Package com.adobe.granite.workflow.model
Interface WorkflowModelSerializer
public interface WorkflowModelSerializer
WorkflowModelSerializer is the interface for services that
provide functionality for de-/serialising
WorkflowModel from/to other (textual) representations.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(String modelDefinition) Deserializes aWorkflowModelinstance from the given (textual) model definition.Returns the mime type of theWorkflowModelSerializers serialization format.getType()Returns the type of theWorkflowModelSerializer.serialize(WorkflowModel model) Serializes the givenWorkflowModelinto a textual representation.
-
Field Details
-
TYPE
Property for the type serialization type of theWorkflowModelSerializer.- See Also:
-
MIME_TYPE
Property for the mime type of the serialization format of theWorkflowModelSerializer.- See Also:
-
-
Method Details
-
getType
String getType()Returns the type of theWorkflowModelSerializer. Must return a unique string describing the type of theWorkflowModelSerializerand serialization format respectively.- Returns:
- Unique string identifier for the type of the
WorkflowModelSerializerand serialization format.
-
getMimeType
String getMimeType()Returns the mime type of theWorkflowModelSerializers serialization format.- Returns:
- The mime type of the serialized format.
-
serialize
Serializes the givenWorkflowModelinto a textual representation.- Parameters:
model- TheWorkflowModelto be serialized.- Returns:
- A serialized (textual) representation of the
WorkflowModel. - Throws:
Exception- if something goes wrong during serialization
-
deserialize
Deserializes aWorkflowModelinstance from the given (textual) model definition.- Parameters:
modelDefinition- The model definition as string.- Returns:
- The deserialized
WorkflowModel. - Throws:
Exception- if something goes wrong during deserialization
-