org.springframework.extensions.config
Class ConfigSectionImpl

java.lang.Object
  extended by org.springframework.extensions.config.ConfigSectionImpl
All Implemented Interfaces:
ConfigSection

public class ConfigSectionImpl
extends Object
implements ConfigSection

Default implementation of a config section

Author:
gavinc

Constructor Summary
ConfigSectionImpl(String evaluator, String condition, boolean replace)
           
 
Method Summary
 void addConfigElement(ConfigElement configElement)
          Adds a config element to the results for the lookup
 String getCondition()
          Returns the condition to use to determine whether the config section this object represents is applicable.
 List<ConfigElement> getConfigElements()
          Returns the config elements that make up this config section
 String getEvaluator()
          Returns the name of an evaluator to use to determine whether the config section this object represents is applicable to the current lookup operation
 boolean isGlobal()
          Determines whether this config section is global
 boolean isReplace()
          Determines whether the config elements found inside this section should replace any previously found config elements with the same name
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfigSectionImpl

public ConfigSectionImpl(String evaluator,
                         String condition,
                         boolean replace)
Method Detail

getEvaluator

public String getEvaluator()
Description copied from interface: ConfigSection
Returns the name of an evaluator to use to determine whether the config section this object represents is applicable to the current lookup operation

Specified by:
getEvaluator in interface ConfigSection
Returns:
Name of an evaluator held by the config service
See Also:
ConfigSection.getEvaluator()

getCondition

public String getCondition()
Description copied from interface: ConfigSection
Returns the condition to use to determine whether the config section this object represents is applicable. The condition is passed to the evaluator

Specified by:
getCondition in interface ConfigSection
Returns:
Condition to test
See Also:
ConfigSection.getCondition()

getConfigElements

public List<ConfigElement> getConfigElements()
Description copied from interface: ConfigSection
Returns the config elements that make up this config section

Specified by:
getConfigElements in interface ConfigSection
Returns:
List of config elements
See Also:
ConfigSection.getConfigElements()

addConfigElement

public void addConfigElement(ConfigElement configElement)
Adds a config element to the results for the lookup

Parameters:
configElement -

isGlobal

public boolean isGlobal()
Description copied from interface: ConfigSection
Determines whether this config section is global

Specified by:
isGlobal in interface ConfigSection
Returns:
true if it is global, false otherwise
See Also:
ConfigSection.isGlobal()

isReplace

public boolean isReplace()
Description copied from interface: ConfigSection
Determines whether the config elements found inside this section should replace any previously found config elements with the same name

Specified by:
isReplace in interface ConfigSection
Returns:
true if config elements should replace existing ones, false otherwise
See Also:
ConfigSection.isReplace()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2009 SpringSource, Inc. All Rights Reserved.