jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1426054 - in /incubator/jspwiki/trunk: etc/ini/ src/org/apache/wiki/ src/org/apache/wiki/attachment/ src/org/apache/wiki/auth/ src/org/apache/wiki/event/ src/org/apache/wiki/parser/ src/org/apache/wiki/plugin/ src/org/apache/wiki/search/
Date Wed, 26 Dec 2012 22:19:07 GMT
Author: juanpablo
Date: Wed Dec 26 22:19:07 2012
New Revision: 1426054

URL: http://svn.apache.org/viewvc?rev=1426054&view=rev
Log:
adapted to use new Filter API

Modified:
    incubator/jspwiki/trunk/etc/ini/classmappings.xml
    incubator/jspwiki/trunk/src/org/apache/wiki/PageManager.java
    incubator/jspwiki/trunk/src/org/apache/wiki/ReferenceManager.java
    incubator/jspwiki/trunk/src/org/apache/wiki/VariableManager.java
    incubator/jspwiki/trunk/src/org/apache/wiki/attachment/AttachmentServlet.java
    incubator/jspwiki/trunk/src/org/apache/wiki/auth/UserManager.java
    incubator/jspwiki/trunk/src/org/apache/wiki/event/PageEventFilter.java
    incubator/jspwiki/trunk/src/org/apache/wiki/event/WikiPageEvent.java
    incubator/jspwiki/trunk/src/org/apache/wiki/parser/JSPWikiMarkupParser.java
    incubator/jspwiki/trunk/src/org/apache/wiki/plugin/BugReportHandler.java
    incubator/jspwiki/trunk/src/org/apache/wiki/search/SearchManager.java

Modified: incubator/jspwiki/trunk/etc/ini/classmappings.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/ini/classmappings.xml?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/ini/classmappings.xml (original)
+++ incubator/jspwiki/trunk/etc/ini/classmappings.xml Wed Dec 26 22:19:07 2012
@@ -88,8 +88,9 @@
     <mappedClass>org.apache.wiki.diff.DifferenceManager</mappedClass>
   </mapping>
   <mapping>
-    <requestedClass>org.apache.wiki.filters.FilterManager</requestedClass>
-    <mappedClass>org.apache.wiki.filters.FilterManager</mappedClass>
+    <requestedClass>org.apache.wiki.api.filters.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 -->
   </mapping>
   <mapping>
     <requestedClass>org.apache.wiki.i18n.InternationalizationManager</requestedClass>

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/PageManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/PageManager.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/PageManager.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/PageManager.java Wed Dec 26 22:19:07 2012
@@ -33,7 +33,7 @@ import org.apache.wiki.auth.acl.AclEntry
 import org.apache.wiki.auth.acl.AclEntryImpl;
 import org.apache.wiki.auth.user.UserProfile;
 import org.apache.wiki.event.*;
-import org.apache.wiki.filters.FilterException;
+import org.apache.wiki.api.exceptions.FilterException;
 import org.apache.wiki.modules.ModuleManager;
 import org.apache.wiki.providers.CachingProvider;
 import org.apache.wiki.providers.ProviderException;

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/ReferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/ReferenceManager.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/ReferenceManager.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/ReferenceManager.java Wed Dec 26 22:19:07
2012
@@ -31,7 +31,7 @@ import org.apache.wiki.event.WikiEvent;
 import org.apache.wiki.event.WikiEventListener;
 import org.apache.wiki.event.WikiEventUtils;
 import org.apache.wiki.event.WikiPageEvent;
-import org.apache.wiki.filters.BasicPageFilter;
+import org.apache.wiki.api.filters.BasicPageFilter;
 import org.apache.wiki.modules.InternalModule;
 import org.apache.wiki.providers.ProviderException;
 import org.apache.wiki.providers.WikiPageProvider;

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/VariableManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/VariableManager.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/VariableManager.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/VariableManager.java Wed Dec 26 22:19:07 2012
@@ -27,7 +27,7 @@ import javax.servlet.http.HttpSession;
 
 import org.apache.log4j.Logger;
 
-import org.apache.wiki.filters.PageFilter;
+import org.apache.wiki.api.filters.PageFilter;
 import org.apache.wiki.i18n.InternationalizationManager;
 import org.apache.wiki.modules.InternalModule;
 
@@ -495,12 +495,11 @@ public class VariableManager
 
         public String getPagefilters()
         {
-            List filters = m_context.getEngine().getFilterManager().getFilterList();
+            List<PageFilter> filters = m_context.getEngine().getFilterManager().getFilterList();
             StringBuffer sb = new StringBuffer();
 
-            for (Iterator i = filters.iterator(); i.hasNext();)
+            for (PageFilter pf : filters )
             {
-                PageFilter pf = (PageFilter) i.next();
                 String f = pf.getClass().getName();
 
                 if( pf instanceof InternalModule )

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/attachment/AttachmentServlet.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/attachment/AttachmentServlet.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/attachment/AttachmentServlet.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/attachment/AttachmentServlet.java Wed Dec
26 22:19:07 2012
@@ -41,8 +41,8 @@ import org.apache.commons.fileupload.Pro
 import org.apache.commons.fileupload.disk.DiskFileItemFactory;
 import org.apache.commons.fileupload.servlet.ServletFileUpload;
 import org.apache.log4j.Logger;
-
 import org.apache.wiki.*;
+import org.apache.wiki.api.exceptions.RedirectException;
 import org.apache.wiki.auth.AuthorizationManager;
 import org.apache.wiki.auth.permissions.PermissionFactory;
 import org.apache.wiki.dav.AttachmentDavProvider;
@@ -51,7 +51,6 @@ import org.apache.wiki.dav.DavProvider;
 import org.apache.wiki.dav.WebdavServlet;
 import org.apache.wiki.dav.methods.DavMethod;
 import org.apache.wiki.dav.methods.PropFindMethod;
-import org.apache.wiki.filters.RedirectException;
 import org.apache.wiki.i18n.InternationalizationManager;
 import org.apache.wiki.providers.ProviderException;
 import org.apache.wiki.ui.progress.ProgressItem;

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/auth/UserManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/auth/UserManager.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/auth/UserManager.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/auth/UserManager.java Wed Dec 26 22:19:07
2012
@@ -40,7 +40,7 @@ import org.apache.wiki.auth.user.UserPro
 import org.apache.wiki.event.WikiEventListener;
 import org.apache.wiki.event.WikiEventManager;
 import org.apache.wiki.event.WikiSecurityEvent;
-import org.apache.wiki.filters.PageFilter;
+import org.apache.wiki.api.filters.PageFilter;
 import org.apache.wiki.filters.SpamFilter;
 import org.apache.wiki.i18n.InternationalizationManager;
 import org.apache.wiki.rpc.RPCCallable;
@@ -469,7 +469,6 @@ public final class UserManager
      * @param context the current wiki context
      * @param profile the supplied UserProfile
      */
-    @SuppressWarnings("unchecked")
     public final void validateProfile( WikiContext context, UserProfile profile )
     {
         boolean isNew = profile.isNew();
@@ -480,7 +479,6 @@ public final class UserManager
         //
         //  Query the SpamFilter first
         //
-        
         List<PageFilter> ls = m_engine.getFilterManager().getFilterList();
         for( PageFilter pf : ls )
         {

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/event/PageEventFilter.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/event/PageEventFilter.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/event/PageEventFilter.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/event/PageEventFilter.java Wed Dec 26 22:19:07
2012
@@ -19,8 +19,8 @@
 
 package org.apache.wiki.event;
 
-import org.apache.wiki.filters.BasicPageFilter;
-import org.apache.wiki.filters.FilterException;
+import org.apache.wiki.api.filters.BasicPageFilter;
+import org.apache.wiki.api.exceptions.FilterException;
 
 import org.apache.wiki.WikiContext;
 import java.util.Properties;

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/event/WikiPageEvent.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/event/WikiPageEvent.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/event/WikiPageEvent.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/event/WikiPageEvent.java Wed Dec 26 22:19:07
2012
@@ -68,7 +68,7 @@ package org.apache.wiki.event;
   * Other WikiPageEvents include both <i>phase boundary</i> and <i>in-phase</i>
   * events for saving, pre- and post-translating content. These are very noisy 
   * event types, but are not fired unless a listener is available. They are
-  * generated by the {@link org.apache.wiki.filters.FilterManager}, 
+  * generated by the {@link org.apache.wiki.filters.DefaultFilterManager}, 
   * {@link org.apache.wiki.event.PageEventFilter}, and potentially other 
   * implementing classes.
   * </p>
@@ -104,7 +104,7 @@ public class WikiPageEvent extends WikiE
     // PRE_TRANSLATE .........
 
     /** Indicates the beginning of all wiki pre-translate page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int PRE_TRANSLATE_BEGIN  = 12;
 
     /** Indicates a wiki pre-translate page event. This is based on events
@@ -112,13 +112,13 @@ public class WikiPageEvent extends WikiE
     public static final int PRE_TRANSLATE        = 13;
 
     /** Indicates the end of all wiki pre-translate page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int PRE_TRANSLATE_END    = 14;
 
     // POST_TRANSLATE ........
 
     /** Indicates the beginning of all wiki post-translate page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int POST_TRANSLATE_BEGIN = 15;
 
     /** Indicates a wiki post-translate page event. This is based on events
@@ -126,13 +126,13 @@ public class WikiPageEvent extends WikiE
     public static final int POST_TRANSLATE       = 16;
 
     /** Indicates the end of all wiki post-translate page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int POST_TRANSLATE_END   = 17;
 
     // PRE_SAVE ..............
 
     /** Indicates the beginning of all wiki pre-save page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int PRE_SAVE_BEGIN       = 18;
 
     /** Indicates a wiki pre-save page event. This is based on events
@@ -140,13 +140,13 @@ public class WikiPageEvent extends WikiE
     public static final int PRE_SAVE             = 19;
 
     /** Indicates the end of all wiki pre-save page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int PRE_SAVE_END         = 20;
 
     // POST_SAVE .............
 
     /** Indicates the beginning of all wiki post-save page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int POST_SAVE_BEGIN      = 21;
 
     /** Indicates a wiki post-save page event. This is based on events
@@ -154,7 +154,7 @@ public class WikiPageEvent extends WikiE
     public static final int POST_SAVE            = 22;
 
     /** Indicates the end of all wiki post-save page events. This is based
-      * on events generated by {@link org.apache.wiki.filters.FilterManager}. */
+      * on events generated by {@link org.apache.wiki.filters.DefaultFilterManager}. */
     public static final int POST_SAVE_END        = 23;
 
     // PAGE REQUESTS .........

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/parser/JSPWikiMarkupParser.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/parser/JSPWikiMarkupParser.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/parser/JSPWikiMarkupParser.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/parser/JSPWikiMarkupParser.java Wed Dec 26
22:19:07 2012
@@ -32,6 +32,7 @@ import org.apache.log4j.Logger;
 import org.apache.oro.text.GlobCompiler;
 import org.apache.oro.text.regex.*;
 import org.apache.wiki.*;
+import org.apache.wiki.api.PluginManager;
 import org.apache.wiki.api.WikiPlugin;
 import org.apache.wiki.api.exceptions.PluginException;
 import org.apache.wiki.attachment.Attachment;
@@ -1473,9 +1474,8 @@ public class JSPWikiMarkupParser
         {
             try
             {
-                PluginContent pluginContent = m_engine.getPluginManager().parsePluginLine(
m_context,
-                                                                                        
  linktext,
-                                                                                        
  pos );
+                PluginManager pm = m_engine.getPluginManager();
+                PluginContent pluginContent = pm.parsePluginLine( m_context, linktext, pos
);
                 //
                 //  This might sometimes fail, especially if there is something which looks
                 //  like a plugin invocation but is really not.

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/plugin/BugReportHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/plugin/BugReportHandler.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/plugin/BugReportHandler.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/plugin/BugReportHandler.java Wed Dec 26 22:19:07
2012
@@ -33,7 +33,7 @@ import org.apache.wiki.WikiException;
 import org.apache.wiki.WikiPage;
 import org.apache.wiki.api.WikiPlugin;
 import org.apache.wiki.api.exceptions.PluginException;
-import org.apache.wiki.filters.RedirectException;
+import org.apache.wiki.api.exceptions.RedirectException;
 import org.apache.wiki.parser.MarkupParser;
 
 /**

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/search/SearchManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/search/SearchManager.java?rev=1426054&r1=1426053&r2=1426054&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/search/SearchManager.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/search/SearchManager.java Wed Dec 26 22:19:07
2012
@@ -23,14 +23,13 @@ import java.util.*;
 
 import org.apache.commons.lang.time.StopWatch;
 import org.apache.log4j.Logger;
-
 import org.apache.wiki.*;
+import org.apache.wiki.api.exceptions.FilterException;
+import org.apache.wiki.api.filters.BasicPageFilter;
 import org.apache.wiki.event.WikiEvent;
 import org.apache.wiki.event.WikiEventListener;
 import org.apache.wiki.event.WikiEventUtils;
 import org.apache.wiki.event.WikiPageEvent;
-import org.apache.wiki.filters.BasicPageFilter;
-import org.apache.wiki.filters.FilterException;
 import org.apache.wiki.modules.InternalModule;
 import org.apache.wiki.parser.MarkupParser;
 import org.apache.wiki.providers.ProviderException;



Mime
View raw message