Class ClosedDataspaceRolloverScheduledTask

java.lang.Object
com.orchestranetworks.scheduler.ScheduledTask
com.apgar.common.lib.scheduledtask.ClosedDataspaceRolloverScheduledTask

public class ClosedDataspaceRolloverScheduledTask extends ScheduledTask
This task deletes closed dataspaces that have been closed n days before.

To utilize this functionality, create a task in the Tasks table of the Task Scheduler under the Administration tab with the following specifications:

  • Module: The module that contains this JAR file.
  • Class Name: com.apgar.common.lib.scheduledtask.ClosedDataspaceRolloverScheduledTask
  • Parameters:
    • threshold: Specifies the number of days after which closed data spaces will be deleted.

The execution report will include the type and label of each closed dataspace that is deleted. If no threshold is set, the task will not execute any deletions, and the execution report will generate a warning indicating that a threshold greater than zero is required.

Author:
APGAR Consulting
  • Constructor Details

    • ClosedDataspaceRolloverScheduledTask

      public ClosedDataspaceRolloverScheduledTask()
  • Method Details

    • execute

      Collects all the dataspaces that were closed threshold days before and deletes them.
      Specified by:
      execute in class ScheduledTask
      Parameters:
      context - context of the scheduled task execution
      Throws:
      OperationException - if an error occurs during deletion
      ScheduledTaskInterruption - if the scheduled task is interrupted
    • getThreshold

      public int getThreshold()
      Retrieves the threshold for closed dataspace deletion.

      This threshold indicates the number of days; any closed dataspace that has been closed for more than this number of days will be deleted.

      Returns:
      the threshold in days
    • setThreshold

      public void setThreshold(int threshold)
      Sets the threshold for closed dataspace deletion.

      This threshold specifies the number of days; any closed dataspace that has been closed for more than this number of days will be deleted.

      Parameters:
      threshold - the new threshold in days