Package com.adobe.granite.workflow.model
Interface WorkflowModelSerializer
-
public interface WorkflowModelSerializer
WorkflowModelSerializer
is the interface for services that provide functionality for de-/serialisingWorkflowModel
from/to other (textual) representations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkflowModel
deserialize(java.lang.String modelDefinition)
Deserializes aWorkflowModel
instance from the given (textual) model definition.java.lang.String
getMimeType()
Returns the mime type of theWorkflowModelSerializer
s serialization format.java.lang.String
getType()
Returns the type of theWorkflowModelSerializer
.java.lang.String
serialize(WorkflowModel model)
Serializes the givenWorkflowModel
into a textual representation.
-
-
-
Field Detail
-
TYPE
static final java.lang.String TYPE
Property for the type serialization type of theWorkflowModelSerializer
.- See Also:
- Constant Field Values
-
MIME_TYPE
static final java.lang.String MIME_TYPE
Property for the mime type of the serialization format of theWorkflowModelSerializer
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
java.lang.String getType()
Returns the type of theWorkflowModelSerializer
. Must return a unique string describing the type of theWorkflowModelSerializer
and serialization format respectively.- Returns:
- Unique string identifier for the type of the
WorkflowModelSerializer
and serialization format.
-
getMimeType
java.lang.String getMimeType()
Returns the mime type of theWorkflowModelSerializer
s serialization format.- Returns:
- The mime type of the serialized format.
-
serialize
java.lang.String serialize(WorkflowModel model) throws java.lang.Exception
Serializes the givenWorkflowModel
into a textual representation.- Parameters:
model
- TheWorkflowModel
to be serialized.- Returns:
- A serialized (textual) representation of the
WorkflowModel
. - Throws:
java.lang.Exception
- if something goes wrong during serialization
-
deserialize
WorkflowModel deserialize(java.lang.String modelDefinition) throws java.lang.Exception
Deserializes aWorkflowModel
instance from the given (textual) model definition.- Parameters:
modelDefinition
- The model definition as string.- Returns:
- The deserialized
WorkflowModel
. - Throws:
java.lang.Exception
- if something goes wrong during deserialization
-
-