Class XmlWorkflowFactoryImpl

  • All Implemented Interfaces:
    XmlWorkflowFactory

    public class XmlWorkflowFactoryImpl
    extends Object
    implements XmlWorkflowFactory
    This is injected with the external workflow configuration and is used to retrieve information 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
    • Constructor Detail

      • XmlWorkflowFactoryImpl

        public XmlWorkflowFactoryImpl()
    • Method Detail

      • setWorkflowMapping

        @Autowired(required=true)
        public void setWorkflowMapping​(Map<String,​Workflow> workflowMapping)
        Inject the mapping from Collection Handle into Workflow.
        Parameters:
        workflowMapping - map from Handle name to Workflow object.
      • getCollectionHandlesMappedToWorkflow

        public List<Collection> getCollectionHandlesMappedToWorkflow​(Context context,
                                                                     String workflowName)
        Description copied from interface: XmlWorkflowFactory
        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
        Specified by:
        getCollectionHandlesMappedToWorkflow in interface XmlWorkflowFactory
        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
      • workflowByThisNameExists

        public boolean workflowByThisNameExists​(String workflowName)
        Description copied from interface: XmlWorkflowFactory
        Check to see if there is a workflow configured by the given name
        Specified by:
        workflowByThisNameExists in interface XmlWorkflowFactory
        Parameters:
        workflowName - Name of a possible configured workflow
        Returns:
        True if there is a workflow configured by this name, false otherwise
      • isDefaultWorkflow

        public boolean isDefaultWorkflow​(String workflowName)
        Description copied from interface: XmlWorkflowFactory
        Check to see if the given workflowName is the workflow configured to be default for collections
        Specified by:
        isDefaultWorkflow in interface XmlWorkflowFactory
        Parameters:
        workflowName - Name of workflow to check if default
        Returns:
        True if given workflowName is the workflow mapped to default for collections, otherwise false
      • getStepByName

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