Interface XmlWorkflowFactory

All Known Implementing Classes:
XmlWorkflowFactoryImpl

public interface XmlWorkflowFactory
The workflowfactory is responsible for parsing the workflow xml file and is used to retrieve info about the workflow: - the workflow for a certain collection - collections mapped to a certain workflow - collections not mapped to any workflow - configured workflows and the default workflow - workflow action by name
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), Maria Verdonck (Atmire) on 11/12/2019
  • Method Details

    • getWorkflow

      Workflow getWorkflow(Collection collection) throws WorkflowConfigurationException
      Retrieve the workflow configuration for a single collection
      Parameters:
      collection - the collection for which we want our workflow
      Returns:
      the workflow configuration
      Throws:
      WorkflowConfigurationException - occurs if there is a configuration error in the workflow
    • getWorkflowByName

      Workflow getWorkflowByName(String workflowName) throws WorkflowConfigurationException
      Retrieves the workflow configuration by name
      Parameters:
      workflowName - the name for which we want our workflow
      Returns:
      the workflow configuration
      Throws:
      WorkflowConfigurationException - occurs if there is no workflow configured by that name
    • getAllConfiguredWorkflows

      List<Workflow> getAllConfiguredWorkflows()
      Creates a list of all configured workflows, or returns the cache of this if it was already created
      Returns:
      List of all configured workflows
    • workflowByThisNameExists

      boolean workflowByThisNameExists(String workflowName)
      Check to see if there is a workflow configured by the given name
      Parameters:
      workflowName - Name of a possible configured workflow
      Returns:
      True if there is a workflow configured by this name, false otherwise
    • isDefaultWorkflow

      boolean isDefaultWorkflow(String workflowName)
      Check to see if the given workflowName is the workflow configured to be default for collections
      Parameters:
      workflowName - Name of workflow to check if default
      Returns:
      True if given workflowName is the workflow mapped to default for collections, otherwise false
    • getDefaultWorkflow

      Workflow getDefaultWorkflow()
      Gets the default workflow, i.e. the workflow that is mapped to collection=default in workflow.xml
    • getCollectionHandlesMappedToWorkflow

      List<Collection> getCollectionHandlesMappedToWorkflow(Context context, String workflowName)
      Return a list of collections that are mapped to the given workflow in the workflow configuration. * Makes use of a cache so it only retrieves the workflowName->List if it's not cached
      Parameters:
      context - Dspace context
      workflowName - Name of workflow we want the collections of that are mapped to is
      Returns:
      List of collections mapped to the requested workflow
    • getAllNonMappedCollectionsHandles

      List<Collection> getAllNonMappedCollectionsHandles(Context context)
      Returns list of collections that are not mapped to any configured workflow, and thus use the default workflow
      Returns:
      List of collections not mapped to any workflow
    • getActionByName

      WorkflowActionConfig getActionByName(String workflowActionName)
      Retrieves a WorkflowActionConfig object based on its name, should correspond with bean id in workflow-actions.xml
      Parameters:
      workflowActionName - Name of workflow action we want to retrieve
      Returns:
      Workflow action object corresponding to the given workflowActionName
    • getStepByName

      Step getStepByName(String workflowStepName)
      Retrieves a Step object based on its name, should correspond with bean id in workflow.xml
      Parameters:
      workflowStepName - Name of workflow step we want to retrieve
      Returns:
      Workflow step object corresponding to the given workflowStepName