|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jasig.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao
org.jasig.portal.services.persondir.support.MergingPersonAttributeDaoImpl
public class MergingPersonAttributeDaoImpl
A IPersonAttributeDao
implementation which iterates over children
IPersonAttributeDaos queries each with the same data and merges their
reported attributes in a configurable way. The default merger is
MultivaluedAttributeMerger
.
Field Summary | |
---|---|
private IAttributeMerger |
attrMerger
Strategy for merging together the results from successive PersonAttributeDaos. |
private java.util.List |
personAttributeDaos
A List of child IPersonAttributeDao instances which we will poll in order. |
private boolean |
recoverExceptions
True if we should catch, log, and ignore Throwables propogated by individual DAOs. |
Fields inherited from class org.jasig.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao |
---|
log |
Constructor Summary | |
---|---|
MergingPersonAttributeDaoImpl()
|
Method Summary | |
---|---|
IAttributeMerger |
getMerger()
Get the strategy whereby we accumulate attributes. |
java.util.List |
getPersonAttributeDaos()
Get the List of delegates which we will poll for attributes. |
java.util.Set |
getPossibleUserAttributeNames()
This implementation is not always correct. |
java.util.Map |
getUserAttributes(java.util.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(java.util.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.portal.services.persondir.support.AbstractDefaultQueryPersonAttributeDao |
---|
getDefaultAttributeName, getUserAttributes, setDefaultAttributeName |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.List personAttributeDaos
private IAttributeMerger attrMerger
private boolean recoverExceptions
Constructor Detail |
---|
public MergingPersonAttributeDaoImpl()
Method Detail |
---|
public java.util.Map getUserAttributes(java.util.Map seed)
List
of IPersonAttributeDao
instances. The results from each DAO are merged into the result Map
by the configured IAttributeMerger
.
seed
- immutable Map of attributes to values to seed the query
IPersonAttributeDao.getUserAttributes(java.util.Map)
public java.util.Set getPossibleUserAttributeNames()
IPersonAttributeDao.getPossibleUserAttributeNames()
public IAttributeMerger getMerger()
public void setMerger(IAttributeMerger merger)
merger
- The attrMerger to set.
java.lang.IllegalArgumentException
- If merger is null
.public java.util.List getPersonAttributeDaos()
List
of delegates which we will poll for attributes.
public void setPersonAttributeDaos(java.util.List daos)
List
of delegates which we will poll for attributes.
daos
- The personAttributeDaos to set.
java.lang.IllegalArgumentException
- If daos is null
.public boolean isRecoverExceptions()
public void setRecoverExceptions(boolean recover)
recover
- The recoverExceptions to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |