Class ParameterEvaluatorImpl
- java.lang.Object
-
- org.kuali.rice.core.impl.parameter.ParameterEvaluatorImpl
-
- All Implemented Interfaces:
Serializable,ParameterEvaluator
public class ParameterEvaluatorImpl extends Object implements ParameterEvaluator
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ParameterEvaluatorImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconstraintIsAllow()This method determines whether the parameter lists allowed values or denied values.booleanevaluateAndAddError(Class<? extends Object> businessObjectOrDocumentClass, String constrainedPropertyName)This method uses the evaluateAndAddError method.booleanevaluateAndAddError(Class<? extends Object> businessObjectOrDocumentClass, String constrainedPropertyName, String userEditablePropertyName)This method uses the evaluationSucceeds method to evaluate the constrainedValue.booleanevaluationSucceeds()If the constraint is allow and the constrainedValue is in the list of allowed values specified by the parameter this will return true, and if the constraint is deny and the constrainedValue is not in the list of denied values specified by the parameter this method will return true.protected DataDictionaryServicegetDataDictionaryService()StringgetModuleAndComponent()StringgetParameterValuesForMessage()This method uses the List toString method and eliminates the [].StringgetValue()This method returns the value of the correspnding Parameter.voidsetConstrainedValue(String constrainedValue)voidsetConstraintIsAllow(boolean constraintIsAllow)voidsetParameter(Parameter parameter)voidsetValues(List<String> values)StringtoString()
-
-
-
Method Detail
-
evaluationSucceeds
public boolean evaluationSucceeds()
If the constraint is allow and the constrainedValue is in the list of allowed values specified by the parameter this will return true, and if the constraint is deny and the constrainedValue is not in the list of denied values specified by the parameter this method will return true.- Specified by:
evaluationSucceedsin interfaceParameterEvaluator- Returns:
- boolean indicating whether the constrained value adheres to the restriction specified by the combination of the parameter constraint and the parameter value
-
evaluateAndAddError
public boolean evaluateAndAddError(Class<? extends Object> businessObjectOrDocumentClass, String constrainedPropertyName)
Description copied from interface:ParameterEvaluatorThis method uses the evaluateAndAddError method. It passes the constrainedPropertyName as both the constrainedPropertyName and the userEditablePropertyName, i.e. it should be used when they are one and the same.- Specified by:
evaluateAndAddErrorin interfaceParameterEvaluator- Returns:
- boolean indicating whether evaluation succeeded (see evaluationSucceeds)
-
evaluateAndAddError
public boolean evaluateAndAddError(Class<? extends Object> businessObjectOrDocumentClass, String constrainedPropertyName, String userEditablePropertyName)
This method uses the evaluationSucceeds method to evaluate the constrainedValue. If evaluation does not succeed, it adds an error to GlobalVariables.getErrorMap(). The businessObjectOrDocumentClass, nameOfConstrainedProperty and userEditablePropertyName are used to retrieve the appropriate labels from the DataDictionary.- Specified by:
evaluateAndAddErrorin interfaceParameterEvaluator- Parameters:
businessObjectOrDocumentClass-- Returns:
- boolean indicating whether evaluation succeeded (see evaluationSucceeds)
-
constraintIsAllow
public boolean constraintIsAllow()
Description copied from interface:ParameterEvaluatorThis method determines whether the parameter lists allowed values or denied values.- Specified by:
constraintIsAllowin interfaceParameterEvaluator- Returns:
- boolean indicating whether the parameter lists allowed values
-
getParameterValuesForMessage
public String getParameterValuesForMessage()
This method uses the List toString method and eliminates the [].- Specified by:
getParameterValuesForMessagein interfaceParameterEvaluator- Returns:
- user-friendly String representation of Parameter values
-
getValue
public String getValue()
Description copied from interface:ParameterEvaluatorThis method returns the value of the correspnding Parameter.- Specified by:
getValuein interfaceParameterEvaluator- Returns:
- String value of underlying Parameter
-
getModuleAndComponent
public String getModuleAndComponent()
-
setConstrainedValue
public void setConstrainedValue(String constrainedValue)
-
setConstraintIsAllow
public void setConstraintIsAllow(boolean constraintIsAllow)
-
setParameter
public void setParameter(Parameter parameter)
-
getDataDictionaryService
protected DataDictionaryService getDataDictionaryService()
- Returns:
- the dataDictionaryService
-
-