com.cumulocity.rest.representation.user
Class CurrentUserRepresentation

java.lang.Object
  extended by com.cumulocity.rest.representation.BaseResourceRepresentation
      extended by com.cumulocity.rest.representation.user.CurrentUserRepresentation
All Implemented Interfaces:
ResourceRepresentation

public class CurrentUserRepresentation
extends BaseResourceRepresentation

This class intentionally is not extending UserRepresentation, although CurrentUser extends User. Current user resource provides information required by client (application) for normal operation. One example is effective list of roles. Without building this list on server side, client would have to explicitly go through associated roles/groups, possibly with pagination operations. It is both difficult, and not possible if ROLE_USER_MANAGEMENT_READ role is not present.


Constructor Summary
CurrentUserRepresentation()
           
 
Method Summary
 List<RoleRepresentation> getEffectiveRoles()
           
 String getEmail()
           
 String getFirstName()
           
 String getId()
           
 String getLastName()
           
 String getPassword()
           
 String getPhone()
           
 String getUserName()
           
 void setEffectiveRoles(List<RoleRepresentation> effectiveRoles)
           
 void setEmail(String email)
           
 void setFirstName(String firstName)
           
 void setId(String id)
           
 void setLastName(String lastName)
           
 void setPassword(String password)
           
 void setPhone(String phone)
           
 void setUserName(String userName)
           
 
Methods inherited from class com.cumulocity.rest.representation.BaseResourceRepresentation
getSelf, setSelf, toJSON, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CurrentUserRepresentation

public CurrentUserRepresentation()
Method Detail

getId

@JSONProperty(ignoreIfNull=true)
public String getId()

getUserName

@JSONProperty(ignoreIfNull=true)
public String getUserName()

setUserName

public void setUserName(String userName)

getPassword

@JSONProperty(ignoreIfNull=true)
public String getPassword()

setPassword

public void setPassword(String password)

getFirstName

@JSONProperty(ignoreIfNull=true)
public String getFirstName()

setFirstName

public void setFirstName(String firstName)

getLastName

@JSONProperty(ignoreIfNull=true)
public String getLastName()

setLastName

public void setLastName(String lastName)

getPhone

@JSONProperty(ignoreIfNull=true)
public String getPhone()

setPhone

public void setPhone(String phone)

getEmail

@JSONProperty(ignoreIfNull=true)
public String getEmail()

setEmail

public void setEmail(String email)

setId

public void setId(String id)

getEffectiveRoles

@JSONProperty(ignoreIfNull=true)
public List<RoleRepresentation> getEffectiveRoles()

setEffectiveRoles

public void setEffectiveRoles(List<RoleRepresentation> effectiveRoles)


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.