Skip to content

Commit

Permalink
Post-processing of shadows/resources that were searched for using Obj…
Browse files Browse the repository at this point in the history
…ectType.
  • Loading branch information
mederly committed Aug 16, 2016
1 parent efa792f commit d40c852
Showing 1 changed file with 11 additions and 0 deletions.
Expand Up @@ -809,6 +809,17 @@ public <T extends ObjectType> SearchResultList<PrismObject<T>> searchObjects(Cla
} finally {
RepositoryCache.exit();
}

// postprocessing objects that weren't handled by their correct provider (e.g. searching for ObjectType, and retrieving tasks, resources, shadows)
// currently only resources and shadows are handled in this way
// TODO generalize this approach somehow (something like "postprocess" in task/provisioning interface)
if (searchProvider == ObjectTypes.ObjectManager.REPOSITORY && !GetOperationOptions.isRaw(rootOptions)) {
for (PrismObject<T> object : list) {
if (object.asObjectable() instanceof ResourceType || object.asObjectable() instanceof ShadowType) {
provisioning.applyDefinition(object, result);
}
}
}

schemaTransformer.applySchemasAndSecurityToObjects(list, rootOptions, null, task, result);

Expand Down

0 comments on commit d40c852

Please sign in to comment.