org.identityconnectors.framework.impl.api
Class AbstractConnectorFacade

java.lang.Object
  extended by org.identityconnectors.framework.impl.api.AbstractConnectorFacade
All Implemented Interfaces:
ConnectorFacade, APIOperation, AuthenticationApiOp, CreateApiOp, DeleteApiOp, GetApiOp, ResolveUsernameApiOp, SchemaApiOp, ScriptOnConnectorApiOp, ScriptOnResourceApiOp, SearchApiOp, SyncApiOp, TestApiOp, UpdateApiOp, ValidateApiOp
Direct Known Subclasses:
LocalConnectorFacadeImpl, RemoteConnectorFacadeImpl

public abstract class AbstractConnectorFacade
extends Object
implements ConnectorFacade

Implements all the methods of the facade


Field Summary
 
Fields inherited from interface org.identityconnectors.framework.api.operations.APIOperation
NO_TIMEOUT
 
Constructor Summary
AbstractConnectorFacade(APIConfigurationImpl configuration)
          Builds up the maps of supported operations and calls.
 
Method Summary
 Uid addAttributeValues(ObjectClass objclass, Uid uid, Set<Attribute> attrs, OperationOptions options)
          
 Uid authenticate(ObjectClass objectClass, String username, GuardedString password, OperationOptions options)
          
 Uid create(ObjectClass oclass, Set<Attribute> attrs, OperationOptions options)
          
protected  APIOperation createLoggingProxy(Class<? extends APIOperation> api, APIOperation target)
          Creates a logging proxy
protected  APIOperation createTimeoutProxy(Class<? extends APIOperation> api, APIOperation target)
          Creates the timeout proxy for the given operation
 void delete(ObjectClass objClass, Uid uid, OperationOptions options)
          
protected  APIConfigurationImpl getAPIConfiguration()
           
 SyncToken getLatestSyncToken(ObjectClass objectClass)
          
 ConnectorObject getObject(ObjectClass objClass, Uid uid, OperationOptions options)
          
 APIOperation getOperation(Class<? extends APIOperation> api)
          Return an instance of an API operation.
protected abstract  APIOperation getOperationImplementation(Class<? extends APIOperation> api)
          Gets the implementation of the given operation
 Set<Class<? extends APIOperation>> getSupportedOperations()
          
protected  APIOperation newAPIOperationProxy(Class<? extends APIOperation> api, InvocationHandler handler)
          Creates a new APIOperation proxy given a handler.
 Uid removeAttributeValues(ObjectClass objclass, Uid uid, Set<Attribute> attrs, OperationOptions options)
          
 Uid resolveUsername(ObjectClass objectClass, String username, OperationOptions options)
          
 Object runScriptOnConnector(ScriptContext request, OperationOptions options)
          
 Object runScriptOnResource(ScriptContext request, OperationOptions options)
          
 Schema schema()
          
 void search(ObjectClass oclass, Filter filter, ResultsHandler handler, OperationOptions options)
          
 void sync(ObjectClass objClass, SyncToken token, SyncResultsHandler handler, OperationOptions options)
          
 void test()
          
 Uid update(ObjectClass objclass, Uid uid, Set<Attribute> attrs, OperationOptions options)
          
 void validate()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractConnectorFacade

public AbstractConnectorFacade(APIConfigurationImpl configuration)
Builds up the maps of supported operations and calls.

Method Detail

getOperation

public final APIOperation getOperation(Class<? extends APIOperation> api)
Return an instance of an API operation.

Specified by:
getOperation in interface ConnectorFacade
Returns:
null if the operation is not support otherwise return an instance of the operation.
See Also:
ConnectorFacade.getOperation(java.lang.Class)

getSupportedOperations

public final Set<Class<? extends APIOperation>> getSupportedOperations()

Specified by:
getSupportedOperations in interface ConnectorFacade

schema

public final Schema schema()

Specified by:
schema in interface SchemaApiOp

create

public final Uid create(ObjectClass oclass,
                        Set<Attribute> attrs,
                        OperationOptions options)

Specified by:
create in interface CreateApiOp

delete

public final void delete(ObjectClass objClass,
                         Uid uid,
                         OperationOptions options)

Specified by:
delete in interface DeleteApiOp

search

public final void search(ObjectClass oclass,
                         Filter filter,
                         ResultsHandler handler,
                         OperationOptions options)

Specified by:
search in interface SearchApiOp

update

public final Uid update(ObjectClass objclass,
                        Uid uid,
                        Set<Attribute> attrs,
                        OperationOptions options)

Specified by:
update in interface UpdateApiOp

addAttributeValues

public final Uid addAttributeValues(ObjectClass objclass,
                                    Uid uid,
                                    Set<Attribute> attrs,
                                    OperationOptions options)

Specified by:
addAttributeValues in interface UpdateApiOp

removeAttributeValues

public final Uid removeAttributeValues(ObjectClass objclass,
                                       Uid uid,
                                       Set<Attribute> attrs,
                                       OperationOptions options)

Specified by:
removeAttributeValues in interface UpdateApiOp

authenticate

public final Uid authenticate(ObjectClass objectClass,
                              String username,
                              GuardedString password,
                              OperationOptions options)

Specified by:
authenticate in interface AuthenticationApiOp

resolveUsername

public final Uid resolveUsername(ObjectClass objectClass,
                                 String username,
                                 OperationOptions options)

Specified by:
resolveUsername in interface ResolveUsernameApiOp

runScriptOnConnector

public final Object runScriptOnConnector(ScriptContext request,
                                         OperationOptions options)

Specified by:
runScriptOnConnector in interface ScriptOnConnectorApiOp

runScriptOnResource

public final Object runScriptOnResource(ScriptContext request,
                                        OperationOptions options)

Specified by:
runScriptOnResource in interface ScriptOnResourceApiOp

getObject

public final ConnectorObject getObject(ObjectClass objClass,
                                       Uid uid,
                                       OperationOptions options)

Specified by:
getObject in interface GetApiOp

test

public final void test()

Specified by:
test in interface TestApiOp

validate

public final void validate()

Specified by:
validate in interface ValidateApiOp

sync

public final void sync(ObjectClass objClass,
                       SyncToken token,
                       SyncResultsHandler handler,
                       OperationOptions options)

Specified by:
sync in interface SyncApiOp

getLatestSyncToken

public final SyncToken getLatestSyncToken(ObjectClass objectClass)

Specified by:
getLatestSyncToken in interface SyncApiOp

newAPIOperationProxy

protected APIOperation newAPIOperationProxy(Class<? extends APIOperation> api,
                                            InvocationHandler handler)
Creates a new APIOperation proxy given a handler.


getOperationImplementation

protected abstract APIOperation getOperationImplementation(Class<? extends APIOperation> api)
Gets the implementation of the given operation

Parameters:
api - The operation to implement.
Returns:
The implementation

getAPIConfiguration

protected final APIConfigurationImpl getAPIConfiguration()

createTimeoutProxy

protected final APIOperation createTimeoutProxy(Class<? extends APIOperation> api,
                                                APIOperation target)
Creates the timeout proxy for the given operation

Parameters:
api - The operation
target - The underlying object
Returns:
The proxy

createLoggingProxy

protected final APIOperation createLoggingProxy(Class<? extends APIOperation> api,
                                                APIOperation target)
Creates a logging proxy

Parameters:
api -
target -
Returns:


Copyright © 2011. All Rights Reserved.