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();
}
Aggregations