public interface Persona
extends java.security.Principal
The Persona interface is a superset of the standard J2EE Principal interface, and implements the Principle interface for interoperability.
User
,
UserAuthority
,
AccessControlEntry
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION |
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()
Returns the access rights associated with the principal
|
java.lang.Object |
getAttribute(java.lang.String attributeName)
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[] |
getSubPersonae()
Returns a list of sub-personae that compose this persona.
|
UserAuthority |
getUserAuthority()
Returns the authority that manages this persona.
|
boolean |
hasPersona(Persona persona)
Returns true if this persona matches or encompasses the indicated
persona.
|
boolean |
hasRole(java.lang.String roleName)
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.
|
static final java.lang.String CLASS_VERSION
java.lang.String getName()
getName
in interface java.security.Principal
UserAuthority getUserAuthority()
boolean equals(java.lang.Object object)
equals
in interface java.security.Principal
equals
in class java.lang.Object
boolean hasPersona(Persona persona)
Persona[] getSubPersonae()
void setSubPersonae(Persona[] newSubPersonae) throws InvalidPersonaException
InvalidPersonaException
void addSubPersona(Persona newSubPersona) throws InvalidPersonaException
InvalidPersonaException
void removeSubPersona(Persona oldPersona) throws InvalidPersonaException
InvalidPersonaException
java.lang.Object getAttribute(java.lang.String attributeName)
boolean hasRole(java.lang.String roleName)
java.util.Collection getAccessRights()