Author: mrdon
Date: Sat Sep 23 22:50:01 2006
New Revision: 449363

URL: http://svn.apache.org/viewvc?view=rev&rev=449363
Log:
Renaming the xml configuration provider to match the xwork one (not sure why I 
named it different 
to start with...)
WW-1349

Added:
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
      - copied, changed from r449350, 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java
Removed:
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java
Modified:
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsTestCase.java
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
    
struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
    
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/ServletRedirectResultTest.java
    
struts/struts2/trunk/legacy/src/test/java/org/apache/struts2/legacy/StrutsFactoryTest.java

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsTestCase.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsTestCase.java?view=diff&rev=449363&r1=449362&r2=449363
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsTestCase.java 
(original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/StrutsTestCase.java 
Sat Sep 23 22:50:01 2006
@@ -18,7 +18,7 @@
 package org.apache.struts2;
 
 import org.apache.struts2.config.Settings;
-import org.apache.struts2.config.StrutsXMLConfigurationProvider;
+import org.apache.struts2.config.StrutsXmlConfigurationProvider;
 import org.apache.struts2.dispatcher.Dispatcher;
 import org.springframework.mock.web.MockServletContext;
 
@@ -44,7 +44,7 @@
         Dispatcher.setInstance(du);
         configurationManager = new ConfigurationManager();
         configurationManager.addConfigurationProvider(
-                new StrutsXMLConfigurationProvider("struts.xml", false));
+                new StrutsXmlConfigurationProvider("struts.xml", false));
         du.setConfigurationManager(configurationManager);
         
     }

Copied: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
 (from r449350, 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java)
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java?view=diff&rev=449363&p1=struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java&r1=449350&p2=struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java&r2=449363
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXMLConfigurationProvider.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/config/StrutsXmlConfigurationProvider.java
 Sat Sep 23 22:50:01 2006
@@ -25,9 +25,9 @@
 /**
  * Override Xwork class so we can use an arbitrary config file
  */
-public class StrutsXMLConfigurationProvider extends XmlConfigurationProvider {
+public class StrutsXmlConfigurationProvider extends XmlConfigurationProvider {
 
-    private static final Log LOG = 
LogFactory.getLog(StrutsXMLConfigurationProvider.class);
+    private static final Log LOG = 
LogFactory.getLog(StrutsXmlConfigurationProvider.class);
     private File baseDir = null;
 
     /** 
@@ -35,7 +35,7 @@
      * 
      * @param errorIfMissing If we should throw an exception if the file can't 
be found
      */
-    public StrutsXMLConfigurationProvider(boolean errorIfMissing) {
+    public StrutsXmlConfigurationProvider(boolean errorIfMissing) {
         this("struts.xml", errorIfMissing);
     }
     
@@ -45,7 +45,7 @@
      * @param filename The filename to look for
      * @param errorIfMissing If we should throw an exception if the file can't 
be found
      */
-    public StrutsXMLConfigurationProvider(String filename, boolean 
errorIfMissing) {
+    public StrutsXmlConfigurationProvider(String filename, boolean 
errorIfMissing) {
         super(filename, errorIfMissing);
         
         Map<String,String> dtdMappings = new 
HashMap<String,String>(getDtdMappings());

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java?view=diff&rev=449363&r1=449362&r2=449363
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
 Sat Sep 23 22:50:01 2006
@@ -36,7 +36,7 @@
 import org.apache.struts2.StrutsConstants;
 import org.apache.struts2.StrutsStatics;
 import org.apache.struts2.config.Settings;
-import org.apache.struts2.config.StrutsXMLConfigurationProvider;
+import org.apache.struts2.config.StrutsXmlConfigurationProvider;
 import org.apache.struts2.dispatcher.mapper.ActionMapping;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
 import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
@@ -256,7 +256,7 @@
         configurationManager.addConfigurationProvider(new 
XmlConfigurationProvider("xwork.xml", false));
         
         // Load Struts config files
-        configurationManager.addConfigurationProvider(new 
StrutsXMLConfigurationProvider(false));
+        configurationManager.addConfigurationProvider(new 
StrutsXmlConfigurationProvider(false));
         
         synchronized(Dispatcher.class) {
             if (dispatcherListeners.size() > 0) {

Modified: 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java?view=diff&rev=449363&r1=449362&r2=449363
==============================================================================
--- 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
 (original)
+++ 
struts/struts2/trunk/core/src/main/java/org/apache/struts2/sitegraph/StrutsConfigRetriever.java
 Sat Sep 23 22:50:01 2006
@@ -12,7 +12,7 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.struts2.config.StrutsXMLConfigurationProvider;
+import org.apache.struts2.config.StrutsXmlConfigurationProvider;
 import org.apache.struts2.sitegraph.entities.FreeMarkerView;
 import org.apache.struts2.sitegraph.entities.JspView;
 import org.apache.struts2.sitegraph.entities.VelocityView;
@@ -50,7 +50,7 @@
         String configFilePath = configDir + "/struts.xml";
         File configFile = new File(configFilePath);
         try {
-            ConfigurationProvider configProvider = new 
StrutsXMLConfigurationProvider(configFile.getCanonicalPath(), true);
+            ConfigurationProvider configProvider = new 
StrutsXmlConfigurationProvider(configFile.getCanonicalPath(), true);
             cm = new ConfigurationManager();
             cm.addConfigurationProvider(configProvider);
             isXWorkStarted = true;

Modified: 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/ServletRedirectResultTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/ServletRedirectResultTest.java?view=diff&rev=449363&r1=449362&r2=449363
==============================================================================
--- 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/ServletRedirectResultTest.java
 (original)
+++ 
struts/struts2/trunk/core/src/test/java/org/apache/struts2/dispatcher/ServletRedirectResultTest.java
 Sat Sep 23 22:50:01 2006
@@ -27,7 +27,7 @@
 import org.apache.struts2.ServletActionContext;
 import org.apache.struts2.StrutsStatics;
 import org.apache.struts2.StrutsTestCase;
-import org.apache.struts2.config.StrutsXMLConfigurationProvider;
+import org.apache.struts2.config.StrutsXmlConfigurationProvider;
 import org.springframework.mock.web.MockServletContext;
 
 import com.mockobjects.dynamic.C;
@@ -100,7 +100,7 @@
         Dispatcher du = new Dispatcher(new MockServletContext());
         Dispatcher.setInstance(du);
         ConfigurationManager cm = new ConfigurationManager();
-        cm.addConfigurationProvider(new 
StrutsXMLConfigurationProvider("struts.xml", false));
+        cm.addConfigurationProvider(new 
StrutsXmlConfigurationProvider("struts.xml", false));
         du.setConfigurationManager(cm);
         du.getConfigurationManager().getConfiguration().
             addPackageConfig("foo", new PackageConfig("foo", "/namespace", 
false, null));

Modified: 
struts/struts2/trunk/legacy/src/test/java/org/apache/struts2/legacy/StrutsFactoryTest.java
URL: 
http://svn.apache.org/viewvc/struts/struts2/trunk/legacy/src/test/java/org/apache/struts2/legacy/StrutsFactoryTest.java?view=diff&rev=449363&r1=449362&r2=449363
==============================================================================
--- 
struts/struts2/trunk/legacy/src/test/java/org/apache/struts2/legacy/StrutsFactoryTest.java
 (original)
+++ 
struts/struts2/trunk/legacy/src/test/java/org/apache/struts2/legacy/StrutsFactoryTest.java
 Sat Sep 23 22:50:01 2006
@@ -1,22 +1,26 @@
 package org.apache.struts2.legacy;
 
-import junit.framework.*;
-import com.opensymphony.xwork2.config.providers.XmlConfigurationProvider;
-import com.opensymphony.xwork2.config.ConfigurationManager;
+import java.lang.reflect.InvocationTargetException;
+
+import junit.framework.TestCase;
+
+import org.apache.struts.action.ActionErrors;
+import org.apache.struts.action.ActionForward;
+import org.apache.struts.action.ActionMapping;
+import org.apache.struts.action.ActionMessage;
+import org.apache.struts.config.ActionConfig;
+import org.apache.struts.config.ExceptionConfig;
+import org.apache.struts.config.ForwardConfig;
+import org.apache.struts.config.ModuleConfig;
+import org.apache.struts2.config.StrutsXmlConfigurationProvider;
+
+import com.opensymphony.xwork2.ActionSupport;
 import com.opensymphony.xwork2.config.Configuration;
+import com.opensymphony.xwork2.config.ConfigurationManager;
 import com.opensymphony.xwork2.config.ConfigurationProvider;
+import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
 import com.opensymphony.xwork2.config.entities.PackageConfig;
 import com.opensymphony.xwork2.config.entities.ResultConfig;
-import com.opensymphony.xwork2.config.entities.ExceptionMappingConfig;
-import com.opensymphony.xwork2.ActionSupport;
-import org.apache.struts.action.*;
-import org.apache.struts.config.*;
-import org.apache.struts2.config.StrutsXMLConfigurationProvider;
-
-import java.io.InputStream;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
 
 /**
  * Test of StrutsFactory, which creates Struts 1.x wrappers around XWork 
config objects.
@@ -42,7 +46,7 @@
      */
     public void setUp() {
         ConfigurationManager manager = new ConfigurationManager();
-        ConfigurationProvider provider = new 
StrutsXMLConfigurationProvider(PACKAGE_NAME + "/test-struts-factory.xml", true);
+        ConfigurationProvider provider = new 
StrutsXmlConfigurationProvider(PACKAGE_NAME + "/test-struts-factory.xml", true);
         manager.addConfigurationProvider(provider);
         config = manager.getConfiguration();
         factory = new StrutsFactory(config);


Reply via email to