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
Constructors -
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).voidresolveAllReferences(Collection<PrismContainerValue<?>> pcvs, Object taskObject, OperationResult result) voidresolveReference(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, waitMethods 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:ObjectResolverResolve 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:
resolvein 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 schemaCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
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:
getObjectin interfaceObjectResolver- Throws:
ObjectNotFoundExceptionCommunicationExceptionSchemaExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
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:
searchIterativein interfaceObjectResolver- Throws:
SchemaExceptionObjectNotFoundExceptionCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
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:
searchObjectsin interfaceObjectResolver- Throws:
SchemaExceptionObjectNotFoundExceptionCommunicationExceptionConfigurationExceptionSecurityViolationExceptionExpressionEvaluationException
-
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:
resolveAllReferencesin interfaceObjectResolver
-
resolveReference
public void resolveReference(PrismReferenceValue prv, String contextDescription, ObjectResolver.Session session, Object taskObject, OperationResult result) - Specified by:
resolveReferencein interfaceObjectResolver
-