Class ProcessDiagramLayoutFactory
java.lang.Object
org.camunda.bpm.engine.impl.bpmn.diagram.ProcessDiagramLayoutFactory
Provides positions and dimensions of elements in a process diagram as
provided by
RepositoryService.getProcessDiagram(String)
.- Author:
- Falko Menge
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Map<String,
DiagramNode> fixFlowNodePositionsIfModelFromAdonis
(Document bpmnModel, Map<String, DiagramNode> elementBoundsFromBpmnDi) getBpmnProcessDiagramLayout
(Document bpmnModel, InputStream imageStream) Provides positions and dimensions of elements in a BPMN process diagram as provided byRepositoryService.getProcessDiagram(String)
.protected DocumentBuilderFactory
protected DiagramNode
getDiagramBoundsFromBpmnDi
(Document bpmnModel) protected DiagramNode
getDiagramBoundsFromImage
(BufferedImage image, int offsetTop, int offsetBottom) protected DiagramNode
getDiagramBoundsFromImage
(InputStream imageStream) protected DiagramNode
getDiagramBoundsFromImage
(InputStream imageStream, int offsetTop, int offsetBottom) protected Map<String,
DiagramNode> getElementBoundsFromBpmnDi
(Document bpmnModel) getProcessDiagramLayout
(InputStream bpmnXmlStream, InputStream imageStream) Provides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String)
.protected boolean
isExportedFromAdonis50
(Document bpmnModel) protected DiagramNode
parseBounds
(Element boundsElement) protected Document
parseXml
(InputStream bpmnXmlStream) protected Map<String,
DiagramElement> transformBoundsForImage
(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, Map<String, DiagramNode> listOfBounds) protected DiagramNode
transformBoundsForImage
(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, DiagramNode elementBounds)
-
Constructor Details
-
ProcessDiagramLayoutFactory
public ProcessDiagramLayoutFactory()
-
-
Method Details
-
getProcessDiagramLayout
Provides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String)
. Currently, it only supports BPMN 2.0 models.- Parameters:
bpmnXmlStream
- BPMN 2.0 XML fileimageStream
- BPMN 2.0 diagram in PNG format (JPEG and other formats supported byImageIO
may also work)- Returns:
- Layout of the process diagram
-
getBpmnProcessDiagramLayout
Provides positions and dimensions of elements in a BPMN process diagram as provided byRepositoryService.getProcessDiagram(String)
.- Parameters:
bpmnModel
- BPMN 2.0 XML documentimageStream
- BPMN 2.0 diagram in PNG format (JPEG and other formats supported byImageIO
may also work)- Returns:
- Layout of the process diagram
-
parseXml
-
getDiagramBoundsFromBpmnDi
-
getDiagramBoundsFromImage
-
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(InputStream imageStream, int offsetTop, int offsetBottom) -
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(BufferedImage image, int offsetTop, int offsetBottom) -
getElementBoundsFromBpmnDi
-
parseBounds
-
transformBoundsForImage
protected Map<String,DiagramElement> transformBoundsForImage(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, Map<String, DiagramNode> listOfBounds) -
transformBoundsForImage
protected DiagramNode transformBoundsForImage(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, DiagramNode elementBounds) -
fixFlowNodePositionsIfModelFromAdonis
protected Map<String,DiagramNode> fixFlowNodePositionsIfModelFromAdonis(Document bpmnModel, Map<String, DiagramNode> elementBoundsFromBpmnDi) -
isExportedFromAdonis50
-
getConfiguredDocumentBuilderFactory
-