public class User
extends java.lang.Object
implements java.io.Serializable
UserAuthority
,
Persona
,
Serialized FormModifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
Constructor and Description |
---|
User() |
Modifier and Type | Method and Description |
---|---|
void |
addPersona(Persona pNewPersona)
Adds a new persona that has been granted to the user.
|
void |
destroy()
Destroys a user object.
|
java.lang.Object |
doAs(Action pAction)
Performs the specified action as this user.
|
java.util.Collection |
getAccessRights()
Returns true if this user has the indicated access right, either actual
or implied.
|
Persona[] |
getPersonae()
Returns the set of personae granted to the user by various
authorities.
|
Persona[] |
getPersonae(UserAuthority pUserAuthority)
Returns the set of personae granted to the user that were granted
by the indicated authority.
|
Persona |
getPrimaryPersona(UserAuthority pAuthority)
Returns the primary persona for the user in a given user authority.
|
UserAuthority[] |
getUserAuthorities()
Returns the list of UserAuthorities associated with this User
|
boolean |
hasAccessRight(AccessRight pAccessRight)
Returns true if this user has the indicated access right, either actual
or implied.
|
boolean |
hasPersona(Persona pPersona)
Returns true if this user has the indicated persona, either actual
or implied.
|
boolean |
hasRole(java.lang.String pRoleId,
UserAuthority pAuthority)
Returns true if the user has the given Role ID within the given
UserAuthority (security technology domain).
|
boolean |
hasUserAuthority(UserAuthority pAuthority)
Returns true if the indicated user authority is managing personae
for this user.
|
void |
removePersona(Persona pOldPersona)
Removes a persona that has been granted to the user.
|
void |
setPersonae(UserAuthority pUserAuthority,
Persona[] pNewPersonae)
Changes the set of personae assigned by a user authority.
|
java.lang.String |
toString() |
public boolean hasUserAuthority(UserAuthority pAuthority)
public boolean hasPersona(Persona pPersona)
public boolean hasAccessRight(AccessRight pAccessRight)
public java.util.Collection getAccessRights()
public Persona getPrimaryPersona(UserAuthority pAuthority)
public Persona[] getPersonae()
public Persona[] getPersonae(UserAuthority pUserAuthority)
public void addPersona(Persona pNewPersona)
public void removePersona(Persona pOldPersona)
public void setPersonae(UserAuthority pUserAuthority, Persona[] pNewPersonae) throws InvalidPersonaException
InvalidPersonaException
public java.lang.Object doAs(Action pAction) throws java.lang.Exception
java.lang.Exception
ThreadSecurityManager.doAs(atg.security.User, atg.security.Action)
,
Action.run()
public void destroy()
public boolean hasRole(java.lang.String pRoleId, UserAuthority pAuthority)
pRoleId
- - the Role ID searched onpAuthority
- - the UserAuthority objectpublic java.lang.String toString()
toString
in class java.lang.Object
public UserAuthority[] getUserAuthorities()