|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nim.NiMKernelService
com.nitido.nim.ConfigurationService
com.nitido.nimx.services.configuration.file.ConfigurationServiceImpl
public class ConfigurationServiceImpl
This ConfigurationService implementation reads in the configuration from two files, one with default settings and one with local settings.
This Configuration Service requires the NiM Descriptor to specify the following setting for the service.
Since ConfigurationService is the FIRST NiM core service to be loaded, its configuration are specified in the NiM Descriptor file. (For other services, the configuration is usually specified in the configuration files pointed by the previous settings.
The configuration file format follows the specification indicated by the standard Java class java.util.Properties.
Field Summary | |
---|---|
static java.lang.String |
DEFAULT_URL
The name of the settings key that contains the URL of the file with the default configuration attributes. |
static java.lang.String |
LOCAL_URL
The name of the settings key that contains the URL of the file with the local configuration attributes. |
Fields inherited from class com.nitido.nim.ConfigurationService |
---|
KEY_APP_ID, KEY_ENV_ID, KEY_NODE_ID, KEY_REV_ID |
Constructor Summary | |
---|---|
ConfigurationServiceImpl(NiMKernelServiceVisa visa)
This class constructor is used by NiMKernel to instantiate a new ConfigurationService. |
Method Summary | |
---|---|
java.util.Properties |
getPropertiesByFilter(java.lang.String searchFilter)
This method is currently not supported by this service implementation. |
java.util.Properties |
getPropertiesByPrefix(java.lang.String prefix)
This method returns all the properties whose keys start with the given prefix. |
java.lang.String |
getProperty(java.lang.String name)
This method returns the configuration property associated to the given name. |
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,
java.util.Map settings)
This method is called by the NiMKernel to initialize the ConfigurationService. |
Methods inherited from class com.nitido.nim.ConfigurationService |
---|
init |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DEFAULT_URL
public static final java.lang.String LOCAL_URL
Constructor Detail |
---|
public ConfigurationServiceImpl(NiMKernelServiceVisa visa)
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 |
---|
protected void init(NiMKernel kernel, java.util.Map settings) throws InitializationFailedException, NiMException
init
in class ConfigurationService
kernel
- Reference to the kernel that instantitated this service.settings
- The settings used to initialize the service. This service
implementation expects the following configuration
parameters:
InitializationFailedException
- If unable to initialize the service due to any of the
following reasons:
NiMException
- If unable to contact the back-end service. This exception
is never thrown by this service implementation.public java.util.Properties getPropertiesByPrefix(java.lang.String prefix)
ConfigurationService
getPropertiesByPrefix
in class ConfigurationService
prefix
- The prefix used to search the configuration properties.
Properties
public java.util.Properties getPropertiesByFilter(java.lang.String searchFilter)
getPropertiesByFilter
in class ConfigurationService
searchFilter
- The search filter used to retrieve a set of configuration
properties. This service implementation ignores this
parameter.
public java.lang.String getProperty(java.lang.String name)
ConfigurationService
getProperty
in class ConfigurationService
name
- The name of the configuration property.
public java.lang.String getPropertyWithDefault(java.lang.String name, java.lang.String defaultValue)
ConfigurationService
getPropertyWithDefault
in class ConfigurationService
name
- The name of the configuration property.defaultValue
- The return value if the given property name does not exist.
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.