com.esf.core.configuration.service
Class ConfigurationPropertiesObject

java.lang.Object
  extended by com.esf.core.configuration.service.ConfigurationPropertiesObject

public class ConfigurationPropertiesObject
extends java.lang.Object

A @ConfigurationPropertiesObject is a @Hashtable of a specific form. The keys are all bundle symbolic names and the values are Objects that represent the configuration associated with the specific bundle. Copyright (c) 2009 Eurotech Inc. All rights reserved.


Constructor Summary
ConfigurationPropertiesObject()
          Constructor to create a new empty @ConfigurationPropertiesObject
ConfigurationPropertiesObject(java.util.Hashtable completeConfiguration)
          Constructor to create a new @ConfigurationPropertiesObject from a @Hashtable
ConfigurationPropertiesObject(java.lang.String[] names, java.lang.Object[] configurations)
          Constructor to create a new @ConfigurationPropertiesObject from an array of bundle symbolic names and an array of @Object representing their respective configurations
ConfigurationPropertiesObject(java.lang.String name, java.lang.Object newConfiguration)
          Constructor to create a new @ConfigurationPropertiesObject that contains one bundle and configuration
 
Method Summary
 void addConfiguration(java.lang.String name, java.lang.Object configuration)
          Adds a new bundle and configuration to this @ConfigurationPropertiesObject
 java.util.Hashtable getConfiguration()
          Gets the @Hashtable representing this @ConfigurationPropertiesObject
 void removeConfiguration(java.lang.String name)
          Removes a configuration from the @ConfiguraitonPropertiesObject by bundle name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationPropertiesObject

public ConfigurationPropertiesObject(java.util.Hashtable completeConfiguration)
                              throws java.lang.Exception
Constructor to create a new @ConfigurationPropertiesObject from a @Hashtable

Parameters:
completeConfiguration - a @ConfigurationPropertiesObject in the form of a @Hasthable
Throws:
java.lang.Exception - if the @Hashtable is malformed

ConfigurationPropertiesObject

public ConfigurationPropertiesObject(java.lang.String[] names,
                                     java.lang.Object[] configurations)
                              throws java.lang.Exception
Constructor to create a new @ConfigurationPropertiesObject from an array of bundle symbolic names and an array of @Object representing their respective configurations

Parameters:
names - an array of bundle symbolic names
configurations - an array of @Object configurations that map to to one to the symbolic bundle names in the first array
Throws:
java.lang.Exception - if the data is malformed

ConfigurationPropertiesObject

public ConfigurationPropertiesObject(java.lang.String name,
                                     java.lang.Object newConfiguration)
Constructor to create a new @ConfigurationPropertiesObject that contains one bundle and configuration

Parameters:
name - the name of the bundle to add
configuration - the @Object representing the configuration

ConfigurationPropertiesObject

public ConfigurationPropertiesObject()
Constructor to create a new empty @ConfigurationPropertiesObject

Method Detail

addConfiguration

public void addConfiguration(java.lang.String name,
                             java.lang.Object configuration)
Adds a new bundle and configuration to this @ConfigurationPropertiesObject

Parameters:
name - the name of the bundle to add
configuration - the @Object representing the configuration

removeConfiguration

public void removeConfiguration(java.lang.String name)
                         throws java.lang.Throwable
Removes a configuration from the @ConfiguraitonPropertiesObject by bundle name

Parameters:
name - the symbolic name of the bundle to add
Throws:
java.lang.Throwable - if the bundle symbolic name does not exist in this

getConfiguration

public java.util.Hashtable getConfiguration()
Gets the @Hashtable representing this @ConfigurationPropertiesObject

Returns:
the @Hasthable representing this @ConfigurationPropertiesObject