Class ClosedDataspaceRolloverScheduledTask

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

public class ClosedDataspaceRolloverScheduledTask extends com.orchestranetworks.scheduler.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 Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(com.orchestranetworks.scheduler.ScheduledExecutionContext context)
    Collects all the dataspaces that were closed threshold days before and deletes them.
    int
    Retrieves the threshold for closed dataspace deletion.
    void
    setThreshold(int threshold)
    Sets the threshold for closed dataspace deletion.

    Methods inherited from class com.orchestranetworks.scheduler.ScheduledTask

    handleBeforeInterrupting, handleBeforePausing, handleBeforeResuming, isInterruptable, isPausable, validate, zza, zza, zza, zzb, zzb, zzc, zzd

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ClosedDataspaceRolloverScheduledTask

      public ClosedDataspaceRolloverScheduledTask()
  • Method Details

    • execute

      public void execute(com.orchestranetworks.scheduler.ScheduledExecutionContext context) throws com.orchestranetworks.service.OperationException, com.orchestranetworks.scheduler.ScheduledTaskInterruption
      Collects all the dataspaces that were closed threshold days before and deletes them.
      Specified by:
      execute in class com.orchestranetworks.scheduler.ScheduledTask
      Parameters:
      context - context of the scheduled task execution
      Throws:
      com.orchestranetworks.service.OperationException - if an error occurs during deletion
      com.orchestranetworks.scheduler.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