Class DefaultPropagationManager

  • All Implemented Interfaces:
    org.apache.syncope.core.provisioning.api.propagation.PropagationManager

    @Transactional(rollbackFor=java.lang.Throwable.class)
    public class DefaultPropagationManager
    extends Object
    implements org.apache.syncope.core.provisioning.api.propagation.PropagationManager
    Manage the data propagation to external resources.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory anyUtilsFactory  
      protected ConnObjectUtils connObjectUtils  
      protected org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler  
      protected org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory  
      protected static org.slf4j.Logger LOG  
      protected org.apache.syncope.core.provisioning.api.MappingManager mappingManager  
      protected org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO  
      protected org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO  
      • Fields inherited from interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager

        MANDATORY_MISSING_ATTR_NAME, MANDATORY_NULL_OR_EMPTY_ATTR_NAME
    • Constructor Summary

      Constructors 
      Constructor Description
      DefaultPropagationManager​(org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO, org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO, org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory, ConnObjectUtils connObjectUtils, org.apache.syncope.core.provisioning.api.MappingManager mappingManager, org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler, org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory anyUtilsFactory)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> createTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any, String password, boolean changePwd, Boolean enable, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<org.apache.syncope.common.lib.Attr> vAttrs)
      Create propagation tasks.
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> createTasks​(org.apache.syncope.core.persistence.api.entity.Realm realm, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, Collection<String> excludedResources)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getCreateTasks​(org.apache.syncope.common.lib.types.AnyTypeKind kind, String key, Boolean enable, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, Collection<org.apache.syncope.common.lib.Attr> vAttrs, Collection<String> excludedResources)  
      protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getCreateTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any, String password, Boolean enable, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<org.apache.syncope.common.lib.Attr> vAttrs, Collection<String> excludedResources)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getDeleteTasks​(org.apache.syncope.common.lib.types.AnyTypeKind kind, String key, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<String> excludedResources)  
      protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getDeleteTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<String> excludedResources)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUpdateTasks​(org.apache.syncope.common.lib.types.AnyTypeKind kind, String key, boolean changePwd, Boolean enable, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<org.apache.syncope.common.lib.Attr> vAttrs, Collection<String> excludedResources)  
      protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUpdateTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any, String password, boolean changePwd, Boolean enable, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<org.apache.syncope.common.lib.Attr> vAttrs, Collection<String> excludedResources)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUserCreateTasks​(String key, String password, Boolean enable, org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes, org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount, Collection<org.apache.syncope.common.lib.Attr> vAttrs, Collection<String> excludedResources)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUserUpdateTasks​(org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,​Boolean>> wfResult)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUserUpdateTasks​(org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,​Boolean>> wfResult, boolean changePwd, Collection<String> excludedResources)  
      org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo newTask​(org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler, org.apache.syncope.core.persistence.api.entity.Any<?> any, org.apache.syncope.core.persistence.api.entity.ExternalResource resource, org.apache.syncope.common.lib.types.ResourceOperation operation, org.apache.syncope.common.lib.to.Provision provision, Stream<org.apache.syncope.common.lib.to.Item> mappingItems, org.apache.commons.lang3.tuple.Pair<String,​Set<org.identityconnectors.framework.common.objects.Attribute>> preparedAttrs)  
      Map<org.apache.commons.lang3.tuple.Pair<String,​String>,​Set<org.identityconnectors.framework.common.objects.Attribute>> prepareAttrs​(org.apache.syncope.common.lib.types.AnyTypeKind kind, String key, String password, boolean changePwd, Boolean enable, Collection<String> excludedResources)  
      Map<org.apache.commons.lang3.tuple.Pair<String,​String>,​Set<org.identityconnectors.framework.common.objects.Attribute>> prepareAttrs​(org.apache.syncope.core.persistence.api.entity.Realm realm)  
      List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> setAttributeDeltas​(List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> tasks, Map<org.apache.commons.lang3.tuple.Pair<String,​String>,​Set<org.identityconnectors.framework.common.objects.Attribute>> beforeAttrs, org.apache.syncope.common.lib.request.AnyUR updateRequest)  
    • Field Detail

      • LOG

        protected static final org.slf4j.Logger LOG
      • virSchemaDAO

        protected final org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO
      • resourceDAO

        protected final org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO
      • entityFactory

        protected final org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory
      • mappingManager

        protected final org.apache.syncope.core.provisioning.api.MappingManager mappingManager
      • derAttrHandler

        protected final org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler
      • anyUtilsFactory

        protected final org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory anyUtilsFactory
    • Constructor Detail

      • DefaultPropagationManager

        public DefaultPropagationManager​(org.apache.syncope.core.persistence.api.dao.VirSchemaDAO virSchemaDAO,
                                         org.apache.syncope.core.persistence.api.dao.ExternalResourceDAO resourceDAO,
                                         org.apache.syncope.core.persistence.api.entity.EntityFactory entityFactory,
                                         ConnObjectUtils connObjectUtils,
                                         org.apache.syncope.core.provisioning.api.MappingManager mappingManager,
                                         org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler,
                                         org.apache.syncope.core.persistence.api.entity.AnyUtilsFactory anyUtilsFactory)
    • Method Detail

      • getCreateTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getCreateTasks​(org.apache.syncope.common.lib.types.AnyTypeKind kind,
                                                                                                             String key,
                                                                                                             Boolean enable,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                             Collection<org.apache.syncope.common.lib.Attr> vAttrs,
                                                                                                             Collection<String> excludedResources)
        Specified by:
        getCreateTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • getUserCreateTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUserCreateTasks​(String key,
                                                                                                                 String password,
                                                                                                                 Boolean enable,
                                                                                                                 org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                                 org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                                 Collection<org.apache.syncope.common.lib.Attr> vAttrs,
                                                                                                                 Collection<String> excludedResources)
        Specified by:
        getUserCreateTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • getCreateTasks

        protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getCreateTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any,
                                                                                                                String password,
                                                                                                                Boolean enable,
                                                                                                                org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                                org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                                Collection<org.apache.syncope.common.lib.Attr> vAttrs,
                                                                                                                Collection<String> excludedResources)
      • getUpdateTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUpdateTasks​(org.apache.syncope.common.lib.types.AnyTypeKind kind,
                                                                                                             String key,
                                                                                                             boolean changePwd,
                                                                                                             Boolean enable,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                             Collection<org.apache.syncope.common.lib.Attr> vAttrs,
                                                                                                             Collection<String> excludedResources)
        Specified by:
        getUpdateTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • getUserUpdateTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUserUpdateTasks​(org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,​Boolean>> wfResult,
                                                                                                                 boolean changePwd,
                                                                                                                 Collection<String> excludedResources)
        Specified by:
        getUserUpdateTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • getUserUpdateTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUserUpdateTasks​(org.apache.syncope.core.provisioning.api.UserWorkflowResult<org.apache.commons.lang3.tuple.Pair<org.apache.syncope.common.lib.request.UserUR,​Boolean>> wfResult)
        Specified by:
        getUserUpdateTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • getUpdateTasks

        protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getUpdateTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any,
                                                                                                                String password,
                                                                                                                boolean changePwd,
                                                                                                                Boolean enable,
                                                                                                                org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                                org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                                Collection<org.apache.syncope.common.lib.Attr> vAttrs,
                                                                                                                Collection<String> excludedResources)
      • getDeleteTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getDeleteTasks​(org.apache.syncope.common.lib.types.AnyTypeKind kind,
                                                                                                             String key,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                             Collection<String> excludedResources)
        Specified by:
        getDeleteTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • getDeleteTasks

        protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> getDeleteTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any,
                                                                                                                org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                                org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                                Collection<String> excludedResources)
      • newTask

        public org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo newTask​(org.apache.syncope.core.provisioning.api.DerAttrHandler derAttrHandler,
                                                                                                org.apache.syncope.core.persistence.api.entity.Any<?> any,
                                                                                                org.apache.syncope.core.persistence.api.entity.ExternalResource resource,
                                                                                                org.apache.syncope.common.lib.types.ResourceOperation operation,
                                                                                                org.apache.syncope.common.lib.to.Provision provision,
                                                                                                Stream<org.apache.syncope.common.lib.to.Item> mappingItems,
                                                                                                org.apache.commons.lang3.tuple.Pair<String,​Set<org.identityconnectors.framework.common.objects.Attribute>> preparedAttrs)
        Specified by:
        newTask in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • createTasks

        protected List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> createTasks​(org.apache.syncope.core.persistence.api.entity.Any<?> any,
                                                                                                             String password,
                                                                                                             boolean changePwd,
                                                                                                             Boolean enable,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                             org.apache.syncope.core.provisioning.api.PropagationByResource<org.apache.commons.lang3.tuple.Pair<String,​String>> propByLinkedAccount,
                                                                                                             Collection<org.apache.syncope.common.lib.Attr> vAttrs)
        Create propagation tasks.
        Parameters:
        any - to be provisioned
        password - clear text password to be provisioned
        changePwd - whether password should be included for propagation attributes or not
        enable - whether user must be enabled or not
        propByRes - operation to be performed per resource
        propByLinkedAccount - operation to be performed on linked accounts
        vAttrs - virtual attributes to be set
        Returns:
        list of propagation tasks created
      • createTasks

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> createTasks​(org.apache.syncope.core.persistence.api.entity.Realm realm,
                                                                                                          org.apache.syncope.core.provisioning.api.PropagationByResource<String> propByRes,
                                                                                                          Collection<String> excludedResources)
        Specified by:
        createTasks in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • prepareAttrs

        @Transactional(readOnly=true,
                       propagation=REQUIRES_NEW)
        public Map<org.apache.commons.lang3.tuple.Pair<String,​String>,​Set<org.identityconnectors.framework.common.objects.Attribute>> prepareAttrs​(org.apache.syncope.common.lib.types.AnyTypeKind kind,
                                                                                                                                                               String key,
                                                                                                                                                               String password,
                                                                                                                                                               boolean changePwd,
                                                                                                                                                               Boolean enable,
                                                                                                                                                               Collection<String> excludedResources)
        Specified by:
        prepareAttrs in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • prepareAttrs

        @Transactional(readOnly=true,
                       propagation=REQUIRES_NEW)
        public Map<org.apache.commons.lang3.tuple.Pair<String,​String>,​Set<org.identityconnectors.framework.common.objects.Attribute>> prepareAttrs​(org.apache.syncope.core.persistence.api.entity.Realm realm)
        Specified by:
        prepareAttrs in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager
      • setAttributeDeltas

        public List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> setAttributeDeltas​(List<org.apache.syncope.core.provisioning.api.propagation.PropagationTaskInfo> tasks,
                                                                                                                 Map<org.apache.commons.lang3.tuple.Pair<String,​String>,​Set<org.identityconnectors.framework.common.objects.Attribute>> beforeAttrs,
                                                                                                                 org.apache.syncope.common.lib.request.AnyUR updateRequest)
        Specified by:
        setAttributeDeltas in interface org.apache.syncope.core.provisioning.api.propagation.PropagationManager