Author: juanpablo
Date: Thu Jun  6 23:52:40 2013
New Revision: 1490477

URL: http://svn.apache.org/r1490477
Log:
 * removed some deprecated classes (related to JSPWIKI-303), targetted to be 
removed on 2.10. Specifically: 
  - o.a.w.FileUtil: in favour of o.a.w.util.FileUtil
  - o.a.w.TextUtil: in favour of o.a.w.util.TextUtil
  - o.a.w.filters.FilterManager: in favour of o.a.w.filters.DefaultFilterManager
  - o.a.w.plugin.PluginManager: in favour of o.a.w.plugin.DefaultPluginManager

Removed:
    
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/FileUtil.java
    
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/TextUtil.java
    
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/FilterManager.java
    
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/plugin/PluginManager.java
Modified:
    
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/DefaultFilterManager.java
    incubator/jspwiki/trunk/jspwiki-war/src/main/resources/ini/classmappings.xml
    
incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/RecentChangesPluginTest.java

Modified: 
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/DefaultFilterManager.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/DefaultFilterManager.java?rev=1490477&r1=1490476&r2=1490477&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/DefaultFilterManager.java
 (original)
+++ 
incubator/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/filters/DefaultFilterManager.java
 Thu Jun  6 23:52:40 2013
@@ -88,10 +88,8 @@ import org.jdom.xpath.XPath;
  *
  *  The <filter> -sections define the filters.  For more information, 
please see
  *  the PageFilterConfiguration page in the JSPWiki distribution.
- *  
- * FIXME: this class should be final in 2.10. It isn't right now because of 
compatibility reasons
  */
-public class DefaultFilterManager extends ModuleManager implements 
org.apache.wiki.api.engine.FilterManager
+public final class DefaultFilterManager extends ModuleManager implements 
org.apache.wiki.api.engine.FilterManager
 {
     private PriorityList<PageFilter> m_pageFilters = new 
PriorityList<PageFilter>();
 

Modified: 
incubator/jspwiki/trunk/jspwiki-war/src/main/resources/ini/classmappings.xml
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/main/resources/ini/classmappings.xml?rev=1490477&r1=1490476&r2=1490477&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/jspwiki-war/src/main/resources/ini/classmappings.xml 
(original)
+++ 
incubator/jspwiki/trunk/jspwiki-war/src/main/resources/ini/classmappings.xml 
Thu Jun  6 23:52:40 2013
@@ -89,8 +89,7 @@
   </mapping>
   <mapping>
     <requestedClass>org.apache.wiki.api.engine.FilterManager</requestedClass>
-    <mappedClass>org.apache.wiki.filters.FilterManager</mappedClass> <!-- to 
be replaced in 2.10 -->
-    <!-- 
<mappedClass>org.apache.wiki.filters.DefaultFilterManager</mappedClass> --> 
<!-- replacing the former in 2.10 -->
+    <mappedClass>org.apache.wiki.filters.DefaultFilterManager</mappedClass>
   </mapping>
   <mapping>
     
<requestedClass>org.apache.wiki.i18n.InternationalizationManager</requestedClass>
@@ -98,8 +97,7 @@
   </mapping>
   <mapping>
     <requestedClass>org.apache.wiki.api.engine.PluginManager</requestedClass>
-    <mappedClass>org.apache.wiki.plugin.PluginManager</mappedClass> <!-- to be 
replaced in 2.10 -->
-    <!-- 
<mappedClass>org.apache.wiki.plugin.DefaultPluginManager</mappedClass> --> <!-- 
replacing the former in 2.10 -->
+    <mappedClass>org.apache.wiki.plugin.DefaultPluginManager</mappedClass>
   </mapping>
   <mapping>
     <requestedClass>org.apache.wiki.render.RenderingManager</requestedClass>

Modified: 
incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/RecentChangesPluginTest.java
URL: 
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/RecentChangesPluginTest.java?rev=1490477&r1=1490476&r2=1490477&view=diff
==============================================================================
--- 
incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/RecentChangesPluginTest.java
 (original)
+++ 
incubator/jspwiki/trunk/jspwiki-war/src/test/java/org/apache/wiki/plugin/RecentChangesPluginTest.java
 Thu Jun  6 23:52:40 2013
@@ -15,114 +15,125 @@ software distributed under the License i
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.    
-*/
+ */
 
 package org.apache.wiki.plugin;
 
 import java.util.Properties;
 
-import org.apache.wiki.TestEngine;
-import org.apache.wiki.WikiContext;
-import org.apache.wiki.WikiPage;
-import org.apache.wiki.plugin.PluginManager;
-
 import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
+import org.apache.wiki.TestEngine;
+import org.apache.wiki.WikiContext;
+import org.apache.wiki.WikiPage;
+import org.apache.wiki.api.engine.PluginManager;
 
-public class RecentChangesPluginTest extends TestCase
-{
-Properties props = new Properties();
-
-TestEngine testEngine;
-
-WikiContext context;
-
-PluginManager manager;
-
-public void setUp() throws Exception
-{
-    props.load( TestEngine.findTestProperties() );
-
-    testEngine = new TestEngine( props );
-
-    testEngine.saveText( "TestPage01", "Some Text for testing 01" );
-    testEngine.saveText( "TestPage02", "Some Text for testing 02" );
-    testEngine.saveText( "TestPage03", "Some Text for testing 03" );
-
-    manager = new PluginManager( testEngine, props );
-}
-
-public void tearDown()
-{
-    testEngine.deleteTestPage( "TestPage01" );
-    testEngine.deleteTestPage( "TestPage02" );
-    testEngine.deleteTestPage( "TestPage03" );
-    
-    TestEngine.emptyWorkDir();
-}
-
-/**
- * Plain test without parameters
- * 
- * @throws Exception
- */
-public void testSimple() throws Exception
-{
-    context = new WikiContext( testEngine, new 
WikiPage(testEngine,"TestPage01") );
-
-    String res = manager.execute( context, "{INSERT 
org.apache.wiki.plugin.RecentChangesPlugin}" );
-
-    // we don't want to compare the complete html returned, but check if 
certain Strings are present and other 
-    // Strings are not present
-    assertTrue(res.contains( "<table cellpadding='4' class='recentchanges'>"));
-    assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>Test Page 
01</a>" ));
-    assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>Test Page 
02</a>" ));
-    assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>Test Page 
03</a>" ));
-
-}
-
-/**
- * Test with the include parameter
- * 
- * @throws Exception
- */
-public void testParmInClude() throws Exception
-{
-    context = new WikiContext( testEngine, new 
WikiPage(testEngine,"TestPage02") );
-
-    String res = manager.execute( context,
-                                  "{INSERT 
org.apache.wiki.plugin.RecentChangesPlugin include='TestPage02*'}" );
-    
-    assertTrue(res.contains( "<table cellpadding='4' class='recentchanges'>"));
-    assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>Test Page 
01</a>" ));
-    assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>Test Page 
02</a>" ));
-    assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>Test Page 
03</a>" ));
-
-}
+public class RecentChangesPluginTest extends TestCase {
+       Properties props = new Properties();
 
-/**
- * Test with the exclude parameter
- * 
- * @throws Exception
- */
-public void testParmExClude() throws Exception
-{
-    context = new WikiContext( testEngine, new 
WikiPage(testEngine,"TestPage03") );
-
-    String res = manager.execute( context,
-                                  "{INSERT 
org.apache.wiki.plugin.RecentChangesPlugin exclude='TestPage03*'}" );
-    
-    assertTrue(res.contains( "<table cellpadding='4' class='recentchanges'>"));
-    assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage01'>Test Page 
01</a>" ));
-    assertTrue(res.contains( "<a href='/Wiki.jsp?page=TestPage02'>Test Page 
02</a>" ));
-    assertFalse(res.contains( "<a href='/Wiki.jsp?page=TestPage03'>Test Page 
03</a>" ));
+       TestEngine testEngine;
 
-}
+       WikiContext context;
 
-public static Test suite()
-{
-    return new TestSuite( RecentChangesPluginTest.class );
-}
+       PluginManager manager;
+
+       public void setUp() throws Exception {
+               props.load(TestEngine.findTestProperties());
+
+               testEngine = new TestEngine(props);
+
+               testEngine.saveText("TestPage01", "Some Text for testing 01");
+               testEngine.saveText("TestPage02", "Some Text for testing 02");
+               testEngine.saveText("TestPage03", "Some Text for testing 03");
+
+               manager = new DefaultPluginManager(testEngine, props);
+       }
+
+       public void tearDown() {
+               testEngine.deleteTestPage("TestPage01");
+               testEngine.deleteTestPage("TestPage02");
+               testEngine.deleteTestPage("TestPage03");
+
+               TestEngine.emptyWorkDir();
+       }
+
+       /**
+        * Plain test without parameters
+        * 
+        * @throws Exception
+        */
+       public void testSimple() throws Exception {
+               context = new WikiContext(testEngine, new WikiPage(testEngine,
+                               "TestPage01"));
+
+               String res = manager.execute(context,
+                               "{INSERT 
org.apache.wiki.plugin.RecentChangesPlugin}");
+
+               // we don't want to compare the complete html returned, but 
check if
+               // certain Strings are present and other
+               // Strings are not present
+               assertTrue(res
+                               .contains("<table cellpadding='4' 
class='recentchanges'>"));
+               assertTrue(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage01'>Test Page 01</a>"));
+               assertTrue(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage02'>Test Page 02</a>"));
+               assertTrue(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage03'>Test Page 03</a>"));
+
+       }
+
+       /**
+        * Test with the include parameter
+        * 
+        * @throws Exception
+        */
+       public void testParmInClude() throws Exception {
+               context = new WikiContext(testEngine, new WikiPage(testEngine,
+                               "TestPage02"));
+
+               String res = manager
+                               .execute(context,
+                                               "{INSERT 
org.apache.wiki.plugin.RecentChangesPlugin include='TestPage02*'}");
+
+               assertTrue(res
+                               .contains("<table cellpadding='4' 
class='recentchanges'>"));
+               assertFalse(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage01'>Test Page 01</a>"));
+               assertTrue(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage02'>Test Page 02</a>"));
+               assertFalse(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage03'>Test Page 03</a>"));
+
+       }
+
+       /**
+        * Test with the exclude parameter
+        * 
+        * @throws Exception
+        */
+       public void testParmExClude() throws Exception {
+               context = new WikiContext(testEngine, new WikiPage(testEngine,
+                               "TestPage03"));
+
+               String res = manager
+                               .execute(context,
+                                               "{INSERT 
org.apache.wiki.plugin.RecentChangesPlugin exclude='TestPage03*'}");
+
+               assertTrue(res
+                               .contains("<table cellpadding='4' 
class='recentchanges'>"));
+               assertTrue(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage01'>Test Page 01</a>"));
+               assertTrue(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage02'>Test Page 02</a>"));
+               assertFalse(res
+                               .contains("<a 
href='/Wiki.jsp?page=TestPage03'>Test Page 03</a>"));
+
+       }
+
+       public static Test suite() {
+               return new TestSuite(RecentChangesPluginTest.class);
+       }
 }


Reply via email to