public class PersonaAdapter extends java.lang.Object implements Persona, java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
| Constructor and Description |
|---|
PersonaAdapter(java.lang.String pName,
UserAuthority pAuthority)
Creates a new persona with a given name and user authority.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubPersona(Persona pNewPersona)
Adds a new sub-persona.
|
boolean |
equals(java.lang.Object object)
Returns true if this persona is equivalent to another.
|
java.util.Collection |
getAccessRights()
Does actual lookup of sub-persona information.
|
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 a machine-readable name of the access right, useful for
persisting the object.
|
Persona[] |
getSubPersonae()
Returns a list of sub-personae that compose this persona.
|
UserAuthority |
getUserAuthority()
Returns the authority that manages this persona.
|
int |
hashCode()
Returns the hash code of the persona's name.
|
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 is or has a sub-persona with the given
name.
|
boolean |
isReadOnly()
Returns true if this Persona has been marked as read-only.
|
static void |
main(java.lang.String[] args) |
void |
removeSubPersona(Persona pOldPersona)
Removes a sub-persona.
|
void |
setAttribute(java.lang.String pName,
java.lang.Object pValue)
Adds a new attribute to the attribute map.
|
void |
setAttributes(java.util.Map mNewAttributes)
Sets the entire collection of attributes.
|
void |
setReadOnly(boolean b)
If set to true, this Persona becomes immutable.
|
void |
setSubPersonae(Persona[] pNewPersonae)
Changes the list of sub-personae that compose this persona.
|
java.lang.String |
toString() |
public PersonaAdapter(java.lang.String pName,
UserAuthority pAuthority)
public boolean isReadOnly()
public void setReadOnly(boolean b)
public void setAttribute(java.lang.String pName,
java.lang.Object pValue)
public void setAttributes(java.util.Map mNewAttributes)
public java.lang.String toString()
toString in interface java.security.PrincipaltoString in class java.lang.Objectpublic int hashCode()
hashCode in interface java.security.PrincipalhashCode in class java.lang.Objectpublic boolean equals(java.lang.Object object)
public java.lang.String getName()
public UserAuthority getUserAuthority()
getUserAuthority in interface Personapublic boolean hasPersona(Persona pPersona)
hasPersona in interface Personapublic Persona[] getSubPersonae()
getSubPersonae in interface Personapublic void setSubPersonae(Persona[] pNewPersonae) throws InvalidPersonaException
setSubPersonae in interface PersonaInvalidPersonaExceptionpublic void addSubPersona(Persona pNewPersona) throws InvalidPersonaException
addSubPersona in interface PersonaInvalidPersonaExceptionpublic void removeSubPersona(Persona pOldPersona) throws InvalidPersonaException
removeSubPersona in interface PersonaInvalidPersonaExceptionpublic java.lang.Object getAttribute(java.lang.String pAttributeName)
getAttribute in interface PersonaSecurityDomain.createResource(java.lang.Object, java.lang.Object, atg.security.AccessControlEntry[])public boolean hasRole(java.lang.String pRoleName)
public java.util.Collection getAccessRights()
getAccessRights in interface Personapublic static void main(java.lang.String[] args)