You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2009/03/01 22:10:29 UTC
svn commit: r749109 -
/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/HierarchicalConfigurationSource.java
Author: oheger
Date: Sun Mar 1 21:10:28 2009
New Revision: 749109
URL: http://svn.apache.org/viewvc?rev=749109&view=rev
Log:
Some extensions of the HierarchicalConfigurationSource interface.
Modified:
commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/HierarchicalConfigurationSource.java
Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/HierarchicalConfigurationSource.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/HierarchicalConfigurationSource.java?rev=749109&r1=749108&r2=749109&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/HierarchicalConfigurationSource.java (original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/HierarchicalConfigurationSource.java Sun Mar 1 21:10:28 2009
@@ -18,6 +18,7 @@
import org.apache.commons.configuration2.expr.NodeHandler;
import org.apache.commons.configuration2.expr.NodeList;
+import org.apache.commons.configuration2.expr.NodeVisitor;
/**
* <p>
@@ -80,4 +81,26 @@
* @return a {@code NodeList} with the results
*/
NodeList<T> find(String expr);
+
+ /**
+ * Visits the specified configuration node. This method implements the
+ * traversal of the node hierarchy starting with the specified node. The
+ * passed in node can be <b>null</b>; in this case the root node is used as
+ * start node.
+ *
+ * @param node the node to be visited
+ * @param visitor the visitor (must not be <b>null</b>)
+ * @throws IllegalArgumentException if the visitor is <b>null</b>
+ */
+ void visit(T node, NodeVisitor<T> visitor);
+
+ /**
+ * Removes all values of the property with the given name and of keys that
+ * start with this name. So if there is a property with the key
+ * "foo" and a property with the key "foo.bar", a call
+ * of {@code clearTree("foo")} would remove both properties.
+ *
+ * @param key the key of the property to be removed
+ */
+ void clearTree(String key);
}