Nitido Inc.

com.nitido.nim
Class ConfigurationService

java.lang.Object
  extended by com.nitido.nim.NiMKernelService
      extended by com.nitido.nim.ConfigurationService
All Implemented Interfaces:
NiMConstants
Direct Known Subclasses:
ConfigurationServiceImpl

public abstract class ConfigurationService
extends NiMKernelService

The ConfigurationService is the NiMKernel module responsible for retrieving configuration information.


Field Summary
protected static java.lang.String KEY_APP_ID
           
protected static java.lang.String KEY_ENV_ID
           
protected static java.lang.String KEY_NODE_ID
           
protected static java.lang.String KEY_REV_ID
           
 
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
 
Constructor Summary
ConfigurationService(NiMKernelServiceVisa visa)
          This class constructor is used by NiMKernel to instantiate a new ConfigurationService.
 
Method Summary
abstract  java.util.Properties getPropertiesByFilter(java.lang.String searchFilter)
          This method returns all the properties whose keys satisfy the given search filter.
abstract  java.util.Properties getPropertiesByPrefix(java.lang.String prefix)
          This method returns all the properties whose keys start with the given prefix.
abstract  java.lang.String getProperty(java.lang.String name)
          This method returns the configuration property associated to the given name.
abstract  java.lang.String getPropertyWithDefault(java.lang.String name, java.lang.String defaultValue)
          This method returns the configuration property associated to the given name.
protected  void init(NiMKernel kernel, ConfigurationService confServ)
          This method throws UnsupportedOperationException.
protected abstract  void init(NiMKernel kernel, java.util.Map settings)
          This method is used to initialize the ConfigurationService.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_APP_ID

protected static final java.lang.String KEY_APP_ID
See Also:
Constant Field Values

KEY_ENV_ID

protected static final java.lang.String KEY_ENV_ID
See Also:
Constant Field Values

KEY_REV_ID

protected static final java.lang.String KEY_REV_ID
See Also:
Constant Field Values

KEY_NODE_ID

protected static final java.lang.String KEY_NODE_ID
See Also:
Constant Field Values
Constructor Detail

ConfigurationService

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

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

init

protected final void init(NiMKernel kernel,
                          ConfigurationService confServ)
                   throws InitializationFailedException,
                          NiMException
This method throws UnsupportedOperationException. Initialization of the ConfigurationService must be done through the init() method that takes a Map with the initialization settings as parameter. Initialization of the ConfigurationService is initialized with settings from NiMDescriptor.xml

Specified by:
init in class NiMKernelService
Parameters:
kernel - Reference to the NiMKernel object that instantiated the service.
confServ - A reference to the configuration service. All the service implementations (except ConfigurationService) should retrieve the setting information from it.
Throws:
InitializationFailedException - If unable to initialize the kernel service.
NiMException - If service initialization can not be done due to failure in establish a connection to the back-end service. Not all service implementation will throw this exception.

init

protected abstract void init(NiMKernel kernel,
                             java.util.Map settings)
                      throws InitializationFailedException,
                             NiMException
This method is used to initialize the ConfigurationService. Within the settings, the following keys are reserved:

Parameters:
kernel - Reference to the NiMKernel that created this service.
settings - Map with all the configuration parameters need to initialize this service.
Throws:
InitializationFailedException - If unable to initialize the ConfigurationService implementation.
NiMException - If unable the service is unable to contacts its back-end.

getPropertiesByPrefix

public abstract java.util.Properties getPropertiesByPrefix(java.lang.String prefix)
This method returns all the properties whose keys start with the given prefix. If no property matches the given prefix the method returns an empty Properties object.

Parameters:
prefix - The prefix used to search the configuration properties.
Returns:
The Properties object with all the properties whose keys start with the given prefix.
See Also:
Properties

getPropertiesByFilter

public abstract java.util.Properties getPropertiesByFilter(java.lang.String searchFilter)
This method returns all the properties whose keys satisfy the given search filter. If no property matches the search filter, the method returns an empty Properties object.

Parameters:
searchFilter - The search filter used to retrieve a set of configuration properties. The filter should follows the format of a standard LDAP filter as specified in RFC 1960.
Returns:
The Properties object with all the configuration properties that matches the given search filter.

getProperty

public abstract java.lang.String getProperty(java.lang.String name)
This method returns the configuration property associated to the given name.

Parameters:
name - The name of the configuration property.
Returns:
The value of the requested configuration property.

getPropertyWithDefault

public abstract java.lang.String getPropertyWithDefault(java.lang.String name,
                                                        java.lang.String defaultValue)
This method returns the configuration property associated to the given name. If no property matches the given name, the method returns the given default value.

Parameters:
name - The name of the configuration property.
defaultValue - The return value if the given property name does not exist.
Returns:
The value of the requested configuration property.

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.