Search in sources :

Example 6 with SyncDelta

use of org.identityconnectors.framework.common.objects.SyncDelta in project syncope by apache.

the class LDAPMembershipPullActions method populateMemberships.

/**
 * Pull Syncope memberships with the situation read on the external resource's group.
 *
 * @param profile pull profile
 * @param delta representing the pullong group
 * @param groupTO group after modification performed by the handler
 * @throws JobExecutionException if anything goes wrong
 */
protected void populateMemberships(final ProvisioningProfile<?, ?> profile, final SyncDelta delta, final GroupTO groupTO) throws JobExecutionException {
    Connector connector = profile.getConnector();
    getMembAttrValues(delta, connector).stream().map(membValue -> {
        Set<String> memb = memberships.get(membValue.toString());
        if (memb == null) {
            memb = new HashSet<>();
            memberships.put(membValue.toString(), memb);
        }
        return memb;
    }).forEachOrdered(memb -> {
        memb.add(groupTO.getKey());
    });
}
Also used : ProvisioningProfile(org.apache.syncope.core.provisioning.api.pushpull.ProvisioningProfile) ProvisioningReport(org.apache.syncope.core.provisioning.api.pushpull.ProvisioningReport) LoggerFactory(org.slf4j.LoggerFactory) Autowired(org.springframework.beans.factory.annotation.Autowired) HashMap(java.util.HashMap) HashSet(java.util.HashSet) ConnConfProperty(org.apache.syncope.common.lib.types.ConnConfProperty) Attribute(org.identityconnectors.framework.common.objects.Attribute) PullTask(org.apache.syncope.core.persistence.api.entity.task.PullTask) EntityTO(org.apache.syncope.common.lib.to.EntityTO) GroupDAO(org.apache.syncope.core.persistence.api.dao.GroupDAO) OperationOptionsBuilder(org.identityconnectors.framework.common.objects.OperationOptionsBuilder) Map(java.util.Map) SetUMembershipsJob(org.apache.syncope.core.provisioning.java.job.SetUMembershipsJob) SyncDelta(org.identityconnectors.framework.common.objects.SyncDelta) Logger(org.slf4j.Logger) UserDAO(org.apache.syncope.core.persistence.api.dao.UserDAO) Set(java.util.Set) GroupTO(org.apache.syncope.common.lib.to.GroupTO) AnyTypeDAO(org.apache.syncope.core.persistence.api.dao.AnyTypeDAO) JobExecutionException(org.quartz.JobExecutionException) Connector(org.apache.syncope.core.provisioning.api.Connector) ConnectorObject(org.identityconnectors.framework.common.objects.ConnectorObject) List(java.util.List) ObjectClass(org.identityconnectors.framework.common.objects.ObjectClass) Optional(java.util.Optional) Collections(java.util.Collections) Connector(org.apache.syncope.core.provisioning.api.Connector) HashSet(java.util.HashSet) Set(java.util.Set) HashSet(java.util.HashSet)

Aggregations

SyncDelta (org.identityconnectors.framework.common.objects.SyncDelta)6 ObjectClass (org.identityconnectors.framework.common.objects.ObjectClass)4 Change (com.evolveum.midpoint.provisioning.ucf.api.Change)2 GenericFrameworkException (com.evolveum.midpoint.provisioning.ucf.api.GenericFrameworkException)2 SchemaException (com.evolveum.midpoint.util.exception.SchemaException)2 PullActions (org.apache.syncope.core.provisioning.api.pushpull.PullActions)2 Attribute (org.identityconnectors.framework.common.objects.Attribute)2 OperationOptions (org.identityconnectors.framework.common.objects.OperationOptions)2 OperationOptionsBuilder (org.identityconnectors.framework.common.objects.OperationOptionsBuilder)2 SyncResultsHandler (org.identityconnectors.framework.common.objects.SyncResultsHandler)2 ObjectDelta (com.evolveum.midpoint.prism.delta.ObjectDelta)1 AsynchronousOperationResult (com.evolveum.midpoint.schema.result.AsynchronousOperationResult)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 CommunicationException (com.evolveum.midpoint.util.exception.CommunicationException)1 SystemException (com.evolveum.midpoint.util.exception.SystemException)1 ShadowType (com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType)1 IcObjectClass (eu.bcvsolutions.idm.ic.api.IcObjectClass)1 IcSyncResultsHandler (eu.bcvsolutions.idm.ic.api.IcSyncResultsHandler)1 IcSyncToken (eu.bcvsolutions.idm.ic.api.IcSyncToken)1 IcConnectorFacade (eu.bcvsolutions.idm.ic.service.api.IcConnectorFacade)1