com.esf.core.configuration.service
Interface IEsfConfigProviderService


public interface IEsfConfigProviderService

Provides an API to allow components to provide configuration content to the @IConfigurationManagerService. Example implementations of this would include a set of Web UI components that want an interface to provide configurations to the @IConfigurationManagerService so they can be distributed and archived via the ESF Configuration Manager. Copyright © 2009 Eurotech Inc. All rights reserved.


Field Summary
static java.lang.String SERVICE_NAME
          Reports the class name representing this interface.
 
Method Summary
 boolean configChangePending(java.lang.String name)
          This method is used to find out if the configuration manager has sent a new configuration to a component and is waiting for a response.
 java.util.Hashtable getRejectedConfigs()
          gets the configurations that were rejected by the components.
 java.lang.String[] getSucceededConfigs()
          returns a an array of all bundles that successfully updated their configuration.
 void submit(java.util.Hashtable props)
          Is used to send configurations in the form of a ConfigurationPropertiesObject to the configuration manager
 

Field Detail

SERVICE_NAME

static final java.lang.String SERVICE_NAME
Reports the class name representing this interface.

Method Detail

submit

void submit(java.util.Hashtable props)
            throws java.lang.Exception
Is used to send configurations in the form of a ConfigurationPropertiesObject to the configuration manager

Parameters:
props - A @Hashtable representing the @ConfigurationPropertiesObject to send to the configuration manager
Throws:
java.lang.Exception - if the @Hashtable is invalid

configChangePending

boolean configChangePending(java.lang.String name)
This method is used to find out if the configuration manager has sent a new configuration to a component and is waiting for a response. If the configuration manager has sent a configuration to a component and has not yet received a response it will return true. Otherwise it will return false.

Parameters:
name - A @String representing the symbolic name of the requesting component.
Returns:
true if a configuration change is pending, otherwise false.

getRejectedConfigs

java.util.Hashtable getRejectedConfigs()
gets the configurations that were rejected by the components. The @Hashtable is a set of key/value pairs representing the bundle symbolic name and the error message it provided. Upon returning this list of errors the @Hashtable is deleted from the ConfigurationManager.

Returns:
A @Hashtable of key='bundle names' and value='error messages'

getSucceededConfigs

java.lang.String[] getSucceededConfigs()
returns a an array of all bundles that successfully updated their configuration. The Strings are the symbolic names of the bundles that were updated. Upon returning the list is deleted from the implementation of the @IEsfConfigProviderService. So, this can only be called once per configuration cycle.

Returns:
An array of @String representing all bundles which were successfully updated