Package com.sas.lsaf.security.user
Class UserDescriptor
- java.lang.Object
-
- com.sas.lsaf.core.AbstractIdentifiable
-
- com.sas.lsaf.security.user.UserDescriptor
-
- All Implemented Interfaces:
Identifiable
,Principal
,java.io.Serializable
- Direct Known Subclasses:
User
public class UserDescriptor extends AbstractIdentifiable implements Principal
Lightweight representation of a user account defined in the system. A User account has a unique user ID that can be used to login and to identify the user in the system.- Since:
- 1.2
- See Also:
User
,UserService
, Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UserDescriptor(java.lang.String id, java.lang.String userId, java.lang.String displayName)
It is not intended or recommended that the consumer of this API construct these objects.UserDescriptor(java.lang.String id, java.lang.String userId, java.lang.String displayName, java.lang.String createdBy, java.util.Date created, java.lang.String lastModifiedBy, java.util.Date lastModified)
It is not intended or recommended that the consumer of this API construct these objects.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.util.Date
getCreated()
Gets the date the user was created.java.lang.String
getCreatedBy()
Gets the user who created the user.java.lang.String
getDisplayName()
Returns the display name for a user account.java.util.Date
getLastModified()
Gets the date on which the user was last modified.java.lang.String
getLastModifiedBy()
Gets the user who last modified the user.java.lang.String
getPrincipalId()
Returns the principal identifier of a user or group.java.lang.String
getPrincipalName()
Returns the principal name of a user or group.java.lang.String
getUserId()
Returns the user identifier for a user account.int
hashCode()
void
setDisplayName(java.lang.String displayName)
Sets the display name for a user account.java.lang.String
toString()
-
Methods inherited from class com.sas.lsaf.core.AbstractIdentifiable
getId, getTypeId
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sas.lsaf.core.Identifiable
getId, getTypeId
-
-
-
-
Constructor Detail
-
UserDescriptor
public UserDescriptor(java.lang.String id, java.lang.String userId, java.lang.String displayName)
It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the user descriptors returned by the API.- Parameters:
id
- the unique identifier of the user account.userId
- the user identifier of the user account.displayName
- the display name of the user account.
-
UserDescriptor
public UserDescriptor(java.lang.String id, java.lang.String userId, java.lang.String displayName, java.lang.String createdBy, java.util.Date created, java.lang.String lastModifiedBy, java.util.Date lastModified)
It is not intended or recommended that the consumer of this API construct these objects. They should only deal with the user descriptors returned by the API.- Parameters:
id
- the unique identifier of the user account.userId
- the user identifier of the user account.displayName
- the display name of the user account.createdBy
- The user who created the user.created
- The date on which the user was created.lastModifiedBy
- The user who last modified the user.lastModified
- The date on which the user was last modified.
-
-
Method Detail
-
getUserId
public java.lang.String getUserId()
Returns the user identifier for a user account. User identifiers are unique for each the user account in the system.- Returns:
- The user identifier for the user account.
-
getDisplayName
public java.lang.String getDisplayName()
Returns the display name for a user account.- Returns:
- The display name for a user account.
-
setDisplayName
public void setDisplayName(java.lang.String displayName)
Sets the display name for a user account.- Parameters:
displayName
- the display name for a user account.
-
getPrincipalId
public java.lang.String getPrincipalId()
Description copied from interface:Principal
Returns the principal identifier of a user or group. This uniquely identifies the principal within the system.- Specified by:
getPrincipalId
in interfacePrincipal
- Returns:
- The principal identifier of a user or group.
-
getPrincipalName
public java.lang.String getPrincipalName()
Description copied from interface:Principal
Returns the principal name of a user or group. This may not uniquely identify the principal and should only be used for display purposes.- Specified by:
getPrincipalName
in interfacePrincipal
- Returns:
- The principal name of a user or group.
-
getCreated
public java.util.Date getCreated()
Gets the date the user was created.- Returns:
- The date the user was created.
-
getCreatedBy
public java.lang.String getCreatedBy()
Gets the user who created the user.- Returns:
- The user who created the user.
-
getLastModified
public java.util.Date getLastModified()
Gets the date on which the user was last modified.- Returns:
- The date on which the user was last modified.
-
getLastModifiedBy
public java.lang.String getLastModifiedBy()
Gets the user who last modified the user.- Returns:
- The user who last modified the user.
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacePrincipal
- Overrides:
hashCode
in classAbstractIdentifiable
-
equals
public boolean equals(java.lang.Object obj)
- Specified by:
equals
in interfacePrincipal
- Overrides:
equals
in classAbstractIdentifiable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAbstractIdentifiable
-
-