org.jasig.services.persondir.support
Class AbstractDefaultAttributePersonAttributeDao

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

public abstract class AbstractDefaultAttributePersonAttributeDao
extends AbstractFlatteningPersonAttributeDao

Abstract class implementing the IPersonAttributeDao method IPersonAttributeDao.getPerson(String) by delegation to IPersonAttributeDao.getPeopleWithMultivaluedAttributes(Map) using a configurable default attribute name. If IPersonAttributeDao.getPeopleWithMultivaluedAttributes(Map) returnes more than one IPersonAttributes is returned IncorrectResultSizeDataAccessException is thrown.

Configuration:

Property Description Required Default
usernameAttributeProvider The provider used to determine the username attribute to use when no attribute is specified in the query. This is primarily used for calls to getPerson(String). No SimpleUsernameAttributeProvider

Since:
uPortal 2.5
Version:
$Revision$ $Date$
Author:
Eric Dalquist

Field Summary
 
Fields inherited from class org.jasig.services.persondir.support.BasePersonAttributeDao
logger
 
Fields inherited from interface org.jasig.services.persondir.IPersonAttributeDao
WILDCARD, WILDCARD_PATTERN
 
Constructor Summary
AbstractDefaultAttributePersonAttributeDao()
           
 
Method Summary
 IPersonAttributes getPerson(String uid)
           
 IUsernameAttributeProvider getUsernameAttributeProvider()
           
 void setUsernameAttributeProvider(IUsernameAttributeProvider usernameAttributeProvider)
          The IUsernameAttributeProvider to use for determining the username attribute to use when none is provided.
protected  Map<String,List<Object>> toSeedMap(String uid)
          Converts the uid to a multi-valued seed Map using the value from #getDefaultAttributeName() as the key.
 
Methods inherited from class org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
getPeople, toMultivaluedSeed
 
Methods inherited from class org.jasig.services.persondir.support.BasePersonAttributeDao
flattenResults, getMultivaluedUserAttributes, getMultivaluedUserAttributes, 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
getAvailableQueryAttributes, getPeopleWithMultivaluedAttributes, getPossibleUserAttributeNames
 

Constructor Detail

AbstractDefaultAttributePersonAttributeDao

public AbstractDefaultAttributePersonAttributeDao()
Method Detail

getPerson

public IPersonAttributes getPerson(String uid)
Throws:
org.springframework.dao.IncorrectResultSizeDataAccessException - if more than one matching IPersonAttributes is found.
See Also:
IPersonAttributeDao.getPerson(java.lang.String)

toSeedMap

protected Map<String,List<Object>> toSeedMap(String uid)
Converts the uid to a multi-valued seed Map using the value from #getDefaultAttributeName() as the key.


getUsernameAttributeProvider

public IUsernameAttributeProvider getUsernameAttributeProvider()

setUsernameAttributeProvider

public void setUsernameAttributeProvider(IUsernameAttributeProvider usernameAttributeProvider)
The IUsernameAttributeProvider to use for determining the username attribute to use when none is provided. The provider is used when calls are made to getPerson(String) to build a query Map and then call IPersonAttributeDao.getPeopleWithMultivaluedAttributes(Map)

Parameters:
usernameAttributeProvider - the usernameAttributeProvider to set


Copyright © 2012 Jasig. All Rights Reserved.