Class ProcessDiagramLayoutFactory
- java.lang.Object
-
- org.camunda.bpm.engine.impl.bpmn.diagram.ProcessDiagramLayoutFactory
-
public class ProcessDiagramLayoutFactory extends Object
Provides 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
-
-
-
Method Detail
-
getProcessDiagramLayout
public DiagramLayout getProcessDiagramLayout(InputStream bpmnXmlStream, 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 byImageIO
may also work)- Returns:
- Layout of the process diagram
-
getBpmnProcessDiagramLayout
public DiagramLayout getBpmnProcessDiagramLayout(Document bpmnModel, 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 byImageIO
may also work)- Returns:
- Layout of the process diagram
-
parseXml
protected Document parseXml(InputStream bpmnXmlStream)
-
getDiagramBoundsFromBpmnDi
protected DiagramNode getDiagramBoundsFromBpmnDi(Document bpmnModel)
-
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(InputStream imageStream)
-
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(InputStream imageStream, int offsetTop, int offsetBottom)
-
getDiagramBoundsFromImage
protected DiagramNode getDiagramBoundsFromImage(BufferedImage image, int offsetTop, int offsetBottom)
-
getElementBoundsFromBpmnDi
protected Map<String,DiagramNode> getElementBoundsFromBpmnDi(Document bpmnModel)
-
parseBounds
protected DiagramNode parseBounds(Element boundsElement)
-
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
protected boolean isExportedFromAdonis50(Document bpmnModel)
-
getConfiguredDocumentBuilderFactory
protected DocumentBuilderFactory getConfiguredDocumentBuilderFactory()
-
-