use of com.evolveum.midpoint.schema.result.AsynchronousOperationReturnValue in project midpoint by Evolveum.
the class AbstractManualConnectorInstance method addObject.
// TODO: operations to check ticket state
@Override
public AsynchronousOperationReturnValue<Collection<ResourceAttribute<?>>> addObject(PrismObject<? extends ShadowType> object, Collection<Operation> additionalOperations, StateReporter reporter, OperationResult parentResult) throws CommunicationException, GenericFrameworkException, SchemaException, ObjectAlreadyExistsException, ConfigurationException {
OperationResult result = parentResult.createSubresult(OPERATION_ADD);
String ticketIdentifier = null;
try {
ticketIdentifier = createTicketAdd(object, additionalOperations, result);
} catch (CommunicationException | GenericFrameworkException | SchemaException | ObjectAlreadyExistsException | ConfigurationException | RuntimeException | Error e) {
result.recordFatalError(e);
throw e;
}
result.recordInProgress();
result.setAsynchronousOperationReference(ticketIdentifier);
AsynchronousOperationReturnValue<Collection<ResourceAttribute<?>>> ret = new AsynchronousOperationReturnValue<>();
ret.setOperationResult(result);
return ret;
}
use of com.evolveum.midpoint.schema.result.AsynchronousOperationReturnValue in project midpoint by Evolveum.
the class AbstractManualConnectorInstance method modifyObject.
@Override
public AsynchronousOperationReturnValue<Collection<PropertyModificationOperation>> modifyObject(ObjectClassComplexTypeDefinition objectClass, Collection<? extends ResourceAttribute<?>> identifiers, Collection<Operation> changes, StateReporter reporter, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, GenericFrameworkException, SchemaException, SecurityViolationException, ObjectAlreadyExistsException, ConfigurationException {
OperationResult result = parentResult.createSubresult(OPERATION_MODIFY);
String ticketIdentifier = null;
try {
ticketIdentifier = createTicketModify(objectClass, identifiers, changes, result);
} catch (ObjectNotFoundException | CommunicationException | GenericFrameworkException | SchemaException | ObjectAlreadyExistsException | ConfigurationException | RuntimeException | Error e) {
result.recordFatalError(e);
throw e;
}
result.recordInProgress();
result.setAsynchronousOperationReference(ticketIdentifier);
AsynchronousOperationReturnValue<Collection<PropertyModificationOperation>> ret = new AsynchronousOperationReturnValue<>();
ret.setOperationResult(result);
return ret;
}
Aggregations