Class AbstractPullResultHandler

  • All Implemented Interfaces:
    org.apache.syncope.core.provisioning.api.pushpull.SyncopePullResultHandler, org.apache.syncope.core.provisioning.api.pushpull.SyncopeResultHandler<org.apache.syncope.core.persistence.api.entity.task.PullTask,​org.apache.syncope.core.provisioning.api.pushpull.PullActions>, org.identityconnectors.framework.common.objects.SyncResultsHandler
    Direct Known Subclasses:
    DefaultAnyObjectPullResultHandler, DefaultGroupPullResultHandler, DefaultUserPullResultHandler

    public abstract class AbstractPullResultHandler
    extends AbstractSyncopeResultHandler<org.apache.syncope.core.persistence.api.entity.task.PullTask,​org.apache.syncope.core.provisioning.api.pushpull.PullActions>
    implements org.apache.syncope.core.provisioning.api.pushpull.SyncopePullResultHandler
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected static org.apache.syncope.common.lib.types.AuditElements.Result and​(org.apache.syncope.common.lib.types.AuditElements.Result left, org.apache.syncope.common.lib.types.AuditElements.Result right)  
      protected void createRemediation​(String anyType, String anyKey, org.apache.syncope.common.lib.request.AnyCR anyCR, org.apache.syncope.common.lib.request.AnyUR anyUR, org.apache.syncope.common.lib.to.ProvisioningReport result, org.identityconnectors.framework.common.objects.SyncDelta delta)  
      protected void createRemediationIfNeeded​(org.apache.syncope.common.lib.request.AnyUR anyUR, org.identityconnectors.framework.common.objects.SyncDelta delta, org.apache.syncope.common.lib.to.ProvisioningReport result)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result delete​(org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.to.Provision provision)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result deprovision​(org.apache.syncope.common.lib.types.MatchingRule matchingRule, org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.to.Provision provision)  
      protected abstract org.apache.syncope.common.lib.to.AnyTO doCreate​(org.apache.syncope.common.lib.request.AnyCR anyCR, org.identityconnectors.framework.common.objects.SyncDelta delta)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result doHandle​(org.identityconnectors.framework.common.objects.SyncDelta delta, org.apache.syncope.common.lib.to.Provision provision, org.apache.syncope.common.lib.types.AnyTypeKind anyTypeKind)
      Look into SyncDelta and take necessary profile.getActions() (create / update / delete) on any object(s).
      protected abstract org.apache.syncope.common.lib.request.AnyUR doUpdate​(org.apache.syncope.common.lib.to.AnyTO before, org.apache.syncope.common.lib.request.AnyUR anyUR, org.identityconnectors.framework.common.objects.SyncDelta delta, org.apache.syncope.common.lib.to.ProvisioningReport result)  
      protected void end​(String anyType, String event, org.apache.syncope.common.lib.types.AuditElements.Result result, Object before, Object output, org.identityconnectors.framework.common.objects.SyncDelta delta, Object... furtherInput)  
      protected abstract String getName​(org.apache.syncope.common.lib.request.AnyCR anyCR)  
      protected abstract String getName​(org.apache.syncope.common.lib.to.AnyTO anyTO)  
      protected abstract org.apache.syncope.core.provisioning.api.ProvisioningManager<?,​?> getProvisioningManager()  
      boolean handle​(org.identityconnectors.framework.common.objects.SyncDelta delta)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result handleAnys​(org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.types.AnyTypeKind anyTypeKind, org.apache.syncope.common.lib.to.Provision provision)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result handleLinkedAccounts​(org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.to.Provision provision)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result ignore​(org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.to.Provision provision, boolean matching, String... message)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result link​(org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.to.Provision provision, boolean unlink)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result provision​(org.apache.syncope.common.lib.types.UnmatchingRule rule, org.identityconnectors.framework.common.objects.SyncDelta delta, org.apache.syncope.common.lib.types.AnyTypeKind anyTypeKind, org.apache.syncope.common.lib.to.Provision provision)  
      protected void throwIgnoreProvisionException​(org.identityconnectors.framework.common.objects.SyncDelta delta, Exception exception)  
      protected org.apache.syncope.common.lib.types.AuditElements.Result update​(org.identityconnectors.framework.common.objects.SyncDelta delta, List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches, org.apache.syncope.common.lib.to.Provision provision)  
      • Methods inherited from interface org.apache.syncope.core.provisioning.api.pushpull.SyncopeResultHandler

        setProfile
    • Field Detail

      • notificationManager

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

        @Autowired
        protected org.apache.syncope.core.provisioning.api.AuditManager auditManager
      • userDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.UserDAO userDAO
      • anyTypeDAO

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

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.TaskDAO taskDAO
      • remediationDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.RemediationDAO remediationDAO
      • virSchemaDAO

        @Autowired
        protected org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO
      • virAttrCache

        @Autowired
        protected org.apache.syncope.core.provisioning.api.cache.VirAttrCache virAttrCache
      • entityFactory

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

      • AbstractPullResultHandler

        public AbstractPullResultHandler()
    • Method Detail

      • and

        protected static org.apache.syncope.common.lib.types.AuditElements.Result and​(org.apache.syncope.common.lib.types.AuditElements.Result left,
                                                                                      org.apache.syncope.common.lib.types.AuditElements.Result right)
      • getName

        protected abstract String getName​(org.apache.syncope.common.lib.to.AnyTO anyTO)
      • getName

        protected abstract String getName​(org.apache.syncope.common.lib.request.AnyCR anyCR)
      • getProvisioningManager

        protected abstract org.apache.syncope.core.provisioning.api.ProvisioningManager<?,​?> getProvisioningManager()
      • doCreate

        protected abstract org.apache.syncope.common.lib.to.AnyTO doCreate​(org.apache.syncope.common.lib.request.AnyCR anyCR,
                                                                           org.identityconnectors.framework.common.objects.SyncDelta delta)
      • doUpdate

        protected abstract org.apache.syncope.common.lib.request.AnyUR doUpdate​(org.apache.syncope.common.lib.to.AnyTO before,
                                                                                org.apache.syncope.common.lib.request.AnyUR anyUR,
                                                                                org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                org.apache.syncope.common.lib.to.ProvisioningReport result)
      • handle

        @Transactional(rollbackFor=java.lang.Throwable.class,
                       propagation=REQUIRES_NEW)
        public boolean handle​(org.identityconnectors.framework.common.objects.SyncDelta delta)
        Specified by:
        handle in interface org.apache.syncope.core.provisioning.api.pushpull.SyncopePullResultHandler
        Specified by:
        handle in interface org.identityconnectors.framework.common.objects.SyncResultsHandler
      • throwIgnoreProvisionException

        protected void throwIgnoreProvisionException​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                     Exception exception)
                                              throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • provision

        protected org.apache.syncope.common.lib.types.AuditElements.Result provision​(org.apache.syncope.common.lib.types.UnmatchingRule rule,
                                                                                     org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                     org.apache.syncope.common.lib.types.AnyTypeKind anyTypeKind,
                                                                                     org.apache.syncope.common.lib.to.Provision provision)
                                                                              throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • update

        protected org.apache.syncope.common.lib.types.AuditElements.Result update​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                  List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                  org.apache.syncope.common.lib.to.Provision provision)
                                                                           throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • deprovision

        protected org.apache.syncope.common.lib.types.AuditElements.Result deprovision​(org.apache.syncope.common.lib.types.MatchingRule matchingRule,
                                                                                       org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                       List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                       org.apache.syncope.common.lib.to.Provision provision)
                                                                                throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • link

        protected org.apache.syncope.common.lib.types.AuditElements.Result link​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                org.apache.syncope.common.lib.to.Provision provision,
                                                                                boolean unlink)
                                                                         throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • delete

        protected org.apache.syncope.common.lib.types.AuditElements.Result delete​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                  List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                  org.apache.syncope.common.lib.to.Provision provision)
                                                                           throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • ignore

        protected org.apache.syncope.common.lib.types.AuditElements.Result ignore​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                  List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                  org.apache.syncope.common.lib.to.Provision provision,
                                                                                  boolean matching,
                                                                                  String... message)
                                                                           throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • handleAnys

        protected org.apache.syncope.common.lib.types.AuditElements.Result handleAnys​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                      List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                      org.apache.syncope.common.lib.types.AnyTypeKind anyTypeKind,
                                                                                      org.apache.syncope.common.lib.to.Provision provision)
                                                                               throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • handleLinkedAccounts

        protected org.apache.syncope.common.lib.types.AuditElements.Result handleLinkedAccounts​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                                List<org.apache.syncope.core.provisioning.api.rules.PullMatch> matches,
                                                                                                org.apache.syncope.common.lib.to.Provision provision)
                                                                                         throws org.quartz.JobExecutionException
        Throws:
        org.quartz.JobExecutionException
      • doHandle

        protected org.apache.syncope.common.lib.types.AuditElements.Result doHandle​(org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                                                    org.apache.syncope.common.lib.to.Provision provision,
                                                                                    org.apache.syncope.common.lib.types.AnyTypeKind anyTypeKind)
                                                                             throws org.quartz.JobExecutionException
        Look into SyncDelta and take necessary profile.getActions() (create / update / delete) on any object(s).
        Parameters:
        delta - returned by the underlying profile.getConnector()
        provision - provisioning info
        anyTypeKind - any type kind
        Returns:
        if handle was successful or not
        Throws:
        org.quartz.JobExecutionException - in case of pull failure.
      • end

        protected void end​(String anyType,
                           String event,
                           org.apache.syncope.common.lib.types.AuditElements.Result result,
                           Object before,
                           Object output,
                           org.identityconnectors.framework.common.objects.SyncDelta delta,
                           Object... furtherInput)
      • createRemediationIfNeeded

        protected void createRemediationIfNeeded​(org.apache.syncope.common.lib.request.AnyUR anyUR,
                                                 org.identityconnectors.framework.common.objects.SyncDelta delta,
                                                 org.apache.syncope.common.lib.to.ProvisioningReport result)
      • createRemediation

        protected void createRemediation​(String anyType,
                                         String anyKey,
                                         org.apache.syncope.common.lib.request.AnyCR anyCR,
                                         org.apache.syncope.common.lib.request.AnyUR anyUR,
                                         org.apache.syncope.common.lib.to.ProvisioningReport result,
                                         org.identityconnectors.framework.common.objects.SyncDelta delta)