org.kuali.kfs.sec.service.impl
Class AccessPermissionEvaluatorImpl

java.lang.Object
  extended by org.kuali.kfs.sec.service.impl.AccessPermissionEvaluatorImpl
All Implemented Interfaces:
AccessPermissionEvaluator
Direct Known Subclasses:
DescendChartAccessPermissionEvaluatorImpl, DescendOrganizationAccessPermissionEvaluatorImpl, PrincipalInvestigatorAccessPermissionEvaluatorImpl

public class AccessPermissionEvaluatorImpl
extends Object
implements AccessPermissionEvaluator

See Also:
AccessPermissionEvaluator

Field Summary
protected  boolean allowConstraint
           
protected  String constraintCode
           
protected  String[] matchValues
           
protected  boolean notOperator
           
protected  String operatorCode
           
protected  Map<String,Object> otherKeyFieldValues
           
protected  boolean performEqualMatch
           
protected  boolean performGreaterThanMatch
           
protected  boolean performLessThanMatch
           
protected  org.kuali.rice.kim.bo.Person person
           
protected  String propertyValue
           
 
Constructor Summary
AccessPermissionEvaluatorImpl()
           
 
Method Summary
protected  void initializeAfterPropsSet()
          Hooks for permission evaluators to do additional setup after properties have been set
protected  boolean isMatch(String matchValue, String value)
          Determines whether two values match performing an equal, greater than, or less than check and also considering wildcards
 void setConstraintCode(String constraintCode)
          Setter for the constraint code found on the user's qualification record
protected  void setMatchValues()
          Sets the values to match on based on given value and other properties
 void setOperatorCode(String operatorCode)
          Setter for the operator code found on the user's qualification record
 void setOtherKeyFieldValueMap(Map<String,Object> otherKeyFieldValues)
          Setter for the Map that holds values for the other key fields (if any)
 void setPerson(org.kuali.rice.kim.bo.Person person)
          Setter for the person who the permission is being evaluated for
 void setPropertyValue(String propertyValue)
          Setter for the property value found on the user's qualification record
 boolean valueIsAllowed(String value)
          Evaluates the given value against the permission definition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

constraintCode

protected String constraintCode

operatorCode

protected String operatorCode

propertyValue

protected String propertyValue

otherKeyFieldValues

protected Map<String,Object> otherKeyFieldValues

person

protected org.kuali.rice.kim.bo.Person person

matchValues

protected String[] matchValues

performEqualMatch

protected boolean performEqualMatch

performLessThanMatch

protected boolean performLessThanMatch

performGreaterThanMatch

protected boolean performGreaterThanMatch

allowConstraint

protected boolean allowConstraint

notOperator

protected boolean notOperator
Constructor Detail

AccessPermissionEvaluatorImpl

public AccessPermissionEvaluatorImpl()
Method Detail

valueIsAllowed

public boolean valueIsAllowed(String value)
Description copied from interface: AccessPermissionEvaluator
Evaluates the given value against the permission definition. How the evaluation is carried out depends on implementation

Specified by:
valueIsAllowed in interface AccessPermissionEvaluator
Parameters:
value - String value to evaluate
Returns:
True if value is allowed based on the permission definition or false if it is not allowed
See Also:
AccessPermissionEvaluator.valueIsAllowed(java.lang.String)

isMatch

protected boolean isMatch(String matchValue,
                          String value)
Determines whether two values match performing an equal, greater than, or less than check and also considering wildcards

Parameters:
matchValue - String value to match, can contain the * wildcard
value - String value to compare
Returns:
boolean true if values match, false otherwise

initializeAfterPropsSet

protected void initializeAfterPropsSet()
Hooks for permission evaluators to do additional setup after properties have been set


setMatchValues

protected void setMatchValues()
Sets the values to match on based on given value and other properties


setConstraintCode

public void setConstraintCode(String constraintCode)
Description copied from interface: AccessPermissionEvaluator
Setter for the constraint code found on the user's qualification record

Specified by:
setConstraintCode in interface AccessPermissionEvaluator
See Also:
AccessPermissionEvaluator.setConstraintCode(java.lang.String)

setOperatorCode

public void setOperatorCode(String operatorCode)
Description copied from interface: AccessPermissionEvaluator
Setter for the operator code found on the user's qualification record

Specified by:
setOperatorCode in interface AccessPermissionEvaluator
See Also:
AccessPermissionEvaluator.setOperatorCode(java.lang.String)

setPropertyValue

public void setPropertyValue(String propertyValue)
Description copied from interface: AccessPermissionEvaluator
Setter for the property value found on the user's qualification record

Specified by:
setPropertyValue in interface AccessPermissionEvaluator
See Also:
AccessPermissionEvaluator.setPropertyValue(java.lang.String)

setOtherKeyFieldValueMap

public void setOtherKeyFieldValueMap(Map<String,Object> otherKeyFieldValues)
Description copied from interface: AccessPermissionEvaluator
Setter for the Map that holds values for the other key fields (if any)

Specified by:
setOtherKeyFieldValueMap in interface AccessPermissionEvaluator
Parameters:
otherKeyFieldValues - Map with field name as the Map key and field value as Map value
See Also:
AccessPermissionEvaluator.setOtherKeyFieldValueMap(java.util.Map)

setPerson

public void setPerson(org.kuali.rice.kim.bo.Person person)
Description copied from interface: AccessPermissionEvaluator
Setter for the person who the permission is being evaluated for

Specified by:
setPerson in interface AccessPermissionEvaluator
Parameters:
person - Person kim business object
See Also:
AccessPermissionEvaluator.setPerson(org.kuali.rice.kim.bo.Person)


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.