Class BpmnModelerImpl
java.lang.Object
com.vaadin.flow.component.Component
io.jmix.bpmflowui.uicomponent.bpmnmodeler.BpmnModelerImpl
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier
,com.vaadin.flow.component.DetachNotifier
,com.vaadin.flow.component.HasComponents
,com.vaadin.flow.component.HasElement
,com.vaadin.flow.component.HasEnabled
,com.vaadin.flow.component.HasStyle
,BpmnModeler
,Serializable
@Tag("jmix-bpmn-modeler")
@NpmPackage(value="bpmn-js",
version="12.1.0")
@CssImport("bpmn-js/dist/assets/bpmn-font/css/bpmn-embedded.css") @CssImport("bpmn-js/dist/assets/bpmn-font/css/bpmn.css") @CssImport("bpmn-js/dist/assets/bpmn-font/css/bpmn-codes.css") @CssImport("bpmn-js/dist/assets/diagram-js.css")
@JsModule("./src/bpmn-modeler/bpmn-modeler.ts")
public class BpmnModelerImpl
extends com.vaadin.flow.component.Component
implements BpmnModeler
- See Also:
-
Field Summary
Fields inherited from interface io.jmix.bpmflowui.uicomponent.bpmnmodeler.BpmnModeler
NAME
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addSchemaChangedListener
(com.vaadin.flow.component.ComponentEventListener<XmlSchemaChangedEvent> listener) Adds a listener to handle BPMN diagram schema changes.void
addSelectedElementChangedListener
(com.vaadin.flow.component.ComponentEventListener<SelectionChangedEvent> listener) Adds a listener to handle BPMN diagram element selection changes.void
void
void
void
void
void
void
void
void
void
Gets the current BPMN XML from the modeler component.boolean
Checks if changes have been made to the BPMN model.void
void
void
void
void
void
Asynchronously requests the current BPMN XML from the modeler component inm frontend client.void
setBpmnXml
(String bpmnXml) Sets the BPMN XML for the modeler component.void
setHasChanged
(boolean hasChanged) Sets the state of the modeler component changes Can be called for both java (server) code and from typescript (client)void
void
void
void
void
void
Methods inherited from class com.vaadin.flow.component.Component
addListener, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListener
Methods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListener
Methods inherited from interface com.vaadin.flow.component.HasComponents
add, add, add, addComponentAsFirst, addComponentAtIndex, remove, remove, removeAll
Methods inherited from interface com.vaadin.flow.component.HasElement
getElement
Methods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabled
Methods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName
-
Field Details
-
bpmnXml
-
-
Constructor Details
-
BpmnModelerImpl
public BpmnModelerImpl()
-
-
Method Details
-
addSelectedElementChangedListener
public void addSelectedElementChangedListener(com.vaadin.flow.component.ComponentEventListener<SelectionChangedEvent> listener) Description copied from interface:BpmnModeler
Adds a listener to handle BPMN diagram element selection changes.- Specified by:
addSelectedElementChangedListener
in interfaceBpmnModeler
- Parameters:
listener
- The listener to handle selection changes.
-
addSchemaChangedListener
public void addSchemaChangedListener(com.vaadin.flow.component.ComponentEventListener<XmlSchemaChangedEvent> listener) Description copied from interface:BpmnModeler
Adds a listener to handle BPMN diagram schema changes.- Specified by:
addSchemaChangedListener
in interfaceBpmnModeler
- Parameters:
listener
- The listener to handle schema changes.
-
setBpmnXml
Description copied from interface:BpmnModeler
Sets the BPMN XML for the modeler component.- Specified by:
setBpmnXml
in interfaceBpmnModeler
- Parameters:
bpmnXml
- The BPMN XML to be set.
-
getBpmnXml
Description copied from interface:BpmnModeler
Gets the current BPMN XML from the modeler component. Retrieves data from the internal component state, not directly from the frontend component. Note that it may have outdated data.For obtaining the most up-to-date BPMN XML, consider using
BpmnModeler.requestForBpmnXml()
.- Specified by:
getBpmnXml
in interfaceBpmnModeler
- Returns:
- The current BPMN XML.
- See Also:
-
hasChanged
public boolean hasChanged()Description copied from interface:BpmnModeler
Checks if changes have been made to the BPMN model. This method provides real-time information about whether changes have been made. The frontend component notifies the backend by invoking BpmnModeler#setHasChanged(true) every time the schema is updated.- Specified by:
hasChanged
in interfaceBpmnModeler
- Returns:
true
if changes have been made,false
otherwise.
-
setHasChanged
@ClientCallable public void setHasChanged(boolean hasChanged) Sets the state of the modeler component changes Can be called for both java (server) code and from typescript (client)- Specified by:
setHasChanged
in interfaceBpmnModeler
- Parameters:
hasChanged
- flag for changes statement- See Also:
-
requestForBpmnXml
Description copied from interface:BpmnModeler
Asynchronously requests the current BPMN XML from the modeler component inm frontend client.- Specified by:
requestForBpmnXml
in interfaceBpmnModeler
- Returns:
- A
CompletableFuture
containing the current BPMN XML.
-
updateElementProperties
- Specified by:
updateElementProperties
in interfaceBpmnModeler
-
createOrUpdateNestedObject
- Specified by:
createOrUpdateNestedObject
in interfaceBpmnModeler
-
createOrUpdateFormData
- Specified by:
createOrUpdateFormData
in interfaceBpmnModeler
-
createOrUpdateExtensionElement
- Specified by:
createOrUpdateExtensionElement
in interfaceBpmnModeler
-
createOrUpdateRootElement
- Specified by:
createOrUpdateRootElement
in interfaceBpmnModeler
-
removeRootElement
- Specified by:
removeRootElement
in interfaceBpmnModeler
-
setMultiInstanceFormalExpression
- Specified by:
setMultiInstanceFormalExpression
in interfaceBpmnModeler
-
updateTimerEventDefinition
- Specified by:
updateTimerEventDefinition
in interfaceBpmnModeler
-
updateEventDefinition
- Specified by:
updateEventDefinition
in interfaceBpmnModeler
-
updateEventDefinitionProperties
- Specified by:
updateEventDefinitionProperties
in interfaceBpmnModeler
-
removeExtensionElements
- Specified by:
removeExtensionElements
in interfaceBpmnModeler
-
createOrUpdateSpringBean
- Specified by:
createOrUpdateSpringBean
in interfaceBpmnModeler
-
removeSpringBean
- Specified by:
removeSpringBean
in interfaceBpmnModeler
-
createOrUpdateProcessVariable
- Specified by:
createOrUpdateProcessVariable
in interfaceBpmnModeler
-
createOrUpdateExtensionProperty
- Specified by:
createOrUpdateExtensionProperty
in interfaceBpmnModeler
-
removeExtensionProperty
- Specified by:
removeExtensionProperty
in interfaceBpmnModeler
-
removeProcessVariable
- Specified by:
removeProcessVariable
in interfaceBpmnModeler
-
createAndSetListProperty
- Specified by:
createAndSetListProperty
in interfaceBpmnModeler
-
updateProcessDocumentation
- Specified by:
updateProcessDocumentation
in interfaceBpmnModeler
-
createListener
- Specified by:
createListener
in interfaceBpmnModeler
-
removeParticipantProcessExtensionElements
- Specified by:
removeParticipantProcessExtensionElements
in interfaceBpmnModeler
-
createOrUpdateParticipantProcessExtensionElement
- Specified by:
createOrUpdateParticipantProcessExtensionElement
in interfaceBpmnModeler
-