org.openeai.config
Class PropertyConfig
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.config.EnterpriseConfigurationObjectImpl
|
+--org.openeai.config.PropertyConfig
- All Implemented Interfaces:
- EnterpriseConfigurationObject
- public class PropertyConfig
- extends EnterpriseConfigurationObjectImpl
- implements EnterpriseConfigurationObject
A PropertyConifg is a wrapper class that takes information stored in an
OpenEAI Deployment document (PropertyConfig Element) and stores it in a Java object.
Then the configuration object can be retrieved from AppConfig and the Properties
object associated to the config object can be used within the application.
The PropertyConfig object is simply an object that reads the Properties contained
in the deployment document and creates a Java Properties object with those properties
in it. Then an appication can retrieve that Properties object and use it just
like any other Java Properties object.
Configuration Parameters:
These are the configuration parameters specified by the PropertyConfig
Element in the Deployment document. NOTE: Like all other OpenEAI configuration
objects, there is a "container" level associated to PropertyConfig objects.
Many Elements and attributes are required at that level and may be optionally
overridden at this level. This is to avoid having to enter redundant information
in the Deployment document if all (or most) PropertyConfig objects being configured should use
the same configuration information. Therefore, many of the Property configuration
parameters are optional at this level but required at the "container" level. Where
this is the case, it will be indicated by an "*".
| Name |
Required |
Description |
| name |
yes |
Name of the PropertyConfig object. This is how the object will be
stored in AppConfig and should be unique. This allows developers to
conveniently categorize properties for an application |
| ConfigClass |
no* |
Name of the configuration class that wraps the config Element (this class) |
| Property |
yes (at least one) |
This is a pair of Elements that tells the PropertyConfig object what
Java Properties object to build. It consists of PropertyName and a PropertyValue
Elements that are stored in the Java Properties object. Then a developer can
retrieve that Properties object from this PropertyConfig object and
obtain the actually property values by name. |
- Version:
- 3.0 beta2 - 28 January 2003
- Author:
- Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
- See Also:
OpenEaiObject
|
Constructor Summary |
PropertyConfig()
This is the constructor used by AppConfig to instantiate the config object. |
PropertyConfig(org.jdom.Element configElement)
|
PropertyConfig(java.lang.String configDocUrl,
java.lang.String propertyName)
|
|
Method Summary |
void |
init(org.jdom.Element configElement)
Implements the init(Element) method that all EnterpriseConfiguration objects must implement. |
| Methods inherited from class org.openeai.config.EnterpriseConfigurationObjectImpl |
addProperty, getAppName, getConfigDoc, getConfigElementByAttributeValue, getElementByAttributeValue, getName, getType, getValidation, setAppName, setConfigDoc, setName, setType, setValidation |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PropertyConfig
public PropertyConfig()
- This is the constructor used by AppConfig to instantiate the config object.
Then, AppConfig calls this object's init(Element) method passing the configuration
element it retrieved from the XML configuration document which this object uses
to configure itself. After this object has initialized itself,
it will be used to instantiate and initialize the framework object
(MessageObject, Producers, Consumers, ThreadPools etc.)
with the properties it's been initialized with.
PropertyConfig
public PropertyConfig(java.lang.String configDocUrl,
java.lang.String propertyName)
throws EnterpriseConfigurationObjectException
PropertyConfig
public PropertyConfig(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
init
public void init(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
- Implements the init(Element) method that all EnterpriseConfiguration objects must implement.
This init method takes the Configuration element passed in and builds a Java properties object
from its contents. This information can then be retreived by the application via the getProperties() method
after getting the property config object from AppConfig.
The Properties object that gets built is inherited from OpenEaiObject.
- Specified by:
init in interface EnterpriseConfigurationObject
- Throws:
EnterpriseConfigurationObjectException - if errors occur processing the configuration Element.- See Also:
OpenEaiObject
Copyright © 2002, OpenEAI Software Foundation