Package org.dspace.xmlworkflow.state
Class Workflow
- java.lang.Object
-
- org.dspace.xmlworkflow.state.Workflow
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware
public class Workflow extends Object implements org.springframework.beans.factory.BeanNameAware
Contains all the steps involved in a certain configured workflow.- Author:
- Bram De Schouwer (bram.deschouwer at dot com), Kevin Van de Velde (kevin at atmire dot com), Ben Bosman (ben at atmire dot com), Mark Diggory (markd at atmire dot com)
-
-
Constructor Summary
Constructors Constructor Description Workflow()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StepgetFirstStep()StringgetID()Get the name of this Workflow.StepgetNextStep(Context context, XmlWorkflowItem wfi, Step currentStep, int outcome)Find the Step that follows a given Step given an outcome.Map<String,Role>getRoles()Get the roles that are used in this workflowStepgetStep(String stepID)Return a step with a given name.List<Step>getSteps()Get the steps that need to be executed in this workflow before the item is archivedvoidsetBeanName(String s)voidsetFirstStep(Step firstStep)voidsetSteps(List<Step> steps)Set the steps that need to be executed in this workflow before the item is archived
-
-
-
Method Detail
-
getFirstStep
public Step getFirstStep()
-
getID
public String getID()
Get the name of this Workflow.- Returns:
- the name.
- See Also:
setBeanName(java.lang.String)
-
getStep
public Step getStep(String stepID) throws WorkflowConfigurationException
Return a step with a given name.- Parameters:
stepID- name of the Step to find.- Returns:
- the identified Step.
- Throws:
WorkflowConfigurationException- if the named step is not found.
-
getNextStep
public Step getNextStep(Context context, XmlWorkflowItem wfi, Step currentStep, int outcome) throws WorkflowConfigurationException, SQLException
Find the Step that follows a given Step given an outcome.- Parameters:
context-wfi- the item whose steps are consulted.currentStep- the step being consulted.outcome- the outcome ofcurrentStep.- Returns:
- the next step.
- Throws:
WorkflowConfigurationException- if the next step is invalid.SQLException- passed through.
-
setFirstStep
@Autowired(required=true) public void setFirstStep(Step firstStep)
-
getSteps
public List<Step> getSteps()
Get the steps that need to be executed in this workflow before the item is archived- Returns:
- the workflow steps
-
setSteps
@Autowired(required=true) public void setSteps(List<Step> steps)
Set the steps that need to be executed in this workflow before the item is archived- Parameters:
steps- the workflow steps
-
getRoles
public Map<String,Role> getRoles()
Get the roles that are used in this workflow- Returns:
- a map containing the roles, the role name will the key, the role itself the value
-
setBeanName
public void setBeanName(String s)
- Specified by:
setBeanNamein interfaceorg.springframework.beans.factory.BeanNameAware
-
-