Package com.evolveum.midpoint.model.impl
Class ModelObjectResolver
java.lang.Object
com.evolveum.midpoint.model.impl.ModelObjectResolver
- All Implemented Interfaces:
ObjectResolver
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.evolveum.midpoint.repo.common.ObjectResolver
ObjectResolver.Session
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<O extends ObjectType>
IntegercountObjects
(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) <T extends ObjectType>
TgetObject
(@NotNull Class<T> clazz, @NotNull String oid, @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull Task task, @NotNull OperationResult result) <T extends ObjectType>
TgetObjectSimple
(Class<T> clazz, String oid, GetOperationOptions options, Task task, OperationResult result) @NotNull PrismObject<SystemConfigurationType>
<O extends ObjectType>
PrismObject<O>resolve
(PrismReferenceValue refVal, String contextDesc, GetOperationOptions options, Task task, OperationResult result) <O extends ObjectType>
PrismObject<O>resolve
(PrismReferenceValue refVal, String contextDesc, Task task, OperationResult result) <O extends ObjectType>
Oresolve
(Referencable ref, Class<O> expectedType, Collection<SelectorOptions<GetOperationOptions>> options, String contextDescription, Task task, OperationResult result) Resolve the provided reference to object (ObjectType).void
resolveAllReferences
(Collection<PrismContainerValue<?>> pcvs, Object taskObject, OperationResult result) void
resolveReference
(PrismReferenceValue prv, String contextDescription, ObjectResolver.Session session, Object taskObject, OperationResult result) <O extends ObjectType>
voidsearchIterative
(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, ResultHandler<O> handler, Task task, OperationResult result) <O extends ObjectType>
SearchResultList<PrismObject<O>>searchObjects
(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) <R,
O extends ObjectType>
RsearchOrgTreeWidthFirst
(PrismObject<O> object, Function<PrismObject<OrgType>, R> function, Task task, OperationResult result) <O extends ObjectType,
R extends ObjectType>
PrismObject<R>searchOrgTreeWidthFirstReference
(PrismObject<O> object, Function<PrismObject<OrgType>, ObjectReferenceType> function, String shortDesc, Task task, OperationResult result) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.evolveum.midpoint.repo.common.ObjectResolver
openResolutionSession
-
Constructor Details
-
ModelObjectResolver
public ModelObjectResolver()
-
-
Method Details
-
resolve
@NotNull public <O extends ObjectType> O resolve(Referencable ref, Class<O> expectedType, Collection<SelectorOptions<GetOperationOptions>> options, String contextDescription, Task task, OperationResult result) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException Description copied from interface:ObjectResolver
Resolve the provided reference to object (ObjectType). Note: The reference is used instead of just OID because the reference also contains object type. This speeds up the repository operations.- Specified by:
resolve
in interfaceObjectResolver
- Parameters:
ref
- object reference to resolvecontextDescription
- short description of the context of resolution, e.g. "executing expression FOO". Used in error messages.- Returns:
- resolved object
- Throws:
ObjectNotFoundException
- requested object does not existSchemaException
- error dealing with storage schemaCommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
resolve
public <O extends ObjectType> PrismObject<O> resolve(PrismReferenceValue refVal, String contextDesc, Task task, OperationResult result) throws ObjectNotFoundException - Throws:
ObjectNotFoundException
-
resolve
public <O extends ObjectType> PrismObject<O> resolve(PrismReferenceValue refVal, String contextDesc, GetOperationOptions options, Task task, OperationResult result) throws ObjectNotFoundException - Throws:
ObjectNotFoundException
-
getObjectSimple
public <T extends ObjectType> T getObjectSimple(Class<T> clazz, String oid, GetOperationOptions options, Task task, OperationResult result) throws ObjectNotFoundException - Throws:
ObjectNotFoundException
-
getObject
@NotNull public <T extends ObjectType> T getObject(@NotNull @NotNull Class<T> clazz, @NotNull @NotNull String oid, @Nullable @Nullable Collection<SelectorOptions<GetOperationOptions>> options, @NotNull @NotNull Task task, @NotNull @NotNull OperationResult result) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException - Specified by:
getObject
in interfaceObjectResolver
- Throws:
ObjectNotFoundException
CommunicationException
SchemaException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
searchIterative
public <O extends ObjectType> void searchIterative(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, ResultHandler<O> handler, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException - Specified by:
searchIterative
in interfaceObjectResolver
- Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
searchObjects
public <O extends ObjectType> SearchResultList<PrismObject<O>> searchObjects(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException - Specified by:
searchObjects
in interfaceObjectResolver
- Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
countObjects
public <O extends ObjectType> Integer countObjects(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException -
getSystemConfiguration
@NotNull public @NotNull PrismObject<SystemConfigurationType> getSystemConfiguration(OperationResult result) throws ObjectNotFoundException, SchemaException -
searchOrgTreeWidthFirstReference
public <O extends ObjectType,R extends ObjectType> PrismObject<R> searchOrgTreeWidthFirstReference(PrismObject<O> object, Function<PrismObject<OrgType>, ObjectReferenceType> function, String shortDesc, Task task, OperationResult result) throws SchemaException- Throws:
SchemaException
-
searchOrgTreeWidthFirst
public <R,O extends ObjectType> R searchOrgTreeWidthFirst(PrismObject<O> object, Function<PrismObject<OrgType>, R> function, Task task, OperationResult result) -
resolveAllReferences
@Experimental public void resolveAllReferences(Collection<PrismContainerValue<?>> pcvs, Object taskObject, OperationResult result) - Specified by:
resolveAllReferences
in interfaceObjectResolver
-
resolveReference
public void resolveReference(PrismReferenceValue prv, String contextDescription, ObjectResolver.Session session, Object taskObject, OperationResult result) - Specified by:
resolveReference
in interfaceObjectResolver
-