org.jasig.services.persondir.support
Class ComplexStubPersonAttributeDao
java.lang.Object
org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
org.jasig.services.persondir.support.ComplexStubPersonAttributeDao
- All Implemented Interfaces:
- IPersonAttributeDao
public class ComplexStubPersonAttributeDao
- extends AbstractDefaultAttributePersonAttributeDao
Looks up the user's attribute Map in the backingMap. If using the IPersonAttributeDao.getUserAttributes(Map)
method the attribute value returned for the key AbstractDefaultAttributePersonAttributeDao.getDefaultAttributeName() will
be used as the key for the backingMap.
Configuration:
- Version:
- $Revision: 2892 $ $Date: 2006-12-19 13:25:03 -0600 (Tue, 19 Dec 2006) $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ComplexStubPersonAttributeDao
public ComplexStubPersonAttributeDao()
- Creates a new, empty, dao.
ComplexStubPersonAttributeDao
public ComplexStubPersonAttributeDao(Map backingMap)
- Creates a new DAO with the specified backing map.
- Parameters:
backingMap - The backingMap to call setBackingMap(Map) with.
getBackingMap
public Map getBackingMap()
- Returns:
- Returns the backingMap.
setBackingMap
public void setBackingMap(Map backingMap)
- Parameters:
backingMap - The backingMap to set.
getPossibleUserAttributeNames
public Set getPossibleUserAttributeNames()
- Description copied from interface:
IPersonAttributeDao
- Gets a
Set of attribute names that may be returned by the
IPersonAttributeDao.getUserAttributes(Map). The names returned represent all
possible names IPersonAttributeDao.getUserAttributes(Map) could return. If the
dao doesn't have a way to know all possible attribute names this
method should return null.
Returns an immutable Set.
- Returns:
- A {link Set} of possible attribute names for user queries.
getUserAttributes
public Map getUserAttributes(Map seed)
- Description copied from interface:
IPersonAttributeDao
- Obtains a mutable
Map from attribute names to values for
the given query seed which is an immutable Map. The values may be mutable objects but it is
recommended that they be immutable.
For the returned Map; Keys must be String, Values
can be any Object, they are typically Strings.
Values may also be multi-valued, in this case they are of type
List and the list contents are the values of the
attribute.
This method returns according to the following rules:
- If the user exists and has attributes a populated
Map is returned.
- If the user exists and has no attributes an empty
Map is returned.
- If the user doesn't exist
null is returned.
- If an error occurs while getting the attributes the appropriate exception will be propagated.
Unless otherwise specified by an implementation the returned Map
will not be a union of the seed and query results. If your are given a
Map that includes the attribute "phone" and value "555-1212" and
the returned Map contains the attribute "phone" with the value
"555-1212", this means that your implementation also believes that the
"phone" attribute should have this value.
- Parameters:
seed - immutable Map of attributes to values to seed the query
- Returns:
- Map from attribute names to values
Copyright © 1998-2007 Java Architectures Special Interest Group. All Rights Reserved.