|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao
org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
org.jasig.services.persondir.support.AbstractAggregatingDefaultQueryPersonAttributeDao
public abstract class AbstractAggregatingDefaultQueryPersonAttributeDao
Provides a base set of implementations and properties for IPersonAttributeDao
implementations that aggregate results from a sub List of IPersonAttributeDaos.
Configuration:
| Property | Description | Required | Default |
|---|---|---|---|
| personAttributeDaos |
A List of IPersonAttributeDaos to aggregate attributes from.
|
Yes | null |
| attrMerger |
A IAttributeMerger strategy to use for merging the attributes from
the List of IPersonAttributeDaos.
|
No | MultivaluedAttributeMerger |
| recoverExceptions |
Sets the action to be taken if one of the IPersonAttributeDaos in the
List fails with a RuntimeException. If set to true a warn level
log message and stack trace will be logged. If set to false an error level
message and stack trace will be logged and the exception will re-thrown.
|
No | true |
| Field Summary | |
|---|---|
protected IAttributeMerger |
attrMerger
Strategy for merging together the results from successive PersonAttributeDaos. |
protected List<org.jasig.services.persondir.IPersonAttributeDao> |
personAttributeDaos
A List of child IPersonAttributeDao instances which we will poll in order. |
protected boolean |
recoverExceptions
True if we should catch, logger, and ignore Throwables propogated by individual DAOs. |
| Fields inherited from class org.jasig.services.persondir.support.AbstractFlatteningPersonAttributeDao |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractAggregatingDefaultQueryPersonAttributeDao()
|
|
| Method Summary | |
|---|---|
protected abstract Map<String,List<Object>> |
getAttributesFromDao(Map<String,List<Object>> seed,
boolean isFirstQuery,
org.jasig.services.persondir.IPersonAttributeDao currentlyConsidering,
Map<String,List<Object>> resultAttributes)
Call to execute the appropriate query on the current IPersonAttributeDao. |
IAttributeMerger |
getMerger()
Get the strategy whereby we accumulate attributes. |
Map<String,List<Object>> |
getMultivaluedUserAttributes(Map<String,List<Object>> seed)
Iterates through the configured List of IPersonAttributeDao
instances. |
List<org.jasig.services.persondir.IPersonAttributeDao> |
getPersonAttributeDaos()
Get an unmodifiable List of delegates which we will poll for attributes. |
Set<String> |
getPossibleUserAttributeNames()
This implementation is not always correct. |
boolean |
isRecoverExceptions()
True if this class will catch exceptions thrown by its delegate DAOs and fail to propogate them. |
void |
setMerger(IAttributeMerger merger)
Set the strategy whereby we accumulate attributes from the results of polling our delegates. |
void |
setPersonAttributeDaos(List<org.jasig.services.persondir.IPersonAttributeDao> daos)
Set the List of delegates which we will poll for attributes. |
void |
setRecoverExceptions(boolean recover)
Set to true if you would like this class to swallow RuntimeExceptions thrown by its delegates. |
| Methods inherited from class org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao |
|---|
getDefaultAttributeName, getMultivaluedUserAttributes, setDefaultAttributeName |
| 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 |
| Field Detail |
|---|
protected List<org.jasig.services.persondir.IPersonAttributeDao> personAttributeDaos
protected IAttributeMerger attrMerger
protected boolean recoverExceptions
| Constructor Detail |
|---|
public AbstractAggregatingDefaultQueryPersonAttributeDao()
| Method Detail |
|---|
public final Map<String,List<Object>> getMultivaluedUserAttributes(Map<String,List<Object>> seed)
List of IPersonAttributeDao
instances. The results from each DAO are merged into the result Map
by the configured IAttributeMerger.
IPersonAttributeDao.getMultivaluedUserAttributes(Map)
protected abstract Map<String,List<Object>> getAttributesFromDao(Map<String,List<Object>> seed,
boolean isFirstQuery,
org.jasig.services.persondir.IPersonAttributeDao currentlyConsidering,
Map<String,List<Object>> resultAttributes)
IPersonAttributeDao. Provides extra information
beyond the seed for the state of the query chain and previous results.
seed - The seed for the original query.isFirstQuery - If this is the first query, this will stay true until a call to this method returns (does not throw an exception).currentlyConsidering - The IPersonAttributeDao to execute the query on.resultAttributes - The Map of results from all previous queries, may be null.
IPersonAttributeDao.getUserAttributes(Map).public final Set<String> getPossibleUserAttributeNames()
IPersonAttributeDao.getPossibleUserAttributeNames()public final IAttributeMerger getMerger()
public final void setMerger(IAttributeMerger merger)
merger - The attrMerger to set.
IllegalArgumentException - If merger is null.public final List<org.jasig.services.persondir.IPersonAttributeDao> getPersonAttributeDaos()
List of delegates which we will poll for attributes.
public final void setPersonAttributeDaos(List<org.jasig.services.persondir.IPersonAttributeDao> daos)
List of delegates which we will poll for attributes.
daos - The personAttributeDaos to set.
IllegalArgumentException - If daos is null.public final boolean isRecoverExceptions()
public final void setRecoverExceptions(boolean recover)
recover - whether you would like exceptions recovered internally
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||