Class ProcessDiagramLayoutFactory
- java.lang.Object
 - 
- org.camunda.bpm.engine.impl.bpmn.diagram.ProcessDiagramLayoutFactory
 
 
- 
public class ProcessDiagramLayoutFactory extends java.lang.ObjectProvides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String).- Author:
 - Falko Menge
 
 
- 
- 
Constructor Summary
Constructors Constructor Description ProcessDiagramLayoutFactory() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Map<java.lang.String,DiagramNode>fixFlowNodePositionsIfModelFromAdonis(org.w3c.dom.Document bpmnModel, java.util.Map<java.lang.String,DiagramNode> elementBoundsFromBpmnDi)DiagramLayoutgetBpmnProcessDiagramLayout(org.w3c.dom.Document bpmnModel, java.io.InputStream imageStream)Provides positions and dimensions of elements in a BPMN process diagram as provided byRepositoryService.getProcessDiagram(String).protected javax.xml.parsers.DocumentBuilderFactorygetConfiguredDocumentBuilderFactory()protected DiagramNodegetDiagramBoundsFromBpmnDi(org.w3c.dom.Document bpmnModel)protected DiagramNodegetDiagramBoundsFromImage(java.awt.image.BufferedImage image, int offsetTop, int offsetBottom)protected DiagramNodegetDiagramBoundsFromImage(java.io.InputStream imageStream)protected DiagramNodegetDiagramBoundsFromImage(java.io.InputStream imageStream, int offsetTop, int offsetBottom)protected java.util.Map<java.lang.String,DiagramNode>getElementBoundsFromBpmnDi(org.w3c.dom.Document bpmnModel)DiagramLayoutgetProcessDiagramLayout(java.io.InputStream bpmnXmlStream, java.io.InputStream imageStream)Provides positions and dimensions of elements in a process diagram as provided byRepositoryService.getProcessDiagram(String).protected booleanisExportedFromAdonis50(org.w3c.dom.Document bpmnModel)protected DiagramNodeparseBounds(org.w3c.dom.Element boundsElement)protected org.w3c.dom.DocumentparseXml(java.io.InputStream bpmnXmlStream)protected java.util.Map<java.lang.String,DiagramElement>transformBoundsForImage(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, java.util.Map<java.lang.String,DiagramNode> listOfBounds)protected DiagramNodetransformBoundsForImage(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, DiagramNode elementBounds) 
 - 
 
- 
- 
Method Detail
- 
getProcessDiagramLayout
public DiagramLayout getProcessDiagramLayout(java.io.InputStream bpmnXmlStream, java.io.InputStream imageStream)
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 byImageIOmay also work)- Returns:
 - Layout of the process diagram
 
 
- 
getBpmnProcessDiagramLayout
public DiagramLayout getBpmnProcessDiagramLayout(org.w3c.dom.Document bpmnModel, java.io.InputStream imageStream)
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 byImageIOmay also work)- Returns:
 - Layout of the process diagram
 
 
- 
parseXml
protected org.w3c.dom.Document parseXml(java.io.InputStream bpmnXmlStream)
 
- 
getDiagramBoundsFromBpmnDi
protected DiagramNode getDiagramBoundsFromBpmnDi(org.w3c.dom.Document bpmnModel)
 
- 
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(java.io.InputStream imageStream)
 
- 
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(java.io.InputStream imageStream, int offsetTop, int offsetBottom)
 
- 
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(java.awt.image.BufferedImage image, int offsetTop, int offsetBottom)
 
- 
getElementBoundsFromBpmnDi
protected java.util.Map<java.lang.String,DiagramNode> getElementBoundsFromBpmnDi(org.w3c.dom.Document bpmnModel)
 
- 
parseBounds
protected DiagramNode parseBounds(org.w3c.dom.Element boundsElement)
 
- 
transformBoundsForImage
protected java.util.Map<java.lang.String,DiagramElement> transformBoundsForImage(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, java.util.Map<java.lang.String,DiagramNode> listOfBounds)
 
- 
transformBoundsForImage
protected DiagramNode transformBoundsForImage(DiagramNode diagramBoundsImage, DiagramNode diagramBoundsXml, DiagramNode elementBounds)
 
- 
fixFlowNodePositionsIfModelFromAdonis
protected java.util.Map<java.lang.String,DiagramNode> fixFlowNodePositionsIfModelFromAdonis(org.w3c.dom.Document bpmnModel, java.util.Map<java.lang.String,DiagramNode> elementBoundsFromBpmnDi)
 
- 
isExportedFromAdonis50
protected boolean isExportedFromAdonis50(org.w3c.dom.Document bpmnModel)
 
- 
getConfiguredDocumentBuilderFactory
protected javax.xml.parsers.DocumentBuilderFactory getConfiguredDocumentBuilderFactory()
 
 - 
 
 -