Search in sources :

Example 1 with DataObjectPropertyReader

use of org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.DataObjectPropertyReader in project kie-wb-common by kiegroup.

the class ArtifactsConverter method toDataObject.

private BpmnNode toDataObject(org.eclipse.bpmn2.DataObjectReference element) {
    DataObjectPropertyReader p = propertyReaderFactory.of(element);
    Node<View<DataObject>, Edge> node = typedFactoryManager.newNode(element.getId(), DataObject.class);
    DataObject definition = node.getContent().getDefinition();
    definition.setName(new Name(revertIllegalCharsAttribute(p.getName())));
    definition.setType(new DataObjectType(new DataObjectTypeValue(p.getType())));
    node.getContent().setBounds(p.getBounds());
    definition.setDimensionsSet(p.getRectangleDimensionsSet());
    definition.setFontSet(p.getFontSet());
    definition.setBackgroundSet(p.getBackgroundSet());
    definition.setAdvancedData(new AdvancedData(p.getMetaDataAttributes()));
    return BpmnNode.of(node, p);
}
Also used : AdvancedData(org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData) DataObjectPropertyReader(org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.DataObjectPropertyReader) DataObject(org.kie.workbench.common.stunner.bpmn.definition.DataObject) DataObjectTypeValue(org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue) View(org.kie.workbench.common.stunner.core.graph.content.view.View) Edge(org.kie.workbench.common.stunner.core.graph.Edge) DataObjectType(org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectType) Name(org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)

Aggregations

DataObjectPropertyReader (org.kie.workbench.common.stunner.bpmn.backend.converters.tostunner.properties.DataObjectPropertyReader)1 DataObject (org.kie.workbench.common.stunner.bpmn.definition.DataObject)1 DataObjectType (org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectType)1 DataObjectTypeValue (org.kie.workbench.common.stunner.bpmn.definition.property.artifacts.DataObjectTypeValue)1 Name (org.kie.workbench.common.stunner.bpmn.definition.property.general.Name)1 AdvancedData (org.kie.workbench.common.stunner.bpmn.definition.property.variables.AdvancedData)1 Edge (org.kie.workbench.common.stunner.core.graph.Edge)1 View (org.kie.workbench.common.stunner.core.graph.content.view.View)1