org.jasig.services.persondir.support.rule
Interface AttributeRule

All Known Implementing Classes:
SimpleAttributeRule

public interface AttributeRule

Defines the contract for a person directory user attribute rule for use with the DeclaredRulePersonAttributeDao.


Method Summary
 boolean appliesTo(Map userInfo)
          Indicates whether the rule applies to the user described by the specified information.
 Map evaluate(Map userInfo)
          Applies the embodied rule to the user described by the specified information and returns the result.
 Set getPossibleUserAttributeNames()
          Indicates the complete set of user attribute names that may be returned by a call to evaluate.
 

Method Detail

appliesTo

boolean appliesTo(Map userInfo)
Indicates whether the rule applies to the user described by the specified information. Implementations of AttributeRule must not change the input Map. Implementations dictate the expected types for the Keys and Values of the Map.

Parameters:
userInfo - immutable Map of attributes to values for the implementation to determine if this rule applies, must not be null.
Returns:
TRUE if this rule applies to the Map data, FALSE if not.
Throws:
IllegalArgumentException - If userInfo is null.

evaluate

Map evaluate(Map userInfo)
Applies the embodied rule to the user described by the specified information and returns the result. This method follows the same contract as org.jasig.portal.services.persondir.IPersonAttributeDao#getUserAttributes(Map)


getPossibleUserAttributeNames

Set getPossibleUserAttributeNames()
Indicates the complete set of user attribute names that may be returned by a call to evaluate. This method follows the same contract as org.jasig.portal.services.persondir.IPersonAttributeDao#getPossibleUserAttributeNames()



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