Package com.jalios.jcms
Class WFTransition
java.lang.Object
com.jalios.jcms.WFTransition
This class represents a transition in a Workflow
- Since:
- jcms-2.1
- Author:
- Olivier Dedieu
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionWFTransition(WFState source, WFState target, WFRole role) Creates a new transition between two states for a given group -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a role to this transitionbooleancheckRule(ObjectIntTreeMap grpVoteMap, TreeSet<Member> mbrVoteSet, Publication publication, Member loggedMember) Perform the rulebooleanCheck if a given role can perform this transitionvoidremoveRole(WFRole role) Removes a role to this transitiontoString()
-
Field Details
-
source
-
target
-
roleSet
-
-
Constructor Details
-
WFTransition
Creates a new transition between two states for a given group- Parameters:
source- the outgoing statetarget- the incoming staterole- the role authorized to perform this transition- Since:
- jcms-2.1
-
-
Method Details
-
toString
-
contains
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
Adds a role to this transition- Parameters:
role- the role to add- Since:
- jcms-4.0.2
-
removeRole
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 changembrVoteSet- contains the members who have votedpublication- the publicationloggedMember- the member who performs this rule- Returns:
- true if rule is ok false instead
-
getSource
- Returns:
- the source state
- Since:
- jcms-2.1
-
getTarget
- Returns:
- the target state
- Since:
- jcms-2.1
-
getRoleSet
- Returns:
- the set of role bound to this transition
- Since:
- jcms-4.0.2
-