Search in sources :

Example 1 with UcfAsyncUpdateChangeListener

use of com.evolveum.midpoint.provisioning.ucf.api.async.UcfAsyncUpdateChangeListener in project midpoint by Evolveum.

the class ResourceObjectConverter method listenForAsynchronousUpdates.

public void listenForAsynchronousUpdates(@NotNull ProvisioningContext ctx, @NotNull ResourceObjectAsyncChangeListener outerListener, @NotNull OperationResult parentResult) throws SchemaException, CommunicationException, ConfigurationException, ObjectNotFoundException, ExpressionEvaluationException {
    LOGGER.trace("Listening for async updates in {}", ctx);
    ConnectorInstance connector = ctx.getConnector(AsyncUpdateCapabilityType.class, parentResult);
    UcfAsyncUpdateChangeListener innerListener = (ucfChange, listenerTask, listenerResult) -> {
        ResourceObjectAsyncChange change = new ResourceObjectAsyncChange(ucfChange, ResourceObjectConverter.this, ctx);
        change.initialize(listenerTask, listenerResult);
        outerListener.onChange(change, listenerTask, listenerResult);
    };
    connector.listenForChanges(innerListener, ctx::canRun, parentResult);
    LOGGER.trace("Finished listening for async updates");
}
Also used : Autowired(org.springframework.beans.factory.annotation.Autowired) com.evolveum.midpoint.util.exception(com.evolveum.midpoint.util.exception) InternalsConfig(com.evolveum.midpoint.schema.internals.InternalsConfig) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) UcfAsyncUpdateChangeListener(com.evolveum.midpoint.provisioning.ucf.api.async.UcfAsyncUpdateChangeListener) com.evolveum.midpoint.prism(com.evolveum.midpoint.prism) LightweightIdentifierGenerator(com.evolveum.midpoint.task.api.LightweightIdentifierGenerator) Collections.emptyList(java.util.Collections.emptyList) PrismPropertyValue.getRealValue(com.evolveum.midpoint.prism.PrismPropertyValue.getRealValue) Task(com.evolveum.midpoint.task.api.Task) MatchingRuleRegistry(com.evolveum.midpoint.prism.match.MatchingRuleRegistry) com.evolveum.midpoint.xml.ns._public.resource.capabilities_3(com.evolveum.midpoint.xml.ns._public.resource.capabilities_3) ResourceObjectPattern(com.evolveum.midpoint.schema.processor.ResourceObjectPattern) Nullable(org.jetbrains.annotations.Nullable) ExpressionFactory(com.evolveum.midpoint.repo.common.expression.ExpressionFactory) com.evolveum.midpoint.schema.result(com.evolveum.midpoint.schema.result) PolyStringType(com.evolveum.prism.xml.ns._public.types_3.PolyStringType) Entry(java.util.Map.Entry) com.evolveum.midpoint.prism.delta(com.evolveum.midpoint.prism.delta) QName(javax.xml.namespace.QName) NotNull(org.jetbrains.annotations.NotNull) Validate(org.apache.commons.lang.Validate) UcfExecutionContext(com.evolveum.midpoint.provisioning.ucf.api.UcfExecutionContext) com.evolveum.midpoint.provisioning.impl(com.evolveum.midpoint.provisioning.impl) com.evolveum.midpoint.schema(com.evolveum.midpoint.schema) java.util(java.util) com.evolveum.midpoint.util(com.evolveum.midpoint.util) com.evolveum.midpoint.xml.ns._public.common.common_3(com.evolveum.midpoint.xml.ns._public.common.common_3) SchemaConstants(com.evolveum.midpoint.schema.constants.SchemaConstants) Trace(com.evolveum.midpoint.util.logging.Trace) BooleanUtils(org.apache.commons.lang3.BooleanUtils) ObjectUtils.defaultIfNull(org.apache.commons.lang3.ObjectUtils.defaultIfNull) GenericConnectorException(com.evolveum.midpoint.provisioning.api.GenericConnectorException) RepositoryCache(com.evolveum.midpoint.repo.cache.RepositoryCache) EquivalenceStrategy(com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy) LiveSyncToken(com.evolveum.midpoint.provisioning.api.LiveSyncToken) PrismUtil(com.evolveum.midpoint.prism.util.PrismUtil) XMLGregorianCalendar(javax.xml.datatype.XMLGregorianCalendar) ItemPath(com.evolveum.midpoint.prism.path.ItemPath) MatchingRule(com.evolveum.midpoint.prism.match.MatchingRule) Component(org.springframework.stereotype.Component) ItemName(com.evolveum.midpoint.prism.path.ItemName) com.evolveum.midpoint.provisioning.ucf.api(com.evolveum.midpoint.provisioning.ucf.api) com.evolveum.midpoint.schema.processor(com.evolveum.midpoint.schema.processor) ProvisioningUtil(com.evolveum.midpoint.provisioning.util.ProvisioningUtil) Tracer(com.evolveum.midpoint.task.api.Tracer) CacheConfigurationManager(com.evolveum.midpoint.schema.cache.CacheConfigurationManager) ObjectQuery(com.evolveum.midpoint.prism.query.ObjectQuery) TraceManager(com.evolveum.midpoint.util.logging.TraceManager) com.evolveum.midpoint.schema.util(com.evolveum.midpoint.schema.util) UcfAsyncUpdateChangeListener(com.evolveum.midpoint.provisioning.ucf.api.async.UcfAsyncUpdateChangeListener)

Aggregations

com.evolveum.midpoint.prism (com.evolveum.midpoint.prism)1 PrismPropertyValue.getRealValue (com.evolveum.midpoint.prism.PrismPropertyValue.getRealValue)1 com.evolveum.midpoint.prism.delta (com.evolveum.midpoint.prism.delta)1 EquivalenceStrategy (com.evolveum.midpoint.prism.equivalence.EquivalenceStrategy)1 MatchingRule (com.evolveum.midpoint.prism.match.MatchingRule)1 MatchingRuleRegistry (com.evolveum.midpoint.prism.match.MatchingRuleRegistry)1 ItemName (com.evolveum.midpoint.prism.path.ItemName)1 ItemPath (com.evolveum.midpoint.prism.path.ItemPath)1 ObjectQuery (com.evolveum.midpoint.prism.query.ObjectQuery)1 PrismUtil (com.evolveum.midpoint.prism.util.PrismUtil)1 GenericConnectorException (com.evolveum.midpoint.provisioning.api.GenericConnectorException)1 LiveSyncToken (com.evolveum.midpoint.provisioning.api.LiveSyncToken)1 com.evolveum.midpoint.provisioning.impl (com.evolveum.midpoint.provisioning.impl)1 com.evolveum.midpoint.provisioning.ucf.api (com.evolveum.midpoint.provisioning.ucf.api)1 UcfExecutionContext (com.evolveum.midpoint.provisioning.ucf.api.UcfExecutionContext)1 UcfAsyncUpdateChangeListener (com.evolveum.midpoint.provisioning.ucf.api.async.UcfAsyncUpdateChangeListener)1 ProvisioningUtil (com.evolveum.midpoint.provisioning.util.ProvisioningUtil)1 RepositoryCache (com.evolveum.midpoint.repo.cache.RepositoryCache)1 ExpressionFactory (com.evolveum.midpoint.repo.common.expression.ExpressionFactory)1 com.evolveum.midpoint.schema (com.evolveum.midpoint.schema)1