org.eclipse.higgins.configuration.xml
Class ReferenceHandler

java.lang.Object
  extended byorg.eclipse.higgins.configuration.xml.ReferenceHandler
All Implemented Interfaces:
ISettingHandler

public class ReferenceHandler
extends Object
implements ISettingHandler

This handler returns an object that has already been processed -- i.e., one that comes earlier in the XML configuration file.

The desired object is referred to by its name, and its relative position in the overall settings. A path-like syntax is used, where '/' is used to denote a subsetting. A leading '/' means that the first string refers to a top-level setting. No leading '/' means that the first string refers to a setting at the same level as the reference (i.e., a sibling). Subsettings of Map elements are referred to by name. Subsettings of list elements are referred to via their position in the list.

Examples:

x/y = setting y inside sibling setting x
/x/y = setting y inside top-level setting
x/y/3 = element 3 of setting y of sibling setting x

Author:
gbyrd

Constructor Summary
ReferenceHandler()
           
 
Method Summary
 Object getSetting(String strName, String strConfigurationBase, Map mapSettingHandlers, Map mapSettingsGlobal, Object settingsParent, org.apache.axiom.om.OMElement omSetting)
          Method to convert XML element (omSetting) to an object that will be placed into a configuration map.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReferenceHandler

public ReferenceHandler()
Method Detail

getSetting

public Object getSetting(String strName,
                         String strConfigurationBase,
                         Map mapSettingHandlers,
                         Map mapSettingsGlobal,
                         Object settingsParent,
                         org.apache.axiom.om.OMElement omSetting)
                  throws Exception
Description copied from interface: ISettingHandler
Method to convert XML element (omSetting) to an object that will be placed into a configuration map. The type of the returned object is implicitly determined by the class implementing the ISettingHandler interface.

Specified by:
getSetting in interface ISettingHandler
Parameters:
strName - Name of setting being processed.
strConfigurationBase - Configuration directory (used for file-oriented settings).
mapSettingHandlers - Map that associates types with ISettingHandler classes.
mapSettingsGlobal - Configuration map containing top-level settings that might be needed for this setting. (E.g., a certificate handler might need information about a previously-configured keystore component.)
settingsParent - Configuration map or list (if any) that will contain this setting.
omSetting - XML element that is being converted to Object.
Returns:
Object that will be put into a configuration Map, associated with given name.
Throws:
Exception