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 StringdefaultBgColor_Activitiesstatic StringdefaultBgColor_CatchingEventsstatic StringdefaultBgColor_DataObjectsstatic StringdefaultBgColor_EndEventsstatic StringdefaultBgColor_Eventsstatic StringdefaultBgColor_Gatewaysstatic StringdefaultBgColor_StartEventsstatic StringdefaultBgColor_Swimlanesstatic StringdefaultBgColor_ThrowingEventsstatic StringdefaultBrColorstatic StringdefaultBrColor_CatchingEventsstatic StringdefaultBrColor_Gatewaysstatic StringdefaultBrColor_ThrowingEventsstatic StringdefaultFontColorstatic StringdefaultSequenceflowColor
-
Constructor Summary
Constructors Constructor Description Bpmn2JsonMarshaller()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidapplyDiagramResolution(org.eclipse.bpmn2.di.BPMNPlane plane)voidapplyResolutionForDockers(org.eclipse.dd.dc.Point p)protected org.eclipse.bpmn2.AssociationfindOutgoingAssociation(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)Stringmarshall(org.eclipse.bpmn2.Definitions def, String preProcessingData)protected voidmarshallArtifact(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 voidmarshallAssociation(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 voidmarshallBoundaryEvent(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 voidmarshallCallableElement(org.eclipse.bpmn2.CallableElement callableElement, org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallCallActivity(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 voidmarshallChoreography(org.eclipse.bpmn2.Choreography callableElement, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallComplexGateway(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 voidmarshallConversation(org.eclipse.bpmn2.Conversation callableElement, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallDataObject(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 voidmarshallDefinitions(org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator, String preProcessingData)protected voidmarshallEndEvent(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 voidmarshallEventBasedGateway(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 voidmarshallExclusiveGateway(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 voidmarshallFlowElement(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 voidmarshallGlobalChoreographyTask(org.eclipse.bpmn2.GlobalChoreographyTask callableElement, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallGlobalTask(org.eclipse.bpmn2.GlobalTask globalTask, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallGroup(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 voidmarshallInclusiveGateway(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 voidmarshallIntermediateCatchEvent(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 voidmarshallIntermediateThrowEvent(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 voidmarshallNode(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 voidmarshallParallelGateway(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 voidmarshallProcess(org.eclipse.bpmn2.Process process, org.eclipse.bpmn2.Definitions def, com.fasterxml.jackson.core.JsonGenerator generator, String preProcessingData)protected voidmarshallProperties(Map<String,Object> properties, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallSequenceFlow(org.eclipse.bpmn2.SequenceFlow sequenceFlow, org.eclipse.bpmn2.di.BPMNPlane plane, com.fasterxml.jackson.core.JsonGenerator generator, float xOffset, float yOffset)protected voidmarshallStartEvent(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 voidmarshallStencil(String stencilId, com.fasterxml.jackson.core.JsonGenerator generator)protected voidmarshallSubProcess(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 voidmarshallTask(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 voidmarshallTextAnnotation(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)voidsetProfile(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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
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.JsonGenerationExceptionIOException
-
-