|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jalios.jcms.WorkflowManager
public class WorkflowManager
This class manages JCMS workflows.
| Field Summary | |
|---|---|
static Workflow |
DEFAULT_WORKFLOW
|
static String |
REVISION
|
protected static Map<String,WFRole> |
wfRoleMap
|
| 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 |
| 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 |
| Method Summary | |
|---|---|
protected static void |
addRole(WFRole role)
|
static void |
addWFExpressAlarm(Publication pub)
Adds a WFReminder alarm for the given publication (only for main leader replica). |
static void |
addWFReminderAlarm(Publication pub)
Adds a WFReminder alarm for the given publication (only for main leader replica). |
static void |
addWorkflow(String id,
Workflow wf)
Binds a Workflow to a given class |
static void |
convertFromVersion3()
Converts old JCMS (<= 5.6) workflow.xml to new (>=5.7) workflow structure. |
static Comparator<Workflow> |
getAlphabeticalComparator()
|
static Workflow |
getCopyWorkflow(String id)
Returns the workflow bound to the given id in copyWorkflowMap |
static Map<String,Workflow> |
getCopyWorkflowMap()
Returns the copy of the workflow map (used to perform changes with no effect until the workflows are saved) |
static Workflow |
getDefaultWorkflow()
|
static WorkflowManager |
getInstance()
|
static WFNote |
getLastWFNote(Publication pub)
Returns the last WFNote created for this publication. |
static String |
getUnknownWFStateLabel(int pstatus)
Returns the label of an unknown pstatus. |
static List<WFNote> |
getWFNoteList(Publication pub)
Returns the list of WFNote bound to the given publication. |
static WFRole |
getWFRole(String wfRoleId)
|
static Set<String> |
getWFRoleIdSet()
Returns a Set of workflow role's ids (String) as defined by the tag <role... |
static String |
getWFStateStateLabel(Publication pub,
int pstatus,
String userLang)
Returns the label of the given pstatus. |
static String |
getWFStateStateLabel(Workflow wf,
int pstatus,
String userLang)
Returns the label of the given pstatus. |
static String |
getWFStateStateLabelHtml(Publication pub,
int pstatus,
String userLang)
Returns the HTML code for the label of the given pstatus. |
static String |
getWFStateStateLabelHtml(Workflow wf,
int pstatus,
String userLang)
Returns the HTML code for the label of the given pstatus. |
static WKRole |
getWKRole(String wkRoleId)
|
static Set<WKRole> |
getWKRoles(WFRole wfRole)
|
static Workflow |
getWorkflow(Publication pub)
Returns the workflow bound to a given publication (general workflow, not instance one if any is set. |
static Workflow |
getWorkflow(String wfId)
Return a Workflow from a given Id |
static Set<String> |
getWorkflowIdSet()
Return the set of Workflow id from the workflow Map |
static Set<String> |
getWorkflowIdSet(Class typeClass)
Return the set of workflow id from the workflow Map compatible with the typeClass |
static Map<String,Workflow> |
getWorkflowMap()
Returns the workflow map. |
static Map<String,Workflow> |
getWorkflowMap(boolean copy)
Returns the workflow map or the copy of the workflow map (without the default workflow) |
static Set<Workflow> |
getWorkflowSet()
Return the set of workflow from the workflow Map |
static Set<Workflow> |
getWorkflowSet(Class typeClass)
Return the set of workflow from the workflow Map compatible with the typeClass |
static boolean |
hasAlreadyVoted(Publication pub,
Member mbr)
Check if the given member has already voted for the given publication. |
static void |
initWorkflow()
Initialize the workflows |
static void |
initWorkflowAlarms()
|
static boolean |
isCompatibleWorkflow(Workflow workflow,
Class typeClass)
indicates if the Workflow is compatible with the type Class |
static boolean |
isUpdated()
Returns true if at least one workflow is new, has been updated or has been deleted. |
static Map<String,Workflow> |
parseAllWorkflows()
Parse all workflows contains in JCMS workflows directory. |
static void |
removeAllWFNotes(Publication pub)
Removes all the WFNote bound to the given publication. |
protected static void |
removeRole(WFRole role)
|
static void |
removeWFExpressAlarm(Publication pub)
Removes the WFExpress alarm for the given publication. |
static void |
removeWFReminderAlarm(Publication pub)
Removes the WFExpress alarm for the given publication. |
static void |
removeWorkflow(String id)
Unbinds a Workflow to a given wfId |
static void |
revertAllWorkflows()
Revert all the workflow |
static void |
saveAllWorkflows()
Save the Workflow on disk |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String REVISION
public static Workflow DEFAULT_WORKFLOW
protected static final Map<String,WFRole> wfRoleMap
| Method Detail |
|---|
public static WorkflowManager getInstance()
public static void convertFromVersion3()
throws IOException,
org.jdom.JDOMException
IOException
org.jdom.JDOMException
public static Map<String,Workflow> parseAllWorkflows()
throws org.jdom.JDOMException,
IOException
workflows directory.
org.jdom.JDOMException
IOExceptionpublic static void initWorkflowAlarms()
public static Workflow getWorkflow(String wfId)
wfId - the WOrkflow Id
public static Set<Workflow> getWorkflowSet()
public static Set<String> getWorkflowIdSet()
Workflow id from the workflow Map
Workflow idpublic static Set<Workflow> getWorkflowSet(Class typeClass)
typeClass - the Class with wich the workflow should be compatible
public static boolean isCompatibleWorkflow(Workflow workflow,
Class typeClass)
Workflow is compatible with the type Class
workflow - the WorkflowtypeClass - the type Class
Workflow can be used with this type class, false otherwise (null parameter always return false)public static Set<String> getWorkflowIdSet(Class typeClass)
typeClass - the Class with wich the workflow should be compatible
Workflow id compatible with the typeClasspublic static Map<String,Workflow> getWorkflowMap()
public static Map<String,Workflow> getCopyWorkflowMap()
public static Map<String,Workflow> getWorkflowMap(boolean copy)
copy - if true returns the copy of the workflow map
public static void addWorkflow(String id,
Workflow wf)
id - the workflow idwf - the workflowpublic static void removeWorkflow(String id)
id - the workflow idpublic static Workflow getCopyWorkflow(String id)
id - the workflow id
public static Workflow getWorkflow(Publication pub)
pub - the publication
public static void saveAllWorkflows()
public static void revertAllWorkflows()
public static void initWorkflow()
throws Exception
Exception - if the initialization failedpublic static Workflow getDefaultWorkflow()
public static boolean isUpdated()
protected static void addRole(WFRole role)
protected static void removeRole(WFRole role)
public static Set<String> getWFRoleIdSet()
<role... > in the workflow.xml file of this JCMS site.
- Returns:
- Set of String
public static WFRole getWFRole(String wfRoleId)
public static WKRole getWKRole(String wkRoleId)
public static Set<WKRole> getWKRoles(WFRole wfRole)
public static String getWFStateStateLabel(Publication pub,
int pstatus,
String userLang)
pub - the publication to be used to get the workflow.pstatus - the pstatususerLang - the user language
public static String getWFStateStateLabel(Workflow wf,
int pstatus,
String userLang)
wf - the workflow.pstatus - the pstatususerLang - the user language
public static String getWFStateStateLabelHtml(Publication pub,
int pstatus,
String userLang)
pub - the publication to be used to get the workflow.pstatus - the pstatususerLang - the user language
public static String getWFStateStateLabelHtml(Workflow wf,
int pstatus,
String userLang)
wf - the workflow.pstatus - the pstatususerLang - the user language
public static String getUnknownWFStateLabel(int pstatus)
pstatus -
public static List<WFNote> getWFNoteList(Publication pub)
pub - the publication
public static WFNote getLastWFNote(Publication pub)
pub - the publication
public static boolean hasAlreadyVoted(Publication pub,
Member mbr)
pub - the publicationmbr - the member
public static void removeAllWFNotes(Publication pub)
pub - the publicationpublic static void addWFReminderAlarm(Publication pub)
pub - the publicationpublic static void removeWFReminderAlarm(Publication pub)
pub - the publicationpublic static void addWFExpressAlarm(Publication pub)
pub - the publicationpublic static void removeWFExpressAlarm(Publication pub)
pub - the publicationpublic static Comparator<Workflow> getAlphabeticalComparator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||