public class SimpleWorkflowJsonConverter extends Object
WorkflowDefinition
s from and to a
JSON representation.
Instances of this class are thread-safe.
Modifier and Type | Field and Description |
---|---|
protected List<Class<?>> |
additionalModelClasses |
protected com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
Constructor and Description |
---|
SimpleWorkflowJsonConverter() |
Modifier and Type | Method and Description |
---|---|
protected com.fasterxml.jackson.databind.ObjectMapper |
getObjectMapper() |
FormDefinition |
readFormDefinition(InputStream inputStream) |
WorkflowDefinition |
readWorkflowDefinition(byte[] bytes) |
WorkflowDefinition |
readWorkflowDefinition(InputStream inputStream) |
protected SimpleWorkflowException |
wrapExceptionRead(Exception e) |
protected SimpleWorkflowException |
wrapExceptionWrite(Exception e) |
void |
writeFormDefinition(FormDefinition definition,
Writer writer) |
void |
writeWorkflowDefinition(WorkflowDefinition definition,
Writer writer) |
public WorkflowDefinition readWorkflowDefinition(InputStream inputStream) throws SimpleWorkflowException
inputStream
- the stream to read the JSON from.SimpleWorkflowException
- when an error occurs while reading or parsing the definition.public WorkflowDefinition readWorkflowDefinition(byte[] bytes) throws SimpleWorkflowException
bytes
- array representing the definition JSON.SimpleWorkflowException
- when an error occurs while parsing the definition.public void writeWorkflowDefinition(WorkflowDefinition definition, Writer writer)
public FormDefinition readFormDefinition(InputStream inputStream)
inputStream
- the stream to read the JSON from.SimpleWorkflowException
- when an error occurs while reading or parsing the definition.public void writeFormDefinition(FormDefinition definition, Writer writer)
protected SimpleWorkflowException wrapExceptionRead(Exception e)
e
- exception to wrapSimpleWorkflowException
to throw, wrapping the given exception.protected SimpleWorkflowException wrapExceptionWrite(Exception e)
e
- exception to wrapSimpleWorkflowException
to throw, wrapping the given exception.protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
Copyright © 2016 Alfresco. All rights reserved.