Class Bpmn2JsonMarshaller


  • public class Bpmn2JsonMarshaller
    extends Object
    • 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)  
    • Constructor Detail

      • Bpmn2JsonMarshaller

        public Bpmn2JsonMarshaller()
    • Method Detail

      • 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