incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1026604 - in /incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces: Configuration.java ConfigurationNode.java IHierarchyParent.java
Date Sat, 23 Oct 2010 11:43:39 GMT
Author: kwright
Date: Sat Oct 23 11:43:39 2010
New Revision: 1026604

URL: http://svn.apache.org/viewvc?rev=1026604&view=rev
Log:
Create an interface representing functionality that is common between Configuration and ConfigurationNode.
 This will allow generic methods that support both to be written.

Added:
    incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java
  (with props)
Modified:
    incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java
    incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java?rev=1026604&r1=1026603&r2=1026604&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java
(original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/Configuration.java
Sat Oct 23 11:43:39 2010
@@ -27,7 +27,7 @@ import org.json.*;
 
 /** This class represents XML configuration information, in its most basic incarnation.
 */
-public class Configuration
+public class Configuration implements IHierarchyParent
 {
   public static final String _rcsid = "@(#)$Id: Configuration.java 988245 2010-08-23 18:39:35Z
kwright $";
 

Modified: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java?rev=1026604&r1=1026603&r2=1026604&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java
(original)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/ConfigurationNode.java
Sat Oct 23 11:43:39 2010
@@ -23,7 +23,7 @@ import java.util.*;
 
 /** This class represents a node in a configuration structure.
 */
-public class ConfigurationNode
+public class ConfigurationNode implements IHierarchyParent
 {
   public static final String _rcsid = "@(#)$Id: ConfigurationNode.java 988245 2010-08-23
18:39:35Z kwright $";
 

Added: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java?rev=1026604&view=auto
==============================================================================
--- incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java
(added)
+++ incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java
Sat Oct 23 11:43:39 2010
@@ -0,0 +1,53 @@
+/* $Id$ */
+
+/**
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements. See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License. You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package org.apache.manifoldcf.core.interfaces;
+
+import java.io.*;
+import java.util.*;
+
+/** This interface describes the methods for support configuration parent/child
+* relationships.
+*/
+public interface IHierarchyParent
+{
+  public static final String _rcsid = "@(#)$Id$";
+
+   /** Get child count.
+  *@return the count.
+  */
+  public int getChildCount();
+
+  /** Get child n.
+  *@param index is the child number.
+  *@return the child node.
+  */
+  public ConfigurationNode findChild(int index);
+
+  /** Remove child n.
+  *@param index is the child to remove.
+  */
+  public void removeChild(int index);
+
+  /** Add child at specified position.
+  *@param index is the position to add the child.
+  *@param child is the child to add.
+  */
+  public void addChild(int index, ConfigurationNode child);
+
+}

Propchange: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/lcf/trunk/modules/framework/core/src/main/java/org/apache/manifoldcf/core/interfaces/IHierarchyParent.java
------------------------------------------------------------------------------
    svn:keywords = Id



Mime
View raw message