commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1295941 - in /commons/proper/chain/trunk: ./ configuration/ configuration/src/main/java/org/apache/commons/chain2/config/ configuration/src/test/java/org/apache/commons/chain2/config/ web/ web/src/main/java/org/apache/commons/chain2/web/
Date Thu, 01 Mar 2012 22:15:06 GMT
Author: simonetripodi
Date: Thu Mar  1 22:15:05 2012
New Revision: 1295941

URL: http://svn.apache.org/viewvc?rev=1295941&view=rev
Log:
started migrating the configuration module to use Digester3

Modified:
    commons/proper/chain/trunk/configuration/pom.xml
    commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java
    commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java
    commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigParser.java
    commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java
    commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRuleSet.java
    commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParser2TestCase.java
    commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParserTestCase.java
    commons/proper/chain/trunk/pom.xml
    commons/proper/chain/trunk/web/pom.xml
    commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
    commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainServlet.java

Modified: commons/proper/chain/trunk/configuration/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/pom.xml?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/pom.xml (original)
+++ commons/proper/chain/trunk/configuration/pom.xml Thu Mar  1 22:15:05 2012
@@ -37,12 +37,11 @@
       <groupId>${project.groupId}</groupId>
       <artifactId>commons-chain2</artifactId>
       <version>${project.parent.version}</version>
-      <scope>compile</scope>
     </dependency>
+
     <dependency>
-      <groupId>commons-digester</groupId>
-      <artifactId>commons-digester</artifactId>
-      <version>2.1</version>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>commons-digester3</artifactId>
     </dependency>
 
     <dependency>

Modified: commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java
(original)
+++ commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java
Thu Mar  1 22:15:05 2012
@@ -21,7 +21,7 @@ import java.util.Map;
 
 import org.apache.commons.chain2.Catalog;
 import org.apache.commons.chain2.CatalogFactory;
-import org.apache.commons.digester.Rule;
+import org.apache.commons.digester3.Rule;
 import org.xml.sax.Attributes;
 
 
@@ -107,7 +107,7 @@ class ConfigCatalogRule extends Rule {
 
         // Create and register a new Catalog instance if necessary
         if (catalog == null) {
-            Class<?> clazz = digester.getClassLoader().loadClass(catalogClass);
+            Class<?> clazz = getDigester().getClassLoader().loadClass(catalogClass);
 
             /* Convert catalog pulled from digester to default generic signature
              * with the assumption that the Catalog returned from digester will
@@ -125,7 +125,7 @@ class ConfigCatalogRule extends Rule {
         }
 
         // Push this Catalog onto the top of the stack
-        digester.push(catalog);
+        getDigester().push(catalog);
     }
 
 }

Modified: commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java
(original)
+++ commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java
Thu Mar  1 22:15:05 2012
@@ -17,7 +17,7 @@
 package org.apache.commons.chain2.config;
 
 
-import org.apache.commons.digester.Rule;
+import org.apache.commons.digester3.Rule;
 import org.xml.sax.Attributes;
 
 
@@ -94,10 +94,10 @@ class ConfigDefineRule extends Rule {
         String classValue = attributes.getValue(classAttribute);
 
         // Add rules for this new element
-        digester.addObjectCreate("*/" + nameValue, classValue);
-        digester.addSetProperties("*/" + nameValue);
-        digester.addRule("*/" + nameValue,
-                         new ConfigRegisterRule(nameAttribute));
+        getDigester().addObjectCreate("*/" + nameValue, classValue);
+        getDigester().addSetProperties("*/" + nameValue);
+        getDigester().addRule("*/" + nameValue,
+                              new ConfigRegisterRule(nameAttribute));
 
     }
 

Modified: commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigParser.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigParser.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigParser.java
(original)
+++ commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigParser.java
Thu Mar  1 22:15:05 2012
@@ -21,8 +21,8 @@ import java.net.URL;
 
 import org.apache.commons.chain2.Catalog;
 import org.apache.commons.chain2.Context;
-import org.apache.commons.digester.Digester;
-import org.apache.commons.digester.RuleSet;
+import org.apache.commons.digester3.Digester;
+import org.apache.commons.digester3.RuleSet;
 
 
 /**

Modified: commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java
(original)
+++ commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java
Thu Mar  1 22:15:05 2012
@@ -22,8 +22,7 @@ import java.util.Map;
 import org.apache.commons.chain2.Catalog;
 import org.apache.commons.chain2.Chain;
 import org.apache.commons.chain2.Command;
-import org.apache.commons.chain2.Context;
-import org.apache.commons.digester.Rule;
+import org.apache.commons.digester3.Rule;
 import org.xml.sax.Attributes;
 
 
@@ -85,7 +84,7 @@ class ConfigRegisterRule extends Rule {
         throws Exception {
 
         // Is the top object a Command?
-        Object top = digester.peek(0);
+        Object top = getDigester().peek(0);
         if ((top == null)
             || !(top instanceof Command)) {
             return;
@@ -98,7 +97,7 @@ class ConfigRegisterRule extends Rule {
                 (Command<Object, Object, Map<Object, Object>>) top;
 
         // Is the next object a Catalog or a Chain?
-        Object next = digester.peek(1);
+        Object next = getDigester().peek(1);
         if (next == null) {
             return;
         }

Modified: commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRuleSet.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRuleSet.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRuleSet.java
(original)
+++ commons/proper/chain/trunk/configuration/src/main/java/org/apache/commons/chain2/config/ConfigRuleSet.java
Thu Mar  1 22:15:05 2012
@@ -17,8 +17,8 @@
 package org.apache.commons.chain2.config;
 
 
-import org.apache.commons.digester.Digester;
-import org.apache.commons.digester.RuleSetBase;
+import org.apache.commons.digester3.Digester;
+import org.apache.commons.digester3.RuleSetBase;
 
 
 /**

Modified: commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParser2TestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParser2TestCase.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParser2TestCase.java
(original)
+++ commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParser2TestCase.java
Thu Mar  1 22:15:05 2012
@@ -28,8 +28,6 @@ import org.apache.commons.chain2.Catalog
 import org.apache.commons.chain2.CatalogFactory;
 import org.apache.commons.chain2.Command;
 import org.apache.commons.chain2.Context;
-import org.apache.commons.chain2.config.ConfigParser;
-import org.apache.commons.chain2.config.ConfigRuleSet;
 import org.apache.commons.chain2.impl.AddingCommand;
 import org.apache.commons.chain2.impl.CatalogBase;
 import org.apache.commons.chain2.impl.CatalogFactoryBase;
@@ -41,7 +39,7 @@ import org.apache.commons.chain2.impl.Ex
 import org.apache.commons.chain2.impl.ExceptionFilter;
 import org.apache.commons.chain2.impl.NonDelegatingCommand;
 import org.apache.commons.chain2.impl.NonDelegatingFilter;
-import org.apache.commons.digester.Digester;
+import org.apache.commons.digester3.Digester;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;

Modified: commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParserTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParserTestCase.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParserTestCase.java
(original)
+++ commons/proper/chain/trunk/configuration/src/test/java/org/apache/commons/chain2/config/ConfigParserTestCase.java
Thu Mar  1 22:15:05 2012
@@ -28,8 +28,6 @@ import org.apache.commons.chain2.Catalog
 import org.apache.commons.chain2.CatalogFactory;
 import org.apache.commons.chain2.Command;
 import org.apache.commons.chain2.Context;
-import org.apache.commons.chain2.config.ConfigParser;
-import org.apache.commons.chain2.config.ConfigRuleSet;
 import org.apache.commons.chain2.impl.AddingCommand;
 import org.apache.commons.chain2.impl.CatalogBase;
 import org.apache.commons.chain2.impl.CatalogFactoryBase;
@@ -41,7 +39,7 @@ import org.apache.commons.chain2.impl.Ex
 import org.apache.commons.chain2.impl.ExceptionFilter;
 import org.apache.commons.chain2.impl.NonDelegatingCommand;
 import org.apache.commons.chain2.impl.NonDelegatingFilter;
-import org.apache.commons.digester.Digester;
+import org.apache.commons.digester3.Digester;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;

Modified: commons/proper/chain/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/pom.xml?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/pom.xml (original)
+++ commons/proper/chain/trunk/pom.xml Thu Mar  1 22:15:05 2012
@@ -131,6 +131,12 @@
         <artifactId>commons-logging</artifactId>
         <version>1.1.1</version>
       </dependency>
+
+      <dependency>
+        <groupId>${project.groupId}</groupId>
+        <artifactId>commons-digester3</artifactId>
+        <version>3.2</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
   <dependencies>

Modified: commons/proper/chain/trunk/web/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/pom.xml?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/web/pom.xml (original)
+++ commons/proper/chain/trunk/web/pom.xml Thu Mar  1 22:15:05 2012
@@ -42,13 +42,18 @@
       <groupId>${project.groupId}</groupId>
       <artifactId>commons-chain2</artifactId>
       <version>${project.parent.version}</version>
-      <scope>compile</scope>
     </dependency>
+
     <dependency>
       <groupId>${project.groupId}</groupId>
       <artifactId>commons-chain2-configuration</artifactId>
       <version>${project.parent.version}</version>
-      <scope>compile</scope>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>commons-digester3</artifactId>
+      <scope>provided</scope>
     </dependency>
 
     <dependency>

Modified: commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
(original)
+++ commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainListener.java
Thu Mar  1 22:15:05 2012
@@ -31,7 +31,7 @@ import org.apache.commons.chain2.Catalog
 import org.apache.commons.chain2.config.ConfigParser;
 import org.apache.commons.chain2.impl.CatalogBase;
 import org.apache.commons.chain2.web.servlet.ServletWebContext;
-import org.apache.commons.digester.RuleSet;
+import org.apache.commons.digester3.RuleSet;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 

Modified: commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainServlet.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainServlet.java?rev=1295941&r1=1295940&r2=1295941&view=diff
==============================================================================
--- commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainServlet.java
(original)
+++ commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/ChainServlet.java
Thu Mar  1 22:15:05 2012
@@ -18,6 +18,7 @@ package org.apache.commons.chain2.web;
 
 
 import java.io.IOException;
+
 import javax.servlet.ServletConfig;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
@@ -30,7 +31,7 @@ import org.apache.commons.chain2.Catalog
 import org.apache.commons.chain2.config.ConfigParser;
 import org.apache.commons.chain2.impl.CatalogBase;
 import org.apache.commons.chain2.web.servlet.ServletWebContext;
-import org.apache.commons.digester.RuleSet;
+import org.apache.commons.digester3.RuleSet;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 



Mime
View raw message