org.jasig.portal.portlets.swapper
Class OverwritingPersonAttributeDao

java.lang.Object
  extended by org.jasig.services.persondir.support.BasePersonAttributeDao
      extended by org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
          extended by org.jasig.portal.portlets.swapper.OverwritingPersonAttributeDao
All Implemented Interfaces:
org.jasig.services.persondir.IPersonAttributeDao

public class OverwritingPersonAttributeDao
extends org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao

Provides for overriding certain attributes for certain users. By default uses a concurrent hash map to store the attributes

Version:
$Revision$
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
OverwritingPersonAttributeDao()
           
 
Method Summary
 Map<String,Map<String,List<Object>>> getAttributeOverridesMap()
           
 Set<String> getAvailableQueryAttributes()
           
 org.jasig.services.persondir.IPersonAttributeDao getDelegatePersonAttributeDao()
           
protected  org.jasig.services.persondir.IPersonAttributes getOverriddenPerson(org.jasig.services.persondir.IPersonAttributes person)
          Gets the overridden version of the IPersonAttributes if attribute overrides exist
 Set<org.jasig.services.persondir.IPersonAttributes> getPeopleWithMultivaluedAttributes(Map<String,List<Object>> query)
           
 org.jasig.services.persondir.IPersonAttributes getPerson(String uid)
           
 Set<String> getPossibleUserAttributeNames()
           
 void removeUserAttributeOverride(String uid)
           
 void setAttributeOverridesMap(Map<String,Map<String,List<Object>>> attributeOverridesMap)
           
 void setDelegatePersonAttributeDao(org.jasig.services.persondir.IPersonAttributeDao delegatePersonAttributeDao)
           
 void setUserAttributeOverride(String uid, Map<String,Object> attributes)
           
 
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
 

Constructor Detail

OverwritingPersonAttributeDao

public OverwritingPersonAttributeDao()
Method Detail

getDelegatePersonAttributeDao

public org.jasig.services.persondir.IPersonAttributeDao getDelegatePersonAttributeDao()
Returns:
the delegatePersonAttributeDao

setDelegatePersonAttributeDao

public void setDelegatePersonAttributeDao(org.jasig.services.persondir.IPersonAttributeDao delegatePersonAttributeDao)
Parameters:
delegatePersonAttributeDao - the delegatePersonAttributeDao to set

getAttributeOverridesMap

public Map<String,Map<String,List<Object>>> getAttributeOverridesMap()
Returns:
the attributeOverridesMap

setAttributeOverridesMap

public void setAttributeOverridesMap(Map<String,Map<String,List<Object>>> attributeOverridesMap)
Parameters:
attributeOverridesMap - the attributeOverridesMap to set

setUserAttributeOverride

public void setUserAttributeOverride(String uid,
                                     Map<String,Object> attributes)

removeUserAttributeOverride

public void removeUserAttributeOverride(String uid)

getPerson

public org.jasig.services.persondir.IPersonAttributes getPerson(String uid)

getPeopleWithMultivaluedAttributes

public Set<org.jasig.services.persondir.IPersonAttributes> getPeopleWithMultivaluedAttributes(Map<String,List<Object>> query)

getPossibleUserAttributeNames

public Set<String> getPossibleUserAttributeNames()

getAvailableQueryAttributes

public Set<String> getAvailableQueryAttributes()

getOverriddenPerson

protected org.jasig.services.persondir.IPersonAttributes getOverriddenPerson(org.jasig.services.persondir.IPersonAttributes person)
Gets the overridden version of the IPersonAttributes if attribute overrides exist



Copyright © 2010 Jasig. All Rights Reserved.