|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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 |
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.AbstractDefaultAttributePersonAttributeDao |
|---|
logger |
| Constructor Summary | |
|---|---|
AbstractAggregatingDefaultQueryPersonAttributeDao()
|
|
| Method Summary | |
|---|---|
protected abstract Map |
getAttributesFromDao(Map seed,
boolean isFirstQuery,
IPersonAttributeDao currentlyConsidering,
Map resultAttributes)
Call to execute the appropriate query on the current IPersonAttributeDao. |
IAttributeMerger |
getMerger()
Get the strategy whereby we accumulate attributes. |
List |
getPersonAttributeDaos()
Get an unmodifiable List of delegates which we will poll for attributes. |
Set |
getPossibleUserAttributeNames()
This implementation is not always correct. |
Map |
getUserAttributes(Map seed)
Iterates through the configured List of IPersonAttributeDao
instances. |
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 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, getUserAttributes, setDefaultAttributeName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List personAttributeDaos
protected IAttributeMerger attrMerger
protected boolean recoverExceptions
| Constructor Detail |
|---|
public AbstractAggregatingDefaultQueryPersonAttributeDao()
| Method Detail |
|---|
public final Map getUserAttributes(Map seed)
List of IPersonAttributeDao
instances. The results from each DAO are merged into the result Map
by the configured org.jasig.portal.services.persondir.support.merger.IAttributeMerger.
seed - immutable Map of attributes to values to seed the query
org.jasig.portal.services.persondir.IPersonAttributeDao#getUserAttributes(java.util.Map)
protected abstract Map getAttributesFromDao(Map seed,
boolean isFirstQuery,
IPersonAttributeDao currentlyConsidering,
Map 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 Set getPossibleUserAttributeNames()
org.jasig.portal.services.persondir.IPersonAttributeDao#getPossibleUserAttributeNames()public IAttributeMerger getMerger()
public void setMerger(IAttributeMerger merger)
merger - The attrMerger to set.
IllegalArgumentException - If merger is null.public List getPersonAttributeDaos()
List of delegates which we will poll for attributes.
public void setPersonAttributeDaos(List daos)
List of delegates which we will poll for attributes.
daos - The personAttributeDaos to set.
IllegalArgumentException - If daos is null.public boolean isRecoverExceptions()
public 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 | |||||||||