Package com.day.cq.workflow.model
Interface WorkflowModelSerializer
-
public interface WorkflowModelSerializer
WorkflowModelSerializer
is the interface for services that provide functionality for de-/serialising
from/to other (textual) representations.WorkflowModel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WorkflowModel
deserialize(String modelDefinition)
Deserializes a
instance from the given (textual) model definition.WorkflowModel
String
getMimeType()
Returns the mime type of theWorkflowModelSerializer
s serialization format.String
getType()
Returns the type of theWorkflowModelSerializer
.String
serialize(WorkflowModel model)
Serializes the given
into a textual representation.WorkflowModel
-
-
-
Field Detail
-
TYPE
static final String TYPE
Property for the type serialization type of theWorkflowModelSerializer
.- See Also:
- Constant Field Values
-
MIME_TYPE
static final String MIME_TYPE
Property for the mime type of the serialization format of theWorkflowModelSerializer
.- See Also:
- Constant Field Values
-
-
Method Detail
-
getType
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
String getMimeType()
Returns the mime type of theWorkflowModelSerializer
s serialization format.- Returns:
- The mime type of the serialized format.
-
serialize
String serialize(WorkflowModel model) throws Exception
Serializes the given
into a textual representation.WorkflowModel
- Parameters:
model
- The
to be serialized.WorkflowModel
- Returns:
- A serialized (textual) representation of the
.WorkflowModel
- Throws:
Exception
- when an error occurs
-
deserialize
WorkflowModel deserialize(String modelDefinition) throws Exception
Deserializes a
instance from the given (textual) model definition.WorkflowModel
- Parameters:
modelDefinition
- The model definition as string.- Returns:
- The deserialized
.WorkflowModel
- Throws:
Exception
- when an error occurs
-
-