org.jasig.services.persondir.support
Class AdditionalDescriptors

java.lang.Object
  extended by org.jasig.services.persondir.support.AdditionalDescriptors
All Implemented Interfaces:
Serializable, Principal, IPersonAttributes, IAdditionalDescriptors

public class AdditionalDescriptors
extends Object
implements IAdditionalDescriptors

Implementation of IPersonAttributes for use with AdditionalDescriptorsPersonAttributeDao. Unlike most other implementations, AdditionalDescriptors is mutable. An instance of this class typically lives for the duration of a session or application, and external components are expected to add attributes to the collection after creation.

Author:
awills
See Also:
Serialized Form

Constructor Summary
AdditionalDescriptors()
           
 
Method Summary
 void addAttributes(Map<String,List<Object>> attributes)
           
 boolean equals(Object object)
           
 Map<String,List<Object>> getAttributes()
           
 Object getAttributeValue(String name)
           
 List<Object> getAttributeValues(String name)
           
 String getName()
           
 int hashCode()
           
 List<Object> removeAttribute(String name)
           
 void setAttributes(Map<String,List<Object>> attributes)
          This should be atomic to the view of other methods on this interface.
 List<Object> setAttributeValues(String name, List<Object> values)
          Sets the specified attribute values
 void setName(String name)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AdditionalDescriptors

public AdditionalDescriptors()
Method Detail

getAttributeValue

public Object getAttributeValue(String name)
Specified by:
getAttributeValue in interface IPersonAttributes

getAttributeValues

public List<Object> getAttributeValues(String name)
Specified by:
getAttributeValues in interface IPersonAttributes

getAttributes

public Map<String,List<Object>> getAttributes()
Specified by:
getAttributes in interface IPersonAttributes

getName

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

setName

public void setName(String name)
Specified by:
setName in interface IAdditionalDescriptors
Parameters:
name - The user name for the attributes

addAttributes

public void addAttributes(Map<String,List<Object>> attributes)
Specified by:
addAttributes in interface IAdditionalDescriptors
Parameters:
attributes - Attributes to add to the existing attribute Map

setAttributes

public void setAttributes(Map<String,List<Object>> attributes)
Description copied from interface: IAdditionalDescriptors
This should be atomic to the view of other methods on this interface.

Specified by:
setAttributes in interface IAdditionalDescriptors
Parameters:
attributes - Replace all existing attributes witht he specified Map

setAttributeValues

public List<Object> setAttributeValues(String name,
                                       List<Object> values)
Description copied from interface: IAdditionalDescriptors
Sets the specified attribute values

Specified by:
setAttributeValues in interface IAdditionalDescriptors
Parameters:
name - Name of the attribute, must not be null
values - Values for the attribute, may be null
Returns:
The previous values for the attribute if they existed

removeAttribute

public List<Object> removeAttribute(String name)
Specified by:
removeAttribute in interface IAdditionalDescriptors
Parameters:
name - Removes the specified attribute, must not be null
Returns:
The removed values for the attribute if they existed

equals

public boolean equals(Object object)
Specified by:
equals in interface Principal
Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Specified by:
hashCode in interface Principal
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Specified by:
toString in interface Principal
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2012 Jasig. All Rights Reserved.