Package com.evolveum.midpoint.model.impl
Class ModelObjectResolver
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.ModelObjectResolver
-
- All Implemented Interfaces:
ObjectResolver
@Component public class ModelObjectResolver extends Object implements ObjectResolver
- Author:
- semancik
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.repo.common.ObjectResolver
ObjectResolver.Session
-
-
Constructor Summary
Constructors Constructor Description ModelObjectResolver()
-
Method Summary
-
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
-
-
-
-
Method Detail
-
resolve
public <O extends ObjectType> O resolve(ObjectReferenceType 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 string, Task task, OperationResult result) throws ObjectNotFoundException
- Throws:
ObjectNotFoundException
-
resolve
public <O extends ObjectType> PrismObject<O> resolve(PrismReferenceValue refVal, String string, 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(Class<T> clazz, String oid, Collection<SelectorOptions<GetOperationOptions>> options, Task task, 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 parentResult) 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 parentResult) 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 parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
-
getSystemConfiguration
public 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
-
-