Package de.xima.fc.gui.model.designer
Class DesignerConversationModel
java.lang.Object
de.xima.fc.gui.model.designer.DesignerConversationModel
- All Implemented Interfaces:
Serializable,AutoCloseable
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:
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddTempFile(String id, Path file) Adds a temp file or directory to the conversation scope.voidclose()static DesignerConversationModelempty()getTempFile(String id) Gets a file form the temp file map.booleanremoveTempFile(String id) Gets and removes the file with the ID from the temp file map.voidsetCurrentFormDesignerLanguage(String currentFormDesignerLanguage) voidsetCurrentFormPersist(FormPersist currentFormPersist) voidsetCurrentStateList(StateList currentStateList) voidsetDesignerSessionActive(boolean designerSessionActive) voidsetEnvironmentData(DesignerConversationEnvironmentData environmentData) voidsetInitialFlowchartSnapshot(FlowchartSnapshot initialFlowchartSnapshot) voidsetInitialWebFormPersistJson(String fileName, String initialWebFormPersistJson) voidsetInitialWebFormPersistLivecycle(String fileName, String initialWebFormLivecycleXml) voidsetInitialWebFormPersistPdf(String fileName, String importId)
-
Method Details
-
addTempFile
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
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
getAndClearInitialFlowchartSnapshot
- Returns:
- The snapshot that should be loaded initially when the workflow designer is opened. When
null, the persisted workflow is loaded.
-
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
- Returns:
- The current language selected in the form designer, empty string the form designer is not open currently.
-
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
- Returns:
- The current list of states that are being edited in the workflow designer, but may not yet be saved.
-
getEnvironmentData
- Returns:
- Details about the currently opened form.
-
getTempFile
Gets a file form the temp file map. PreferremoveTempFile(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
nullwhen no such file exists. - Since:
- 7.2.0
-
isDesignerSessionActive
public boolean isDesignerSessionActive()- Returns:
truewhen this session conversation model belongs to an active designer session.falsewhen this is e.g. an empty model with default values.- Since:
- 8.0.0
-
removeTempFile
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
nullwhen no such file exists. - Since:
- 8.0.0
-
setCurrentFormDesignerLanguage
- Parameters:
currentFormDesignerLanguage- The current language selected in the form designer, empty string the form designer is not open currently.
-
setCurrentFormPersist
- 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
- 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-truewhen this session conversation model belongs to an active designer session.falsewhen this is e.g. an empty model with default values.- Since:
- 8.0.0
-
setEnvironmentData
- Parameters:
environmentData- Details about the currently opened form.
-
setInitialFlowchartSnapshot
- Parameters:
initialFlowchartSnapshot- The snapshot that should be loaded initially when the workflow designer is opened. Whennull, the persisted workflow version is loaded.
-
setInitialWebFormPersistJson
- Parameters:
fileName- File name of the persist JSON file.initialWebFormPersistJson- The persist JSON that should be loaded initially when the form designer is opened. Whennull, the persisted form version is loaded.
-
setInitialWebFormPersistLivecycle
- 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. Whennull, the persisted form version is loaded.
-
setInitialWebFormPersistPdf
- 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. Whennull, the persisted form version is loaded.
-
empty
- Returns:
- A new empty conversation model with the defaults.
-