Package org.opencastproject.workflow.api
Class YamlWorkflowParser
java.lang.Object
org.opencastproject.workflow.api.YamlWorkflowParser
Provides a mechanism to un/marshall workflow instances and definitions to/from xml.
-
Method Summary
Modifier and TypeMethodDescriptionstatic WorkflowDefinitionLoads a workflow definition from the given input stream.static WorkflowDefinitionLoads a workflow definition from the xml stream.static List<WorkflowDefinition> Loads workflow definitions from the given input stream.static JaxbWorkflowConfigurationLoads a workflow instance from the given input stream.static JaxbWorkflowConfigurationLoads a workflow instance from the xml stream.static WorkflowSetLoads a set of workflow instances from the given input stream.static StringtoYaml(WorkflowDefinition workflowDefinition) static StringtoYaml(WorkflowInstance workflowInstance)
-
Method Details
-
parseWorkflowDefinitions
public static List<WorkflowDefinition> parseWorkflowDefinitions(InputStream in) throws WorkflowParsingException Loads workflow definitions from the given input stream.- Parameters:
in-- Returns:
- the list of workflow definitions
- Throws:
WorkflowParsingException
-
parseWorkflowDefinition
public static WorkflowDefinition parseWorkflowDefinition(InputStream in) throws WorkflowParsingException Loads a workflow definition from the given input stream.- Parameters:
in- the input stream- Returns:
- the workflow definition
- Throws:
WorkflowParsingException- if creating the workflow definition fails
-
parseWorkflowDefinition
Loads a workflow definition from the xml stream.- Parameters:
in- xml stream of the workflow definition- Returns:
- the workflow definition
- Throws:
WorkflowParsingException- if creating the workflow definition fails
-
parseWorkflowInstance
public static JaxbWorkflowConfiguration parseWorkflowInstance(InputStream in) throws WorkflowParsingException Loads a workflow instance from the given input stream.- Parameters:
in- the input stream- Returns:
- the workflow instance
- Throws:
WorkflowParsingException- if creating the workflow instance fails
-
parseWorkflowInstance
public static JaxbWorkflowConfiguration parseWorkflowInstance(String in) throws WorkflowParsingException Loads a workflow instance from the xml stream.- Parameters:
in- xml stream of the workflow instance- Returns:
- the workflow instance
- Throws:
WorkflowParsingException- if creating the workflow instance fails
-
parseWorkflowSet
Loads a set of workflow instances from the given input stream.- Parameters:
in- the input stream- Returns:
- the set of workflow instances
- Throws:
WorkflowParsingException- if creating the workflow instance set fails
-
toYaml
- Throws:
WorkflowParsingException
-
toYaml
- Throws:
WorkflowParsingException
-