|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.evolveum.midpoint.provisioning.impl.ShadowCache
@Component public class ShadowCache
This class manages the "cache" of ResourceObjectShadows in the repository.
In short, this class takes care of aligning the shadow objects in repository with the real state of the resource. The repository content is considered a "cache" when it comes to Shadow objects. That's why they are called "shadow" objects after all. When a new state (values) of the resource object is detected, the shadow in the repository should be updated. No matter if that was detected by synchronization, reconciliation or an ordinary get from resource. This class is supposed to do that. Therefore all operations that deal with "shadows" should pass through this class. It forms yet another layer of the provisioning subsystem. Current implementation assumes we are only storing primary identifier in the repository. That should be made configurable later. It also only support Account objects now.
Constructor Summary | |
---|---|
ShadowCache()
|
Method Summary | ||
---|---|---|
java.lang.String |
addShadow(ResourceObjectShadowType shadowType,
boolean isReconciled,
ProvisioningScriptsType scripts,
ResourceType resource,
OperationResult parentResult)
|
|
|
applyDefinition(ObjectDelta<T> delta,
OperationResult parentResult)
|
|
|
applyDefinition(PrismObject<T> shadow,
OperationResult parentResult)
|
|
void |
deleteShadow(ObjectType objectType,
ObjectOperationOption option,
ProvisioningScriptsType scripts,
ResourceType resource,
OperationResult parentResult)
|
|
java.util.List<Change> |
fetchChanges(ResourceType resourceType,
PrismProperty lastToken,
OperationResult parentResult)
|
|
PrismProperty |
fetchCurrentToken(ResourceType resourceType,
OperationResult parentResult)
|
|
RepositoryService |
getRepositoryService()
Get the value of repositoryService. |
|
|
getShadow(java.lang.Class<T> type,
java.lang.String oid,
T repositoryShadow,
OperationResult parentResult)
Gets the shadow with specified OID The shadow will be read from the repository and missing information will be fetched from the resource. |
|
java.lang.String |
modifyShadow(ObjectType objectType,
ResourceType resource,
java.lang.String oid,
java.util.Collection<? extends ItemDelta> modifications,
boolean isReconciled,
ProvisioningScriptsType scripts,
OperationResult parentResult)
|
|
void |
setRepositoryService(RepositoryService repositoryService)
Set the value of repositoryService Expected to be injected. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ShadowCache()
Method Detail |
---|
public RepositoryService getRepositoryService()
public void setRepositoryService(RepositoryService repositoryService)
repositoryService
- new value of repositoryServicepublic <T extends ResourceObjectShadowType> T getShadow(java.lang.Class<T> type, java.lang.String oid, T repositoryShadow, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException, SecurityViolationException
oid
- OID of shadow to get.repositoryShadow
- shadow that was read from the repository
ObjectNotFoundException
- shadow was not found or object was not found on the resource
CommunicationException
- problem communicating with the resource
SchemaException
- problem processing schema or schema violation
ConfigurationException
SecurityViolationException
public java.lang.String addShadow(ResourceObjectShadowType shadowType, boolean isReconciled, ProvisioningScriptsType scripts, ResourceType resource, OperationResult parentResult) throws CommunicationException, GenericFrameworkException, ObjectAlreadyExistsException, SchemaException, ObjectNotFoundException, ConfigurationException, SecurityViolationException
CommunicationException
GenericFrameworkException
ObjectAlreadyExistsException
SchemaException
ObjectNotFoundException
ConfigurationException
SecurityViolationException
public void deleteShadow(ObjectType objectType, ObjectOperationOption option, ProvisioningScriptsType scripts, ResourceType resource, OperationResult parentResult) throws CommunicationException, GenericFrameworkException, ObjectNotFoundException, SchemaException, ConfigurationException, SecurityViolationException
CommunicationException
GenericFrameworkException
ObjectNotFoundException
SchemaException
ConfigurationException
SecurityViolationException
public java.lang.String modifyShadow(ObjectType objectType, ResourceType resource, java.lang.String oid, java.util.Collection<? extends ItemDelta> modifications, boolean isReconciled, ProvisioningScriptsType scripts, OperationResult parentResult) throws CommunicationException, GenericFrameworkException, ObjectNotFoundException, SchemaException, ConfigurationException, SecurityViolationException
CommunicationException
GenericFrameworkException
ObjectNotFoundException
SchemaException
ConfigurationException
SecurityViolationException
public PrismProperty fetchCurrentToken(ResourceType resourceType, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, SchemaException, ConfigurationException
ObjectNotFoundException
CommunicationException
SchemaException
ConfigurationException
public java.util.List<Change> fetchChanges(ResourceType resourceType, PrismProperty lastToken, OperationResult parentResult) throws ObjectNotFoundException, CommunicationException, GenericFrameworkException, SchemaException, ConfigurationException, SecurityViolationException
ObjectNotFoundException
CommunicationException
GenericFrameworkException
SchemaException
ConfigurationException
SecurityViolationException
public <T extends ResourceObjectShadowType> void applyDefinition(ObjectDelta<T> delta, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
public <T extends ResourceObjectShadowType> void applyDefinition(PrismObject<T> shadow, OperationResult parentResult) throws SchemaException, ObjectNotFoundException, CommunicationException, ConfigurationException
SchemaException
ObjectNotFoundException
CommunicationException
ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |