public interface MidpointFunctions
Modifier and Type | Method and Description |
---|---|
<T extends ObjectType> |
addObject(com.evolveum.midpoint.prism.PrismObject<T> newObject) |
<T extends ObjectType> |
addObject(com.evolveum.midpoint.prism.PrismObject<T> newObject,
ModelExecuteOptions options) |
<T extends ObjectType> |
addObject(T newObject) |
<T extends ObjectType> |
addObject(T newObject,
ModelExecuteOptions options) |
<T extends ObjectType> |
countObjects(Class<T> type,
com.evolveum.midpoint.prism.query.ObjectQuery query)
Count objects.
|
<T extends ObjectType> |
countObjects(Class<T> type,
com.evolveum.midpoint.prism.query.ObjectQuery query,
Collection<SelectorOptions<GetOperationOptions>> options)
Count objects.
|
<T extends ObjectType> |
createEmptyObject(Class<T> type)
Creates empty prism object of specified type in memory.
|
<T extends ObjectType> |
createEmptyObjectWithName(Class<T> type,
com.evolveum.midpoint.prism.polystring.PolyString name)
Creates empty prism object of specified type and with specified name in memory.
|
<T extends ObjectType> |
createEmptyObjectWithName(Class<T> type,
com.evolveum.prism.xml.ns._public.types_3.PolyStringType name)
Creates empty prism object of specified type and with specified name in memory.
|
<T extends ObjectType> |
createEmptyObjectWithName(Class<T> type,
String name)
Creates empty prism object of specified type and with specified name in memory.
|
<T extends ObjectType> |
deleteObject(Class<T> type,
String oid) |
<T extends ObjectType> |
deleteObject(Class<T> type,
String oid,
ModelExecuteOptions options) |
void |
executeChanges(Collection<com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ObjectType>> deltas)
Execute the provided object deltas.
|
void |
executeChanges(Collection<com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ObjectType>> deltas,
ModelExecuteOptions options)
Execute the provided object deltas.
|
void |
executeChanges(com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ObjectType>... deltas)
Execute the provided object deltas.
|
com.evolveum.midpoint.prism.PrismObject<UserType> |
findShadowOwner(String accountOid)
Returns the User object representing owner of specified account (account
shadow).
|
ShadowType |
getLinkedShadow(FocusType focus,
ResourceType resource) |
ShadowType |
getLinkedShadow(FocusType focus,
ResourceType resource,
boolean repositoryObjectOnly) |
ShadowType |
getLinkedShadow(FocusType focus,
String resourceOid) |
ShadowType |
getLinkedShadow(FocusType focus,
String resourceOid,
boolean repositoryObjectOnly) |
ShadowType |
getLinkedShadow(FocusType focus,
String resourceOid,
ShadowKindType kind,
String intent) |
ShadowType |
getLinkedShadow(FocusType focus,
String resourceOid,
ShadowKindType kind,
String intent,
boolean repositoryObjectOnly) |
Collection<UserType> |
getManagers(UserType user) |
Collection<UserType> |
getManagers(UserType user,
String orgType,
boolean allowSelf) |
Collection<UserType> |
getManagersByOrgType(UserType user,
String orgType) |
Collection<UserType> |
getManagersOfOrg(String orgOid) |
Collection<String> |
getManagersOids(UserType user) |
Collection<String> |
getManagersOidsExceptUser(UserType user) |
<T extends ObjectType> |
getObject(Class<T> type,
String oid)
Returns object for provided OID.
|
<T extends ObjectType> |
getObject(Class<T> type,
String oid,
Collection<SelectorOptions<GetOperationOptions>> options)
Returns object for provided OID.
|
OrgType |
getOrgByName(String name) |
OrgType |
getOrgByOid(String oid) |
Collection<String> |
getOrgUnits(UserType user) |
Collection<String> |
getOrgUnits(UserType user,
QName relation) |
OrgType |
getParentOrgByOrgType(ObjectType object,
String orgType)
Returns parent orgs of the specified object that have a specific orgType.
|
Collection<OrgType> |
getParentOrgs(ObjectType object)
Returns all parent orgs of the specified object.
|
Collection<OrgType> |
getParentOrgs(ObjectType object,
QName relation,
String orgType)
Returns parent orgs of the specified object that have a specific relation and orgType.
|
Collection<OrgType> |
getParentOrgs(ObjectType object,
String relation,
String orgType)
Returns parent orgs of the specified object that have a specific relation and orgType.
|
Collection<OrgType> |
getParentOrgsByRelation(ObjectType object,
QName relation)
Returns parent orgs of the specified object that have a specific relation.
|
Collection<OrgType> |
getParentOrgsByRelation(ObjectType object,
String relation)
Returns parent orgs of the specified object that have a specific relation.
|
String |
getPlaintextAccountPassword(ShadowType account) |
String |
getPlaintextAccountPasswordFromDelta(com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ShadowType> delta) |
String |
getPlaintextUserPassword(UserType user) |
String |
getPlaintextUserPasswordFromDeltas(List<com.evolveum.midpoint.prism.delta.ObjectDelta<UserType>> deltas) |
com.evolveum.midpoint.prism.crypto.Protector |
getProtector() |
com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType |
getResourceDelta(ModelContext context,
String resourceOid)
Returns aggregated delta that is to be executed on a given resource.
|
UserType |
getUserByOid(String oid) |
<F extends FocusType> |
isDirectlyAssigned(F focusType,
ObjectType target) |
<F extends FocusType> |
isDirectlyAssigned(F focusType,
String targetOid) |
boolean |
isDirectlyAssigned(ObjectType target) |
boolean |
isDirectlyAssigned(String targetOid) |
boolean |
isManager(UserType user)
Returns true if user is a manager of any organizational unit.
|
boolean |
isManagerOf(UserType user,
String orgOid)
Returns true if user is a manager of specified organiational unit.
|
boolean |
isManagerOfOrgType(UserType user,
String orgType) |
boolean |
isMemberOf(UserType user,
String orgOid) |
<T extends ObjectType> |
modifyObject(com.evolveum.midpoint.prism.delta.ObjectDelta<T> modifyDelta) |
<T extends ObjectType> |
modifyObject(com.evolveum.midpoint.prism.delta.ObjectDelta<T> modifyDelta,
ModelExecuteOptions options) |
<F extends FocusType> |
recompute(Class<F> type,
String oid)
Recomputes focal object with the specified OID.
|
<T extends ObjectType> |
resolveReference(ObjectReferenceType reference) |
<T extends ObjectType> |
resolveReferenceIfExists(ObjectReferenceType reference) |
<T extends ObjectType> |
searchObjectByName(Class<T> type,
com.evolveum.midpoint.prism.polystring.PolyString name)
Search for objects by name.
|
<T extends ObjectType> |
searchObjectByName(Class<T> type,
com.evolveum.prism.xml.ns._public.types_3.PolyStringType name)
Search for objects by name.
|
<T extends ObjectType> |
searchObjectByName(Class<T> type,
String name)
Search for objects by name.
|
<T extends ObjectType> |
searchObjects(Class<T> type,
com.evolveum.midpoint.prism.query.ObjectQuery query)
Search for objects.
|
<T extends ObjectType> |
searchObjects(Class<T> type,
com.evolveum.midpoint.prism.query.ObjectQuery query,
Collection<SelectorOptions<GetOperationOptions>> options)
Search for objects.
|
<T extends ObjectType> |
searchObjectsIterative(Class<T> type,
com.evolveum.midpoint.prism.query.ObjectQuery query,
ResultHandler<T> handler)
Search for objects in iterative fashion (using callback).
|
<T extends ObjectType> |
searchObjectsIterative(Class<T> type,
com.evolveum.midpoint.prism.query.ObjectQuery query,
ResultHandler<T> handler,
Collection<SelectorOptions<GetOperationOptions>> options)
Search for objects in iterative fashion (using callback).
|
OperationResult |
testResource(String resourceOid)
Test the resource connection and basic resource connector functionality.
|
List<String> |
toList(String... s) |
ModelContext |
unwrapModelContext(LensContextType lensContextType) |
<T extends ObjectType> T createEmptyObject(Class<T> type) throws SchemaException
Creates empty prism object of specified type in memory. This is used to construct Java instances of object before they are added to the repository.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
type
- Class of the object to createSchemaException
- schema error instantiating the object (e.g. attempt to
instantiate abstract type).<T extends ObjectType> T createEmptyObjectWithName(Class<T> type, String name) throws SchemaException
Creates empty prism object of specified type and with specified name in memory. This is used to construct Java instances of object before they are added to the repository. The 'name' property of the new object will be set to a specified value.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
type
- Class of the object to createname
- Name of the objectSchemaException
- schema error instantiating the object (e.g. attempt to
instantiate abstract type).<T extends ObjectType> T createEmptyObjectWithName(Class<T> type, com.evolveum.midpoint.prism.polystring.PolyString name) throws SchemaException
Creates empty prism object of specified type and with specified name in memory. This is used to construct Java instances of object before they are added to the repository. The 'name' property of the new object will be set to a specified value.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
type
- Class of the object to createname
- Name of the objectSchemaException
- schema error instantiating the object (e.g. attempt to
instantiate abstract type).<T extends ObjectType> T createEmptyObjectWithName(Class<T> type, com.evolveum.prism.xml.ns._public.types_3.PolyStringType name) throws SchemaException
Creates empty prism object of specified type and with specified name in memory. This is used to construct Java instances of object before they are added to the repository. The 'name' property of the new object will be set to a specified value.
Please note that this method constructs the object in memory only. If you intend to create an object in repository or on the resource you need to populate this object with data and then invoke the addObject or executeChanges method.
type
- Class of the object to createname
- Name of the objectSchemaException
- schema error instantiating the object (e.g. attempt to
instantiate abstract type).<T extends ObjectType> T resolveReference(ObjectReferenceType reference) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
<T extends ObjectType> T resolveReferenceIfExists(ObjectReferenceType reference) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
<T extends ObjectType> T getObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException
Returns object for provided OID. It retrieves the object from an appropriate source for an object type (e.g. internal repository, resource or both), merging data as necessary, processing any policies, caching mechanisms, etc. This can be influenced by using options.
Fails if object with the OID does not exists.
type
- (class) of an object to getoid
- OID of the object to getoptions
- options influencing the retrieval and processing of the objectObjectNotFoundException
- requested object does not existSchemaException
- the object is not schema compliantCommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceIllegalArgumentException
- missing required parameter, wrong OID format, etc.ClassCastException
- OID represents object of a type incompatible with requested
typeSystemException
- unknown error from underlying layers or other unexpected
stateConfigurationException
SecurityViolationException
<T extends ObjectType> T getObject(Class<T> type, String oid) throws ObjectNotFoundException, SchemaException, SecurityViolationException, CommunicationException, ConfigurationException, SecurityViolationException
Returns object for provided OID. It retrieves the object from an appropriate source for an object type (e.g. internal repository, resource or both), merging data as necessary, processing any policies, caching mechanisms, etc.
Fails if object with the OID does not exists.
type
- (class) of an object to getoid
- OID of the object to getObjectNotFoundException
- requested object does not existSchemaException
- the object is not schema compliantCommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceIllegalArgumentException
- missing required parameter, wrong OID format, etc.ClassCastException
- OID represents object of a type incompatible with requested
typeSystemException
- unknown error from underlying layers or other unexpected
stateSecurityViolationException
ConfigurationException
void executeChanges(Collection<com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ObjectType>> deltas, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Execute the provided object deltas.
The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation also implicitly links the objects (mark them to be analogous) if such a link is part of the data model. E.g. the implementation links all accounts to the user if they are passed in a single delta collection. This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked explicitly.
There must be no more than one delta for each object. The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
The OID provided in ADD deltas may be empty. In that case the OID will be assigned by the implementation and the OIDs will be set in the deltas after the operation is completed.
Execution of ADD deltas should fail if such object already exists (if object with the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if such objects do not exist.
The operation may fail if provided OIDs are in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail or even fail partially. The consistency of the data and state are not based on operation atomicity but rather a data model that can "repair" inconsistencies.
The operation may fail if any of the objects to be created or modified does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
deltas
- Collection of object deltas to executeoptions
- options influencing processing of the deltasObjectAlreadyExistsException
- object with specified identifiers already exists, cannot addObjectNotFoundException
- object required to complete the operation was not found (e.g.
appropriate connector or resource definition)SchemaException
- error dealing with resource schema, e.g. created object does
not conform to schemaExpressionEvaluationException
- evaluation of expression associated with the object has failedCommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.PolicyViolationException
- Policy violation was detected during processing of the objectIllegalArgumentException
- wrong OID format, etc.SystemException
- unknown error from underlying layers or other unexpected stateSecurityViolationException
void executeChanges(Collection<com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ObjectType>> deltas) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Execute the provided object deltas.
The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation also implicitly links the objects (mark them to be analogous) if such a link is part of the data model. E.g. the implementation links all accounts to the user if they are passed in a single delta collection. This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked explicitly.
There must be no more than one delta for each object. The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
The OID provided in ADD deltas may be empty. In that case the OID will be assigned by the implementation and the OIDs will be set in the deltas after the operation is completed.
Execution of ADD deltas should fail if such object already exists (if object with the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if such objects do not exist.
The operation may fail if provided OIDs are in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail or even fail partially. The consistency of the data and state are not based on operation atomicity but rather a data model that can "repair" inconsistencies.
The operation may fail if any of the objects to be created or modified does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
deltas
- Collection of object deltas to executeObjectAlreadyExistsException
- object with specified identifiers already exists, cannot addObjectNotFoundException
- object required to complete the operation was not found (e.g.
appropriate connector or resource definition)SchemaException
- error dealing with resource schema, e.g. created object does
not conform to schemaExpressionEvaluationException
- evaluation of expression associated with the object has failedCommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.PolicyViolationException
- Policy violation was detected during processing of the objectIllegalArgumentException
- wrong OID format, etc.SystemException
- unknown error from underlying layers or other unexpected stateSecurityViolationException
void executeChanges(com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ObjectType>... deltas) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
Execute the provided object deltas.
The operation executes the provided object deltas. All deltas must relate to analogous objects (e.g. user and linked accounts). The implementation may throw an error if the objects are not analogous. The implementation also implicitly links the objects (mark them to be analogous) if such a link is part of the data model. E.g. the implementation links all accounts to the user if they are passed in a single delta collection. This is especially useful if the account deltas are ADD deltas without OID and therefore cannot be linked explicitly.
There must be no more than one delta for each object. The order of execution is not defined and the implementation is free to determine the correct or most suitable ordering.
The OID provided in ADD deltas may be empty. In that case the OID will be assigned by the implementation and the OIDs will be set in the deltas after the operation is completed.
Execution of ADD deltas should fail if such object already exists (if object with the provided OID already exists). Execution of MODIFY and DELETE deltas should fail if such objects do not exist.
The operation may fail if provided OIDs are in an unusable format for the storage. Generating own OIDs and providing them to this method is not recommended for normal operation.
There are no explicit atomicity guarantees for the operations. Some of the operations may pass, some may fail or even fail partially. The consistency of the data and state are not based on operation atomicity but rather a data model that can "repair" inconsistencies.
The operation may fail if any of the objects to be created or modified does not conform to the underlying schema of the storage system or the schema enforced by the implementation.
deltas
- Collection of object deltas to executeObjectAlreadyExistsException
- object with specified identifiers already exists, cannot addObjectNotFoundException
- object required to complete the operation was not found (e.g.
appropriate connector or resource definition)SchemaException
- error dealing with resource schema, e.g. created object does
not conform to schemaExpressionEvaluationException
- evaluation of expression associated with the object has failedCommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.PolicyViolationException
- Policy violation was detected during processing of the objectIllegalArgumentException
- wrong OID format, etc.SystemException
- unknown error from underlying layers or other unexpected stateSecurityViolationException
<T extends ObjectType> String addObject(com.evolveum.midpoint.prism.PrismObject<T> newObject, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> String addObject(com.evolveum.midpoint.prism.PrismObject<T> newObject) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> String addObject(T newObject, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> String addObject(T newObject) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> void modifyObject(com.evolveum.midpoint.prism.delta.ObjectDelta<T> modifyDelta, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> void modifyObject(com.evolveum.midpoint.prism.delta.ObjectDelta<T> modifyDelta) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> void deleteObject(Class<T> type, String oid, ModelExecuteOptions options) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<T extends ObjectType> void deleteObject(Class<T> type, String oid) throws ObjectAlreadyExistsException, ObjectNotFoundException, SchemaException, ExpressionEvaluationException, CommunicationException, ConfigurationException, PolicyViolationException, SecurityViolationException
<F extends FocusType> void recompute(Class<F> type, String oid) throws SchemaException, PolicyViolationException, ExpressionEvaluationException, ObjectNotFoundException, ObjectAlreadyExistsException, CommunicationException, ConfigurationException, SecurityViolationException
type
- type (class) of an object to recomputeoid
- OID of the object to recomputeSchemaException
PolicyViolationException
ExpressionEvaluationException
ObjectNotFoundException
ObjectAlreadyExistsException
CommunicationException
ConfigurationException
SecurityViolationException
com.evolveum.midpoint.prism.PrismObject<UserType> findShadowOwner(String accountOid) throws ObjectNotFoundException, SecurityViolationException, SchemaException, ConfigurationException
Returns the User object representing owner of specified account (account shadow).
May return null if there is no owner specified for the account.
Implements the backward "owns" association between account shadow and user. Forward association is implemented by property "account" of user object.
accountOid
- OID of the account to look for an ownerObjectNotFoundException
- specified account was not foundSchemaException
SecurityViolationException
IllegalArgumentException
- wrong OID format, described change is not applicableSystemException
- unknown error from underlying layers or other unexpected
stateConfigurationException
<T extends ObjectType> List<T> searchObjects(Class<T> type, com.evolveum.midpoint.prism.query.ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException
Search for objects.
Searches through all object of a specified type. Returns a list of objects that match search criteria.
Note that this method has a very limited scaling capability as all the results are stored in the memory. DO NOT USE on large datasets. Recommended usage is only when using queries that cannot return large number of results (e.g. queries for unique values) or when combined with paging capability. For other cases use searchObjectsIterative instead.
Returns empty list if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
type
- (class) of an object to searchquery
- search queryoptions
- options influencing the retrieval and processing of the objectsSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> List<T> searchObjects(Class<T> type, com.evolveum.midpoint.prism.query.ObjectQuery query) throws SchemaException, ObjectNotFoundException, SecurityViolationException, CommunicationException, ConfigurationException
Search for objects.
Searches through all object of a specified type. Returns a list of objects that match search criteria.
Note that this method has a very limited scaling capability as all the results are stored in the memory. DO NOT USE on large datasets. Recommended usage is only when using queries that cannot return large number of results (e.g. queries for unique values) or when combined with paging capability. For other cases use searchObjectsIterative instead.
Returns empty list if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
type
- (class) of an object to searchquery
- search querySchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> void searchObjectsIterative(Class<T> type, com.evolveum.midpoint.prism.query.ObjectQuery query, ResultHandler<T> handler, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
Search for objects in iterative fashion (using callback).
Searches through all object of a specified type. A handler is invoked for each object found.
The handler is not called at all if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
type
- (class) of an object to searchquery
- search queryhandler
- callback handler that will be called for each found objectoptions
- options influencing the retrieval and processing of the objectsSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> void searchObjectsIterative(Class<T> type, com.evolveum.midpoint.prism.query.ObjectQuery query, ResultHandler<T> handler) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
Search for objects in iterative fashion (using callback).
Searches through all object of a specified type. A handler is invoked for each object found.
The handler is not called at all if object type is correct but there are no objects of that type. Fails if object type is wrong. Should fail if unknown property is specified in the query.
type
- (class) of an object to searchquery
- search queryhandler
- callback handler that will be called for each found objectSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> T searchObjectByName(Class<T> type, String name) throws SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException, SchemaException
Search for objects by name.
Searches through all object of a specified type for an object with specified name. Returns that object if it is found, return null otherwise. The method fails if more than one object is found therefore it cannot be reliably used on types with non-unique names (such as Shadows).
type
- (class) of an object to searchname
- Name of the object to look forSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> T searchObjectByName(Class<T> type, com.evolveum.midpoint.prism.polystring.PolyString name) throws SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException, SchemaException
Search for objects by name.
Searches through all object of a specified type for an object with specified name. Returns that object if it is found, return null otherwise. The method fails if more than one object is found therefore it cannot be reliably used on types with non-unique names (such as Shadows).
type
- (class) of an object to searchname
- Name of the object to look forSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> T searchObjectByName(Class<T> type, com.evolveum.prism.xml.ns._public.types_3.PolyStringType name) throws SecurityViolationException, ObjectNotFoundException, CommunicationException, ConfigurationException, SchemaException
Search for objects by name.
Searches through all object of a specified type for an object with specified name. Returns that object if it is found, return null otherwise. The method fails if more than one object is found therefore it cannot be reliably used on types with non-unique names (such as Shadows).
type
- (class) of an object to searchname
- Name of the object to look forSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> int countObjects(Class<T> type, com.evolveum.midpoint.prism.query.ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException
Count objects.
Searches through all object of a specified type and returns a count of such objects. This method is usually much more efficient than equivalent search method. It is used mostly for presentation purposes, e.g. displaying correct number of pages in the GUI listings.
type
- (class) of an object to searchquery
- search queryoptions
- options influencing the retrieval and processing of the objectsSchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
<T extends ObjectType> int countObjects(Class<T> type, com.evolveum.midpoint.prism.query.ObjectQuery query) throws SchemaException, ObjectNotFoundException, SecurityViolationException, ConfigurationException, CommunicationException
Count objects.
Searches through all object of a specified type and returns a count of such objects. This method is usually much more efficient than equivalent search method. It is used mostly for presentation purposes, e.g. displaying correct number of pages in the GUI listings.
type
- (class) of an object to searchquery
- search querySchemaException
- unknown property used in search queryObjectNotFoundException
- object required for a search was not found (e.g. resource definition)CommunicationException
- Communication (network) error during retrieval. E.g. error communicating with the resourceConfigurationException
- Configuration error. E.g. misconfigured resource parameters, invalid policies, etc.IllegalArgumentException
- wrong query formatSecurityViolationException
OperationResult testResource(String resourceOid) throws ObjectNotFoundException
Test the resource connection and basic resource connector functionality.
This operation will NOT throw exception in case the resource connection fails. It such case it will indicate the failure in the return message, but the operation itself succeeds. The operations fails only if the provided arguments are wrong, in case of system error, system misconfiguration, etc.
This returns OperationResult instead of taking it as in/out argument. This is different from the other methods. The testResource method is not using OperationResult to track its own execution but rather to track the execution of resource tests (that in fact happen in provisioning).
resourceOid
- OID of resource to testObjectNotFoundException
- specified object does not existIllegalArgumentException
- wrong OID formatCollection<String> getManagersOids(UserType user) throws SchemaException, ObjectNotFoundException, SecurityViolationException
Collection<String> getManagersOidsExceptUser(UserType user) throws SchemaException, ObjectNotFoundException, SecurityViolationException
Collection<UserType> getManagers(UserType user) throws SchemaException, ObjectNotFoundException, SecurityViolationException
Collection<UserType> getManagersByOrgType(UserType user, String orgType) throws SchemaException, ObjectNotFoundException, SecurityViolationException
Collection<UserType> getManagers(UserType user, String orgType, boolean allowSelf) throws SchemaException, ObjectNotFoundException, SecurityViolationException
UserType getUserByOid(String oid) throws ObjectNotFoundException, SchemaException
Collection<String> getOrgUnits(UserType user)
Collection<String> getOrgUnits(UserType user, QName relation)
OrgType getOrgByOid(String oid) throws SchemaException
SchemaException
OrgType getOrgByName(String name) throws SchemaException, SecurityViolationException
Collection<OrgType> getParentOrgs(ObjectType object, String relation, String orgType) throws SchemaException, SecurityViolationException
object
- base objectrelation
- local part of the relation (in the String form)orgType
- orgType to selectSchemaException
- Internal schema errorSecurityViolationException
- Security violationCollection<OrgType> getParentOrgs(ObjectType object, QName relation, String orgType) throws SchemaException, SecurityViolationException
object
- base objectrelation
- relation in the QName formorgType
- orgType to selectSchemaException
- Internal schema errorSecurityViolationException
- Security violationOrgType getParentOrgByOrgType(ObjectType object, String orgType) throws SchemaException, SecurityViolationException
object
- base objectorgType
- orgType to selectSchemaException
- Internal schema errorSecurityViolationException
- Security violationCollection<OrgType> getParentOrgsByRelation(ObjectType object, QName relation) throws SchemaException, SecurityViolationException
object
- base objectrelation
- relation in the QName formSchemaException
- Internal schema errorSecurityViolationException
- Security violationCollection<OrgType> getParentOrgsByRelation(ObjectType object, String relation) throws SchemaException, SecurityViolationException
object
- base objectrelation
- local part of the relation (in the String form)SchemaException
- Internal schema errorSecurityViolationException
- Security violationCollection<OrgType> getParentOrgs(ObjectType object) throws SchemaException, SecurityViolationException
object
- base objectSchemaException
- Internal schema errorSecurityViolationException
- Security violationCollection<UserType> getManagersOfOrg(String orgOid) throws SchemaException, SecurityViolationException
boolean isManagerOf(UserType user, String orgOid)
boolean isManager(UserType user)
boolean isManagerOfOrgType(UserType user, String orgType) throws SchemaException
SchemaException
String getPlaintextUserPassword(UserType user) throws com.evolveum.midpoint.prism.crypto.EncryptionException
com.evolveum.midpoint.prism.crypto.EncryptionException
String getPlaintextAccountPassword(ShadowType account) throws com.evolveum.midpoint.prism.crypto.EncryptionException
com.evolveum.midpoint.prism.crypto.EncryptionException
String getPlaintextAccountPasswordFromDelta(com.evolveum.midpoint.prism.delta.ObjectDelta<? extends ShadowType> delta) throws com.evolveum.midpoint.prism.crypto.EncryptionException
com.evolveum.midpoint.prism.crypto.EncryptionException
String getPlaintextUserPasswordFromDeltas(List<com.evolveum.midpoint.prism.delta.ObjectDelta<UserType>> deltas) throws com.evolveum.midpoint.prism.crypto.EncryptionException
com.evolveum.midpoint.prism.crypto.EncryptionException
ModelContext unwrapModelContext(LensContextType lensContextType) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
boolean isDirectlyAssigned(String targetOid)
boolean isDirectlyAssigned(ObjectType target)
<F extends FocusType> boolean isDirectlyAssigned(F focusType, ObjectType target)
ShadowType getLinkedShadow(FocusType focus, String resourceOid) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException
ShadowType getLinkedShadow(FocusType focus, String resourceOid, boolean repositoryObjectOnly) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException
ShadowType getLinkedShadow(FocusType focus, ResourceType resource) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException
ShadowType getLinkedShadow(FocusType focus, ResourceType resource, boolean repositoryObjectOnly) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException
ShadowType getLinkedShadow(FocusType focus, String resourceOid, ShadowKindType kind, String intent) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException
ShadowType getLinkedShadow(FocusType focus, String resourceOid, ShadowKindType kind, String intent, boolean repositoryObjectOnly) throws SchemaException, SecurityViolationException, CommunicationException, ConfigurationException
com.evolveum.prism.xml.ns._public.types_3.ObjectDeltaType getResourceDelta(ModelContext context, String resourceOid) throws SchemaException
context
- model contextresourceOid
- OID of the resource in questionSchemaException
com.evolveum.midpoint.prism.crypto.Protector getProtector()
Copyright © 2016 Evolveum. All rights reserved.