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

java.lang.Object
  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:
org.jasig.services.persondir.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.AbstractFlatteningPersonAttributeDao
logger
 
Constructor Summary
DeclaredRulePersonAttributeDao(String attributeName, List<AttributeRule> rules)
          Creates a new DeclaredRulePersonAttributeDao specifying the attributeName to pass to AbstractDefaultAttributePersonAttributeDao.setDefaultAttributeName(String) and the List of AttributeRules to pass to setRules(List)
 
Method Summary
 Map<String,List<Object>> getMultivaluedUserAttributes(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
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
 

Constructor Detail

DeclaredRulePersonAttributeDao

public DeclaredRulePersonAttributeDao(String attributeName,
                                      List<AttributeRule> rules)
Creates a new DeclaredRulePersonAttributeDao specifying the attributeName to pass to AbstractDefaultAttributePersonAttributeDao.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

getMultivaluedUserAttributes

public Map<String,List<Object>> getMultivaluedUserAttributes(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()


Copyright © 1998-2008 Java Architectures Special Interest Group. All Rights Reserved.