org.jasig.services.persondir.support
Class AbstractDefaultAttributePersonAttributeDao

java.lang.Object
  extended by org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
      extended by org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
All Implemented Interfaces:
org.jasig.services.persondir.IPersonAttributeDao
Direct Known Subclasses:
AbstractAggregatingDefaultQueryPersonAttributeDao, AbstractQueryPersonAttributeDao, CachingPersonAttributeDaoImpl, ComplexStubPersonAttributeDao, DeclaredRulePersonAttributeDao, EchoPersonAttributeDaoImpl, RegexGatewayPersonAttributeDao

public abstract class AbstractDefaultAttributePersonAttributeDao
extends AbstractFlatteningPersonAttributeDao

Abstract class implementing the IPersonAttributeDao method IPersonAttributeDao.getUserAttributes(String) and IPersonAttributeDao.getMultivaluedUserAttributes(String) methods by delegation to IPersonAttributeDao.getUserAttributes(Map) or IPersonAttributeDao.getMultivaluedUserAttributes(Map) using a configurable default attribute name.

Configuration:

Property Description Required Default
defaultAttribute The attribute to use for the key in the Map passed to IPersonAttributeDao.getUserAttributes(Map) or IPersonAttributeDao.getMultivaluedUserAttributes(Map) when getMultivaluedUserAttributes(String) is called. The value is the uid passed to the method. No "username"

Since:
uPortal 2.5
Version:
$Revision: 43106 $ $Date: 2008-02-14 11:22:40 -0600 (Thu, 14 Feb 2008) $
Author:
Eric Dalquist

Field Summary
 
Fields inherited from class org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
logger
 
Constructor Summary
AbstractDefaultAttributePersonAttributeDao()
           
 
Method Summary
 String getDefaultAttributeName()
          Returns the attribute set by setDefaultAttributeName(String) or if it has not been called the default value "uid" is returned.
 Map<String,List<Object>> getMultivaluedUserAttributes(String uid)
          Implements this interface method by creating a seed Map from the uid argument and delegating to IPersonAttributeDao.getMultivaluedUserAttributes(Map) using the created seed Map.
 void setDefaultAttributeName(String name)
          Sets the attribute to use for AbstractFlatteningPersonAttributeDao.getUserAttributes(String) queries.
 
Methods inherited from class org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
flattenResults, getUserAttributes, getUserAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jasig.services.persondir.IPersonAttributeDao
getMultivaluedUserAttributes, getPossibleUserAttributeNames
 

Constructor Detail

AbstractDefaultAttributePersonAttributeDao

public AbstractDefaultAttributePersonAttributeDao()
Method Detail

getMultivaluedUserAttributes

public final Map<String,List<Object>> getMultivaluedUserAttributes(String uid)
Implements this interface method by creating a seed Map from the uid argument and delegating to IPersonAttributeDao.getMultivaluedUserAttributes(Map) using the created seed Map.

See Also:
IPersonAttributeDao.getMultivaluedUserAttributes(String)

getDefaultAttributeName

public final 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, will never be null.

setDefaultAttributeName

public final void setDefaultAttributeName(String name)
Sets the attribute to use for AbstractFlatteningPersonAttributeDao.getUserAttributes(String) queries. It cannot be null.

Parameters:
name - The attribute name to set as default.
Throws:
IllegalArgumentException - if name is null.


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