org.dspace.xmlworkflow.state
Class Step

java.lang.Object
  extended by org.dspace.xmlworkflow.state.Step

public class Step
extends Object

A class that contains all the data of an xlworkflow step

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
Step(String id, Workflow workflow, Role role, UserSelectionActionConfig userSelectionMethod, List<String> actionConfigsList, Map<Integer,String> outcomes, int requiredUsers)
           
 
Method Summary
 WorkflowActionConfig getActionConfig(String actionID)
           
 String getId()
           
 WorkflowActionConfig getNextAction(WorkflowActionConfig currentAction)
           
 String getNextStepID(int outcome)
           
 int getRequiredUsers()
           
 Role getRole()
           
 UserSelectionActionConfig getUserSelectionMethod()
           
 Workflow getWorkflow()
           
 boolean hasUI()
          Boolean that returns whether or not the actions in this step have a ui
 boolean isFinished(Context c, XmlWorkflowItem wfi)
          Check if enough users have finished this step for it to continue
 boolean isValidStep(Context context, XmlWorkflowItem wfi)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Step

public Step(String id,
            Workflow workflow,
            Role role,
            UserSelectionActionConfig userSelectionMethod,
            List<String> actionConfigsList,
            Map<Integer,String> outcomes,
            int requiredUsers)
Method Detail

getActionConfig

public WorkflowActionConfig getActionConfig(String actionID)

hasUI

public boolean hasUI()
Boolean that returns whether or not the actions in this step have a ui

Returns:
a boolean

getNextStepID

public String getNextStepID(int outcome)
                     throws WorkflowException,
                            IOException,
                            WorkflowConfigurationException,
                            SQLException
Throws:
WorkflowException
IOException
WorkflowConfigurationException
SQLException

isValidStep

public boolean isValidStep(Context context,
                           XmlWorkflowItem wfi)
                    throws WorkflowConfigurationException,
                           SQLException
Throws:
WorkflowConfigurationException
SQLException

getUserSelectionMethod

public UserSelectionActionConfig getUserSelectionMethod()

getNextAction

public WorkflowActionConfig getNextAction(WorkflowActionConfig currentAction)

getId

public String getId()

getWorkflow

public Workflow getWorkflow()

isFinished

public boolean isFinished(Context c,
                          XmlWorkflowItem wfi)
                   throws SQLException
Check if enough users have finished this step for it to continue

Parameters:
wfi - the workflow item to check
Returns:
if enough users have finished this task
Throws:
SQLException

getRequiredUsers

public int getRequiredUsers()

getRole

public Role getRole()


Copyright © 2012 DuraSpace. All Rights Reserved.