Class AbstractSchedTaskJobDelegate

    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • task

        protected org.apache.syncope.core.persistence.api.entity.task.SchedTask task
        The actual task to be executed.
      • taskExecDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.TaskExecDAO taskExecDAO
        Task execution DAO.
      • taskDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.TaskDAO taskDAO
        Task DAO.
      • entityFactory

        @Autowired
        protected org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory
      • notificationManager

        @Autowired
        protected org.apache.syncope.core.provisioning.api.notification.NotificationManager notificationManager
        Notification manager.
      • auditManager

        @Autowired
        protected org.apache.syncope.core.provisioning.api.AuditManager auditManager
        Audit manager.
      • interrupt

        protected boolean interrupt
      • interrupted

        protected boolean interrupted
    • Constructor Detail

      • AbstractSchedTaskJobDelegate

        public AbstractSchedTaskJobDelegate()
    • Method Detail

      • currentStatus

        public String currentStatus()
        Specified by:
        currentStatus in interface org.apache.syncope.core.provisioning.api.job.JobDelegate
      • interrupt

        public void interrupt()
        Specified by:
        interrupt in interface org.apache.syncope.core.provisioning.api.job.JobDelegate
      • isInterrupted

        public boolean isInterrupted()
        Specified by:
        isInterrupted in interface org.apache.syncope.core.provisioning.api.job.JobDelegate
      • execute

        @Transactional
        public void execute​(String taskKey,
                            boolean dryRun,
                            org.quartz.JobExecutionContext context)
                     throws org.quartz.JobExecutionException
        Specified by:
        execute in interface org.apache.syncope.core.provisioning.api.job.SchedTaskJobDelegate
        Throws:
        org.quartz.JobExecutionException
      • 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​(org.apache.syncope.core.persistence.api.entity.task.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​(org.apache.syncope.core.persistence.api.entity.task.TaskExec execution)