Search in sources :

Example 1 with TextAnnotationPropertyWriter

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

the class ArtifactsConverter method toTextAnnotation.

private PropertyWriter toTextAnnotation(Node<View<TextAnnotation>, ?> node) {
    org.eclipse.bpmn2.TextAnnotation element = bpmn2.createTextAnnotation();
    element.setId(node.getUUID());
    TextAnnotationPropertyWriter writer = propertyWriterFactory.of(element);
    TextAnnotation definition = node.getContent().getDefinition();
    BPMNGeneralSet general = definition.getGeneral();
    writer.setName(general.getName().getValue());
    writer.setDocumentation(general.getDocumentation().getValue());
    writer.setMetaData(definition.getAdvancedData().getMetaDataAttributes());
    writer.setAbsoluteBounds(node);
    return writer;
}
Also used : Factories.bpmn2(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2) BPMNGeneralSet(org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet) TextAnnotation(org.kie.workbench.common.stunner.bpmn.definition.TextAnnotation) TextAnnotationPropertyWriter(org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.TextAnnotationPropertyWriter)

Aggregations

Factories.bpmn2 (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.Factories.bpmn2)1 TextAnnotationPropertyWriter (org.kie.workbench.common.stunner.bpmn.backend.converters.fromstunner.properties.TextAnnotationPropertyWriter)1 TextAnnotation (org.kie.workbench.common.stunner.bpmn.definition.TextAnnotation)1 BPMNGeneralSet (org.kie.workbench.common.stunner.bpmn.definition.property.general.BPMNGeneralSet)1