Nitido Inc.

com.nitido.nimx.services.datacontrol.profilemap
Class DataControlServiceImpl

java.lang.Object
  extended by com.nitido.nim.NiMKernelService
      extended by com.nitido.nim.DataControlService
          extended by com.nitido.nimx.services.datacontrol.profilemap.DataControlServiceImpl
All Implemented Interfaces:
CredentialConstants, NiMConstants

public class DataControlServiceImpl
extends DataControlService
implements CredentialConstants

This implementation of DataControlService is a factory for profile-mapping DataControls.

Main Features

Detail Description When the application attempts to get a NiM Entity object for a specific object, NiM Kernel will invoke the DataControlService to generate an instance of the DataControl object to provide the data access logic for the specified Entity.

Depending on the configuration, this implementation generates the LDAP login DN in the following steps:

  1. Assuming the Entity is logging in with a credential of the type "MyCredType". If the configuration "com.nitido.nimx.services.datacontrol.profilemap.cred.tokenkey.MyCredType" existis, the login DN will be fetched from the credential token key specified by this configuration.
  2. If the previous configuration is not specified, this implementation will uses the credential's identifying entity ID and the configuration "com.nitido.nimx.services.datacontrol.profilemap.cred.dnprefix.MyCredType" and the configuration "com.nitido.nimx.services.datacontrol.profilemap.cred.dnpostfix.MyCredType" to generate the login DN for the backend LDAP.
  3. If the previous step failed because one of the configurations is missing, an IllegalCredentialException will be thrown.

Configuration Settings

This service requires the following configurations:


Field Summary
static java.lang.String CONF_KEY_ATTRIBUTEMAP_PASSWORD
          The user password attribute key.
static java.lang.String CONF_KEY_HOST
          Configuration key for the directory host name
static java.lang.String CONF_KEY_PORT
          Configuration key for the directory port number
static java.lang.String CONF_KEY_PREFIX_ATTRIBUTEMAP
          The configuration key prefix for the mapping settings from a user space key to a LDAP attribute name.
static java.lang.String CONF_KEY_PREFIX_BIND_AS_DN
          The configuration key for the bind-as DN.
static java.lang.String CONF_KEY_PREFIX_BIND_AS_PWD
          The configuration key for the bind-as password.
static java.lang.String CONF_KEY_PREFIX_DN_POSTFIX
          The configuration key prefix for an Entity's DN postfix for the specific credential type.
static java.lang.String CONF_KEY_PREFIX_DN_PREFIX
          The configuration key prefix for an Entity's DN prefix.
static java.lang.String CONF_KEY_PREFIX_DN_TOKEN_KEY
          The configuration key postfix for an Entity's DN token key.
static int LEN_CONF_KEY_PREFIX_ATTRIBUTEMAP
          The string length of the configuration key prefix "com.nitido.nimx.services.datacontrol.profilemap.attributemap.".
static java.lang.String USER_SPACE_KEY_PASSWORD
          The constant for the user space key "password".
 
Fields inherited from interface com.nitido.nim.NiMConstants
ACTION_CREATE_NUGGET, ACTION_CREATE_NUGGET_BY_NAME, ACTION_CRED_SPACE_ADD, ACTION_CRED_SPACE_GET_KEYS, ACTION_CRED_SPACE_GET_KEYS_START_WITH, ACTION_CRED_SPACE_GET_VALUE, ACTION_CRED_SPACE_GET_VALUES, ACTION_CRED_SPACE_MODIFY, ACTION_CRED_SPACE_REMOVE_VALUE, ACTION_CRED_SPACE_REMOVE_VALUES, ACTION_CRED_SPACE_REPLACE, ACTION_DEPROVISION_ENTITY, ACTION_ENTITY_CHANGE_CRED, ACTION_LOG_EVENT, ACTION_PROVISION_ENTITY, ACTION_USER_SPACE_ADD, ACTION_USER_SPACE_GET_KEYS, ACTION_USER_SPACE_GET_KEYS_START_WITH, ACTION_USER_SPACE_GET_VALUE, ACTION_USER_SPACE_GET_VALUES, ACTION_USER_SPACE_MODIFY, ACTION_USER_SPACE_REMOVE_VALUE, ACTION_USER_SPACE_REMOVE_VALUES, ACTION_USER_SPACE_REPLACE, CONF_PREFIX_SECURITY_ACCESS, CONF_PREFIX_SECURITY_ALLOW, CONF_PREFIX_SECURITY_ASSIGN, CONF_PREFIX_SECURITY_RESOURCE, PARAM_CHANGE_CRED, PARAM_DEPROVISION_CREDENTIAL, PARAM_EVENT_NAME, PARAM_MODIFIER_CONTAINER, PARAM_NUGGET_CREATE_CRED, PARAM_NUGGET_NAME, PARAM_NUGGET_SETTINGS, PARAM_NUGGET_TYPE, PARAM_PROVISION_DESCRIPTOR, PARAM_SPACE_KEY, PARAM_SPACE_KEYS_START_WITH, PARAM_SPACE_VALUE, PREFIX_ACCESS_CLASS_IN_PACKAGE
 
Fields inherited from interface com.nitido.nim.CredentialConstants
CRED_ADMIN, CRED_CONTAINER, CRED_HELPDESK, CRED_SYSTEM, CRED_USER, KEY_PASSWORD
 
Constructor Summary
DataControlServiceImpl(NiMKernelServiceVisa visa)
          This class constructor is used by NiMKernel to instantiate a new DataControlService.
 
Method Summary
protected  com.nitido.nimx.services.datacontrol.profilemap.BindData credentialToBindData(Credential cred)
           
protected  java.lang.String credentialToUserDN(Credential cred)
          This method is invoked by the DataControl object to obtain the DN for the specified credential.
 DataControl getDataControl(Credential credential)
          This method is a factory method for DataControl objects.
protected static DataControlServiceImpl getInstance()
           
protected  java.lang.String getMappedKey(java.lang.String userSpaceKey)
           
protected  java.util.Set getUserSpaceKeysThatAreMapped(java.lang.String startsWith)
           
protected  void init(NiMKernel kernel, ConfigurationService confService)
          This method is used by the kernel to initialize the DataControlService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONF_KEY_HOST

public static final java.lang.String CONF_KEY_HOST
Configuration key for the directory host name

See Also:
Constant Field Values

CONF_KEY_PORT

public static final java.lang.String CONF_KEY_PORT
Configuration key for the directory port number

See Also:
Constant Field Values

CONF_KEY_PREFIX_DN_TOKEN_KEY

public static final java.lang.String CONF_KEY_PREFIX_DN_TOKEN_KEY
The configuration key postfix for an Entity's DN token key.

See Also:
Constant Field Values

CONF_KEY_PREFIX_DN_PREFIX

public static final java.lang.String CONF_KEY_PREFIX_DN_PREFIX
The configuration key prefix for an Entity's DN prefix.

See Also:
Constant Field Values

CONF_KEY_PREFIX_DN_POSTFIX

public static final java.lang.String CONF_KEY_PREFIX_DN_POSTFIX
The configuration key prefix for an Entity's DN postfix for the specific credential type.

See Also:
Constant Field Values

CONF_KEY_PREFIX_BIND_AS_DN

public static final java.lang.String CONF_KEY_PREFIX_BIND_AS_DN
The configuration key for the bind-as DN.

See Also:
Constant Field Values

CONF_KEY_PREFIX_BIND_AS_PWD

public static final java.lang.String CONF_KEY_PREFIX_BIND_AS_PWD
The configuration key for the bind-as password.

See Also:
Constant Field Values

CONF_KEY_PREFIX_ATTRIBUTEMAP

public static final java.lang.String CONF_KEY_PREFIX_ATTRIBUTEMAP
The configuration key prefix for the mapping settings from a user space key to a LDAP attribute name.

See Also:
Constant Field Values

LEN_CONF_KEY_PREFIX_ATTRIBUTEMAP

public static final int LEN_CONF_KEY_PREFIX_ATTRIBUTEMAP
The string length of the configuration key prefix "com.nitido.nimx.services.datacontrol.profilemap.attributemap.".


USER_SPACE_KEY_PASSWORD

public static final java.lang.String USER_SPACE_KEY_PASSWORD
The constant for the user space key "password".

See Also:
Constant Field Values

CONF_KEY_ATTRIBUTEMAP_PASSWORD

public static final java.lang.String CONF_KEY_ATTRIBUTEMAP_PASSWORD
The user password attribute key.

See Also:
Constant Field Values
Constructor Detail

DataControlServiceImpl

public DataControlServiceImpl(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new DataControlService.

Parameters:
visa - Reference to the NiMKernelServiceVisa object required to instantiate the service. This parameter is required to ensure that only the NiMkernel can instantiate a reference to this service.
Method Detail

getInstance

protected static DataControlServiceImpl getInstance()

init

protected void init(NiMKernel kernel,
                    ConfigurationService confService)
             throws InitializationFailedException,
                    NiMException
This method is used by the kernel to initialize the DataControlService.

Specified by:
init in class DataControlService
Parameters:
kernel - Reference to the kernel that instantiated this service.
confService - A reference to the ConfigurationService.
Throws:
InitializationFailedException - If unable to initialize the DataControlService. This exception is thrown by this service implementation if any of the expected settings are not available.
NiMException - This exception is never thrown by this service implementation

getDataControl

public DataControl getDataControl(Credential credential)
                           throws IllegalCredentialException,
                                  DataControlException
Description copied from class: DataControlService
This method is a factory method for DataControl objects.

Specified by:
getDataControl in class DataControlService
Parameters:
credential - The credential used by the DataControl to access the back-end data.
Throws:
IllegalCredentialException - If the given credential is not valid.
DataControlException - If the DataControl service is unable to establish a connection with the back-end data services.

credentialToUserDN

protected java.lang.String credentialToUserDN(Credential cred)
                                       throws IllegalCredentialException
This method is invoked by the DataControl object to obtain the DN for the specified credential.

Throws:
IllegalCredentialException

credentialToBindData

protected com.nitido.nimx.services.datacontrol.profilemap.BindData credentialToBindData(Credential cred)
                                                                                 throws IllegalCredentialException
Throws:
IllegalCredentialException

getMappedKey

protected java.lang.String getMappedKey(java.lang.String userSpaceKey)

getUserSpaceKeysThatAreMapped

protected java.util.Set getUserSpaceKeysThatAreMapped(java.lang.String startsWith)

Nitido NiM 2.5 Java API

These JavaDoc pages are generated for release/nim_2_5-2.5.44

Copyright © 1999-2009 Nitido Inc.    Proprietary and Confidential.    All Rights Reserved.