public class WorkflowHelper extends AbstractLogEnabled implements Component, Serviceable
| Modifier and Type | Field and Description |
|---|---|
protected WorkflowProvider |
_workflowProvider
The content types extension point
|
static String |
ROLE
The Avalon role
|
| Constructor and Description |
|---|
WorkflowHelper() |
| Modifier and Type | Method and Description |
|---|---|
String |
getActionName(String workflowName,
int actionID)
Retrieves the name of an action.
|
int[] |
getAllActions(String workflowName)
Retrieves all actions of the workflow of a particular type of workflow
except initial actions.
|
int[] |
getAllActionsFromStep(String workflowName,
int stepId)
Retrieves the action ids from a particular step.
|
int |
getInitialAction(String workflowName)
Retrieves the initial action id of a workflow.
|
List<com.opensymphony.workflow.spi.Step> |
getStepAt(com.opensymphony.workflow.Workflow workflow,
long entryId,
Date timestamp)
Get the steps the workflow was "in" at a given date.
|
String |
getStepName(String workflowName,
int stepId)
Retrieves the name of a step.
|
List<com.opensymphony.workflow.spi.Step> |
getStepsBetween(com.opensymphony.workflow.Workflow workflow,
long entryId,
Date start,
Date end)
Get the steps the workflow was "in" between two dates.
|
com.opensymphony.workflow.loader.WorkflowDescriptor |
getWorkflowDescriptor(String workflowName)
Returns a workflow definition object associated with the given name.
|
String[] |
getWorkflowNames()
Get a list of workflow names available
|
void |
service(ServiceManager smanager) |
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerprotected WorkflowProvider _workflowProvider
public WorkflowHelper()
public void service(ServiceManager smanager) throws ServiceException
service in interface ServiceableServiceExceptionpublic String[] getWorkflowNames()
public com.opensymphony.workflow.loader.WorkflowDescriptor getWorkflowDescriptor(String workflowName)
workflowName - the name of the workflowpublic int[] getAllActions(String workflowName) throws IllegalArgumentException
workflowName - the name of the workflow.IllegalArgumentException - If the workflow name is not valid.public String getActionName(String workflowName, int actionID)
workflowName - The name of the workflow.actionID - The id of the action.public String getStepName(String workflowName, int stepId)
workflowName - the name of the workflow.stepId - the id of the step.public int getInitialAction(String workflowName)
workflowName - the name of the workflow.-1
if the workflow does not exist.public int[] getAllActionsFromStep(String workflowName, int stepId)
workflowName - the name of the workflow.stepId - the id of the step.public List<com.opensymphony.workflow.spi.Step> getStepAt(com.opensymphony.workflow.Workflow workflow, long entryId, Date timestamp) throws com.opensymphony.workflow.WorkflowException
workflow - workflowentryId - the workflow entry ID.timestamp - the date.com.opensymphony.workflow.WorkflowException - if an error occurs.public List<com.opensymphony.workflow.spi.Step> getStepsBetween(com.opensymphony.workflow.Workflow workflow, long entryId, Date start, Date end) throws com.opensymphony.workflow.WorkflowException
workflow - workflowentryId - the workflow entry ID.start - the start date.end - the end date.com.opensymphony.workflow.WorkflowException - if an error occurs.