org.naftulin.configmgr.content
Class ExternalRecordImpl
java.lang.Object
org.naftulin.configmgr.content.AbstractRecordImpl
org.naftulin.configmgr.content.ExternalRecordImpl
public class ExternalRecordImpl
- extends AbstractRecordImpl
Represents an external entry, with it's key, name-value pairs and parser class.
Intended to mirror master configuration rules for external configuration.
The external configuraton xml is:
<external key="the key" configEntryAdatorClass="the fully qualified parser class">
<param name="key1" value="value1" />
.....
<param name="keyn" value="valuen" />
</external>
where configEntryParserClass
is a class implementing ExternalRecordAdapter
interface.
- Since:
- 1.0
- Author:
- Henry Henry
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ExternalRecordImpl
public ExternalRecordImpl()
addNameValuePair
public void addNameValuePair(NameValuePairImpl nameValuePair)
- Adds a name-value pair as it is read from the master configuration.
- Parameters:
nameValuePair
- the name value pair.
setConfigEntryAdaptorClass
public void setConfigEntryAdaptorClass(java.lang.String adaptor)
- Sets the configuration entry adapter class. This class will handle
adapting the loading and reloading of the configurations by calling
load and reload methods on the original, exteral interface.
- Parameters:
adaptor
- the fully qualified name of the adaptor implementation class.
getParser
public ConfigEntryParser getParser()
throws ConfigurationManagerException
- Returns an instance of
parser
that can parse the file to extract the configuration.
- Specified by:
getParser
in class AbstractRecordImpl
- Returns:
- the parser that can parse the file to extract the configuration.
- Throws:
ConfigurationManagerException
- if an error occured while instantiating the parser.
Copyright © 2009. All Rights Reserved.