com.jalios.jcms
Class WFTransition

java.lang.Object
  extended by com.jalios.jcms.WFTransition

public class WFTransition
extends Object

This class represents a transition in a Workflow

Since:
jcms-2.1
Version:
$Revision: 27753 $
Author:
Olivier Dedieu

Field Summary
static String REVISION
           
protected  Set<WFRole> roleSet
           
protected  WFState source
           
protected  WFState target
           
 
Constructor Summary
WFTransition(WFState source, WFState target, WFRole role)
          Creates a new transition between two states for a given group
 
Method Summary
 void addRole(WFRole role)
          Adds a role to this transition
 boolean checkRule(ObjectIntTreeMap grpVoteMap, TreeSet<Member> mbrVoteSet, Publication publication, Member loggedMember)
          Perform the rule
 boolean contains(WFRole role)
          Check if a given role can perform this transition
 Set<WFRole> getRoleSet()
           
 WFState getSource()
           
 WFState getTarget()
           
 void removeRole(WFRole role)
          Removes a role to this transition
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REVISION

public static final String REVISION
See Also:
Constant Field Values

source

protected WFState source

target

protected WFState target

roleSet

protected Set<WFRole> roleSet
Constructor Detail

WFTransition

public WFTransition(WFState source,
                    WFState target,
                    WFRole role)
Creates a new transition between two states for a given group

Parameters:
source - the outgoing state
target - the incoming state
role - the role authorized to perform this transition
Since:
jcms-2.1
Method Detail

toString

public String toString()
Overrides:
toString in class Object

contains

public boolean contains(WFRole role)
Check if a given role can perform this transition

Parameters:
role - the role
Returns:
true if the role can perform this transition
Since:
jcms-4.0.2

addRole

public void addRole(WFRole role)
Adds a role to this transition

Parameters:
role - the role to add
Since:
jcms-4.0.2

removeRole

public void removeRole(WFRole role)
Removes a role to this transition

Parameters:
role - the role to add
Since:
jcms-5.5.0

checkRule

public boolean checkRule(ObjectIntTreeMap grpVoteMap,
                         TreeSet<Member> mbrVoteSet,
                         Publication publication,
                         Member loggedMember)
Perform the rule

Parameters:
grpVoteMap - contains the votes for the state change
mbrVoteSet - contains the members who have voted
publication - the publication
loggedMember - the member who performs this rule
Returns:
true if rule is ok false instead

getSource

public WFState getSource()
Returns:
the source state
Since:
jcms-2.1

getTarget

public WFState getTarget()
Returns:
the target state
Since:
jcms-2.1

getRoleSet

public Set<WFRole> getRoleSet()
Returns:
the set of role bound to this transition
Since:
jcms-4.0.2


Copyright © 2001-2010 Jalios SA. All Rights Reserved.