org.apache.oodt.cas.workflow.lifecycle
Class WorkflowLifecycle

java.lang.Object
  extended by org.apache.oodt.cas.workflow.lifecycle.WorkflowLifecycle

public class WorkflowLifecycle
extends Object

Version:
$Revision$

Defines the lifecycle of a Workflow, identifying what WorkflowStatuses belong to a particular phase.

.
Author:
mattmann

Field Summary
static String DEFAULT_LIFECYCLE
           
static String NO_WORKFLOW_ID
           
 
Constructor Summary
WorkflowLifecycle()
          Default Constructor.
WorkflowLifecycle(String name, String workflowId)
          Constructs a new WorkflowLifecycle with the given parameters.
 
Method Summary
 void addStage(WorkflowLifecycleStage stage)
          Adds a WorkflowStage to this WorkflowLifecycle.
 void clearStages()
          Clears the WorkflowStages in this WorkflowLifecycle.
 String getName()
           
 WorkflowLifecycleStage getStageForWorkflow(String status)
          Gets the associated WorkflowLifecycleStage for a WorkflowInstance with a given status.
 SortedSet getStages()
           
 String getWorkflowId()
           
 boolean removeStage(WorkflowLifecycleStage stage)
          Removes the given WorkflowStage from this WorkflowLifecycle.
 void setName(String name)
           
 void setWorkflowId(String workflowId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_LIFECYCLE

public static final String DEFAULT_LIFECYCLE
See Also:
Constant Field Values

NO_WORKFLOW_ID

public static final String NO_WORKFLOW_ID
See Also:
Constant Field Values
Constructor Detail

WorkflowLifecycle

public WorkflowLifecycle()
Default Constructor.


WorkflowLifecycle

public WorkflowLifecycle(String name,
                         String workflowId)
Constructs a new WorkflowLifecycle with the given parameters.

Parameters:
name - The name of the WorkflowLifecycle.
workflowId - The associated identifier for the Workflows that this WorkflowLifecycle is appropriate for.
Method Detail

getName

public String getName()
Returns:
the name

setName

public void setName(String name)
Parameters:
name - the name to set

getStages

public SortedSet getStages()
Returns:
the stages

addStage

public void addStage(WorkflowLifecycleStage stage)
Adds a WorkflowStage to this WorkflowLifecycle.

Parameters:
stage - The WorkflowStage to add to this WorkflowLifecycle.

removeStage

public boolean removeStage(WorkflowLifecycleStage stage)
Removes the given WorkflowStage from this WorkflowLifecycle.

Parameters:
stage - The WorkflowStage to remove.
Returns:
True on success, false on failure.

clearStages

public void clearStages()
Clears the WorkflowStages in this WorkflowLifecycle.


getWorkflowId

public String getWorkflowId()
Returns:
the workflowId

setWorkflowId

public void setWorkflowId(String workflowId)
Parameters:
workflowId - the workflowId to set

getStageForWorkflow

public WorkflowLifecycleStage getStageForWorkflow(String status)
Gets the associated WorkflowLifecycleStage for a WorkflowInstance with a given status.

Parameters:
status - The status of the WorkflowInstance to get the WorkflowLifecycleStage for.
Returns:
The corresponding WorkflowLifecycleStage for the WorkflowInstance with the given status, or null if that status does not exist in any defined WorkflowLifecycleStage.


Copyright © 1999-2011 Apache OODT. All Rights Reserved.