Interface IWorkflowVersionBackupDao

    • Method Detail

      • allByWorkflowVersion

        List<WorkflowVersionBackup> allByWorkflowVersion​(IEntityContext ec,
                                                         WorkflowVersion workflowVersion)
        Retrieves all available backups for the given workflow version, sorted in ascending order by getDateCreated().
        Parameters:
        ec - Current entity context for accessing the database.
        workflowVersion - Workflow version for which to retrieve all backups
        Returns:
        All existing backups for the given workflow version, sorted in ascending order by getDateCreated().
      • createNewBackup

        WorkflowVersionBackup createNewBackup​(IEntityContext ec,
                                              WorkflowVersion workflowVersion,
                                              String backupData)
        Creates a new workflow version backup with the data of the given workflow version. Enforces a limit on the number of backups. No more than the specified number of backups will be present after the new backup was created. When the number of backups exceeds the limit, the oldest backups are deleted.
        Parameters:
        ec - Current entity context for accessing the database.
        workflowVersion - Workflow version to backup.
        backupData - Backup JSON data to store.
        Returns:
        The newly created backup.
      • deleteAllByWorkflowVersion

        void deleteAllByWorkflowVersion​(IEntityContext ec,
                                        WorkflowVersion workflowVersion)
        Deletes all backups for the given workflow version.
        Parameters:
        ec - Current entity context for accessing the database.
        workflowVersion - Workflow version for which to delete all backups