net.kwfgrid.gwes
Class ConditionChecker

java.lang.Object
  extended by net.kwfgrid.gwes.ConditionChecker

public class ConditionChecker
extends Object

This class is used to check conditions expressed in the XPath syntax.

Version:
$Id: ConditionChecker.java 1433 2010-11-29 18:06:07Z hoheisel $
Author:
Andreas Hoheisel (www.andreas-hoheisel.de)

Field Summary
static int CONDITION_FALSE_DYNAMIC
           
static int CONDITION_FALSE_STATIC
           
static int CONDITION_TRUE
           
 
Constructor Summary
ConditionChecker()
          Constructor for the condition checker.
 
Method Summary
 boolean check(String xpathExpression, org.jaxen.NamespaceContext nsContext)
           
 int check(TransitionOccurrence to)
          Check a set of conditions.
 void setContext(org.jdom.Document context)
          Set the evaluation context for conditions.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONDITION_TRUE

public static final int CONDITION_TRUE
See Also:
Constant Field Values

CONDITION_FALSE_STATIC

public static final int CONDITION_FALSE_STATIC
See Also:
Constant Field Values

CONDITION_FALSE_DYNAMIC

public static final int CONDITION_FALSE_DYNAMIC
See Also:
Constant Field Values
Constructor Detail

ConditionChecker

public ConditionChecker()
Constructor for the condition checker.

Parameters:
workflow - The workflow context of the condition.
transition - The parent transition.
Method Detail

setContext

public void setContext(org.jdom.Document context)
Set the evaluation context for conditions.

Parameters:
context - Context as JDOM Document.

check

public int check(TransitionOccurrence to)
          throws net.kwfgrid.gworkflowdl.structure.WorkflowFormatException
Check a set of conditions. Variables (e.g. $input/) that are expanded by the corresponding context XPath (e.g. /gwdl:data/input).

Parameters:
to - The transition occurrence that contains the conditios to check.
Returns:
CONDITION_TRUE if all conditions evaluate to true and CONDITION_FALSE_STATIC if a least one static condition evaluates to false. CONDITION_FALSE_DYNAMIC if condition is false just because of time-depend conditions that may change in future.
Throws:
net.kwfgrid.gworkflowdl.structure.WorkflowFormatException - If the syntax of the condition is wrong.

check

public boolean check(String xpathExpression,
                     org.jaxen.NamespaceContext nsContext)
              throws org.jaxen.JaxenException
Throws:
org.jaxen.JaxenException


Copyright © 2005-2011 Fraunhofer FIRST. All Rights Reserved.