atg.security
Class RepositoryApplicationPersona

java.lang.Object
  extended by atg.security.RepositoryApplicationPersona
All Implemented Interfaces:
Persona, java.security.Principal

public class RepositoryApplicationPersona
extends java.lang.Object
implements Persona

This is the Persona implementation that is produced by the RepositoryApplicationUserAuthority.


Field Summary
static java.lang.String CLASS_VERSION
           
 
Constructor Summary
RepositoryApplicationPersona(RepositoryApplicationUserAuthority pUserAuthority, java.lang.String pName, RepositoryItem pItem)
          Constructor
 
Method Summary
 void addSubPersona(Persona pNewSubPersona)
          Adds a new sub-persona.
 boolean equals(java.lang.Object pObject)
          Returns true if this persona is equivalent to another.
 java.util.Collection getAccessRights()
          Access rights not supported by RepositoryApplicationPersona
 java.lang.Object getAttribute(java.lang.String pAttributeName)
          Retrieves the value of a named attribute of the persona's account.
 java.lang.String getName()
          Returns the machine-readable name of the persona, useful for persisting the object.
 java.lang.String getPassword()
          Returns the value of the password property directly from the Repository
 Persona[] getSubPersonae()
          Returns a list of sub-personae that compose this persona.
 UserAuthority getUserAuthority()
          Returns the authority that manages this persona.
 boolean hasPersona(Persona pPersona)
          Returns true if this persona matches or encompasses the indicated persona.
 boolean hasRole(java.lang.String pRoleName)
          Returns true if this persona contains a role with the specified role name.
 void removeSubPersona(Persona pOldPersona)
          Removes a sub-persona.
 void setSubPersonae(Persona[] pNewSubPersonae)
          Changes the list of sub-personae that compose this persona.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
hashCode, toString
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

RepositoryApplicationPersona

public RepositoryApplicationPersona(RepositoryApplicationUserAuthority pUserAuthority,
                                    java.lang.String pName,
                                    RepositoryItem pItem)
Constructor

Method Detail

getPassword

public java.lang.String getPassword()
Returns the value of the password property directly from the Repository


getName

public java.lang.String getName()
Returns the machine-readable name of the persona, useful for persisting the object.

Specified by:
getName in interface Persona
Specified by:
getName in interface java.security.Principal

getUserAuthority

public UserAuthority getUserAuthority()
Returns the authority that manages this persona.

Specified by:
getUserAuthority in interface Persona

equals

public boolean equals(java.lang.Object pObject)
Returns true if this persona is equivalent to another.

Specified by:
equals in interface Persona
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object

hasPersona

public boolean hasPersona(Persona pPersona)
Returns true if this persona matches or encompasses the indicated persona.

Specified by:
hasPersona in interface Persona

getSubPersonae

public Persona[] getSubPersonae()
Returns a list of sub-personae that compose this persona.

Specified by:
getSubPersonae in interface Persona

setSubPersonae

public void setSubPersonae(Persona[] pNewSubPersonae)
                    throws InvalidPersonaException
Changes the list of sub-personae that compose this persona.

Specified by:
setSubPersonae in interface Persona
Throws:
InvalidPersonaException

addSubPersona

public void addSubPersona(Persona pNewSubPersona)
                   throws InvalidPersonaException
Adds a new sub-persona.

Specified by:
addSubPersona in interface Persona
Throws:
InvalidPersonaException

removeSubPersona

public void removeSubPersona(Persona pOldPersona)
                      throws InvalidPersonaException
Removes a sub-persona.

Specified by:
removeSubPersona in interface Persona
Throws:
InvalidPersonaException

getAttribute

public java.lang.Object getAttribute(java.lang.String pAttributeName)
Retrieves the value of a named attribute of the persona's account. This is a general escape hatch for passing information between the account database and the security domain and is primarily used to allow the security domain to determine the default ACL to use when creating secured resources.

Specified by:
getAttribute in interface Persona
See Also:
SecurityDomain.createResource(java.lang.Object, java.lang.Object, atg.security.AccessControlEntry[])

hasRole

public boolean hasRole(java.lang.String pRoleName)
Returns true if this persona contains a role with the specified role name.

Specified by:
hasRole in interface Persona

getAccessRights

public java.util.Collection getAccessRights()
Access rights not supported by RepositoryApplicationPersona

Specified by:
getAccessRights in interface Persona