@Service(value="provisioningService") @Primary public class ProvisioningServiceImpl extends Object implements ProvisioningService
Constructor and Description |
---|
ProvisioningServiceImpl() |
Modifier and Type | Method and Description |
---|---|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
addObject(PrismObject<T> object,
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationProvisioningScriptsType scripts,
ProvisioningOperationOptions options,
Task task,
OperationResult parentResult)
Add new object.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
applyDefinition(Class<T> type,
ObjectQuery query,
OperationResult parentResult)
Applies appropriate definition to the query.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
applyDefinition(ObjectDelta<T> delta,
Objectable object,
OperationResult parentResult)
Applies appropriate definition to the shadow/resource delta (uses provided object to get necessary information)
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
applyDefinition(ObjectDelta<T> delta,
OperationResult parentResult)
Applies appropriate definition to the shadow/resource delta.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
applyDefinition(PrismObject<T> object,
OperationResult parentResult)
Applies appropriate definition to the shadow.
|
ConstraintsCheckingResult |
checkConstraints(RefinedObjectClassDefinition shadowDefinition,
PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> shadowObject,
com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType resourceType,
String shadowOid,
ResourceShadowDiscriminator resourceShadowDiscriminator,
ConstraintViolationConfirmer constraintViolationConfirmer,
Task task,
OperationResult parentResult) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
countObjects(Class<T> type,
ObjectQuery query,
Collection<SelectorOptions<GetOperationOptions>> options,
Task task,
OperationResult parentResult)
Options: if noFetch or raw, we count only shadows from the repository.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
deleteObject(Class<T> type,
String oid,
ProvisioningOperationOptions options,
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationProvisioningScriptsType scripts,
Task task,
OperationResult parentResult)
Deletes object with specified OID.
|
Set<com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType> |
discoverConnectors(com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorHostType hostType,
OperationResult parentResult)
Discovers local or remote connectors.
|
void |
enterConstraintsCheckerCache() |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
executeScript(String resourceOid,
com.evolveum.midpoint.xml.ns._public.common.common_3.ProvisioningScriptType script,
Task task,
OperationResult parentResult)
Executes a single provisioning script.
|
void |
exitConstraintsCheckerCache() |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> |
finishOperation(PrismObject<T> object,
ProvisioningOperationOptions options,
Task task,
OperationResult parentResult) |
RepositoryService |
getCacheRepositoryService()
Get the value of repositoryService.
|
ConnectorOperationalStatus |
getConnectorOperationalStatus(String resourceOid,
OperationResult parentResult) |
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
getObject(Class<T> type,
String oid,
Collection<SelectorOptions<GetOperationOptions>> options,
Task task,
OperationResult parentResult)
Returns object for provided OID.
|
ProvisioningDiag |
getProvisioningDiag()
Returns a diagnostic information.
|
ShadowCache |
getShadowCache(ShadowCacheFactory.Mode mode) |
List<PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType>> |
listResourceObjects(String resourceOid,
QName objectClass,
ObjectPaging paging,
Task task,
OperationResult parentResult)
Lists resource objects.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
modifyObject(Class<T> type,
String oid,
Collection<? extends ItemDelta> modifications,
com.evolveum.midpoint.xml.ns._public.common.common_3.OperationProvisioningScriptsType scripts,
ProvisioningOperationOptions options,
Task task,
OperationResult parentResult)
Modifies object using relative change description.
|
void |
postInit(OperationResult parentResult)
Finish initialization of provisioning system.
|
void |
provisioningSelfTest(OperationResult parentTestResult,
Task task)
Runs a short, non-destructive internal provisioning test.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
searchObjects(Class<T> type,
ObjectQuery query,
Collection<SelectorOptions<GetOperationOptions>> options,
Task task,
OperationResult parentResult)
Search for objects.
|
<T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> |
searchObjectsIterative(Class<T> type,
ObjectQuery query,
Collection<SelectorOptions<GetOperationOptions>> options,
ResultHandler<T> handler,
Task task,
OperationResult parentResult)
Search for objects iteratively.
|
void |
setCacheRepositoryService(RepositoryService repositoryService)
Set the value of repositoryService
Expected to be injected.
|
void |
shutdown() |
int |
synchronize(ResourceShadowDiscriminator shadowCoordinates,
Task task,
OperationResult parentResult)
Collect external changes on a resource and call the business logic with
the accumulated change data.
|
OperationResult |
testResource(String resourceOid)
Test the resource connection and basic resource connector functionality.
|
public ShadowCache getShadowCache(ShadowCacheFactory.Mode mode)
public RepositoryService getCacheRepositoryService()
public void setCacheRepositoryService(RepositoryService repositoryService)
repositoryService
- new value of repositoryServicepublic <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> PrismObject<T> getObject(Class<T> type, String oid, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
ProvisioningService
getObject
in interface ProvisioningService
type
- the type (class) of object to getoid
- OID of the object to getparentResult
- parent OperationResult (in/out)ObjectNotFoundException
- requested object does not existCommunicationException
- error communicating with the resourceSchemaException
- error dealing with resource schemaConfigurationException
- Wrong resource or connector configurationSecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiespublic <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String addObject(PrismObject<T> object, com.evolveum.midpoint.xml.ns._public.common.common_3.OperationProvisioningScriptsType scripts, ProvisioningOperationOptions options, Task task, OperationResult parentResult) throws ObjectAlreadyExistsException, SchemaException, CommunicationException, ObjectNotFoundException, ConfigurationException, SecurityViolationException
ProvisioningService
addObject
in interface ProvisioningService
object
- object to createscripts
- scripts to execute before/after the operationparentResult
- parent OperationResult (in/out)ObjectAlreadyExistsException
- object with specified identifiers already exists, cannot addSchemaException
- error dealing with resource schema, e.g. schema violationCommunicationException
- error communicating with the resourceObjectNotFoundException
- appropriate connector object was not foundConfigurationException
SecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiespublic int synchronize(ResourceShadowDiscriminator shadowCoordinates, Task task, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
ProvisioningService
synchronize
in interface ProvisioningService
parentResult
- parent OperationResult (in/out)ObjectNotFoundException
- some of key objects (resource, task, ...) do not existCommunicationException
- error communicating with the resourceSchemaException
- error dealing with resource schemaConfigurationException
SecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiespublic <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> SearchResultList<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
ProvisioningService
searchObjects
in interface ProvisioningService
query
- search queryparentResult
- parent OperationResult (in/out) @return all objects of specified type that match search criteria (subject
to paging)SchemaException
- unknown property used in search queryConfigurationException
SecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiesObjectNotFoundException
CommunicationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> Integer countObjects(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
ProvisioningService
countObjects
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
SecurityViolationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> String modifyObject(Class<T> type, String oid, Collection<? extends ItemDelta> modifications, com.evolveum.midpoint.xml.ns._public.common.common_3.OperationProvisioningScriptsType scripts, ProvisioningOperationOptions options, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException
ProvisioningService
modifyObject
in interface ProvisioningService
scripts
- scripts that should be executed before of after operationparentResult
- parent OperationResult (in/out)ObjectNotFoundException
- specified object does not existSchemaException
- resulting object would violate the schemaSecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiesObjectAlreadyExistsException
- if resulting object would have name which already exists in another object of the same typeCommunicationException
ConfigurationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void deleteObject(Class<T> type, String oid, ProvisioningOperationOptions options, com.evolveum.midpoint.xml.ns._public.common.common_3.OperationProvisioningScriptsType scripts, Task task, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
ProvisioningService
Deletes object with specified OID.
Must fail if object with specified OID does not exists. Should be atomic.
deleteObject
in interface ProvisioningService
oid
- OID of object to deletescripts
- scripts that should be executed before of after operationparentResult
- parent OperationResult (in/out)ObjectNotFoundException
- specified object does not existConfigurationException
SecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiesCommunicationException
SchemaException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void executeScript(String resourceOid, com.evolveum.midpoint.xml.ns._public.common.common_3.ProvisioningScriptType script, Task task, OperationResult parentResult) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ObjectAlreadyExistsException
ProvisioningService
executeScript
in interface ProvisioningService
script
- script to executeparentResult
- parent OperationResult (in/out)ObjectNotFoundException
- specified object does not existSchemaException
- resulting object would violate the schemaSecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiesObjectAlreadyExistsException
- if resulting object would have name which already exists in another object of the same typeCommunicationException
ConfigurationException
public OperationResult testResource(String resourceOid) throws ObjectNotFoundException
ProvisioningService
testResource
in interface ProvisioningService
resourceOid
- OID of resource to testObjectNotFoundException
- specified object does not existConnectorTestOperation
public List<PrismObject<? extends com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType>> listResourceObjects(String resourceOid, QName objectClass, ObjectPaging paging, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
ProvisioningService
listResourceObjects
in interface ProvisioningService
resourceOid
- OID of the resource to fetch objects fromobjectClass
- Object class of the objects to fetchpaging
- paging specification to limit operation result (optional)parentResult
- parent OperationResult (in/out) @return resource objects in a form of "detached shadows"SchemaException
- error handling resource schemaObjectNotFoundException
- specified resource object does not existCommunicationException
- error communicating with the resourceConfigurationException
SecurityViolationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> void finishOperation(PrismObject<T> object, ProvisioningOperationOptions options, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, SecurityViolationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> SearchResultMetadata searchObjectsIterative(Class<T> type, ObjectQuery query, Collection<SelectorOptions<GetOperationOptions>> options, ResultHandler<T> handler, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
ProvisioningService
searchObjectsIterative
in interface ProvisioningService
query
- search queryhandler
- result handlerparentResult
- parent OperationResult (in/out)SchemaException
- unknown property used in search queryObjectNotFoundException
- appropriate connector object was not foundConfigurationException
SecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiesCommunicationException
public Set<com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorType> discoverConnectors(com.evolveum.midpoint.xml.ns._public.common.common_3.ConnectorHostType hostType, OperationResult parentResult) throws CommunicationException
ProvisioningService
discoverConnectors
in interface ProvisioningService
hostType
- definition of a connector host or nullparentResult
- parentResult parent OperationResult (in/out)CommunicationException
- error connecting to a remote hostpublic ConnectorOperationalStatus getConnectorOperationalStatus(String resourceOid, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
getConnectorOperationalStatus
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void applyDefinition(ObjectDelta<T> delta, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
ProvisioningService
applyDefinition
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void applyDefinition(ObjectDelta<T> delta, Objectable object, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
ProvisioningService
applyDefinition
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void applyDefinition(PrismObject<T> object, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
ProvisioningService
applyDefinition
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public <T extends com.evolveum.midpoint.xml.ns._public.common.common_3.ObjectType> void applyDefinition(Class<T> type, ObjectQuery query, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
ProvisioningService
applyDefinition
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public void provisioningSelfTest(OperationResult parentTestResult, Task task)
ProvisioningService
provisioningSelfTest
in interface ProvisioningService
public ProvisioningDiag getProvisioningDiag()
ProvisioningService
getProvisioningDiag
in interface ProvisioningService
ProvisioningDiag
public void postInit(OperationResult parentResult)
ProvisioningService
postInit
in interface ProvisioningService
@PreDestroy public void shutdown()
shutdown
in interface ProvisioningService
public ConstraintsCheckingResult checkConstraints(RefinedObjectClassDefinition shadowDefinition, PrismObject<com.evolveum.midpoint.xml.ns._public.common.common_3.ShadowType> shadowObject, com.evolveum.midpoint.xml.ns._public.common.common_3.ResourceType resourceType, String shadowOid, ResourceShadowDiscriminator resourceShadowDiscriminator, ConstraintViolationConfirmer constraintViolationConfirmer, Task task, OperationResult parentResult) throws CommunicationException, ObjectAlreadyExistsException, SchemaException, SecurityViolationException, ConfigurationException, ObjectNotFoundException
public void enterConstraintsCheckerCache()
enterConstraintsCheckerCache
in interface ProvisioningService
public void exitConstraintsCheckerCache()
exitConstraintsCheckerCache
in interface ProvisioningService
Copyright © 2016 evolveum. All rights reserved.