Class BuildIndexScheduledTask

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

public class BuildIndexScheduledTask extends ScheduledTask
This task builds indices for the specified dataspaces in dataspaces or all non-technical dataspaces that have not been marked for exclusion.

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.BuildIndexScheduledTask
  • Optional Parameters:
    • dataspaces: Names of the dataspaces for which the index needs to be built, separated by semicolons (;). If not specified, indices for all non-technical dataspaces will be built.
    • excludeRegExp: A regular expression to exclude certain dataspaces based on naming conventions. For example, use .*\d.* to exclude dataspaces with numbers in their names (child dataspaces). If not specified, no dataspaces will be excluded.
    • includeTechnicalDataspaces: Indicator specifying whether technical dataspaces are included or excluded from indexing.

The execution report will include information about the task's start and end, the current dataspace being indexed, and warnings if any of the specified dataspaces do not exist or if datasets cannot be indexed due to severe errors.

Author:
APGAR Consulting
  • Constructor Details

    • BuildIndexScheduledTask

      public BuildIndexScheduledTask()
  • Method Details

    • execute

      Builds indices for the specified dataspaces, if provided, or for all non-technical dataspaces if none are specified.
      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
    • getDataspaces

      public String getDataspaces()
      Gets the names of the dataspaces for which the index needs to be built.
      Returns:
      a semicolon-separated string of dataspace names
    • setDataspaces

      public void setDataspaces(String dataspaces)
      Sets the names of the dataspaces for which the index needs to be built.
      Parameters:
      dataspaces - a semicolon-separated string of dataspace names
    • getExcludeRegExp

      public String getExcludeRegExp()
      Gets the regular expression used to exclude certain dataspaces from indexing.
      Returns:
      the regular expression for exclusion
    • setExcludeRegExp

      public void setExcludeRegExp(String excludeRegExp)
      Sets the regular expression to exclude certain dataspaces from indexing.
      Parameters:
      excludeRegExp - the regular expression for exclusion
    • getIncludeTechnicalDataspaces

      public boolean getIncludeTechnicalDataspaces()
      Checks whether technical dataspaces should be included in indexing.
      Returns:
      true if technical dataspaces are included, false otherwise
    • setIncludeTechnicalDataspaces

      public void setIncludeTechnicalDataspaces(boolean includeTechnicalDataspaces)
      Specifies whether technical dataspaces should be included in indexing.
      Parameters:
      includeTechnicalDataspaces - true to include technical dataspaces, false to exclude them