Class IridaWorkflowLoaderService


  • @Service
    public class IridaWorkflowLoaderService
    extends java.lang.Object
    Used to load up IRIDA workflows.
    • Constructor Detail

      • IridaWorkflowLoaderService

        @Autowired
        public IridaWorkflowLoaderService​(org.springframework.oxm.Unmarshaller workflowDescriptionUnmarshaller,
                                          AnalysisTypesService analysisTypesService)
        Builds a new IridaWorkflowLoaderService with the given unmarshaller.
        Parameters:
        workflowDescriptionUnmarshaller - The unmarshaller to use.
        analysisTypesService - The AnalysisTypesService to use.
    • Method Detail

      • loadAllWorkflowImplementations

        public java.util.Set<IridaWorkflow> loadAllWorkflowImplementations​(java.nio.file.Path workflowDirectory)
                                                                    throws java.io.IOException,
                                                                           IridaWorkflowLoadException
        Loads up a set of IridaWorkflows from the given directory.
        Parameters:
        workflowDirectory - The directory containing the different workflow implementations and files.
        Returns:
        A set of IridaWorkflows for all implementations.
        Throws:
        java.io.IOException - If there was an issue reading one of the workflow files.
        IridaWorkflowLoadException - If there was an issue when loading up the workflows.
      • loadIridaWorkflowFromDirectory

        public IridaWorkflow loadIridaWorkflowFromDirectory​(java.nio.file.Path workflowDirectory)
                                                     throws java.io.IOException,
                                                            IridaWorkflowLoadException
        Loads up a workflow from the given directory.
        Parameters:
        workflowDirectory - The directory containing a single version of a workflow.
        Returns:
        An IridaWorkflow from this directory.
        Throws:
        java.io.IOException - If there was an error reading one of the files.
        IridaWorkflowLoadException - If there was an issue loading up the workflow.
      • loadIridaWorkflow

        public IridaWorkflow loadIridaWorkflow​(java.nio.file.Path descriptionFile,
                                               java.nio.file.Path structureFile)
                                        throws java.io.IOException,
                                               IridaWorkflowLoadException
        Loads up an IridaWorkflow from the given information files.
        Parameters:
        descriptionFile - The description file for the workflow.
        structureFile - The file describing the structure of a workflow.
        Returns:
        An IridaWorkflow object for this workflow.
        Throws:
        java.io.IOException - If there was an issue reading the passed file.
        IridaWorkflowLoadException - If there was an issue loading up the workflow.
      • loadWorkflowDescription

        public IridaWorkflowDescription loadWorkflowDescription​(java.nio.file.Path descriptionFile)
                                                         throws java.io.IOException,
                                                                IridaWorkflowLoadException
        Loads up the workflow description from the given file.
        Parameters:
        descriptionFile - The file to load up a workflow description.
        Returns:
        An IridaWorkflowDescription object.
        Throws:
        java.io.IOException - If there was an issue reading the passed file.
        IridaWorkflowLoadException - If there was an issue loading up the workflow description.
      • loadWorkflowStructure

        public IridaWorkflowStructure loadWorkflowStructure​(java.nio.file.Path structureFile)
                                                     throws java.io.FileNotFoundException
        Loads up the structure of the workflow given the file.
        Parameters:
        structureFile - The file to load up.
        Returns:
        An IridaWorkflowStructure defining the structure of the workflow.
        Throws:
        java.io.FileNotFoundException - If the structure file could not be found.