Class AlwaysSucceedParameterEvaluatorImpl
- java.lang.Object
-
- org.kuali.rice.core.impl.parameter.AlwaysSucceedParameterEvaluatorImpl
-
- All Implemented Interfaces:
Serializable,ParameterEvaluator
public class AlwaysSucceedParameterEvaluatorImpl extends Object implements ParameterEvaluator
This implementation of ParameterEvaluator is returned by ParameterServiceImpl when evaluation involves a constraining value and neither the allow nor deny parameter have restrictions for that value.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static 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 businessObjectOrDocumentClass, String constrainedPropertyName)This method uses the evaluateAndAddError method.booleanevaluateAndAddError(Class businessObjectOrDocumentClass, String constrainedPropertyName, String userEditablePropertyName)This method uses the evaluationSucceeds method to evaluate the constrainedValue.booleanevaluationSucceeds()This method determines whether the constrainedValue specified when the ParameterEvaluator was created matches the parameter.static ParameterEvaluatorgetInstance()StringgetName()StringgetParameterValuesForMessage()This method creates a pretty String representation of parameter values for the user messages.StringgetValue()This method returns the value of the correspnding Parameter.voidsetConstrainedValue(String constrainedValue)
-
-
-
Method Detail
-
getInstance
public static ParameterEvaluator getInstance()
-
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
-
evaluateAndAddError
public boolean evaluateAndAddError(Class businessObjectOrDocumentClass, String constrainedPropertyName, String userEditablePropertyName)
Description copied from interface:ParameterEvaluatorThis method uses the evaluationSucceeds method to evaluate the constrainedValue. If evaluation does not succeed, it adds an error for the user. The businessObjectOrDocumentClass, nameOfConstrainedProperty and userEditablePropertyName are used by ParameterEvaluatorImpl to retrieve user friendly labels for the error message. The constrainedPropertyName corresponds to the field that has the value that the parameter is evaluating. The userEditablePropertyName corresponds to the field that has the value the user needs to correct to resolve the error. For example, the object type may be invalid, but the user needs to change the object code in order to remedy that.- Specified by:
evaluateAndAddErrorin interfaceParameterEvaluator- Returns:
- boolean indicating whether evaluation succeeded (see evaluationSucceeds)
-
evaluateAndAddError
public boolean evaluateAndAddError(Class 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)
-
evaluationSucceeds
public boolean evaluationSucceeds()
Description copied from interface:ParameterEvaluatorThis method determines whether the constrainedValue specified when the ParameterEvaluator was created matches the parameter.- 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
-
getName
public String getName()
-
getParameterValuesForMessage
public String getParameterValuesForMessage()
Description copied from interface:ParameterEvaluatorThis method creates a pretty String representation of parameter values for the user messages.- 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
-
setConstrainedValue
public void setConstrainedValue(String constrainedValue)
-
-