| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.Workflow
public class Workflow
This class represents a Workflow.
| Field Summary | |
|---|---|
static String | 
REVISION
 | 
| Fields inherited from interface com.jalios.jcms.WorkflowConstants | 
|---|
ACTION, ACTION_REPEAT, ACTION_TYPE, ACTION_WHEN, ALL_WF, ARCHIVED_PSTATUS, EXPIRED_PSTATUS, PUBLISHED_PSTATUS, ROLE, ROLE_DESCRIPTION, ROLE_GROUP, ROLE_GRPID, ROLE_ID, ROLE_MBRID, ROLE_MEMBER, ROLE_NAME, ROLE_TYPE, ROLE_WEIGHT, SCHEDULED_PSTATUS, STATE, STATE_DESCRIPTION, STATE_DURATION, STATE_LABEL, STATE_PSTATUS, STATE_REMINDER, STATE_TARGETPSTATUS, STATE_TYPE, STATESPE, TRANSITION, TRANSITION_GROUP, TRANSITION_ROLEID, TRANSITION_SOURCE, TRANSITION_TARGET, UNKNOWN_PSTATUS, WF_DEFAULT_ID, WF_DIR, WF_ELT_NAME, WF_ID, WF_INIT, WF_LABEL, WF_TYPE, WF_VERSION, WF_VERSION_VALUE, WFTYPE_PROCESS, WFTYPE_PUBLISH | 
| Fields inherited from interface com.jalios.util.JaliosConstants | 
|---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR | 
| Constructor Summary | |
|---|---|
Workflow(org.jdom.Element elt)
Create a workflow from a JDOM Element  | 
|
Workflow(Map<String,String> labelMap,
         Workflow wf,
         boolean clone)
Creates a workflow from a given workflow (clone workflow type, states, actions, roles and transitions).  | 
|
Workflow(String id,
         String type,
         Map<String,String> labelMap,
         boolean createInitState)
Creates a new empty workflow with the given label and id.  | 
|
Workflow(Workflow wf)
Clones a workflow from a given workflow (clone workflow type, states, actions, roles and transitions).  | 
|
| Method Summary | |
|---|---|
 void | 
addRole(WFRole role)
Adds a WFRole to the workflow  | 
 void | 
addRole(WFRole role,
        boolean register)
Adds a WFRole to the workflow  | 
 void | 
addState(WFState state)
Adds a state in this workflow  | 
 void | 
addTransition(WFState source,
              WFState target,
              WFRole role)
Adds a transition in this workflow  | 
 boolean | 
canChangeState(Member member,
               Publication pub,
               WFState target)
Checks if a given member can move a given publication in a given state.  | 
 boolean | 
canChangeState(Member member,
               Publication pub,
               WFState source,
               WFState target)
Checks if a given member can move from a given state in a given state  | 
 boolean | 
canChangeState(WFRole role,
               WFState source,
               WFState target)
Checks if a given role can move from a given state in a given state  | 
 boolean | 
canWorkInState(Publication pub,
               Member member,
               WFState state)
Checks if a given member can work in a given state  | 
 void | 
cloneStates(Workflow other)
Clones all the states of another workflow in this one.  | 
 int | 
compareTo(Object obj)
 | 
 void | 
convertToProcessWorkflow()
Convert this (publish) workflow to a process workflow.  | 
 void | 
convertToPublishWorkflow()
Convert this (process) workflow to a publish workflow.  | 
 void | 
deleteRole(WFRole wfRole,
           Member member)
Deletes the given WFRole  | 
 boolean | 
equals(Object obj)
 | 
 String | 
getId()
 | 
 Set<WFTransition> | 
getIncomingTransitionSet(WFState state)
Returns all the transition the given state is the target.  | 
 WFState | 
getInitState()
 | 
 String | 
getLabel(String lang)
Returns a localized label.  | 
 Map<String,String> | 
getLabelMap()
 | 
 Set<WFState> | 
getNextStateSet(Publication pub,
                Member member)
Returns all the states a given member can reach for a given publication.  | 
 Set<WFState> | 
getNextStateSet(Publication pub,
                Member member,
                WFState state,
                Workspace ws)
Returns all the states a given member can reach from a given state  | 
 WFRole | 
getRole(String roleId)
Returns a WFRole from its id.  | 
 Set<WFRole> | 
getRoleSet()
Gets the role set for this workflow  | 
 WFState | 
getState(int pstatus)
Returns the WFState bound to the given pstatus  | 
 String | 
getStateLabel(int pstatus,
              String lang)
This convenient returns the label of WFState bound to the given pstatus  | 
 Set<WFState> | 
getStateSet()
Returns the state set of this workflow  | 
 Set<WFTransition> | 
getTransitionSet()
 | 
 String | 
getType()
 | 
 Set<WFState> | 
getWorkStateSet(Group group,
                Workspace workspace)
Returns all the state a group can work in, for given Workspace.  | 
 Set<WFState> | 
getWorkStateSet(Publication pub,
                Member member)
Returns all the state a member can work in, for all Workspace.  | 
 Set<WFState> | 
getWorkStateSet(Publication pub,
                Member member,
                Workspace workspace)
Returns all the state a member can work in, for given Workspace.  | 
 Set<WFState> | 
getWorkStateSet(WFRole role)
Returns all the states bound to a given WFRole.  | 
 boolean | 
isEmpty()
Check if the workflow is empty.  | 
 boolean | 
isNew()
 | 
 boolean | 
isProcessWorkflow()
Returns true if this workflow is a process workflow.  | 
 boolean | 
isPublishWorkflow()
Returns true if this workflow is a publish workflow.  | 
 boolean | 
isRoleInvolved(WFRole role)
Returns true if the given role is involved in this Workflow  | 
 boolean | 
isUpdated()
 | 
 void | 
removeAllTransitions()
Removes all the transition of this workflow  | 
 void | 
removeState(WFState state)
Removes a state in this workflow  | 
 void | 
setId(String id)
 | 
 void | 
setInitState(WFState v)
 | 
 void | 
setLabelMap(Map<String,String> labelMap)
 | 
 void | 
setNew(boolean isNew)
 | 
 void | 
setType(String type)
 | 
 void | 
setUpdated(boolean isUpdated)
 | 
 String | 
toString()
 | 
 String | 
toXml()
Returns the XML representation for this workflow.  | 
 String | 
toXml(boolean includeXmlHeader)
 | 
| Methods inherited from class java.lang.Object | 
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
public static final String REVISION
| Constructor Detail | 
|---|
public Workflow(String id,
                String type,
                Map<String,String> labelMap,
                boolean createInitState)
labelMap - localized label mapid - the id of the workflowtype - the type of the workflowcreateInitState - if true creates a new state and uses it as initStatepublic Workflow(Workflow wf)
wf - the workflow to clone
public Workflow(Map<String,String> labelMap,
                Workflow wf,
                boolean clone)
labelMap - localized label mapwf - the workflow to cloneclone - if true do generate a new id nor new wfrole idpublic Workflow(org.jdom.Element elt)
elt - the Element| Method Detail | 
|---|
public void convertToPublishWorkflow()
public void convertToProcessWorkflow()
public String getLabel(String lang)
lang - the language
public String toXml()
public String toXml(boolean includeXmlHeader)
public String toString()
toString in class Objectpublic boolean isEmpty()
public boolean isPublishWorkflow()
public boolean isProcessWorkflow()
public boolean isRoleInvolved(WFRole role)
role - the tested Role
public int compareTo(Object obj)
compareTo in interface Comparablepublic boolean equals(Object obj)
equals in class Objectpublic String getId()
public void setId(String id)
public Map<String,String> getLabelMap()
public void setLabelMap(Map<String,String> labelMap)
public String getType()
public void setType(String type)
public WFState getInitState()
public void setInitState(WFState v)
public Set<WFTransition> getTransitionSet()
public Set<WFState> getStateSet()
public WFState getState(int pstatus)
pstatus - the pstatus of the searched WFState
public String getStateLabel(int pstatus,
                            String lang)
pstatus - the pstatus of the searched WFStatelang - the language code in which to retrieve the label
public Set<WFState> getWorkStateSet(Publication pub,
                                    Member member)
pub - the publication to work onmember - the member
public Set<WFState> getWorkStateSet(Publication pub,
                                    Member member,
                                    Workspace workspace)
pub - the publication to work onmember - the memberworkspace - the Workspace in which to retrieve state
public Set<WFState> getWorkStateSet(Group group,
                                    Workspace workspace)
group - the groupworkspace - the Workspace in which to retrieve state
public Set<WFState> getWorkStateSet(WFRole role)
role - 
public boolean canWorkInState(Publication pub,
                              Member member,
                              WFState state)
pub - the publication to work onmember - the memberstate - the state
public boolean canChangeState(WFRole role,
                              WFState source,
                              WFState target)
role - the rolesource - the source statetarget - the target state
public boolean canChangeState(Member member,
                              Publication pub,
                              WFState target)
member - the memberpub - the publicationtarget - the target state
public boolean canChangeState(Member member,
                              Publication pub,
                              WFState source,
                              WFState target)
member - the memberpub - the publicationsource - the source statetarget - the target state
public Set<WFState> getNextStateSet(Publication pub,
                                    Member member)
pub - the publicationmember - the member
public Set<WFState> getNextStateSet(Publication pub,
                                    Member member,
                                    WFState state,
                                    Workspace ws)
pub - the publication to work onmember - the memberstate - the source statews - the current workspace
public void addState(WFState state)
state - the state to addpublic void removeState(WFState state)
state - the state to remove
public void addTransition(WFState source,
                          WFState target,
                          WFRole role)
source - the source statetarget - the target staterole - the rolepublic void removeAllTransitions()
public Set<WFTransition> getIncomingTransitionSet(WFState state)
state - the state
public void cloneStates(Workflow other)
other - the other workflow to clone the statepublic WFRole getRole(String roleId)
roleId - the role Id
public Set<WFRole> getRoleSet()
public void addRole(WFRole role)
role - the role to be added
public void addRole(WFRole role,
                    boolean register)
role - the role to be addedregister - should register role to channel
public void deleteRole(WFRole wfRole,
                       Member member)
wfRole - the WFRole to be deletedmember - the member which perform this actionpublic 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 | |||||||||