Class AbstractSchedTaskJobDelegate<T extends SchedTask>

    • Constructor Detail

      • AbstractSchedTaskJobDelegate

        public AbstractSchedTaskJobDelegate()
    • Method Detail

      • setStatus

        protected void setStatus​(String status)
      • execute

        @Transactional
        public void execute​(TaskType taskType,
                            String taskKey,
                            boolean dryRun,
                            org.quartz.JobExecutionContext context)
                     throws org.quartz.JobExecutionException
        Description copied from interface: SchedTaskJobDelegate
        Executes a Quartz Job to run the given Task.
        Specified by:
        execute in interface SchedTaskJobDelegate
        Parameters:
        taskType - Type of task to run
        taskKey - Task key to run
        dryRun - indicates if execution shall be simulated with no actual changes
        context - Quartz' execution context, can be used to pass parameters to the job
        Throws:
        org.quartz.JobExecutionException - if anything goes wrong
      • doExecute

        protected abstract String doExecute​(boolean dryRun,
                                            String executor,
                                            org.quartz.JobExecutionContext context)
                                     throws org.quartz.JobExecutionException
        The actual execution, delegated to child classes.
        Parameters:
        dryRun - whether to actually touch the data
        executor - the user executing this task
        context - Quartz' execution context, can be used to pass parameters to the job
        Returns:
        the task execution status to be set
        Throws:
        org.quartz.JobExecutionException - if anything goes wrong
      • hasToBeRegistered

        protected boolean hasToBeRegistered​(TaskExec<?> execution)
        Template method to determine whether this job's task execution has to be persisted or not.
        Parameters:
        execution - task execution
        Returns:
        whether to persist or not
      • register

        protected void register​(TaskExec<?> execution)