org.jasig.services.persondir.support.rule
Class DeclaredRulePersonAttributeDao

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.AbstractDefaultAttributePersonAttributeDao
              extended by org.jasig.services.persondir.support.rule.DeclaredRulePersonAttributeDao
All Implemented Interfaces:
IPersonAttributeDao

public final class DeclaredRulePersonAttributeDao
extends AbstractDefaultAttributePersonAttributeDao

Implementation of uPortal's IPersonAttributeDao that evaluates person directory information based on configurable rules. You may chain as many rules as you like, but this DAO will apply at most one rule, the first that triggers.

Configuration:

Property Description Required Default
rules The array of AttributeRules to use when Yes null


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
DeclaredRulePersonAttributeDao(String attributeName, List<AttributeRule> rules)
          Creates a new DeclaredRulePersonAttributeDao specifying the attributeName to pass to #setDefaultAttributeName(String) and the List of AttributeRules to pass to setRules(List)
 
Method Summary
 Set<String> getAvailableQueryAttributes()
           
 Set<IPersonAttributes> getPeopleWithMultivaluedAttributes(Map<String,List<Object>> seed)
           
 Set<String> getPossibleUserAttributeNames()
          Aggregates the results of calling AttributeRule.getPossibleUserAttributeNames() on each AttributeRule instance in the rules array.
 List<AttributeRule> getRules()
           
 void setRules(List<AttributeRule> rules)
           
 
Methods inherited from class org.jasig.services.persondir.support.AbstractDefaultAttributePersonAttributeDao
getPerson, getUsernameAttributeProvider, setUsernameAttributeProvider, toSeedMap
 
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

DeclaredRulePersonAttributeDao

public DeclaredRulePersonAttributeDao(String attributeName,
                                      List<AttributeRule> rules)
Creates a new DeclaredRulePersonAttributeDao specifying the attributeName to pass to #setDefaultAttributeName(String) and the List of AttributeRules to pass to setRules(List)

Parameters:
attributeName -
rules -
Method Detail

getRules

public List<AttributeRule> getRules()
Returns:
the rules

setRules

public void setRules(List<AttributeRule> rules)
Parameters:
rules - the rules to set

getPeopleWithMultivaluedAttributes

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

getPossibleUserAttributeNames

public Set<String> getPossibleUserAttributeNames()
Aggregates the results of calling AttributeRule.getPossibleUserAttributeNames() on each AttributeRule instance in the rules array.

See Also:
IPersonAttributeDao.getPossibleUserAttributeNames()

getAvailableQueryAttributes

public Set<String> getAvailableQueryAttributes()


Copyright © 2012 Jasig. All Rights Reserved.