Class WorkflowBackupBean

  • All Implemented Interfaces:
    Serializable

    @Named
    @ViewScoped
    public class WorkflowBackupBean
    extends Object
    implements 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:
    Serialized Form
    • Constructor Detail

      • WorkflowBackupBean

        public WorkflowBackupBean()
    • Method Detail

      • getBackupLabel

        public String getBackupLabel​(WorkflowVersionBackup item)
        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.
      • loadBackup

        public void loadBackup​(FlowchartSnapshot snapshot)
        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

        public void onBackupDetect​(BackupDetectEvent event)
        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.