|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.security.AliasedPersona
public class AliasedPersona
A persona that wraps another persona. This is typically used by a user authority that is acting as a proxy for another user authority, providing a special namespace, e.g. atg.userdirectory.UserDirectoryLoginUserAuthority.
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.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
Constructor Summary | |
---|---|
AliasedPersona(java.lang.String pName,
UserAuthority pAuthority,
Persona pPersona)
Creates a new persona that is an alias for another persona. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Constructor Detail |
---|
public AliasedPersona(java.lang.String pName, UserAuthority pAuthority, Persona pPersona)
Method Detail |
---|
public Persona getPersona()
public static Persona unalias(Persona persona)
public boolean equals(java.lang.Object object)
Persona
equals
in interface Persona
equals
in interface java.security.Principal
equals
in class java.lang.Object
public int hashCode()
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in interface java.security.Principal
toString
in class java.lang.Object
public java.lang.String getName()
getName
in interface Persona
getName
in interface java.security.Principal
public UserAuthority getUserAuthority()
getUserAuthority
in interface Persona
public boolean hasPersona(Persona persona)
hasPersona
in interface Persona
public Persona[] getSubPersonae()
getSubPersonae
in interface Persona
public void setSubPersonae(Persona[] newSubPersonae) throws InvalidPersonaException
setSubPersonae
in interface Persona
InvalidPersonaException
public void addSubPersona(Persona newSubPersona) throws InvalidPersonaException
addSubPersona
in interface Persona
InvalidPersonaException
public void removeSubPersona(Persona oldPersona)
removeSubPersona
in interface Persona
InvalidPersonaException
public java.lang.Object getAttribute(java.lang.String pAttributeName)
getAttribute
in interface Persona
SecurityDomain.createResource(java.lang.Object, java.lang.Object, atg.security.AccessControlEntry[])
public boolean hasRole(java.lang.String pRoleName)
hasRole
in interface Persona
public java.util.Collection getAccessRights()
getAccessRights
in interface Persona
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |