Class DirectoryFileObjectResolver
- java.lang.Object
-
- com.evolveum.midpoint.repo.common.DirectoryFileObjectResolver
-
- All Implemented Interfaces:
ObjectResolver
public class DirectoryFileObjectResolver extends Object implements ObjectResolver
Object resolver that works on files in a directory. This is only used in tests. But due to complicated dependencies this is part of main code. That does not hurt much.- Author:
- Radovan Semancik
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.evolveum.midpoint.repo.common.ObjectResolver
ObjectResolver.Session
-
-
Constructor Summary
Constructors Constructor Description DirectoryFileObjectResolver(File directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends ObjectType>
TgetObject(Class<T> clazz, String oid, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult result)
<T extends ObjectType>
Tresolve(ObjectReferenceType ref, Class<T> expectedType, Collection<SelectorOptions<GetOperationOptions>> options, String contextDescription, Task task, OperationResult result)
Resolve the provided reference to object (ObjectType).<O extends ObjectType>
voidsearchIterative(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, ResultHandler<O> handler, Task task, OperationResult parentResult)
<O extends ObjectType>
SearchResultList<PrismObject<O>>searchObjects(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult)
-
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, resolveAllReferences, resolveReference
-
-
-
-
Constructor Detail
-
DirectoryFileObjectResolver
public DirectoryFileObjectResolver(File directory)
-
-
Method Detail
-
resolve
public <T extends ObjectType> T resolve(ObjectReferenceType ref, Class<T> 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
-
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
- Specified by:
searchIterative
in interfaceObjectResolver
- Throws:
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
SecurityViolationException
-
searchObjects
public <O extends ObjectType> SearchResultList<PrismObject<O>> searchObjects(Class<O> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult)
- Specified by:
searchObjects
in interfaceObjectResolver
-
getObject
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
-
-