Class DesignerConversationModel

  • All Implemented Interfaces:
    Serializable, AutoCloseable

    public final class DesignerConversationModel
    extends Object
    implements AutoCloseable, Serializable
    POJO model for the current global state of a designer instance. Scoped to the designer conversation, this allows all frames and views to access the current state.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    See Also:
    Serialized Form
    • Method Detail

      • addTempFile

        public void addTempFile​(String id,
                                Path file)
                         throws IllegalStateException
        Adds a temp file or directory to the conversation scope. These will be deleted when the conversation is done.
        Parameters:
        id - ID of the temporary file.
        file - File or directory to add.
        Throws:
        IllegalStateException - When a file with the ID exists already.
        Since:
        7.2.0
      • getAndClearInitialFlowchartSnapshot

        public FlowchartSnapshot getAndClearInitialFlowchartSnapshot()
        Returns:
        The snapshot that should be loaded initially when the workflow designer is opened. When null, the persisted workflow is loaded.
      • getAndClearInitialWebFormPersist

        public WebFormPersistFile getAndClearInitialWebFormPersist()
        Returns:
        The persist file that should be loaded initially when the form designer is opened. When null, the persisted form version is loaded.
      • getCurrentFormDesignerLanguage

        public String getCurrentFormDesignerLanguage()
        Returns:
        The current language selected in the form designer, empty string the form designer is not open currently.
      • getCurrentFormPersist

        public FormPersist getCurrentFormPersist()
        Returns:
        The current form persist representing the current (transient or persistent) state of the form edited in the form designer. Empty model when the form designer is not open currently.
      • getCurrentStateList

        public StateList getCurrentStateList()
        Returns:
        The current list of states that are being edited in the workflow designer, but may not yet be saved.
      • getTempFile

        public Path getTempFile​(String id)
        Gets a file form the temp file map. Prefer removeTempFile(String) if you do not need to access the file from the model any longer.
        Parameters:
        id - ID of the temporary file.
        Returns:
        The file with the given key, or null when no such file exists.
        Since:
        7.2.0
      • isDesignerSessionActive

        public boolean isDesignerSessionActive()
        Returns:
        true when this session conversation model belongs to an active designer session. false when this is e.g. an empty model with default values.
        Since:
        8.0.0
      • removeTempFile

        public Path removeTempFile​(String id)
        Gets and removes the file with the ID from the temp file map.
        Parameters:
        id - ID of the temporary file.
        Returns:
        The file with the given key, or null when no such file exists.
        Since:
        8.0.0
      • setCurrentFormDesignerLanguage

        public void setCurrentFormDesignerLanguage​(String currentFormDesignerLanguage)
        Parameters:
        currentFormDesignerLanguage - The current language selected in the form designer, empty string the form designer is not open currently.
      • setCurrentFormPersist

        public void setCurrentFormPersist​(FormPersist currentFormPersist)
        Parameters:
        currentFormPersist - The current form persist representing the current (transient or persistent) state of the form edited in the form designer. Empty model when the form designer is not open currently.
      • setCurrentStateList

        public void setCurrentStateList​(StateList currentStateList)
        Parameters:
        currentStateList - The current list of states that are being edited in the workflow designer, but may not yet be saved.
      • setDesignerSessionActive

        public void setDesignerSessionActive​(boolean designerSessionActive)
        Parameters:
        designerSessionActive - true when this session conversation model belongs to an active designer session. false when this is e.g. an empty model with default values.
        Since:
        8.0.0
      • setEnvironmentData

        public void setEnvironmentData​(DesignerConversationEnvironmentData environmentData)
        Parameters:
        environmentData - Details about the currently opened form.
      • setInitialFlowchartSnapshot

        public void setInitialFlowchartSnapshot​(FlowchartSnapshot initialFlowchartSnapshot)
        Parameters:
        initialFlowchartSnapshot - The snapshot that should be loaded initially when the workflow designer is opened. When null, the persisted workflow version is loaded.
      • setInitialWebFormPersistJson

        public void setInitialWebFormPersistJson​(String fileName,
                                                 String initialWebFormPersistJson)
        Parameters:
        fileName - File name of the persist JSON file.
        initialWebFormPersistJson - The persist JSON that should be loaded initially when the form designer is opened. When null, the persisted form version is loaded.
      • setInitialWebFormPersistLivecycle

        public void setInitialWebFormPersistLivecycle​(String fileName,
                                                      String initialWebFormLivecycleXml)
        Parameters:
        fileName - File name of the livecycle persist file.
        initialWebFormLivecycleXml - The persist livecycle XML that should be loaded initially when the form designer is opened. When null, the persisted form version is loaded.
      • setInitialWebFormPersistPdf

        public void setInitialWebFormPersistPdf​(String fileName,
                                                String importId)
        Parameters:
        fileName - File name of the livecycle persist file.
        importId - The ID of the upload PDF file that should be loaded initially when the form designer is opened. When null, the persisted form version is loaded.