org.naftulin.configmgr.parsers
Class ExternalConfigurationParserImpl

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

public class ExternalConfigurationParserImpl
extends java.lang.Object
implements ConfigEntryParser

Invokes external record adapter with parameters specified in configuration record. Used to connect external configurations to be managed by configuration managment engine.

Since:
1.0
Author:
Henry Naftulin

Constructor Summary
ExternalConfigurationParserImpl()
           
 
Method Summary
 ConfigurationManagementEntry getConfigurationManagementEntry(java.lang.String key, java.net.URL fileUrl)
          Invokes external record adapter with parameters specified in configuration record.
 java.util.List<NameValuePairImpl> getNameValuePairs()
          Returns the named value list parsed from the master configuration.
 void setExternalRecordAdapterClass(java.lang.String externalRecordAdapterClass)
          Sets the full class name for the ExternalRecordAdapter class.
 void setNameValuePairs(java.util.List<NameValuePairImpl> nameValuePairs)
          Sets the named value list
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalConfigurationParserImpl

public ExternalConfigurationParserImpl()
Method Detail

setExternalRecordAdapterClass

public void setExternalRecordAdapterClass(java.lang.String externalRecordAdapterClass)
Sets the full class name for the ExternalRecordAdapter class.

Parameters:
externalRecordAdapterClass - the full class name for the ExternalRecordAdapter class.

getConfigurationManagementEntry

public ConfigurationManagementEntry getConfigurationManagementEntry(java.lang.String key,
                                                                    java.net.URL fileUrl)
                                                             throws ConfigurationManagerException
Invokes external record adapter with parameters specified in configuration record. If the adaptor is not created yet, create it and call load method, otherwise, calls reload.

Specified by:
getConfigurationManagementEntry in interface ConfigEntryParser
Parameters:
key - the key for the external configuration.
fileUrl - ignored.
Returns:
the configuraion managment entry corresponding to the external configuration.
Throws:
ConfigurationManagementEntry - if external configuration cannot be instatiated or has problems loading or reloading.
ConfigurationManagerException - if an error occurs while parsing an entry.

getNameValuePairs

public java.util.List<NameValuePairImpl> getNameValuePairs()
Returns the named value list parsed from the master configuration.

Returns:
the named value list parsed from the master configuration.

setNameValuePairs

public void setNameValuePairs(java.util.List<NameValuePairImpl> nameValuePairs)
Sets the named value list

Parameters:
nameValuePairs - the named value pair list.


Copyright © 2009. All Rights Reserved.