org.jasig.services.persondir.support
Class StubPersonAttributeDao

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.StubPersonAttributeDao
All Implemented Interfaces:
IPersonAttributeDao

public class StubPersonAttributeDao
extends AbstractFlatteningPersonAttributeDao

A stub IPersonAttributeDao to be used for testing. Backed by a single Map which this implementation will always return.

Configuration:

Property Description Required Default
backingMap This Map will always be returned for any query. No null

Since:
uPortal 2.5
Version:
$Revision$ $Date$
Author:
andrew.petro@yale.edu

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
StubPersonAttributeDao()
           
StubPersonAttributeDao(Map<String,List<Object>> backingMap)
           
 
Method Summary
 Set<String> getAvailableQueryAttributes()
           
 Map<String,List<Object>> getBackingMap()
          Get the Map which this stub object will return for all legal invocations of attributesForUser()
 Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(Map<String,List<Object>> query)
           
 IPersonAttributes getPerson(String uid)
           
 Set<String> getPossibleUserAttributeNames()
           
 void setBackingMap(Map<String,List<Object>> backingMap)
          Set the Map which this stub object will return for all legal invocations of attributesForUser().
 
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

StubPersonAttributeDao

public StubPersonAttributeDao()

StubPersonAttributeDao

public StubPersonAttributeDao(Map<String,List<Object>> backingMap)
Method Detail

getPossibleUserAttributeNames

public Set<String> getPossibleUserAttributeNames()

getAvailableQueryAttributes

public Set<String> getAvailableQueryAttributes()

getPeopleWithMultivaluedAttributes

public Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(Map<String,List<Object>> query)

getPerson

public IPersonAttributes getPerson(String uid)

getBackingMap

public Map<String,List<Object>> getBackingMap()
Get the Map which this stub object will return for all legal invocations of attributesForUser()

Returns:
Returns the backingMap.

setBackingMap

public void setBackingMap(Map<String,List<Object>> backingMap)
Set the Map which this stub object will return for all legal invocations of attributesForUser().

Parameters:
backingMap - The backingMap to set, may not be null.


Copyright © 2012 Jasig. All Rights Reserved.