org.jasig.portal.services.persondir.support
Class AbstractDefaultQueryPersonAttributeDao
java.lang.Object
org.jasig.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao
- All Implemented Interfaces:
- IPersonAttributeDao
- Direct Known Subclasses:
- CachingPersonAttributeDaoImpl, CascadingPersonAttributeDao, EchoPersonAttributeDaoImpl, JdbcPersonAttributeDaoImpl, LdapPersonAttributeDaoImpl, MergingPersonAttributeDaoImpl
public abstract class AbstractDefaultQueryPersonAttributeDao
- extends java.lang.Object
- implements IPersonAttributeDao
Abstract class implementing the IPersonAttributeDao method
IPersonAttributeDao.getUserAttributes(String)
by delegation to
IPersonAttributeDao.getUserAttributes(Map)
using a configurable
default attribute name.
- Since:
- uPortal 2.5
- Version:
- $Revision: 1.9 $ $Date: 2005/04/06 19:13:08 $
- Author:
- Eric Dalquist edalquist@unicon.net
Field Summary |
private java.lang.String |
defaultAttribute
Defaults attribute to use for a simple query |
protected org.apache.commons.logging.Log |
log
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected final org.apache.commons.logging.Log log
defaultAttribute
private java.lang.String defaultAttribute
- Defaults attribute to use for a simple query
AbstractDefaultQueryPersonAttributeDao
public AbstractDefaultQueryPersonAttributeDao()
getUserAttributes
public final java.util.Map getUserAttributes(java.lang.String uid)
- Implements this interface method by creating a seed Map from the
uid argument and delegating to getUserAttributes() on that Map.
Uses
Collections.singletonMap(java.lang.Object, java.lang.Object)
to create a seed with the value rerturned by
getDefaultAttributeName()
as the key and uid
as the value. Returns the result of invoking
IPersonAttributeDao.getUserAttributes(Map)
with the new
Map
as the argument.
- Specified by:
getUserAttributes
in interface IPersonAttributeDao
- Parameters:
uid
- The string to use as the value in the seed
- Returns:
- Map from attribute names to values
- See Also:
IPersonAttributeDao.getUserAttributes(java.lang.String)
getDefaultAttributeName
public final java.lang.String getDefaultAttributeName()
- Returns the attribute set by
setDefaultAttributeName(String)
or
if it has not been called the default value "uid" is returned.
- Returns:
- The default single string query attribute
setDefaultAttributeName
public final void setDefaultAttributeName(java.lang.String name)
- Sets the attribute to use for
getUserAttributes(String)
queries.
It cannot be null
.
- Parameters:
name
- The attribute name to set as default.
- Throws:
java.lang.IllegalArgumentException
- if name
is null
.