@Override public <T extends ObjectType> String addObject(PrismObject<T> newObject, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException { ObjectDelta<T> delta = DeltaFactory.Object.createAddDelta(newObject); Collection<ObjectDelta<? extends ObjectType>> deltaCollection = MiscSchemaUtil.createCollection(delta); Collection<ObjectDeltaOperation<? extends ObjectType>> executedChanges = modelService.executeChanges(deltaCollection, options, getCurrentTask(), getCurrentResult()); String oid = ObjectDeltaOperation.findAddDeltaOid(executedChanges, newObject); newObject.setOid(oid); return oid; }
String newTaskOid = ObjectDeltaOperation.findAddDeltaOid(executedChanges, newTask.asPrismObject()); newTask.setOid(newTaskOid); newTask.setTaskIdentifier(newTaskOid);
oid = ObjectDeltaOperation.findAddDeltaOid(executedChanges, object); result.computeStatus(); result.cleanupResult();
return ObjectDeltaOperation.findAddDeltaOid(executedChanges, newObject);
try { Collection<ObjectDeltaOperation<? extends ObjectType>> executedDeltas = operationsHelper.applyDelta(createAddDelta(objectType), executionOptions, dryRun, context, result); String newObjectOid = ObjectDeltaOperation.findAddDeltaOid(executedDeltas, prismObject); prismObject.setOid(newObjectOid); operationsHelper.recordEnd(context, objectType, started, null);
XMLGregorianCalendar endTime = clock.currentTimeXMLGregorianCalendar(); groupOid = ObjectDeltaOperation.findAddDeltaOid(executedChanges, group); assertNotNull("No account OID in resulting delta", groupOid);