Class AbstractProvisioningJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>

  • All Implemented Interfaces:
    org.apache.syncope.core.provisioning.api.job.JobDelegate, org.apache.syncope.core.provisioning.api.job.SchedTaskJobDelegate
    Direct Known Subclasses:
    PullJobDelegate, PushJobDelegate

    public abstract class AbstractProvisioningJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>
    extends AbstractSchedTaskJobDelegate<T>
    • Field Detail

      • connectorManager

        @Autowired
        protected org.apache.syncope.core.provisioning.api.ConnectorManager connectorManager
        ConnInstance loader.
      • anyTypeDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.AnyTypeDAO anyTypeDAO
        AnyTypeDAO DAO
      • resourceDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO
        Resource DAO.
      • entityFactory

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

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.PolicyDAO policyDAO
        Policy DAO.
      • perContextProvisionSorter

        protected Optional<org.apache.syncope.core.provisioning.api.ProvisionSorter> perContextProvisionSorter
    • Constructor Detail

      • AbstractProvisioningJobDelegate

        public AbstractProvisioningJobDelegate()
    • Method Detail

      • getProvisionSorter

        protected org.apache.syncope.core.provisioning.api.ProvisionSorter getProvisionSorter​(T task)
      • generate

        protected String generate​(Collection<org.apache.syncope.common.lib.to.ProvisioningReport> results,
                                  org.apache.syncope.common.lib.types.TraceLevel level)
        Helper method to invoke logging per provisioning result, for the given trace level.
        Parameters:
        results - provisioning results
        level - trace level
        Returns:
        report as string
      • createReport

        protected String createReport​(Collection<org.apache.syncope.common.lib.to.ProvisioningReport> provResults,
                                      org.apache.syncope.core.persistence.api.entity.ExternalResource resource,
                                      boolean dryRun)
        Create a textual report of the provisioning operation, based on the trace level.
        Parameters:
        provResults - Provisioning results
        resource - Provisioning resource
        dryRun - dry run?
        Returns:
        report as string
      • getConnector

        protected org.apache.syncope.core.provisioning.api.Connector getConnector​(T provisioningTask)
                                                                           throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • doExecute

        protected String doExecute​(boolean dryRun,
                                   String executor,
                                   org.quartz.JobExecutionContext context)
                            throws org.quartz.JobExecutionException
        Description copied from class: AbstractSchedTaskJobDelegate
        The actual execution, delegated to child classes.
        Specified by:
        doExecute in class AbstractSchedTaskJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>
        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
      • doExecuteProvisioning

        protected abstract String doExecuteProvisioning​(T task,
                                                        org.apache.syncope.core.provisioning.api.Connector connector,
                                                        boolean dryRun,
                                                        String executor,
                                                        org.quartz.JobExecutionContext context)
                                                 throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • hasToBeRegistered

        protected boolean hasToBeRegistered​(org.apache.syncope.core.persistence.api.entity.task.TaskExec<?> execution)
        Description copied from class: AbstractSchedTaskJobDelegate
        Template method to determine whether this job's task execution has to be persisted or not.
        Overrides:
        hasToBeRegistered in class AbstractSchedTaskJobDelegate<T extends org.apache.syncope.core.persistence.api.entity.task.ProvisioningTask<T>>
        Parameters:
        execution - task execution
        Returns:
        whether to persist or not
      • getTaskClassReference

        protected Class<T> getTaskClassReference()