org.jasig.services.persondir.support
Class MediatingAdditionalDescriptors
java.lang.Object
org.jasig.services.persondir.support.MediatingAdditionalDescriptors
- All Implemented Interfaces:
- Serializable, Principal, IPersonAttributes, IAdditionalDescriptors
public class MediatingAdditionalDescriptors
- extends Object
- implements IAdditionalDescriptors
Uses a List of IAdditionalDescriptors objects to delegate method calls to. For set/add/remove
operations all delegates are called. For get operations the first delegate to return a non-null/empty
result is used.
- Version:
- $Revision$
- Author:
- Eric Dalquist
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MediatingAdditionalDescriptors
public MediatingAdditionalDescriptors()
setDelegateDescriptors
public void setDelegateDescriptors(List<IAdditionalDescriptors> delegateDescriptors)
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
removeAttribute
public List<Object> removeAttribute(String name)
- Returns list of all removed values
- 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
- See Also:
IAdditionalDescriptors.removeAttribute(java.lang.String)
setAttributeValues
public List<Object> setAttributeValues(String name,
List<Object> values)
- Returns list of all replaced values
- Specified by:
setAttributeValues in interface IAdditionalDescriptors
- Parameters:
name - Name of the attribute, must not be nullvalues - Values for the attribute, may be null
- Returns:
- The previous values for the attribute if they existed
- See Also:
IAdditionalDescriptors.setAttributeValues(java.lang.String, java.util.List)
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
setName
public void setName(String name)
- Specified by:
setName in interface IAdditionalDescriptors
- Parameters:
name - The user name for the attributes
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
Copyright © 2012 Jasig. All Rights Reserved.