Class ValidationRule

java.lang.Object
org.kuali.rice.krms.framework.engine.BasicRule
org.kuali.rice.krms.impl.validation.ValidationRule
All Implemented Interfaces:
org.kuali.rice.krms.framework.engine.Rule

public class ValidationRule extends org.kuali.rice.krms.framework.engine.BasicRule
A Rule that executes a Action when the Proposition is false, as opposed to BasicRule which executes its action when the proposition is true.
Author:
Kuali Rice Team (rice.collab@kuali.org)
  • Constructor Summary

    Constructors
    Constructor
    Description
    ValidationRule(org.kuali.rice.krms.framework.type.ValidationRuleType type, String name, org.kuali.rice.krms.framework.engine.Proposition proposition, List<org.kuali.rice.krms.framework.engine.Action> actions)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    shouldExecuteAction(boolean ruleExecutionResult)
    Valid Validation Rules execute when the ruleExecutionResult is false.

    Methods inherited from class org.kuali.rice.krms.framework.engine.BasicRule

    evaluate, getName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ValidationRule

      public ValidationRule(org.kuali.rice.krms.framework.type.ValidationRuleType type, String name, org.kuali.rice.krms.framework.engine.Proposition proposition, List<org.kuali.rice.krms.framework.engine.Action> actions)
      Parameters:
      type - ValidationRuleType
      name - Rule name
      proposition - Proposition
      actions - Rule Actions
      Throws:
      IllegalArgumentException - if type is null
  • Method Details

    • shouldExecuteAction

      protected boolean shouldExecuteAction(boolean ruleExecutionResult)
      Valid Validation Rules execute when the ruleExecutionResult is false. Invalid Validation Rules execute when the ruleExecutionResult is true.
      Overrides:
      shouldExecuteAction in class org.kuali.rice.krms.framework.engine.BasicRule
      Parameters:
      ruleExecutionResult - result of the rules execution
      Returns:
      should the actions be executed