public class WFState
extends java.lang.Object
implements java.lang.Comparable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
REVISION |
| Constructor and Description |
|---|
WFState(int pstatus,
java.util.Map<java.lang.String,java.lang.String> labelMap,
java.util.Map<java.lang.String,java.lang.String> descriptionMap) |
WFState(int pstatus,
java.util.Map<java.lang.String,java.lang.String> labelMap,
java.util.Map<java.lang.String,java.lang.String> descriptionMap,
int duration,
int targetPstatus,
int reminderDuration) |
| Modifier and Type | Method and Description |
|---|---|
void |
addActionIn(WFAction action)
Adds an incoming action (ie an action triggered when a
publication comes in this state)
|
void |
addActionOut(WFAction action)
Adds an outgoing action (ie an action triggered when a
publication leaves this state)
|
void |
addTransition(WFState target,
WFRole role)
Adds an outgoing transition from this state
|
boolean |
checkTransition(int targetPstatus,
ObjectIntTreeMap grpVoteMap,
java.util.TreeSet<Member> mbrVoteSet,
Publication pub,
Member mbr)
Check if there exists at least one transition matching the given criteria and which can be performed
|
java.lang.Object |
clone() |
int |
compareTo(java.lang.Object obj) |
WFAction |
getActionIn(java.lang.String type)
Get the incoming action of a given type
|
java.util.Set<WFAction> |
getActionInSet() |
WFAction |
getActionOut(java.lang.String type)
Get the outgoing action of a given type
|
java.util.Set<WFAction> |
getActionOutSet() |
java.lang.String |
getDescription(java.lang.String lang)
Returns a localized description.
|
java.util.Map<java.lang.String,java.lang.String> |
getDescriptionMap()
Returns the map of localized description.
|
int |
getDuration() |
java.lang.String |
getLabel(java.lang.String lang)
Returns a localized label.
|
java.lang.String |
getLabelHtml(java.lang.String lang)
Returns the HTML code for the localized label
|
java.util.Map<java.lang.String,java.lang.String> |
getLabelMap()
Returns the map of localized label.
|
int |
getPstatus()
Get the value of pstatus.
|
int |
getReminder()
Returns the reminder duration (in seconds).
|
java.util.TreeSet<WFRole> |
getRoleSet() |
int |
getTargetPstatus() |
java.util.Set<WFTransition> |
getTransitionSet() |
boolean |
hasOpenRole(Workspace ws) |
boolean |
hasReminder()
Returns true if a reminder has been set for this state.
|
boolean |
isActionIn(java.lang.String type)
Checks if an incoming action of a given type exists.
|
boolean |
isActionOut(java.lang.String type)
Checks if an outgoing action of a given type exists.
|
boolean |
isExpress() |
boolean |
isNew() |
boolean |
isSpecialState() |
boolean |
isUpdated() |
void |
performActionIn(Publication pub,
boolean isReminder)
Triggers all the incoming actions for a given publication
|
void |
performActionOut(Publication pub)
Triggers all the outgoing actions for a given publication
|
void |
removeAllActions()
Removes all the incoming and outgoind action of this state
|
void |
removeAllTransitions()
Removes all the transitions of this state
|
void |
removeTransition(WFState target,
WFRole role)
Remove an outgoing transition from this state
|
void |
setDescriptionMap(java.util.Map<java.lang.String,java.lang.String> descriptionMap)
Sets the map of localized description.
|
void |
setDuration(int duration) |
void |
setLabelMap(java.util.Map<java.lang.String,java.lang.String> labelMap)
Sets the map of localized label.
|
void |
setNew(boolean isNew) |
void |
setPstatus(int v)
Set the value of pstatus.
|
void |
setReminder(int reminder)
Set the reminder.
|
void |
setTargetPstatus(int targetPstatus) |
void |
setUpdated(boolean isUpdated) |
java.lang.String |
toString() |
public static final java.lang.String REVISION
public WFState(int pstatus,
java.util.Map<java.lang.String,java.lang.String> labelMap,
java.util.Map<java.lang.String,java.lang.String> descriptionMap)
public WFState(int pstatus,
java.util.Map<java.lang.String,java.lang.String> labelMap,
java.util.Map<java.lang.String,java.lang.String> descriptionMap,
int duration,
int targetPstatus,
int reminderDuration)
public java.lang.Object clone()
clone in class java.lang.Objectpublic java.lang.String getLabel(java.lang.String lang)
lang - the languagepublic java.lang.String getLabelHtml(java.lang.String lang)
lang - the languagepublic java.lang.String getDescription(java.lang.String lang)
lang - the languagepublic boolean isSpecialState()
public void addTransition(WFState target, WFRole role)
target - the target staterole - the role that can perform this transitionpublic void removeTransition(WFState target, WFRole role)
target - the target staterole - the role that can perform this transitionpublic java.util.Set<WFTransition> getTransitionSet()
public void removeAllTransitions()
public boolean checkTransition(int targetPstatus,
ObjectIntTreeMap grpVoteMap,
java.util.TreeSet<Member> mbrVoteSet,
Publication pub,
Member mbr)
targetPstatus - the target pstatusgrpVoteMap - the group vote mapmbrVoteSet - the member vote setpub - the publicationmbr - the member who performs this transitionpublic java.util.TreeSet<WFRole> getRoleSet()
public boolean hasOpenRole(Workspace ws)
ws - the current workspacepublic void addActionIn(WFAction action)
action - the incomming actionpublic java.util.Set<WFAction> getActionInSet()
public void addActionOut(WFAction action)
action - the outgoing actionpublic java.util.Set<WFAction> getActionOutSet()
public void removeAllActions()
public void performActionIn(Publication pub, boolean isReminder)
pub - the publication that triggers the alarmisReminder - indicates if this is a reminderpublic void performActionOut(Publication pub)
pub - the publication that triggers the alarmpublic WFAction getActionIn(java.lang.String type)
type - the action typepublic WFAction getActionOut(java.lang.String type)
type - the action typepublic boolean isActionIn(java.lang.String type)
type - the action typepublic boolean isActionOut(java.lang.String type)
type - the action typepublic java.lang.String toString()
toString in class java.lang.Objectpublic int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic java.util.Map<java.lang.String,java.lang.String> getLabelMap()
public void setLabelMap(java.util.Map<java.lang.String,java.lang.String> labelMap)
labelMap - the map of localized label.public int getPstatus()
public void setPstatus(int v)
v - Value to assign to pstatus.public java.util.Map<java.lang.String,java.lang.String> getDescriptionMap()
public void setDescriptionMap(java.util.Map<java.lang.String,java.lang.String> descriptionMap)
descriptionMap - the map of localized description.public boolean isExpress()
public void setDuration(int duration)
duration - define the duration in minute of the Workflow Express (in minutes)public int getDuration()
public void setTargetPstatus(int targetPstatus)
targetPstatus - the target Pstatus valuepublic int getTargetPstatus()
public int getReminder()
public void setReminder(int reminder)
reminder - the reminder duration (in seconds).public boolean hasReminder()
public boolean isNew()
public void setNew(boolean isNew)
isNew - The isNew to set.public boolean isUpdated()
public void setUpdated(boolean isUpdated)
isUpdated - The isUpdated to set.Copyright © 2001-2010 Jalios SA. All Rights Reserved.