Class WorkflowBackupBean
java.lang.Object
de.xima.fc.workflow.designer.bean.WorkflowBackupBean
- All Implemented Interfaces:
Serializable
Bean for handling workflow version backups. Handles both the backup dialog when an unsaved backup was detected by the
flowchart, as well as the backup chooser in the bottom toolbar.
- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreates the label for the available backup items in the backup chooser.void
loadBackup
(FlowchartSnapshot snapshot) Loads the given snapshot into the workflow designer.void
AJAX callback invoked when the user does not wish to load the detected backup.void
onBackupDetect
(BackupDetectEvent event) AJAX callback when an unsaved backup was detected by the flowchart component.void
AJAX listener invoked when the user decided to load the detected unsaved workflow backup.void
AJAX listener invoked when the selected workflow version backup has changed.
-
Constructor Details
-
WorkflowBackupBean
public WorkflowBackupBean()
-
-
Method Details
-
getBackupLabel
Creates the label for the available backup items in the backup chooser. The label is different depending on whether is is from today or from longer in the past.- Parameters:
item
- Backup item to process- Returns:
- The label for the given backup.
-
getCustomBackupDataJson
- Returns:
- The custom data that should be added to
FlowchartSnapshot.getCustomData()
. This is a serialized instance ofCustomBackupData
. - Throws:
FastJsonException
- When the custom backup JSON string could not be created.
-
getCustomDataVersion
- Returns:
- Custom data version for
FlowchartBase.getBackupCustomDataVersion()
.
-
loadBackup
Loads the given snapshot into the workflow designer.- Parameters:
snapshot
- Snapshot to load into the workflow designer.
-
onBackupCancel
public void onBackupCancel()AJAX callback invoked when the user does not wish to load the detected backup. -
onBackupDetect
AJAX callback when an unsaved backup was detected by the flowchart component.- Parameters:
event
- Backup that was detected.
-
onBackupLoad
public void onBackupLoad()AJAX listener invoked when the user decided to load the detected unsaved workflow backup. Loads the backup and updates the workflow designer. -
onBackupSelectionChange
public void onBackupSelectionChange()AJAX listener invoked when the selected workflow version backup has changed. Loads the selected backup into the workflow designer.
-