org.jasig.portal.security.provider
Class RestrictedPerson

java.lang.Object
  extended by org.jasig.portal.security.provider.RestrictedPerson
All Implemented Interfaces:
Serializable, Principal, IBasicEntity, IAdditionalDescriptor, IPerson

public class RestrictedPerson
extends Object
implements IPerson

An IPerson object that wraps another IPerson object and prevents access to the underlying sercurity context.

Version:
$Revision: 19776 $
Author:
Ken Weiner, kweiner@unicon.net
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.jasig.portal.security.IPerson
GUEST_ID, SYSTEM_USER_ID, UNDEFINED_ID, USERNAME
 
Constructor Summary
RestrictedPerson(IPerson person)
           
 
Method Summary
 Object getAttribute(String key)
          Gets an attribute associated with the user
 Enumeration<String> getAttributeNames()
          Returns the names of all of the attributes stored for the user
 Enumeration<List<Object>> getAttributes()
          Gets all of the attributes associated with the user
 Object[] getAttributeValues(String key)
          Gets multiple values of an attribute associated with the user
 EntityIdentifier getEntityIdentifier()
           
 String getFullName()
          Gets the full name of the user
 int getID()
          Gets the ID of the user
 String getName()
           
 ISecurityContext getSecurityContext()
          RestrictedPerson's implementation of getSecurityContext prevents access to the security context by always returning null.
 String getUserName()
           
 boolean isGuest()
          Checks to see if this user is considered a guest
 void setAttribute(String key, List<Object> values)
           
 void setAttribute(String key, Object value)
          Associates an attribute with the user
 void setAttributes(Map<String,List<Object>> attrs)
          Associates attributes with the user
 void setEntityIdentifier(EntityIdentifier ei)
          Explicitly set the entity identifier The default implementation enforces a one time setting so that the value can't be changed once explicitly set.
 void setFullName(String sFullName)
          Sets the full name of the user
 void setID(int sID)
          Sets the ID of the user
 void setSecurityContext(ISecurityContext securityContext)
          RestrictedPerson's implementation of setSecurityContext does nothing.
 void setUserName(String userName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, hashCode, toString
 

Constructor Detail

RestrictedPerson

public RestrictedPerson(IPerson person)
Method Detail

getAttribute

public Object getAttribute(String key)
Description copied from interface: IPerson
Gets an attribute associated with the user

Specified by:
getAttribute in interface IPerson
Returns:
attribute associated with the user

getAttributeValues

public Object[] getAttributeValues(String key)
Description copied from interface: IPerson
Gets multiple values of an attribute associated with the user

Specified by:
getAttributeValues in interface IPerson
Returns:
attributes associated with the user

getAttributeNames

public Enumeration<String> getAttributeNames()
Description copied from interface: IPerson
Returns the names of all of the attributes stored for the user

Specified by:
getAttributeNames in interface IPerson
Returns:
names of all of the attributes stored for the user

getAttributes

public Enumeration<List<Object>> getAttributes()
Description copied from interface: IPerson
Gets all of the attributes associated with the user

Specified by:
getAttributes in interface IPerson
Returns:
all of the attributes associated with the user

getFullName

public String getFullName()
Description copied from interface: IPerson
Gets the full name of the user

Specified by:
getFullName in interface IPerson
Returns:
full name of the user

getID

public int getID()
Description copied from interface: IPerson
Gets the ID of the user

Specified by:
getID in interface IPerson
Returns:
ID of the user

getUserName

public String getUserName()
Specified by:
getUserName in interface IPerson
Returns:
The userName for the user.

setUserName

public void setUserName(String userName)
Specified by:
setUserName in interface IPerson
Parameters:
userName - The userName to set for the user.

isGuest

public boolean isGuest()
Description copied from interface: IPerson
Checks to see if this user is considered a guest

Specified by:
isGuest in interface IPerson
Returns:
true if user is considered a guest

setAttribute

public void setAttribute(String key,
                         Object value)
Description copied from interface: IPerson
Associates an attribute with the user

Specified by:
setAttribute in interface IPerson

setAttribute

public void setAttribute(String key,
                         List<Object> values)
Specified by:
setAttribute in interface IPerson

setAttributes

public void setAttributes(Map<String,List<Object>> attrs)
Description copied from interface: IPerson
Associates attributes with the user

Specified by:
setAttributes in interface IPerson

setFullName

public void setFullName(String sFullName)
Description copied from interface: IPerson
Sets the full name of the user

Specified by:
setFullName in interface IPerson

setID

public void setID(int sID)
Description copied from interface: IPerson
Sets the ID of the user

Specified by:
setID in interface IPerson

getSecurityContext

public ISecurityContext getSecurityContext()
RestrictedPerson's implementation of getSecurityContext prevents access to the security context by always returning null.

Specified by:
getSecurityContext in interface IPerson
Returns:
null

setSecurityContext

public void setSecurityContext(ISecurityContext securityContext)
RestrictedPerson's implementation of setSecurityContext does nothing.

Specified by:
setSecurityContext in interface IPerson

getEntityIdentifier

public EntityIdentifier getEntityIdentifier()
Specified by:
getEntityIdentifier in interface IBasicEntity
Returns:
EntityIdentifier

setEntityIdentifier

public void setEntityIdentifier(EntityIdentifier ei)
Description copied from interface: IPerson
Explicitly set the entity identifier The default implementation enforces a one time setting so that the value can't be changed once explicitly set.

Specified by:
setEntityIdentifier in interface IPerson

getName

public String getName()
Specified by:
getName in interface Principal


Copyright © 2010 Jasig. All Rights Reserved.