Class BaseConnector<U extends UserIdentityModel,G extends GroupIdentityModel>
java.lang.Object
com.exclamationlabs.connid.base.connector.BaseConnector<U,G>
- Type Parameters:
U
- UserIdentityModel implementation relating to your User model typeG
- GroupIdentityModel implementation relating to your Group model type
- All Implemented Interfaces:
org.identityconnectors.framework.spi.Connector
,org.identityconnectors.framework.spi.operations.CreateOp
,org.identityconnectors.framework.spi.operations.DeleteOp
,org.identityconnectors.framework.spi.operations.SchemaOp
,org.identityconnectors.framework.spi.operations.SearchOp<String>
,org.identityconnectors.framework.spi.operations.SPIOperation
,org.identityconnectors.framework.spi.operations.TestOp
,org.identityconnectors.framework.spi.operations.UpdateOp
,org.identityconnectors.framework.spi.PoolableConnector
public abstract class BaseConnector<U extends UserIdentityModel,G extends GroupIdentityModel> extends Object implements org.identityconnectors.framework.spi.PoolableConnector, org.identityconnectors.framework.spi.operations.SchemaOp, org.identityconnectors.framework.spi.operations.DeleteOp, org.identityconnectors.framework.spi.operations.CreateOp, org.identityconnectors.framework.spi.operations.UpdateOp, org.identityconnectors.framework.spi.operations.SearchOp<String>, org.identityconnectors.framework.spi.operations.TestOp
Abstract base class for defining Identity Access Management connectors.
In order to with MidPoint or ConnId system, this class MUST be annotated
with org.identityconnectors.framework.spi.ConnectorClass, supplying
a displayNameKey and configurationClass. Example:
@ConnectorClass(displayNameKey = "test.display", configurationClass = StubConfiguration.class)
The constructor for your concrete class should also call these setters...
MANDATORY:
setDriver();
setUsersAdapter();
setGroupsAdapter();
setUserAttributes();
setGroupAttributes();
OPTIONAL:
setAuthenticator();
setConnectorSchemaBuilder();
-
Field Summary
Fields Modifier and Type Field Description protected Authenticator
authenticator
protected BaseConnectorConfiguration
configuration
protected Driver<U,G>
driver
protected EnumMap<?,ConnectorAttribute>
groupAttributes
protected BaseGroupsAdapter<U,G>
groupsAdapter
protected ConnectorSchemaBuilder<U,G>
schemaBuilder
protected EnumMap<?,ConnectorAttribute>
userAttributes
protected BaseUsersAdapter<U,G>
usersAdapter
-
Constructor Summary
Constructors Constructor Description BaseConnector()
-
Method Summary
Modifier and Type Method Description void
checkAlive()
org.identityconnectors.framework.common.objects.Uid
create(org.identityconnectors.framework.common.objects.ObjectClass objectClass, Set<org.identityconnectors.framework.common.objects.Attribute> attributes, org.identityconnectors.framework.common.objects.OperationOptions options)
org.identityconnectors.framework.common.objects.filter.FilterTranslator<String>
createFilterTranslator(org.identityconnectors.framework.common.objects.ObjectClass objectClass, org.identityconnectors.framework.common.objects.OperationOptions operationOptions)
org.identityconnectors.framework.common.objects.Uid
createGroup(Set<org.identityconnectors.framework.common.objects.Attribute> attributes)
Convenience method for testingorg.identityconnectors.framework.common.objects.Uid
createUser(Set<org.identityconnectors.framework.common.objects.Attribute> attributes)
Convenience method for testingvoid
delete(org.identityconnectors.framework.common.objects.ObjectClass objectClass, org.identityconnectors.framework.common.objects.Uid uid, org.identityconnectors.framework.common.objects.OperationOptions options)
void
deleteGroup(String uid)
Convenience method for testingvoid
deleteUser(String uid)
Convenience method for testingvoid
dispose()
void
executeQuery(org.identityconnectors.framework.common.objects.ObjectClass objectClass, String query, org.identityconnectors.framework.common.objects.ResultsHandler resultsHandler, org.identityconnectors.framework.common.objects.OperationOptions operationOptions)
protected BaseAdapter<U,G>
getAdapter(org.identityconnectors.framework.common.objects.ObjectClass objectClass)
org.identityconnectors.framework.spi.Configuration
getConfiguration()
Required for ConnId Connector interfaceprotected org.identityconnectors.framework.common.objects.filter.FilterTranslator<String>
getConnectorFilterTranslator()
protected Driver<U,G>
getDriver()
void
getGroups(String query, org.identityconnectors.framework.common.objects.ResultsHandler resultsHandler)
Convenience method for testingprotected BaseGroupsAdapter<U,G>
getGroupsAdapter()
String
getName()
void
getUsers(String query, org.identityconnectors.framework.common.objects.ResultsHandler resultsHandler)
Convenience method for testingprotected BaseUsersAdapter<U,G>
getUsersAdapter()
void
init(org.identityconnectors.framework.spi.Configuration configuration)
MidPoint calls this method to initialize a connector on startup.protected void
initializeBaseConnector(org.identityconnectors.framework.spi.Configuration inputConfiguration)
org.identityconnectors.framework.common.objects.Schema
schema()
protected void
setAuthenticator(Authenticator in)
protected void
setConnectorSchemaBuilder(ConnectorSchemaBuilder<U,G> input)
protected void
setDriver(Driver<U,G> input)
protected void
setGroupAttributes(EnumMap<?,ConnectorAttribute> input)
protected void
setGroupsAdapter(BaseGroupsAdapter<U,G> input)
protected void
setUserAttributes(EnumMap<?,ConnectorAttribute> input)
protected void
setUsersAdapter(BaseUsersAdapter<U,G> input)
void
test()
org.identityconnectors.framework.common.objects.Uid
update(org.identityconnectors.framework.common.objects.ObjectClass objectClass, org.identityconnectors.framework.common.objects.Uid uid, Set<org.identityconnectors.framework.common.objects.Attribute> attributes, org.identityconnectors.framework.common.objects.OperationOptions options)
org.identityconnectors.framework.common.objects.Uid
updateGroup(String uid, Set<org.identityconnectors.framework.common.objects.Attribute> attributes)
Convenience method for testingorg.identityconnectors.framework.common.objects.Uid
updateUser(String uid, Set<org.identityconnectors.framework.common.objects.Attribute> attributes)
Convenience method for testing
-
Field Details
-
driver
-
schemaBuilder
protected ConnectorSchemaBuilder<U extends UserIdentityModel,G extends GroupIdentityModel> schemaBuilder -
usersAdapter
-
groupsAdapter
protected BaseGroupsAdapter<U extends UserIdentityModel,G extends GroupIdentityModel> groupsAdapter -
authenticator
-
configuration
-
userAttributes
-
groupAttributes
-
-
Constructor Details
-
BaseConnector
public BaseConnector()
-
-
Method Details
-
createFilterTranslator
public org.identityconnectors.framework.common.objects.filter.FilterTranslator<String> createFilterTranslator(org.identityconnectors.framework.common.objects.ObjectClass objectClass, org.identityconnectors.framework.common.objects.OperationOptions operationOptions)- Specified by:
createFilterTranslator
in interfaceorg.identityconnectors.framework.spi.operations.SearchOp<U extends UserIdentityModel>
-
checkAlive
public void checkAlive()- Specified by:
checkAlive
in interfaceorg.identityconnectors.framework.spi.PoolableConnector
-
executeQuery
public void executeQuery(org.identityconnectors.framework.common.objects.ObjectClass objectClass, String query, org.identityconnectors.framework.common.objects.ResultsHandler resultsHandler, org.identityconnectors.framework.common.objects.OperationOptions operationOptions)- Specified by:
executeQuery
in interfaceorg.identityconnectors.framework.spi.operations.SearchOp<U extends UserIdentityModel>
-
create
public org.identityconnectors.framework.common.objects.Uid create(org.identityconnectors.framework.common.objects.ObjectClass objectClass, Set<org.identityconnectors.framework.common.objects.Attribute> attributes, org.identityconnectors.framework.common.objects.OperationOptions options)- Specified by:
create
in interfaceorg.identityconnectors.framework.spi.operations.CreateOp
-
update
public org.identityconnectors.framework.common.objects.Uid update(org.identityconnectors.framework.common.objects.ObjectClass objectClass, org.identityconnectors.framework.common.objects.Uid uid, Set<org.identityconnectors.framework.common.objects.Attribute> attributes, org.identityconnectors.framework.common.objects.OperationOptions options)- Specified by:
update
in interfaceorg.identityconnectors.framework.spi.operations.UpdateOp
-
delete
public void delete(org.identityconnectors.framework.common.objects.ObjectClass objectClass, org.identityconnectors.framework.common.objects.Uid uid, org.identityconnectors.framework.common.objects.OperationOptions options)- Specified by:
delete
in interfaceorg.identityconnectors.framework.spi.operations.DeleteOp
-
init
public void init(org.identityconnectors.framework.spi.Configuration configuration)MidPoint calls this method to initialize a connector on startup.- Specified by:
init
in interfaceorg.identityconnectors.framework.spi.Connector
- Parameters:
configuration
- Configuration concrete class (Midpoint determines this by looking at configurationClass of @ConnectorClass annotation on your concrete connector class)
-
getConfiguration
public org.identityconnectors.framework.spi.Configuration getConfiguration()Required for ConnId Connector interface- Specified by:
getConfiguration
in interfaceorg.identityconnectors.framework.spi.Connector
-
test
public void test()- Specified by:
test
in interfaceorg.identityconnectors.framework.spi.operations.TestOp
-
dispose
public void dispose()- Specified by:
dispose
in interfaceorg.identityconnectors.framework.spi.Connector
-
schema
public org.identityconnectors.framework.common.objects.Schema schema()- Specified by:
schema
in interfaceorg.identityconnectors.framework.spi.operations.SchemaOp
-
getName
-
getUsers
public void getUsers(String query, org.identityconnectors.framework.common.objects.ResultsHandler resultsHandler)Convenience method for testing -
createUser
public org.identityconnectors.framework.common.objects.Uid createUser(Set<org.identityconnectors.framework.common.objects.Attribute> attributes)Convenience method for testing -
updateUser
public org.identityconnectors.framework.common.objects.Uid updateUser(String uid, Set<org.identityconnectors.framework.common.objects.Attribute> attributes)Convenience method for testing -
deleteUser
Convenience method for testing -
getGroups
public void getGroups(String query, org.identityconnectors.framework.common.objects.ResultsHandler resultsHandler)Convenience method for testing -
createGroup
public org.identityconnectors.framework.common.objects.Uid createGroup(Set<org.identityconnectors.framework.common.objects.Attribute> attributes)Convenience method for testing -
updateGroup
public org.identityconnectors.framework.common.objects.Uid updateGroup(String uid, Set<org.identityconnectors.framework.common.objects.Attribute> attributes)Convenience method for testing -
deleteGroup
Convenience method for testing -
getConnectorFilterTranslator
protected org.identityconnectors.framework.common.objects.filter.FilterTranslator<String> getConnectorFilterTranslator() -
setConnectorSchemaBuilder
-
setAuthenticator
-
setUserAttributes
-
setGroupAttributes
-
setDriver
-
getDriver
-
setUsersAdapter
-
getUsersAdapter
-
setGroupsAdapter
-
getGroupsAdapter
-
getAdapter
protected BaseAdapter<U,G> getAdapter(org.identityconnectors.framework.common.objects.ObjectClass objectClass) -
initializeBaseConnector
protected void initializeBaseConnector(org.identityconnectors.framework.spi.Configuration inputConfiguration)
-