Class CurrentUserRepresentation
- java.lang.Object
-
- com.cumulocity.rest.representation.BaseResourceRepresentation
-
- com.cumulocity.rest.representation.AbstractExtensibleRepresentation
-
- com.cumulocity.rest.representation.user.CurrentUserRepresentation
-
- All Implemented Interfaces:
ResourceRepresentation
,org.svenson.DynamicProperties
public class CurrentUserRepresentation extends AbstractExtensibleRepresentation
This class intentionally is not extendingUserRepresentation
. 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
Constructors Constructor Description CurrentUserRepresentation()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<RoleRepresentation>
getEffectiveRoles()
String
getEmail()
String
getFirstName()
String
getId()
String
getLastName()
Date
getLastPasswordChange()
Deprecated.org.joda.time.DateTime
getLastPasswordChangeDateTime()
String
getPassword()
String
getPhone()
Boolean
getShouldResetPassword()
String
getUserName()
void
setEffectiveRoles(List<RoleRepresentation> effectiveRoles)
void
setEmail(String email)
void
setFirstName(String firstName)
void
setId(String id)
void
setLastName(String lastName)
void
setLastPasswordChange(Date lastPasswordChange)
Deprecated.void
setLastPasswordChangeDateTime(org.joda.time.DateTime lastPasswordChange)
void
setPassword(String password)
void
setPhone(String phone)
void
setShouldResetPassword(Boolean shouldResetPassword)
void
setUserName(String userName)
-
Methods inherited from class com.cumulocity.rest.representation.AbstractExtensibleRepresentation
get, get, getAttrs, getProperty, hasProperty, propertyNames, removeProperty, set, set, set, setAttrs, setProperty
-
Methods inherited from class com.cumulocity.rest.representation.BaseResourceRepresentation
getSelf, getSelfDecoded, setSelf, toJSON, toString
-
-
-
-
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) @JSONTypeHint(RoleRepresentation.class) public List<RoleRepresentation> getEffectiveRoles()
-
setEffectiveRoles
public void setEffectiveRoles(List<RoleRepresentation> effectiveRoles)
-
getShouldResetPassword
@JSONProperty(ignoreIfNull=true) public Boolean getShouldResetPassword()
-
setShouldResetPassword
public void setShouldResetPassword(Boolean shouldResetPassword)
-
getLastPasswordChange
@JSONProperty(value="deprecated_LastPasswordChange", ignore=true) @Deprecated public Date getLastPasswordChange()
Deprecated.
-
setLastPasswordChange
@Deprecated public void setLastPasswordChange(Date lastPasswordChange)
Deprecated.
-
getLastPasswordChangeDateTime
@JSONProperty(value="lastPasswordChange", ignoreIfNull=true) @JSONConverter(type=DateTimeConverter.class) public org.joda.time.DateTime getLastPasswordChangeDateTime()
-
setLastPasswordChangeDateTime
public void setLastPasswordChangeDateTime(org.joda.time.DateTime lastPasswordChange)
-
-