Class AbstractWorkflow

  • All Implemented Interfaces:
    Workflow, Serializable
    Direct Known Subclasses:
    CommandWorkflow

    public abstract class AbstractWorkflow
    extends Object
    implements Workflow
    This class define a Workflow. This class must be extended by a class to be able to work with a specific workflow file format.
    Since:
    2.0
    Author:
    Laurent Jourdren
    See Also:
    Serialized Form
    • Constructor Detail

      • AbstractWorkflow

        protected AbstractWorkflow​(ExecutorArguments executionArguments,
                                   Design design)
                            throws EoulsanException
        Protected constructor.
        Parameters:
        executionArguments - execution arguments
        design - design to use for the workflow
        Throws:
        EoulsanException - if an error occurs while configuring the workflow
    • Method Detail

      • getDesign

        public Design getDesign()
        Description copied from interface: Workflow
        Get the design used by the workflow.
        Specified by:
        getDesign in interface Workflow
        Returns:
        a Design Object
      • getSteps

        public Set<Step> getSteps()
        Description copied from interface: Workflow
        Get the steps of the workflow.
        Specified by:
        getSteps in interface Workflow
        Returns:
        a Set with the steps of the workflow.
      • getRootStep

        public Step getRootStep()
        Description copied from interface: Workflow
        Get the first steps of the workflow.
        Specified by:
        getRootStep in interface Workflow
        Returns:
        the root step of the workflow
      • getDesignStep

        public Step getDesignStep()
        Description copied from interface: Workflow
        Get the design step of the workflow.
        Specified by:
        getDesignStep in interface Workflow
        Returns:
        the design step of the workflow
      • getFirstStep

        public Step getFirstStep()
        Description copied from interface: Workflow
        Get the first step of the workflow (after generator steps).
        Specified by:
        getFirstStep in interface Workflow
        Returns:
        the first step of the workflow
      • getCheckerStep

        protected Step getCheckerStep()
        Get checker step.
        Returns:
        the checker step
      • getWorkflowContext

        public WorkflowContext getWorkflowContext()
        Get the real Context object. This method is useful to redefine context values like base directory.
        Returns:
        The Context object
      • register

        protected void register​(AbstractStep step)
        Register a step of the workflow.
        Parameters:
        step - step to register
      • stepStateEvent

        public void stepStateEvent​(fr.ens.biologie.genomique.eoulsan.core.workflow.StepStateEvent event)
        Listen StepState events. Update the status of a step. This method is used by steps to inform the workflow object that the status of the step has been changed.
        Parameters:
        event - the event to handle
      • deleteOnExit

        public void deleteOnExit​(DataFile file)
        Description copied from interface: Workflow
        Delete a file on the exit of the workflow.
        Specified by:
        deleteOnExit in interface Workflow
        Parameters:
        file - file to remove
      • createShutdownHookThread

        public Thread createShutdownHookThread()
        Create a shutdown hook thread.
        Returns:
        a new thread
      • saveConfigurationFiles

        protected void saveConfigurationFiles()
                                       throws EoulsanException
        Save configuration files.
        Throws:
        EoulsanException - if an error while writing files
      • checkDirectories

        public void checkDirectories()
                              throws EoulsanException
        Check directories needed by the workflow.
        Throws:
        EoulsanException - if an error about the directories is found
      • createEoulsanDataDirectoryIfRequired

        public void createEoulsanDataDirectoryIfRequired()
                                                  throws EoulsanException
        Create an "eoulsan-data" directory if mapper indexes or genome description storage has not been defined.
        Throws:
        EoulsanException - if an error about the directories is found