Java Doc for SubnodeConfiguration.java in  » Library » Apache-commons-configuration-1.4-src » org » apache » commons » configuration » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Library » Apache commons configuration 1.4 src » org.apache.commons.configuration 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.commons.configuration.AbstractConfiguration
   org.apache.commons.configuration.HierarchicalConfiguration
      org.apache.commons.configuration.SubnodeConfiguration

SubnodeConfiguration
public class SubnodeConfiguration extends HierarchicalConfiguration (Code)

A specialized hierarchical configuration class that wraps a single node of its parent configuration.

Configurations of this type are initialized with a parent configuration and a configuration node of this configuration. This node becomes the root node of the subnode configuration. All property accessor methods are evaluated relative to this root node. A good use case for a SubnodeConfiguration is when multiple properties from a specific sub tree of the whole configuration need to be accessed. Then a SubnodeConfiguration can be created with the parent node of the affected sub tree as root node. This allows for simpler property keys and is also more efficient.

A subnode configuration and its parent configuration operate on the same hierarchy of configuration nodes. So if modifications are performed at the subnode configuration, these changes are immideately visible in the parent configuration. Analogously will updates of the parent configuration affect the subnode configuration if the sub tree spanned by the subnode configuration's root node is involved.

When a subnode configuration is created, it inherits the settings of its parent configuration, e.g. some flags like the throwExceptionOnMissing flag or the settings for handling list delimiters) or the expression engine. If these settings are changed later in either the subnode or the parent configuration, the changes are not visible for each other. So you could create a subnode configuration, change its expression engine without affecting the parent configuration.

From its purpose this class is quite similar to SubsetConfiguration . The difference is that a subset configuration of a hierarchical configuration may combine multiple configuration nodes from different sub trees of the configuration, while all nodes in a subnode configuration belong to the same sub tree. If an application can live with this limitation, it is recommended to use this class instead of SubsetConfiguration because creating a subset configuration is more expensive than creating a subnode configuration.


since:
   1.3
author:
   Oliver Heger
version:
   $Id: SubnodeConfiguration.java 439648 2006-09-02 20:42:10Z oheger $



Constructor Summary
public  SubnodeConfiguration(HierarchicalConfiguration parent, ConfigurationNode root)
     Creates a new instance of SubnodeConfiguration and initializes it with the parent configuration and the new root node.

Method Summary
protected  NodecreateNode(String name)
     Creates a new node.
protected  SubnodeConfigurationcreateSubnodeConfiguration(ConfigurationNode node)
     Returns a hierarchical configuration object for the given sub node.
public  HierarchicalConfigurationgetParent()
     Returns the parent configuration of this subnode configuration.
protected  voidinitFromParent(HierarchicalConfiguration parentConfig)
     Initializes this subnode configuration from the given parent configuration.
protected  Objectinterpolate(Object value)
     Performs interpolation.


Constructor Detail
SubnodeConfiguration
public SubnodeConfiguration(HierarchicalConfiguration parent, ConfigurationNode root)(Code)
Creates a new instance of SubnodeConfiguration and initializes it with the parent configuration and the new root node.
Parameters:
  parent - the parent configuration
Parameters:
  root - the root node of this subnode configuration




Method Detail
createNode
protected Node createNode(String name)(Code)
Creates a new node. This task is delegated to the parent.
Parameters:
  name - the node's name the new node



createSubnodeConfiguration
protected SubnodeConfiguration createSubnodeConfiguration(ConfigurationNode node)(Code)
Returns a hierarchical configuration object for the given sub node. This implementation will ensure that the returned SubnodeConfiguration object will have the same parent than this object.
Parameters:
  node - the sub node, for which the configuration is to be created a hierarchical configuration for this sub node



getParent
public HierarchicalConfiguration getParent()(Code)
Returns the parent configuration of this subnode configuration. the parent configuration



initFromParent
protected void initFromParent(HierarchicalConfiguration parentConfig)(Code)
Initializes this subnode configuration from the given parent configuration. This method is called by the constructor. It will copy many settings from the parent.
Parameters:
  parentConfig - the parent configuration



interpolate
protected Object interpolate(Object value)(Code)
Performs interpolation. This implementation will ask the parent configuration to perform the interpolation so that variables can be evaluated in the global context.
Parameters:
  value - the value to be interpolated



Fields inherited from org.apache.commons.configuration.HierarchicalConfiguration
final public static int EVENT_ADD_NODES(Code)(Java Doc)
final public static int EVENT_CLEAR_TREE(Code)(Java Doc)

Methods inherited from org.apache.commons.configuration.HierarchicalConfiguration
public void addNodes(String key, Collection nodes)(Code)(Java Doc)
protected void addPropertyDirect(String key, Object obj)(Code)(Java Doc)
protected void clearNode(Node node)(Code)(Java Doc)
protected void clearNode(ConfigurationNode node)(Code)(Java Doc)
public void clearProperty(String key)(Code)(Java Doc)
protected static void clearReferences(ConfigurationNode node)(Code)(Java Doc)
public void clearTree(String key)(Code)(Java Doc)
public Object clone()(Code)(Java Doc)
public SubnodeConfiguration configurationAt(String key)(Code)(Java Doc)
public List configurationsAt(String key)(Code)(Java Doc)
public boolean containsKey(String key)(Code)(Java Doc)
protected Node createAddPath(ConfigurationKey.KeyIterator keyIt, Node root)(Code)(Java Doc)
protected Node createNode(String name)(Code)(Java Doc)
protected SubnodeConfiguration createSubnodeConfiguration(ConfigurationNode node)(Code)(Java Doc)
protected Node fetchAddNode(ConfigurationKey.KeyIterator keyIt, Node startNode)(Code)(Java Doc)
protected List fetchNodeList(String key)(Code)(Java Doc)
protected Node findLastPathNode(ConfigurationKey.KeyIterator keyIt, Node node)(Code)(Java Doc)
protected void findPropertyNodes(ConfigurationKey.KeyIterator keyPart, Node node, Collection nodes)(Code)(Java Doc)
public static ExpressionEngine getDefaultExpressionEngine()(Code)(Java Doc)
public ExpressionEngine getExpressionEngine()(Code)(Java Doc)
public Iterator getKeys()(Code)(Java Doc)
public Iterator getKeys(String prefix)(Code)(Java Doc)
public int getMaxIndex(String key)(Code)(Java Doc)
public Object getProperty(String key)(Code)(Java Doc)
public Node getRoot()(Code)(Java Doc)
public ConfigurationNode getRootNode()(Code)(Java Doc)
public boolean isEmpty()(Code)(Java Doc)
protected boolean nodeDefined(Node node)(Code)(Java Doc)
protected boolean nodeDefined(ConfigurationNode node)(Code)(Java Doc)
protected void removeNode(Node node)(Code)(Java Doc)
protected void removeNode(ConfigurationNode node)(Code)(Java Doc)
public static void setDefaultExpressionEngine(ExpressionEngine engine)(Code)(Java Doc)
public void setExpressionEngine(ExpressionEngine expressionEngine)(Code)(Java Doc)
public void setProperty(String key, Object value)(Code)(Java Doc)
public void setRoot(Node node)(Code)(Java Doc)
public void setRootNode(ConfigurationNode rootNode)(Code)(Java Doc)
public Configuration subset(String prefix)(Code)(Java Doc)

Fields inherited from org.apache.commons.configuration.AbstractConfiguration
final protected static String END_TOKEN(Code)(Java Doc)
final public static int EVENT_ADD_PROPERTY(Code)(Java Doc)
final public static int EVENT_CLEAR(Code)(Java Doc)
final public static int EVENT_CLEAR_PROPERTY(Code)(Java Doc)
final public static int EVENT_READ_PROPERTY(Code)(Java Doc)
final public static int EVENT_SET_PROPERTY(Code)(Java Doc)
final protected static String START_TOKEN(Code)(Java Doc)

Methods inherited from org.apache.commons.configuration.AbstractConfiguration
public void addErrorLogListener()(Code)(Java Doc)
public void addProperty(String key, Object value)(Code)(Java Doc)
abstract protected void addPropertyDirect(String key, Object value)(Code)(Java Doc)
public void clear()(Code)(Java Doc)
public void clearProperty(String key)(Code)(Java Doc)
protected void clearPropertyDirect(String key)(Code)(Java Doc)
abstract public boolean containsKey(String key)(Code)(Java Doc)
protected ConfigurationInterpolator createInterpolator()(Code)(Java Doc)
public BigDecimal getBigDecimal(String key)(Code)(Java Doc)
public BigDecimal getBigDecimal(String key, BigDecimal defaultValue)(Code)(Java Doc)
public BigInteger getBigInteger(String key)(Code)(Java Doc)
public BigInteger getBigInteger(String key, BigInteger defaultValue)(Code)(Java Doc)
public boolean getBoolean(String key)(Code)(Java Doc)
public boolean getBoolean(String key, boolean defaultValue)(Code)(Java Doc)
public Boolean getBoolean(String key, Boolean defaultValue)(Code)(Java Doc)
public byte getByte(String key)(Code)(Java Doc)
public byte getByte(String key, byte defaultValue)(Code)(Java Doc)
public Byte getByte(String key, Byte defaultValue)(Code)(Java Doc)
public static char getDefaultListDelimiter()(Code)(Java Doc)
public static char getDelimiter()(Code)(Java Doc)
public double getDouble(String key)(Code)(Java Doc)
public double getDouble(String key, double defaultValue)(Code)(Java Doc)
public Double getDouble(String key, Double defaultValue)(Code)(Java Doc)
public float getFloat(String key)(Code)(Java Doc)
public float getFloat(String key, float defaultValue)(Code)(Java Doc)
public Float getFloat(String key, Float defaultValue)(Code)(Java Doc)
public int getInt(String key)(Code)(Java Doc)
public int getInt(String key, int defaultValue)(Code)(Java Doc)
public Integer getInteger(String key, Integer defaultValue)(Code)(Java Doc)
public ConfigurationInterpolator getInterpolator()(Code)(Java Doc)
abstract public Iterator getKeys()(Code)(Java Doc)
public Iterator getKeys(String prefix)(Code)(Java Doc)
public List getList(String key)(Code)(Java Doc)
public List getList(String key, List defaultValue)(Code)(Java Doc)
public char getListDelimiter()(Code)(Java Doc)
public Log getLogger()(Code)(Java Doc)
public long getLong(String key)(Code)(Java Doc)
public long getLong(String key, long defaultValue)(Code)(Java Doc)
public Long getLong(String key, Long defaultValue)(Code)(Java Doc)
public Properties getProperties(String key)(Code)(Java Doc)
public Properties getProperties(String key, Properties defaults)(Code)(Java Doc)
public short getShort(String key)(Code)(Java Doc)
public short getShort(String key, short defaultValue)(Code)(Java Doc)
public Short getShort(String key, Short defaultValue)(Code)(Java Doc)
public String getString(String key)(Code)(Java Doc)
public String getString(String key, String defaultValue)(Code)(Java Doc)
public String[] getStringArray(String key)(Code)(Java Doc)
public synchronized StrSubstitutor getSubstitutor()(Code)(Java Doc)
protected String interpolate(String base)(Code)(Java Doc)
protected Object interpolate(Object value)(Code)(Java Doc)
protected String interpolateHelper(String base, List priorVariables)(Code)(Java Doc)
public boolean isDelimiterParsingDisabled()(Code)(Java Doc)
abstract public boolean isEmpty()(Code)(Java Doc)
public boolean isThrowExceptionOnMissing()(Code)(Java Doc)
protected Object resolveContainerStore(String key)(Code)(Java Doc)
public static void setDefaultListDelimiter(char delimiter)(Code)(Java Doc)
public static void setDelimiter(char delimiter)(Code)(Java Doc)
public void setDelimiterParsingDisabled(boolean delimiterParsingDisabled)(Code)(Java Doc)
public void setListDelimiter(char listDelimiter)(Code)(Java Doc)
public void setLogger(Log log)(Code)(Java Doc)
public void setProperty(String key, Object value)(Code)(Java Doc)
public void setThrowExceptionOnMissing(boolean throwExceptionOnMissing)(Code)(Java Doc)
public Configuration subset(String prefix)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.