org.jasig.services.persondir
Interface IPersonAttributes

All Superinterfaces:
Principal, Serializable

public interface IPersonAttributes
extends Principal, Serializable

An immutable representation of a person with a uid (userName) and attributes. A user's attributes can be of any type and can be multi-valued. Principal.getName() is used for the uid (userName). The equality and hashCode of an IPersonAttributes should ONLY include the name property and none of the attributes.

Version:
$Revision$
Author:
Eric Dalquist

Method Summary
 Map<String,List<Object>> getAttributes()
           
 Object getAttributeValue(String name)
          The value for the attribute, null if no value exists or the first value is null, if there are multiple values the first is returned.
 List<Object> getAttributeValues(String name)
          All values of the attribute, null if no values exist.
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Method Detail

getAttributes

Map<String,List<Object>> getAttributes()
Returns:
The immutable Map of all attributes for the person.

getAttributeValue

Object getAttributeValue(String name)
The value for the attribute, null if no value exists or the first value is null, if there are multiple values the first is returned.

Parameters:
name - The name of the attribute to get the value for
Returns:
The first value for the attribute

getAttributeValues

List<Object> getAttributeValues(String name)
All values of the attribute, null if no values exist.

Parameters:
name - The name of the attribute to get the values for
Returns:
All values for the attribute


Copyright © 1998-2009 Java Architectures Special Interest Group. All Rights Reserved.