@Service(value="provisioningService") public class ProvisioningServiceImpl extends Object implements ProvisioningService
Constructor and Description |
---|
ProvisioningServiceImpl() |
Modifier and Type | Method and Description |
---|---|
<T extends ObjectType> |
addObject(PrismObject<T> object,
OperationProvisioningScriptsType scripts,
ProvisioningOperationOptions options,
Task task,
OperationResult parentResult)
Add new object.
|
<T extends 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 ObjectType> |
applyDefinition(ObjectDelta<T> delta,
OperationResult parentResult)
Applies appropriate definition to the shadow/resource delta.
|
<T extends ObjectType> |
applyDefinition(PrismObject<T> object,
OperationResult parentResult)
Applies appropriate definition to the shadow.
|
<T extends ObjectType> |
countObjects(Class<T> type,
ObjectQuery query,
OperationResult parentResult) |
<T extends ObjectType> |
deleteObject(Class<T> type,
String oid,
ProvisioningOperationOptions options,
OperationProvisioningScriptsType scripts,
Task task,
OperationResult parentResult)
Deletes object with specified OID.
|
Set<ConnectorType> |
discoverConnectors(ConnectorHostType hostType,
OperationResult parentResult)
Discovers local or remote connectors.
|
<T extends ObjectType> |
executeScript(String resourceOid,
ProvisioningScriptType script,
Task task,
OperationResult parentResult)
Executes a single provisioning script.
|
<T extends ShadowType> |
finishOperation(PrismObject<T> object,
ProvisioningOperationOptions options,
Task task,
OperationResult parentResult) |
RepositoryService |
getCacheRepositoryService()
Get the value of repositoryService.
|
<T extends ObjectType> |
getObject(Class<T> type,
String oid,
GetOperationOptions options,
Task task,
OperationResult parentResult)
Returns object for provided OID.
|
ShadowCache |
getShadowCache(ShadowCacheFactory.Mode mode) |
List<PrismObject<? extends ShadowType>> |
listResourceObjects(String resourceOid,
QName objectClass,
ObjectPaging paging,
OperationResult parentResult)
Lists resource objects.
|
<T extends ObjectType> |
modifyObject(Class<T> type,
String oid,
Collection<? extends ItemDelta> modifications,
OperationProvisioningScriptsType scripts,
ProvisioningOperationOptions options,
Task task,
OperationResult parentResult)
Modifies object using relative change description.
|
void |
postInit(OperationResult parentResult)
Finish initialization of provisioning system.
|
<T extends ObjectType> |
searchObjects(Class<T> type,
ObjectQuery query,
OperationResult parentResult)
Search for objects.
|
<T extends ObjectType> |
searchObjectsIterative(Class<T> type,
ObjectQuery query,
ResultHandler<T> handler,
OperationResult parentResult)
Search for objects iteratively.
|
void |
setCacheRepositoryService(RepositoryService repositoryService)
Set the value of repositoryService
Expected to be injected.
|
int |
synchronize(String resourceOid,
QName objectClass,
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 ObjectType> PrismObject<T> getObject(Class<T> type, String oid, 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 ObjectType> String addObject(PrismObject<T> object, 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(String resourceOid, QName objectClass, Task task, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
ProvisioningService
synchronize
in interface ProvisioningService
resourceOid
- OID of the resource for which to attempt synchronizationparentResult
- 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 ObjectType> List<PrismObject<T>> searchObjects(Class<T> type, ObjectQuery query, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
ProvisioningService
searchObjects
in interface ProvisioningService
query
- search queryparentResult
- parent OperationResult (in/out)SchemaException
- unknown property used in search queryConfigurationException
SecurityViolationException
- Security violation while communicating with the connector or processing provisioning policiesObjectNotFoundException
CommunicationException
public <T extends ObjectType> int countObjects(Class<T> type, ObjectQuery query, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, SecurityViolationException
countObjects
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
SecurityViolationException
public <T extends ObjectType> String modifyObject(Class<T> type, String oid, Collection<? extends ItemDelta> modifications, 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 ObjectType> void deleteObject(Class<T> type, String oid, ProvisioningOperationOptions options, 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 ObjectType> void executeScript(String resourceOid, 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 ShadowType>> listResourceObjects(String resourceOid, QName objectClass, ObjectPaging paging, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
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)SchemaException
- error handling resource schemaObjectNotFoundException
- specified resource object does not existCommunicationException
- error communicating with the resourceConfigurationException
public <T extends ShadowType> void finishOperation(PrismObject<T> object, ProvisioningOperationOptions options, Task task, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException, ObjectAlreadyExistsException, SecurityViolationException
public <T extends ObjectType> void searchObjectsIterative(Class<T> type, ObjectQuery query, ResultHandler<T> handler, 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<ConnectorType> discoverConnectors(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 <T extends 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 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 ObjectType> void applyDefinition(PrismObject<T> object, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
ProvisioningService
applyDefinition
in interface ProvisioningService
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public void postInit(OperationResult parentResult)
ProvisioningService
postInit
in interface ProvisioningService
Copyright © 2013 evolveum. All rights reserved.