com.evolveum.midpoint.provisioning.impl
Class ResourceTypeManager

java.lang.Object
  extended by com.evolveum.midpoint.provisioning.impl.ResourceTypeManager

@Component
public class ResourceTypeManager
extends java.lang.Object


Constructor Summary
ResourceTypeManager()
           
 
Method Summary
 ResourceObjectShadowType assembleShadow(ResourceObject resourceObject, ResourceObjectShadowType repositoryShadow, OperationResult parentResult)
          Creates a shadow object from the supplied resource object.
 ResourceType completeResource(ResourceType resource, Schema resourceSchema, OperationResult result)
          Make sure that the resource is complete.
 RepositoryService getRepositoryService()
          Get the value of repositoryService.
 Schema getResourceSchema(ResourceType resource, ConnectorInstance connector, OperationResult parentResult)
           
 void listShadows(ResourceType resource, javax.xml.namespace.QName objectClass, ShadowHandler handler, boolean readFromRepository, OperationResult parentResult)
           
 void searchObjectsIterative(javax.xml.namespace.QName objectClass, ResourceType resourceType, ShadowHandler handler, DiscoveryHandler discoveryHandler, OperationResult parentResult)
           
 void setRepositoryService(RepositoryService repositoryService)
          Set the value of repositoryService Expected to be injected.
 void testConnection(ResourceType resourceType, OperationResult parentResult)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceTypeManager

public ResourceTypeManager()
Method Detail

getRepositoryService

public RepositoryService getRepositoryService()
Get the value of repositoryService.

Returns:
the value of repositoryService

setRepositoryService

public void setRepositoryService(RepositoryService repositoryService)
Set the value of repositoryService Expected to be injected.

Parameters:
repositoryService - new value of repositoryService

completeResource

public ResourceType completeResource(ResourceType resource,
                                     Schema resourceSchema,
                                     OperationResult result)
                              throws ObjectNotFoundException,
                                     SchemaException,
                                     CommunicationException
Make sure that the resource is complete. It will check if the resource has a sufficiently fresh schema, etc. Returned resource may be the same or may be a different instance, but it is guaranteed that it will be "fresher" and will correspond to the repository state (assuming that the provided resource also corresponded to the repository state). The connector schema that was fetched before can be supplied to this method. This is just an optimization. It comes handy e.g. in test connection case. Note: This is not really the best place for this method. Need to figure out correct place later.

Parameters:
resource - Resource to check
resourceSchema - schema that was freshly pre-fetched (or null)
result -
Returns:
completed resource
Throws:
ObjectNotFoundException - connector instance was not found
SchemaException
CommunicationException - cannot fetch resource schema

testConnection

public void testConnection(ResourceType resourceType,
                           OperationResult parentResult)

getResourceSchema

public Schema getResourceSchema(ResourceType resource,
                                ConnectorInstance connector,
                                OperationResult parentResult)
                         throws SchemaException,
                                CommunicationException
Throws:
SchemaException
CommunicationException

listShadows

public void listShadows(ResourceType resource,
                        javax.xml.namespace.QName objectClass,
                        ShadowHandler handler,
                        boolean readFromRepository,
                        OperationResult parentResult)
                 throws CommunicationException,
                        ObjectNotFoundException,
                        SchemaException
Throws:
CommunicationException
ObjectNotFoundException
SchemaException

searchObjectsIterative

public void searchObjectsIterative(javax.xml.namespace.QName objectClass,
                                   ResourceType resourceType,
                                   ShadowHandler handler,
                                   DiscoveryHandler discoveryHandler,
                                   OperationResult parentResult)
                            throws ObjectNotFoundException,
                                   CommunicationException,
                                   SchemaException
Throws:
ObjectNotFoundException
CommunicationException
SchemaException

assembleShadow

public ResourceObjectShadowType assembleShadow(ResourceObject resourceObject,
                                               ResourceObjectShadowType repositoryShadow,
                                               OperationResult parentResult)
                                        throws SchemaException
Creates a shadow object from the supplied resource object. If an optional resourceObject is specified, it will be used as a base for creating the shadow. In this case the same instance is returned, but it is enriched with attributes from the resource object.

Parameters:
resourceObject -
repositoryShadow -
Returns:
Throws:
SchemaException


Copyright © 2012 evolveum. All Rights Reserved.