org.naftulin.configmgr.parsers
Class XmlFileParserImpl

java.lang.Object
  extended by org.naftulin.configmgr.parsers.XmlFileParserImpl
All Implemented Interfaces:
ConfigEntryParser

public class XmlFileParserImpl
extends java.lang.Object
implements ConfigEntryParser

Configuration entry parser converts xml configuration record into supplied class instance configuration management entry. It parses the property file that the record describes, and stores the configuration as a properties in content of an entry.

Since:
1.0
Author:
Henry Naftulin

Constructor Summary
XmlFileParserImpl(java.lang.String className)
           
 
Method Summary
 ConfigurationManagementEntry getConfigurationManagementEntry(java.lang.String key, java.net.URL fileUrl)
          Returns configuration management entry by parsing the record passed in.
 java.lang.String toString()
          Returns a string representation of this parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XmlFileParserImpl

public XmlFileParserImpl(java.lang.String className)
Method Detail

getConfigurationManagementEntry

public ConfigurationManagementEntry getConfigurationManagementEntry(java.lang.String key,
                                                                    java.net.URL fileUrl)
                                                             throws ConfigurationManagerException
Returns configuration management entry by parsing the record passed in. Note xml file has to match the class passed in, per betwix specfications.

Specified by:
getConfigurationManagementEntry in interface ConfigEntryParser
Parameters:
key - the key configuration entry will be assigned
fileUrl - the file URL to be parsed.
Returns:
a configuration managment entry by parsing the record passed in.
Throws:
ConfigurationManagerException - if an error occurs while parsing an entry.

toString

public java.lang.String toString()
Returns a string representation of this parser.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this parser.


Copyright © 2009. All Rights Reserved.