org.apache.lenya.workflow.impl
Class BooleanVariableCondition

java.lang.Object
  extended by org.apache.lenya.workflow.impl.AbstractCondition
      extended by org.apache.lenya.workflow.impl.BooleanVariableCondition
All Implemented Interfaces:
Condition

public class BooleanVariableCondition
extends AbstractCondition

Implementation of a boolean variable condition.


Constructor Summary
BooleanVariableCondition()
           
 
Method Summary
protected  boolean getValue()
          Returns the variable value to check.
protected  java.lang.String getVariableName()
          Returns the variable name to check.
 boolean isComplied(Situation situation, WorkflowInstance instance)
          Returns if the condition is complied in a certain situation.
 void setExpression(java.lang.String expression)
          Sets the expression for this condition.
 
Methods inherited from class org.apache.lenya.workflow.impl.AbstractCondition
getExpression, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BooleanVariableCondition

public BooleanVariableCondition()
Method Detail

getValue

protected boolean getValue()
Returns the variable value to check.

Returns:
A boolean value.

getVariableName

protected java.lang.String getVariableName()
Returns the variable name to check.

Returns:
A string.

setExpression

public void setExpression(java.lang.String expression)
                   throws WorkflowException
Description copied from interface: Condition
Sets the expression for this condition.

Specified by:
setExpression in interface Condition
Overrides:
setExpression in class AbstractCondition
Parameters:
expression - The expression.
Throws:
WorkflowException - when the expression is not valid.
See Also:
Condition.setExpression(java.lang.String)

isComplied

public boolean isComplied(Situation situation,
                          WorkflowInstance instance)
                   throws WorkflowException
Description copied from interface: Condition
Returns if the condition is complied in a certain situation.

Parameters:
situation - The situation to check.
instance - The workflow instance to check the condition on.
Returns:
if the condition is complied.
Throws:
WorkflowException - when the expression could not be evaluated.
See Also:
Condition.isComplied(org.apache.lenya.workflow.Situation, org.apache.lenya.workflow.WorkflowInstance)


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.