| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.WFState
public class WFState
This class represents a state in a Workflow
| Field Summary | |
|---|---|
static String | 
REVISION
 | 
| Constructor Summary | |
|---|---|
WFState(int pstatus,
        Map<String,String> labelMap,
        Map<String,String> descriptionMap)
 | 
|
WFState(int pstatus,
        Map<String,String> labelMap,
        Map<String,String> descriptionMap,
        int duration,
        int targetPstatus,
        int reminderDuration)
 | 
|
| Method Summary | |
|---|---|
 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,
                TreeSet<Member> mbrVoteSet,
                Publication pub,
                Member mbr)
Check if there exists at least one transition matching the given criteria and which can be performed  | 
 Object | 
clone()
 | 
 int | 
compareTo(Object obj)
 | 
 WFAction | 
getActionIn(String type)
Get the incoming action of a given type  | 
 Set<WFAction> | 
getActionInSet()
 | 
 WFAction | 
getActionOut(String type)
Get the outgoing action of a given type  | 
 Set<WFAction> | 
getActionOutSet()
 | 
 String | 
getDescription(String lang)
Returns a localized description.  | 
 Map<String,String> | 
getDescriptionMap()
Returns the map of localized description.  | 
 int | 
getDuration()
 | 
 String | 
getLabel(String lang)
Returns a localized label.  | 
 Map<String,String> | 
getLabelMap()
Returns the map of localized label.  | 
 int | 
getPstatus()
Get the value of pstatus.  | 
 int | 
getReminder()
Returns the reminder duration (in seconds).  | 
 TreeSet<WFRole> | 
getRoleSet()
 | 
 int | 
getTargetPstatus()
 | 
 Set<WFTransition> | 
getTransitionSet()
 | 
 boolean | 
hasOpenRole(Workspace ws)
 | 
 boolean | 
hasReminder()
Returns true if a reminder has been set for this state.  | 
 boolean | 
isActionIn(String type)
Checks if an incoming action of a given type exists.  | 
 boolean | 
isActionOut(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(Map<String,String> descriptionMap)
Sets the map of localized description.  | 
 void | 
setDuration(int duration)
 | 
 void | 
setLabelMap(Map<String,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)
 | 
 String | 
toString()
 | 
| Methods inherited from class java.lang.Object | 
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
| Constructor Detail | 
|---|
public WFState(int pstatus,
               Map<String,String> labelMap,
               Map<String,String> descriptionMap)
public WFState(int pstatus,
               Map<String,String> labelMap,
               Map<String,String> descriptionMap,
               int duration,
               int targetPstatus,
               int reminderDuration)
| Method Detail | 
|---|
public Object clone()
clone in class Objectpublic String getLabel(String lang)
lang - the language
public String getDescription(String lang)
lang - the language
public boolean isSpecialState()
public void addTransition(WFState target,
                          WFRole role)
target - the target staterole - the role that can perform this transition
public void removeTransition(WFState target,
                             WFRole role)
target - the target staterole - the role that can perform this transitionpublic Set<WFTransition> getTransitionSet()
public void removeAllTransitions()
public boolean checkTransition(int targetPstatus,
                               ObjectIntTreeMap grpVoteMap,
                               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 transition
public TreeSet<WFRole> getRoleSet()
public boolean hasOpenRole(Workspace ws)
ws - the current workspace
public void addActionIn(WFAction action)
action - the incomming actionpublic Set<WFAction> getActionInSet()
public void addActionOut(WFAction action)
action - the outgoing actionpublic 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(String type)
type - the action type
public WFAction getActionOut(String type)
type - the action type
public boolean isActionIn(String type)
type - the action type
public boolean isActionOut(String type)
type - the action type
public String toString()
toString in class Objectpublic int compareTo(Object obj)
compareTo in interface Comparablepublic Map<String,String> getLabelMap()
public void setLabelMap(Map<String,String> labelMap)
labelMap - the map of localized label.public int getPstatus()
public void setPstatus(int v)
v - Value to assign to pstatus.public Map<String,String> getDescriptionMap()
public void setDescriptionMap(Map<String,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.
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||