net.kwfgrid.gwes
Class TokenUtils

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

public class TokenUtils
extends Object

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

Field Summary
static int DATA_GROUP_IGNORE_CONTROL
           
static int DATA_GROUP_IGNORE_READ_WRITE
           
 
Method Summary
static boolean checkDataGroup(net.kwfgrid.gworkflowdl.structure.Token token, boolean isReadWriteToken, String dataGroup, int ignoreDataGroup)
          Check if the token belongs to a certain data group.
static String[] getCombineDataGroupsEdgeExpressions(net.kwfgrid.gworkflowdl.structure.Transition transition)
           
static int getIgnoreDataGroupsCode(net.kwfgrid.gworkflowdl.structure.Transition transition)
           
static TokenUtils getInstance()
          Singleton pattern
static net.kwfgrid.gworkflowdl.structure.Token getNextUnlockedToken(net.kwfgrid.gworkflowdl.structure.Edge edge, boolean isReadEdge, String dataGroup, int ignoreDataGroups)
          Search next token of a certain dataGroup which is not locked.
static int getNextUnlockedTokenIndex(net.kwfgrid.gworkflowdl.structure.Edge edge, boolean isReadEdge, String dataGroup, int ignoreDataGroups)
          Get the index of the next token of a certain dataGroup which is not locked
static String updateDataGroup(TokenParameter tp, int ignoreDataGroups, String[] combineDataGroupsEdgeExpressions, ArrayList<String> dataGroups)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATA_GROUP_IGNORE_READ_WRITE

public static final int DATA_GROUP_IGNORE_READ_WRITE
See Also:
Constant Field Values

DATA_GROUP_IGNORE_CONTROL

public static final int DATA_GROUP_IGNORE_CONTROL
See Also:
Constant Field Values
Method Detail

getInstance

public static TokenUtils getInstance()
Singleton pattern


getNextUnlockedToken

public static net.kwfgrid.gworkflowdl.structure.Token getNextUnlockedToken(net.kwfgrid.gworkflowdl.structure.Edge edge,
                                                                           boolean isReadEdge,
                                                                           String dataGroup,
                                                                           int ignoreDataGroups)
Search next token of a certain dataGroup which is not locked.

Parameters:
edge -
Returns:
The next unlocked token or null if there is no unlocked token.

getNextUnlockedTokenIndex

public static int getNextUnlockedTokenIndex(net.kwfgrid.gworkflowdl.structure.Edge edge,
                                            boolean isReadEdge,
                                            String dataGroup,
                                            int ignoreDataGroups)
Get the index of the next token of a certain dataGroup which is not locked

Parameters:
edge -
dataGroup -
Returns:
The index of the next unlocked token or -1 if there is no unlocked token.

checkDataGroup

public static boolean checkDataGroup(net.kwfgrid.gworkflowdl.structure.Token token,
                                     boolean isReadWriteToken,
                                     String dataGroup,
                                     int ignoreDataGroup)
Check if the token belongs to a certain data group.

Parameters:
token -
dataGroup -
Returns:
"true" iff the dataGroup is null or if there is no data.group property or if the data.group property equals the dataGroup string.

updateDataGroup

public static String updateDataGroup(TokenParameter tp,
                                     int ignoreDataGroups,
                                     String[] combineDataGroupsEdgeExpressions,
                                     ArrayList<String> dataGroups)

getIgnoreDataGroupsCode

public static int getIgnoreDataGroupsCode(net.kwfgrid.gworkflowdl.structure.Transition transition)

getCombineDataGroupsEdgeExpressions

public static String[] getCombineDataGroupsEdgeExpressions(net.kwfgrid.gworkflowdl.structure.Transition transition)


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