use of com.evolveum.midpoint.repo.api.RepoModifyOptions in project midpoint by Evolveum.
the class LookupTableTest method executeAndCheckModification.
protected void executeAndCheckModification(List<ItemDelta<?, ?>> modifications, OperationResult result, int versionDelta, List<String> keysWithGeneratedTimestamps, List<String> replacedKeys) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException, IOException {
RepoModifyOptions modifyOptions = getModifyOptions();
if (RepoModifyOptions.isExecuteIfNoChanges(modifyOptions) && versionDelta == 0) {
versionDelta = 1;
}
PrismObject<LookupTableType> before = getFullTable(tableOid, result);
repositoryService.modifyObject(LookupTableType.class, tableOid, modifications, modifyOptions, result);
checkTable(tableOid, result, before, modifications, Integer.parseInt(before.getVersion()) + versionDelta, keysWithGeneratedTimestamps, replacedKeys);
}
use of com.evolveum.midpoint.repo.api.RepoModifyOptions in project midpoint by Evolveum.
the class CertificationTest method executeAndCheckModification.
protected void executeAndCheckModification(List<ItemDelta<?, ?>> modifications, OperationResult result, int versionDelta) throws ObjectNotFoundException, SchemaException, ObjectAlreadyExistsException, IOException {
RepoModifyOptions modifyOptions = getModifyOptions();
if (RepoModifyOptions.isExecuteIfNoChanges(modifyOptions) && versionDelta == 0) {
versionDelta = 1;
}
PrismObject<AccessCertificationCampaignType> before = getFullCampaign(campaign1Oid, result);
int expectedVersion = Integer.parseInt(before.getVersion()) + versionDelta;
List<ItemDelta> savedModifications = (List) CloneUtil.cloneCollectionMembers(modifications);
repositoryService.modifyObject(AccessCertificationCampaignType.class, campaign1Oid, modifications, modifyOptions, result);
checkCampaign(campaign1Oid, result, before, savedModifications, expectedVersion);
}
Aggregations