Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jharks.workflow;

The RuleCondition class is an abstract class with a factory method that allows for the instantiation of various RuleCondition implementations. RuleConditions can be used as conditional evaluators on Rule implementations This ultimately allows for new RuleCondition implementations to be written and then plugged into the architecture by simply modifying the workflow XML configuration file.

Michael J. Rizzo
public abstract class RuleCondition {

Flag indicating whether condition should be applied using context.
    private boolean useContext = false;
Check to see if condition applies according to provided input.

param the submitted input.
boolean indicating whether condition applied or not.
    public abstract boolean checkCondition(Object param);
Factory method for creation of RuleCondition implementations.

rcImplName the class name of RuleCondition implementation to be instantiated.
an instance of a Rule object.
java.lang.ClassNotFoundException if can not find classname specified.
java.lang.IllegalAccessException if the protection on object constructor is violated.
java.lang.InstantiationException if error occurs while instantiating the object.
    public static RuleCondition getRuleConditionInstance(String rcImplName
                                        throws ClassNotFoundException
                                               InstantiationException {
        return (RuleCondition) Class.forName(rcImplName).newInstance();     
Returns true if condition should only look for responses within the current answer context. Setting is false by default.

Returns true if context should be used to restrict condition.
    public boolean isUseContext() {
        return ;
Set whether to restrict to current context or not.

useContext The useContext to set.
    public void setUseContext(boolean useContext) {
        this. = useContext;
New to GrepCode? Check out our FAQ X