Package org.jbpm.designer.bpmn2.impl
Class Bpmn2JsonMarshaller
- java.lang.Object
-
- org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller
-
public class Bpmn2JsonMarshaller extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
defaultBgColor_Activities
static String
defaultBgColor_CatchingEvents
static String
defaultBgColor_DataObjects
static String
defaultBgColor_EndEvents
static String
defaultBgColor_Events
static String
defaultBgColor_Gateways
static String
defaultBgColor_StartEvents
static String
defaultBgColor_Swimlanes
static String
defaultBgColor_ThrowingEvents
static String
defaultBrColor
static String
defaultBrColor_CatchingEvents
static String
defaultBrColor_Gateways
static String
defaultBrColor_ThrowingEvents
static String
defaultFontColor
static String
defaultSequenceflowColor
-
Constructor Summary
Constructors Constructor Description Bpmn2JsonMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyDiagramResolution(org.eclipse.bpmn2.di.BPMNPlane plane)
void
applyResolutionForDockers(org.eclipse.dd.dc.Point p)
protected org.eclipse.bpmn2.Association
findOutgoingAssociation(org.eclipse.bpmn2.di.BPMNPlane plane, org.eclipse.bpmn2.BaseElement baseElement)
protected List<org.eclipse.bpmn2.Association>
findOutgoingAssociations(org.eclipse.bpmn2.di.BPMNPlane plane, org.eclipse.bpmn2.BaseElement baseElement)
String
marshall(org.eclipse.bpmn2.Definitions def, String preProcessingData)
protected void
marshallArtifact(org.eclipse.bpmn2.Artifact artifact, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def)
protected void
marshallAssociation(org.eclipse.bpmn2.Association association, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def)
protected void
marshallBoundaryEvent(org.eclipse.bpmn2.BoundaryEvent boundaryEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> catchEventProperties)
protected void
marshallCallableElement(org.eclipse.bpmn2.CallableElement callableElement, org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallCallActivity(org.eclipse.bpmn2.CallActivity callActivity, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallChoreography(org.eclipse.bpmn2.Choreography callableElement, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallComplexGateway(org.eclipse.bpmn2.ComplexGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallConversation(org.eclipse.bpmn2.Conversation callableElement, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallDataObject(org.eclipse.bpmn2.DataObject dataObject, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallDefinitions(org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator, String preProcessingData)
protected void
marshallEndEvent(org.eclipse.bpmn2.EndEvent endEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties)
protected void
marshallEventBasedGateway(org.eclipse.bpmn2.EventBasedGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallExclusiveGateway(org.eclipse.bpmn2.ExclusiveGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallFlowElement(org.eclipse.bpmn2.FlowElement flowElement, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def)
protected void
marshallGlobalChoreographyTask(org.eclipse.bpmn2.GlobalChoreographyTask callableElement, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallGlobalTask(org.eclipse.bpmn2.GlobalTask globalTask, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallGroup(org.eclipse.bpmn2.Group group, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def)
protected void
marshallInclusiveGateway(org.eclipse.bpmn2.InclusiveGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallIntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent catchEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties)
protected void
marshallIntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent throwEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties)
protected void
marshallNode(org.eclipse.bpmn2.FlowNode node, Map<String,Object> properties, String stencil, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset)
protected void
marshallParallelGateway(org.eclipse.bpmn2.ParallelGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties)
protected void
marshallProcess(org.eclipse.bpmn2.Process process, org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator, String preProcessingData)
protected void
marshallProperties(Map<String,Object> properties, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallSequenceFlow(org.eclipse.bpmn2.SequenceFlow sequenceFlow, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset)
protected void
marshallStartEvent(org.eclipse.bpmn2.StartEvent startEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties)
protected void
marshallStencil(String stencilId, com.fasterxml.jackson.core.JsonGenerator generator)
protected void
marshallSubProcess(org.eclipse.bpmn2.SubProcess subProcess, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def, Map<String,Object> flowElementProperties)
protected void
marshallTask(org.eclipse.bpmn2.Task task, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def, Map<String,Object> flowElementProperties)
protected void
marshallTextAnnotation(org.eclipse.bpmn2.TextAnnotation textAnnotation, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def, Map<String,Object> flowElementProperties)
void
setProfile(IDiagramProfile profile)
-
-
-
Field Detail
-
defaultBgColor_Activities
public static final String defaultBgColor_Activities
- See Also:
- Constant Field Values
-
defaultBgColor_Events
public static final String defaultBgColor_Events
- See Also:
- Constant Field Values
-
defaultBgColor_StartEvents
public static final String defaultBgColor_StartEvents
- See Also:
- Constant Field Values
-
defaultBgColor_EndEvents
public static final String defaultBgColor_EndEvents
- See Also:
- Constant Field Values
-
defaultBgColor_DataObjects
public static final String defaultBgColor_DataObjects
- See Also:
- Constant Field Values
-
defaultBgColor_CatchingEvents
public static final String defaultBgColor_CatchingEvents
- See Also:
- Constant Field Values
-
defaultBgColor_ThrowingEvents
public static final String defaultBgColor_ThrowingEvents
- See Also:
- Constant Field Values
-
defaultBgColor_Gateways
public static final String defaultBgColor_Gateways
- See Also:
- Constant Field Values
-
defaultBgColor_Swimlanes
public static final String defaultBgColor_Swimlanes
- See Also:
- Constant Field Values
-
defaultBrColor
public static final String defaultBrColor
- See Also:
- Constant Field Values
-
defaultBrColor_CatchingEvents
public static final String defaultBrColor_CatchingEvents
- See Also:
- Constant Field Values
-
defaultBrColor_ThrowingEvents
public static final String defaultBrColor_ThrowingEvents
- See Also:
- Constant Field Values
-
defaultBrColor_Gateways
public static final String defaultBrColor_Gateways
- See Also:
- Constant Field Values
-
defaultFontColor
public static final String defaultFontColor
- See Also:
- Constant Field Values
-
defaultSequenceflowColor
public static final String defaultSequenceflowColor
- See Also:
- Constant Field Values
-
-
Method Detail
-
setProfile
public void setProfile(IDiagramProfile profile)
-
marshall
public String marshall(org.eclipse.bpmn2.Definitions def, String preProcessingData) throws IOException
- Throws:
IOException
-
marshallDefinitions
protected void marshallDefinitions(org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator, String preProcessingData) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
applyDiagramResolution
public void applyDiagramResolution(org.eclipse.bpmn2.di.BPMNPlane plane)
-
applyResolutionForDockers
public void applyResolutionForDockers(org.eclipse.dd.dc.Point p)
-
marshallCallableElement
protected void marshallCallableElement(org.eclipse.bpmn2.CallableElement callableElement, org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallProcess
protected void marshallProcess(org.eclipse.bpmn2.Process process, org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator, String preProcessingData) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallFlowElement
protected void marshallFlowElement(org.eclipse.bpmn2.FlowElement flowElement, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallStartEvent
protected void marshallStartEvent(org.eclipse.bpmn2.StartEvent startEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallEndEvent
protected void marshallEndEvent(org.eclipse.bpmn2.EndEvent endEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallIntermediateCatchEvent
protected void marshallIntermediateCatchEvent(org.eclipse.bpmn2.IntermediateCatchEvent catchEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallBoundaryEvent
protected void marshallBoundaryEvent(org.eclipse.bpmn2.BoundaryEvent boundaryEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> catchEventProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallIntermediateThrowEvent
protected void marshallIntermediateThrowEvent(org.eclipse.bpmn2.IntermediateThrowEvent throwEvent, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> properties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallCallActivity
protected void marshallCallActivity(org.eclipse.bpmn2.CallActivity callActivity, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallTask
protected void marshallTask(org.eclipse.bpmn2.Task task, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallParallelGateway
protected void marshallParallelGateway(org.eclipse.bpmn2.ParallelGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallExclusiveGateway
protected void marshallExclusiveGateway(org.eclipse.bpmn2.ExclusiveGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallInclusiveGateway
protected void marshallInclusiveGateway(org.eclipse.bpmn2.InclusiveGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallEventBasedGateway
protected void marshallEventBasedGateway(org.eclipse.bpmn2.EventBasedGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallComplexGateway
protected void marshallComplexGateway(org.eclipse.bpmn2.ComplexGateway gateway, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallNode
protected void marshallNode(org.eclipse.bpmn2.FlowNode node, Map<String,Object> properties, String stencil, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallDataObject
protected void marshallDataObject(org.eclipse.bpmn2.DataObject dataObject, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallSubProcess
protected void marshallSubProcess(org.eclipse.bpmn2.SubProcess subProcess, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallSequenceFlow
protected void marshallSequenceFlow(org.eclipse.bpmn2.SequenceFlow sequenceFlow, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallGlobalTask
protected void marshallGlobalTask(org.eclipse.bpmn2.GlobalTask globalTask, com.fasterxml.jackson.core.JsonGenerator generator)
-
marshallGlobalChoreographyTask
protected void marshallGlobalChoreographyTask(org.eclipse.bpmn2.GlobalChoreographyTask callableElement, com.fasterxml.jackson.core.JsonGenerator generator)
-
marshallConversation
protected void marshallConversation(org.eclipse.bpmn2.Conversation callableElement, com.fasterxml.jackson.core.JsonGenerator generator)
-
marshallChoreography
protected void marshallChoreography(org.eclipse.bpmn2.Choreography callableElement, com.fasterxml.jackson.core.JsonGenerator generator)
-
marshallProperties
protected void marshallProperties(Map<String,Object> properties, com.fasterxml.jackson.core.JsonGenerator generator) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallArtifact
protected void marshallArtifact(org.eclipse.bpmn2.Artifact artifact, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def) throws IOException
- Throws:
IOException
-
marshallAssociation
protected void marshallAssociation(org.eclipse.bpmn2.Association association, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallTextAnnotation
protected void marshallTextAnnotation(org.eclipse.bpmn2.TextAnnotation textAnnotation, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def, Map<String,Object> flowElementProperties) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
marshallGroup
protected void marshallGroup(org.eclipse.bpmn2.Group group, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset, String preProcessingData, org.eclipse.bpmn2.Definitions def) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
findOutgoingAssociation
protected org.eclipse.bpmn2.Association findOutgoingAssociation(org.eclipse.bpmn2.di.BPMNPlane plane, org.eclipse.bpmn2.BaseElement baseElement)
-
findOutgoingAssociations
protected List<org.eclipse.bpmn2.Association> findOutgoingAssociations(org.eclipse.bpmn2.di.BPMNPlane plane, org.eclipse.bpmn2.BaseElement baseElement)
-
marshallStencil
protected void marshallStencil(String stencilId, com.fasterxml.jackson.core.JsonGenerator generator) throws com.fasterxml.jackson.core.JsonGenerationException, IOException
- Throws:
com.fasterxml.jackson.core.JsonGenerationException
IOException
-
-