public class AliasedPersona extends java.lang.Object implements Persona, java.io.Serializable
The really important part of this is that getUserAuthority() must return the user authority that actually created this persona so that PersonaAdapter.hasRole() will look up the role in the same namespace from which the persona was created.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CLASS_VERSION |
| Constructor and Description |
|---|
AliasedPersona(java.lang.String pName,
UserAuthority pAuthority,
Persona pPersona)
Creates a new persona that is an alias for another persona.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSubPersona(Persona newSubPersona)
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 the machine-readable name of the persona, useful for
persisting the object.
|
Persona |
getPersona()
Returns the persona that we're an alias for.
|
Persona[] |
getSubPersonae()
Returns a list of sub-personae that compose this persona.
|
UserAuthority |
getUserAuthority()
Returns the authority that manages this persona.
|
int |
hashCode() |
boolean |
hasPersona(Persona persona)
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.
|
void |
removeSubPersona(Persona oldPersona)
Removes a sub-persona.
|
void |
setSubPersonae(Persona[] newSubPersonae)
Changes the list of sub-personae that compose this persona.
|
java.lang.String |
toString() |
static Persona |
unalias(Persona persona)
Returns the root (unaliased) persona for the given persona.
|
public AliasedPersona(java.lang.String pName,
UserAuthority pAuthority,
Persona pPersona)
public Persona getPersona()
public static Persona unalias(Persona persona)
public boolean equals(java.lang.Object object)
Personapublic int hashCode()
hashCode in interface java.security.PrincipalhashCode in class java.lang.Objectpublic java.lang.String toString()
toString in interface java.security.PrincipaltoString in class java.lang.Objectpublic java.lang.String getName()
public UserAuthority getUserAuthority()
getUserAuthority in interface Personapublic boolean hasPersona(Persona persona)
hasPersona in interface Personapublic Persona[] getSubPersonae()
getSubPersonae in interface Personapublic void setSubPersonae(Persona[] newSubPersonae) throws InvalidPersonaException
setSubPersonae in interface PersonaInvalidPersonaExceptionpublic void addSubPersona(Persona newSubPersona) throws InvalidPersonaException
addSubPersona in interface PersonaInvalidPersonaExceptionpublic void removeSubPersona(Persona oldPersona)
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 Persona