|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.oodt.cas.workflow.lifecycle.WorkflowLifecycleManager
public class WorkflowLifecycleManager
A Manager interface for the WorkflowLifecycles
used by the webapp to
determine status for a WorkflowInstance
.
Constructor Summary | |
---|---|
WorkflowLifecycleManager(String lifecyclesFilePath)
Constructs a new WorkflowLifecycleManager with the WorkflowLifecycle s identified in the provided file path. |
Method Summary | |
---|---|
static String |
formatPct(double pct)
Formats a double percent number to a 2 decimal place String. |
WorkflowLifecycle |
getDefaultLifecycle()
|
int |
getLastCompletedStageNum(WorkflowInstance inst)
Gets the last completed stage for the given WorkflowInstance . |
WorkflowLifecycle |
getLifecycleForWorkflow(Workflow workflow)
Gets the WorkflowLifecycle associated with the provided
Workflow model. |
int |
getNumStages(Workflow workflow)
Gets the total number of WorkflowLifecycleStage s for the
provided Workflow model. |
double |
getPercentageComplete(WorkflowInstance inst)
Gets the percentage complete that this WorkflowInstance is based
on its WorkflowLifecycle . |
WorkflowLifecycleStage |
getStage(WorkflowInstance inst)
Gets the current WorkflowLifecycleStage for the provided
WorkflowInstance based on its
WorkflowInstance.getStatus() value. |
int |
getStageNum(WorkflowInstance inst)
Gets the number of the current WorkflowLifecycleStage for the
provided WorkflowInstance . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WorkflowLifecycleManager(String lifecyclesFilePath) throws InstantiationException
WorkflowLifecycle
s identified in the provided file path.
lifecyclesFilePath
-
InstantiationException
Method Detail |
---|
public int getStageNum(WorkflowInstance inst)
WorkflowLifecycleStage
for the
provided WorkflowInstance
.
inst
- The WorkflowInstance
to get the current stage num for.
WorkflowLifecycleStage
for the provided
WorkflowInstance
.public int getNumStages(Workflow workflow)
WorkflowLifecycleStage
s for the
provided Workflow
model.
workflow
- The Workflow
model to get the number of
WorkflowLifecycleStage
s for. Only the identifier
parameter from
WorkflowLifecycleStage
s for the
provided Workflow
model.public WorkflowLifecycleStage getStage(WorkflowInstance inst)
WorkflowLifecycleStage
for the provided
WorkflowInstance
based on its
WorkflowInstance.getStatus()
value.
inst
- The WorkflowInstance
to get the current stage for.
WorkflowLifecycleStage
for the provided
WorkflowInstance
based on its
WorkflowInstance.getStatus()
value.public double getPercentageComplete(WorkflowInstance inst)
WorkflowInstance
is based
on its WorkflowLifecycle
.
inst
- The WorkflowInstance
to get the completion percentage
for.
WorkflowInstance
.public static String formatPct(double pct)
pct
- The double percent number to format.
public WorkflowLifecycle getDefaultLifecycle()
WorkflowLifecycle
managed by this
WorkflowLifecycleManager.public WorkflowLifecycle getLifecycleForWorkflow(Workflow workflow)
WorkflowLifecycle
associated with the provided
Workflow
model.
workflow
- The Workflow
to obtain the WorkflowLifecycle
for.
WorkflowLifecycle
associated with the provided
Workflow
model.public int getLastCompletedStageNum(WorkflowInstance inst)
WorkflowInstance
.
inst
- The WorkflowInstance
to obtain the last completed
stage number for.
WorkflowInstance
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |