Search in sources :

Example 11 with PropagationException

use of org.apache.syncope.core.provisioning.api.propagation.PropagationException in project syncope by apache.

the class DefaultAnyObjectProvisioningManager method delete.

@Transactional(propagation = Propagation.REQUIRES_NEW)
@Override
public List<PropagationStatus> delete(final String key, final Set<String> excludedResources, final boolean nullPriorityAsync) {
    PropagationByResource propByRes = new PropagationByResource();
    propByRes.set(ResourceOperation.DELETE, anyObjectDAO.findAllResourceKeys(key));
    // Note here that we can only notify about "delete", not any other
    // task defined in workflow process definition: this because this
    // information could only be available after awfAdapter.delete(), which
    // will also effectively remove user from db, thus making virtually
    // impossible by NotificationManager to fetch required user information
    List<PropagationTaskTO> tasks = propagationManager.getDeleteTasks(AnyTypeKind.ANY_OBJECT, key, propByRes, excludedResources);
    PropagationReporter propagationReporter = taskExecutor.execute(tasks, nullPriorityAsync);
    try {
        awfAdapter.delete(key);
    } catch (PropagationException e) {
        throw e;
    }
    return propagationReporter.getStatuses();
}
Also used : PropagationException(org.apache.syncope.core.provisioning.api.propagation.PropagationException) PropagationTaskTO(org.apache.syncope.common.lib.to.PropagationTaskTO) PropagationByResource(org.apache.syncope.core.provisioning.api.PropagationByResource) PropagationReporter(org.apache.syncope.core.provisioning.api.propagation.PropagationReporter) Transactional(org.springframework.transaction.annotation.Transactional)

Aggregations

PropagationException (org.apache.syncope.core.provisioning.api.propagation.PropagationException)11 Result (org.apache.syncope.common.lib.types.AuditElements.Result)8 IgnoreProvisionException (org.apache.syncope.core.provisioning.api.pushpull.IgnoreProvisionException)8 PullActions (org.apache.syncope.core.provisioning.api.pushpull.PullActions)8 DelegatedAdministrationException (org.apache.syncope.core.spring.security.DelegatedAdministrationException)8 JobExecutionException (org.quartz.JobExecutionException)8 ArrayList (java.util.ArrayList)6 PropagationByResource (org.apache.syncope.core.provisioning.api.PropagationByResource)6 ProvisioningReport (org.apache.syncope.core.provisioning.api.pushpull.ProvisioningReport)6 PropagationTaskTO (org.apache.syncope.common.lib.to.PropagationTaskTO)5 SyncopeClientException (org.apache.syncope.common.lib.SyncopeClientException)4 AnyTO (org.apache.syncope.common.lib.to.AnyTO)4 RealmTO (org.apache.syncope.common.lib.to.RealmTO)4 NotFoundException (org.apache.syncope.core.persistence.api.dao.NotFoundException)4 Realm (org.apache.syncope.core.persistence.api.entity.Realm)4 AnyPatch (org.apache.syncope.common.lib.patch.AnyPatch)3 PropagationReporter (org.apache.syncope.core.provisioning.api.propagation.PropagationReporter)3 Date (java.util.Date)2 Remediation (org.apache.syncope.core.persistence.api.entity.Remediation)2 Serializable (java.io.Serializable)1