Author: ajaquith
Date: Sat Mar 6 19:12:20 2010
New Revision: 919817
URL: http://svn.apache.org/viewvc?rev=919817&view=rev
Log:
Removed WikiServlet. All of its functionality had been previously moved
elsewhere, and it was not being used in web.xml either. Also removed
SpamFilter; the content-inspection package essentially replaces it (and is far
more flexible).
Removed:
incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiServlet.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/filters/SpamFilter.java
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/SpamProtectTag.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/ShortUrlFilter.java
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/SpamProtect.java
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/IsOneOfTest.java
Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java?rev=919817&r1=919816&r2=919817&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/WikiEngine.java Sat Mar 6
19:12:20 2010
@@ -1558,7 +1558,6 @@
/**
* Protected method that signals that the WikiEngine will be
* shut down by the servlet container. It is called by
- * {...@link WikiServlet#destroy()} and
* {...@link
SessionMonitor#contextDestroyed(javax.servlet.ServletContextEvent)}.
* When this method is called, it fires a "shutdown"
* WikiEngineEvent to all registered listeners.
@@ -1704,7 +1703,7 @@
* @throws WikiException if the save operation encounters an error during
the
* save operation. If the page-save operation requires approval, the
exception will
* be of type {...@link
org.apache.wiki.workflow.DecisionRequiredException}. Individual
- * PageFilters, such as the {...@link org.apache.wiki.filters.SpamFilter}
may also
+ * PageFilters, such as the {...@link
org.apache.wiki.filters.CreoleFilter} may also
* throw a {...@link org.apache.wiki.filters.RedirectException}.
* @throws PageNotFoundException
*/
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/SpamProtectTag.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/SpamProtectTag.java?rev=919817&r1=919816&r2=919817&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/SpamProtectTag.java
(original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/tags/SpamProtectTag.java
Sat Mar 6 19:12:20 2010
@@ -37,13 +37,12 @@
import org.apache.wiki.WikiEngine;
import org.apache.wiki.api.WikiException;
import org.apache.wiki.content.inspect.*;
-import org.apache.wiki.filters.SpamFilter;
import org.apache.wiki.ui.stripes.SpamInterceptor;
import org.apache.wiki.ui.stripes.WikiActionBeanContext;
/**
* <p>
- * Tag that injects hidden {...@link SpamFilter}-related parameters into the
+ * Tag that injects hidden spam filtering parameters into the
* current form, which will be parsed and verified by {...@link
SpamInterceptor}
* whenever the input is processed by an ActionBean event handler method
* annotated with the {...@link org.apache.wiki.ui.stripes.SpamProtect}
annotation.
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/ShortUrlFilter.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/ShortUrlFilter.java?rev=919817&r1=919816&r2=919817&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/ShortUrlFilter.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/ShortUrlFilter.java
Sat Mar 6 19:12:20 2010
@@ -32,7 +32,6 @@
import org.apache.wiki.WikiContext;
import org.apache.wiki.WikiEngine;
import org.apache.wiki.action.ViewActionBean;
-import org.apache.wiki.url.ShortURLConstructor;
import org.apache.wiki.util.TextUtil;
/**
@@ -61,6 +60,15 @@
private boolean m_initialized = false;
/**
+ * This corresponds to your WikiServlet path. By default, it is assumed
to
+ * be "wiki/", but you can set it to whatever you like - including an
empty
+ * name.
+ */
+ public static final String PROP_PREFIX =
"jspwiki.shortURLConstructor.prefix";
+
+ private static final String DEFAULT_PREFIX = "wiki/";
+
+ /**
* {...@inheritdoc}
*/
public void destroy()
@@ -72,7 +80,7 @@
* Examines the URI of the incoming request and redirects the user if it
* matches the prefix of a "short URL." The short URL prefix is set in
* <code>jspwiki.properties</code> via key
- * {...@link ShortURLConstructor#PROP_PREFIX}. The default is
+ * {...@link ShortUrlFilter#PROP_PREFIX}. The default is
* <code>/wiki/</code>, relative to the webapp context. If the URL
* consists only of <code>/wiki</code> or <code>/wiki/</code>, the user
* is redirected to {...@link ViewActionBean} and its hander event
@@ -148,7 +156,7 @@
m_engine = engine;
Properties props = engine.getWikiProperties();
- m_urlPrefix = TextUtil.getStringProperty( props,
ShortURLConstructor.PROP_PREFIX, null );
+ m_urlPrefix = TextUtil.getStringProperty( props,
ShortUrlFilter.PROP_PREFIX, DEFAULT_PREFIX );
if( m_urlPrefix == null )
{
m_urlPrefix = "wiki/";
Modified:
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/SpamProtect.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/SpamProtect.java?rev=919817&r1=919816&r2=919817&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/SpamProtect.java
(original)
+++
incubator/jspwiki/trunk/src/java/org/apache/wiki/ui/stripes/SpamProtect.java
Sat Mar 6 19:12:20 2010
@@ -22,11 +22,9 @@
import java.lang.annotation.*;
-import org.apache.wiki.filters.SpamFilter;
-
/**
* Annotation indicating that an event handler method should check that the
user
- * has submitted a series of expected {...@link SpamFilter}-related parameters
+ * has submitted a series of expected spam-filtering parameters
* with the POST or GET. The SpamProtect annotation can be applied to
* method targets. When annotating Stripes event handler
* method, the {...@link SpamInterceptor} will apply spam filtering heuristics
to
Modified:
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/IsOneOfTest.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/IsOneOfTest.java?rev=919817&r1=919816&r2=919817&view=diff
==============================================================================
---
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/IsOneOfTest.java
(original)
+++
incubator/jspwiki/trunk/tests/java/org/apache/wiki/ui/stripes/IsOneOfTest.java
Sat Mar 6 19:12:20 2010
@@ -39,7 +39,7 @@
ResolverUtil.Test test = new IsOneOf( WikiActionBean.class,
PageFilter.class, WikiPlugin.class );
resolver.find( test, "org.apache.wiki" );
Set<Class<? extends Object>> matches = resolver.getClasses();
- assertEquals( 74, matches.size() );
+ assertEquals( 73, matches.size() );
}
public void testActionBeanMatches()
@@ -57,7 +57,7 @@
ResolverUtil.Test test = new IsOneOf( PageFilter.class );
resolver.find( test, "org.apache.wiki.filters" );
Set<Class<? extends Object>> matches = resolver.getClasses();
- assertEquals( 7, matches.size() );
+ assertEquals( 6, matches.size() );
}
public void testWikiPluginMatches()