jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r660295 - in /incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin: AbstractReferralPlugin.java CurrentTimePlugin.java Denounce.java Groups.java PluginException.java
Date Mon, 26 May 2008 20:16:04 GMT
Author: jalkanen
Date: Mon May 26 13:16:00 2008
New Revision: 660295

URL: http://svn.apache.org/viewvc?rev=660295&view=rev
Log:
Javadoc, Java5, checkstyle, and comment fixes.

Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/CurrentTimePlugin.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Denounce.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Groups.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginException.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java?rev=660295&r1=660294&r2=660295&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/AbstractReferralPlugin.java Mon May
26 13:16:00 2008
@@ -56,17 +56,37 @@
 {
     private static Logger log = Logger.getLogger( AbstractReferralPlugin.class );
 
+    /** Magic value for rendering all items. */
     public static final int    ALL_ITEMS              = -1;
+    
+    /** Parameter name for setting the maximum width.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_MAXWIDTH         = "maxwidth";
+
+    /** Parameter name for the separator string.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_SEPARATOR        = "separator";
+    
+    /** Parameter name for the output after the link.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_AFTER            = "after";
+    
+    /** Parameter name for the output before the link.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_BEFORE           = "before";
 
+    /** Parameter name for setting the list of excluded patterns.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_EXCLUDE          = "exclude";
+    
+    /** Parameter name for setting the list of included patterns.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_INCLUDE          = "include";
+    
+    /** Parameter name for the show parameter.  Value is <tt>{@value}</tt>. */
     public static final String PARAM_SHOW             = "show";
+    
+    /** Parameter name for setting show to "pages".  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_SHOW_VALUE_PAGES = "pages";
+    
+    /** Parameter name for setting show to "count".  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_SHOW_VALUE_COUNT = "count";
+    
+    /** Parameter name for showing the last modification count.  Value is <tt>{@value}</tt>.
*/
     public static final String PARAM_LASTMODIFIED     = "showLastModified";
 
     protected           int      m_maxwidth = Integer.MAX_VALUE;
@@ -86,13 +106,10 @@
     protected           WikiEngine m_engine;
 
     /**
-     *  Used to initialize some things.  All subclasses must call this first.
-     *
-     *  @since 1.6.4
+     *  {@inheritDoc}
      */
 
     // FIXME: The compiled pattern strings should really be cached somehow.
-
     public void initialize( WikiContext context, Map params )
         throws PluginException
     {
@@ -202,10 +219,15 @@
         }
     }
     
-
+    /**
+     *  Filters a collection according to the include and exclude -parameters.
+     *  
+     *  @param c The collection to filter.
+     *  @return A filtered collection.
+     */
     protected Collection filterCollection( Collection c )
     {
-        ArrayList result = new ArrayList();
+        ArrayList<String> result = new ArrayList<String>();
 
         PatternMatcher pm = new Perl5Matcher();
 
@@ -280,6 +302,7 @@
      *  @param links Collection to make into WikiText.
      *  @param separator Separator string to use.
      *  @param numItems How many items to show.
+     *  @return The WikiText
      */
     protected String wikitizeCollection( Collection links, String separator, int numItems
)
     {
@@ -322,6 +345,9 @@
     /**
      *  Makes HTML with common parameters.
      *
+     *  @param context The WikiContext
+     *  @param wikitext The wikitext to render
+     *  @return HTML
      *  @since 1.6.4
      */
     protected String makeHTML( WikiContext context, String wikitext )

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/CurrentTimePlugin.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/CurrentTimePlugin.java?rev=660295&r1=660294&r2=660295&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/CurrentTimePlugin.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/CurrentTimePlugin.java Mon May 26
13:16:00 2008
@@ -41,6 +41,9 @@
 {
     // private static Logger log = Logger.getLogger( CurrentTimePlugin.class );
 
+    /**
+     *  {@inheritDoc}
+     */
     public String execute( WikiContext context, Map params )
         throws PluginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Denounce.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Denounce.java?rev=660295&r1=660294&r2=660295&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Denounce.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Denounce.java Mon May 26 13:16:00
2008
@@ -119,6 +119,9 @@
         }
     }
 
+    /**
+     *  {@inheritDoc}
+     */
     public String execute( WikiContext context, Map params )
         throws PluginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Groups.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Groups.java?rev=660295&r1=660294&r2=660295&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Groups.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Groups.java Mon May 26 13:16:00 2008
@@ -40,8 +40,11 @@
 public class Groups
     implements WikiPlugin
 {
-    private static final Comparator COMPARATOR = new PrincipalComparator();
+    private static final Comparator<Principal> COMPARATOR = new PrincipalComparator();
     
+    /**
+     *  {@inheritDoc}
+     */
     public String execute( WikiContext context, Map params )
         throws PluginException
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginException.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginException.java?rev=660295&r1=660294&r2=660295&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginException.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/PluginException.java Mon May 26 13:16:00
2008
@@ -22,6 +22,10 @@
 
 import com.ecyrd.jspwiki.WikiException;
 
+/**
+ *  Provides a generic PluginException.  This is the kind of
+ *  an exception that the plugins should throw.
+ */
 public class PluginException
     extends WikiException
 {
@@ -29,18 +33,34 @@
 
     private final Throwable m_throwable;
 
+    /**
+     *  Create a PluginException.
+     *  
+     *  @param message {@inheritDoc}
+     */
     public PluginException( String message )
     {
         super( message );
         m_throwable = null;
     }
 
+    /**
+     *  Create a PluginException with the given original exception wrapped.
+     *  
+     *  @param message {@inheritDoc}
+     *  @param original The original exception.
+     */
     public PluginException( String message, Throwable original )
     {
         super( message );
         m_throwable = original;
     }
 
+    /**
+     *  Return the original exception.
+     *  
+     *  @return The original exception.
+     */
     public Throwable getRootThrowable()
     {
         return m_throwable;



Mime
View raw message