Author: jalkanen
Date: Sat May 31 14:52:23 2008
New Revision: 662093
URL: http://svn.apache.org/viewvc?rev=662093&view=rev
Log:
Javadoc fixes.
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/IfPlugin.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/InitializablePlugin.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ListLocksPlugin.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Note.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ReferringPagesPlugin.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Search.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/SessionsPlugin.java
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/TableOfContents.java
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/IfPlugin.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/IfPlugin.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/IfPlugin.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/IfPlugin.java Sat May
31 14:52:23 2008
@@ -104,13 +104,28 @@
*/
public class IfPlugin implements WikiPlugin
{
+ /** The parameter name for setting the group to check. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_GROUP = "group";
+
+ /** The parameter name for setting the user id to check. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_USER = "user";
+
+ /** The parameter name for setting the ip address to check. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_IP = "ip";
+
+ /** The parameter name for setting the page name to check. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_PAGE = "page";
+
+ /** The parameter name for setting the contents of the page to check.
Value is <tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_CONTAINS = "contains";
+
+ /** The parameter name for setting the variable name to check. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_VAR = "var";
+
+ /** The parameter name for setting the exact content to check. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_IS = "is";
+
+ /** The parameter name for checking whether a page/var exists. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_EXISTS = "exists";
/**
@@ -133,6 +148,8 @@
*
* @param context The current WikiContext.
* @param params The parameter Map which contains key-value pairs.
+ * @throws PluginException If something goes wrong
+ * @return True, if the condition holds.
*/
public static boolean ifInclude( WikiContext context, Map params ) throws
PluginException
{
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/InitializablePlugin.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/InitializablePlugin.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/InitializablePlugin.java
(original)
+++
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/InitializablePlugin.java
Sat May 31 14:52:23 2008
@@ -40,6 +40,9 @@
/**
* Called whenever the plugin is being instantiated for
* the first time.
+ *
+ * @param engine The WikiEngine.
+ * @throws PluginException If something goes wrong.
*/
public void initialize( WikiEngine engine )
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ListLocksPlugin.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ListLocksPlugin.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ListLocksPlugin.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ListLocksPlugin.java
Sat May 31 14:52:23 2008
@@ -32,6 +32,9 @@
public class ListLocksPlugin
implements WikiPlugin
{
+ /**
+ * [EMAIL PROTECTED]
+ */
public String execute( WikiContext context, Map params )
throws PluginException
{
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Note.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Note.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Note.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Note.java Sat May 31
14:52:23 2008
@@ -44,9 +44,19 @@
*/
public class Note implements WikiPlugin
{
+ /**
+ * Property name for setting the image for the note. Value is <tt>[EMAIL
PROTECTED]</tt>.
+ */
public static final String PROP_NOTE_IMAGE = "notePlugin.imageName";
+
+ /**
+ * The default name for the note. Value is <tt>[EMAIL PROTECTED]</tt>.
+ */
public static final String DEFAULT_NOTE_IMAGE = "note.png";
+ /**
+ * [EMAIL PROTECTED]
+ */
public String execute(WikiContext context, Map params) throws
PluginException
{
String commandline = (String) params.get(PluginManager.PARAM_CMDLINE);
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ReferringPagesPlugin.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ReferringPagesPlugin.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ReferringPagesPlugin.java
(original)
+++
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/ReferringPagesPlugin.java
Sat May 31 14:52:23 2008
@@ -29,22 +29,36 @@
/**
* Displays the pages referring to the current page.
*
- * Parameters: <BR>
- * max: How many items to show.<BR>
- * extras: How to announce extras.<BR>
- * From AbstractReferralPlugin:<BR>
- * separator: How to separate generated links; default is a wikitext line
break,
- * producing a vertical list.<BR>
- * maxwidth: maximum width, in chars, of generated links.
- *
+ * Parameters:
+ * <ul>
+ * <li><b>max</b> - How many items to show.</li>
+ * <li><b>extras</b> - How to announce extras.</li>
+ * <li><b>page</b> - Which page to get the table of contents from.</li>
+ * </ul>
+ *
+ * From AbstractReferralPlugin:
+ * <ul>
+ * <li><b>separator</b> - How to separate generated links; default is a
wikitext line break,
+ * producing a vertical list.</li>
+ * <li><b>maxwidth</b> - maximum width, in chars, of generated links.</li>
+ * </ul>
*/
public class ReferringPagesPlugin
extends AbstractReferralPlugin
{
private static Logger log = Logger.getLogger( ReferringPagesPlugin.class );
+ /** Parameter name for setting the maximum items to show. Value is
<tt>[EMAIL PROTECTED]</tt>. */
public static final String PARAM_MAX = "max";
+
+ /** Parameter name for setting the text to show when the maximum items is
overruled.
+ * Value is <tt>[EMAIL PROTECTED]</tt>.
+ */
public static final String PARAM_EXTRAS = "extras";
+
+ /**
+ * Parameter name for choosing the page. Value is <tt>[EMAIL
PROTECTED]</tt>.
+ */
public static final String PARAM_PAGE = "page";
/**
Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Search.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Search.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Search.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/Search.java Sat May 31
14:52:23 2008
@@ -41,13 +41,24 @@
{
static Logger log = Logger.getLogger(Search.class);
+ /** Parameter name for setting the query string. Value is <tt>[EMAIL
PROTECTED]</tt>. */
public static final String PARAM_QUERY = "query";
+
+ /** Parameter name for setting the name of the set where the results are
stored.
+ * Value is <tt>[EMAIL PROTECTED]</tt>.
+ */
public static final String PARAM_SET = "set";
+
+ /** The default name of the result set. */
public static final String DEFAULT_SETNAME = "_defaultSet";
+
+ /** The parameter name for setting the how many results will be fetched.
+ * Value is <tt>[EMAIL PROTECTED]</tt>.
+ */
public static final String PARAM_MAX = "max";
- /* (non-Javadoc)
- * @see
com.ecyrd.jspwiki.plugin.WikiPlugin#execute(com.ecyrd.jspwiki.WikiContext,
java.util.Map)
+ /**
+ * [EMAIL PROTECTED]
*/
public String execute( WikiContext context, Map params ) throws
PluginException
{
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/SessionsPlugin.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/SessionsPlugin.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/SessionsPlugin.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/SessionsPlugin.java
Sat May 31 14:52:23 2008
@@ -47,8 +47,12 @@
public class SessionsPlugin
implements WikiPlugin
{
+ /** The parameter name for setting the property value. */
public static final String PARAM_PROP = "property";
+ /**
+ * [EMAIL PROTECTED]
+ */
public String execute( WikiContext context, Map params )
throws PluginException
{
@@ -75,7 +79,7 @@
Principal[] principals = WikiSession.userPrincipals(engine);
// we do not assume that the principals are sorted, so first count
// them :
- HashMap distinctPrincipals = new HashMap();
+ HashMap<String,Integer> distinctPrincipals = new
HashMap<String,Integer>();
for (int i = 0; i < principals.length; i++)
{
String principalName = principals[i].getName();
@@ -83,7 +87,7 @@
if (distinctPrincipals.containsKey(principalName))
{
// we already have an entry, increase the counter:
- int numSessions = ((Integer)
distinctPrincipals.get(principalName)).intValue();
+ int numSessions =
distinctPrincipals.get(principalName).intValue();
// store the new value:
distinctPrincipals.put(principalName, new
Integer(++numSessions));
}
@@ -101,7 +105,7 @@
while (entries.hasNext())
{
Map.Entry entry = (Map.Entry)entries.next();
- s.append((entry.getKey().toString() + "(" +
entry.getValue().toString() + "), "));
+ s.append( entry.getKey().toString() + "(" +
entry.getValue().toString() + "), " );
}
// remove the last comma and blank :
return s.substring(0, s.length() - 2);
Modified:
incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/TableOfContents.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/TableOfContents.java?rev=662093&r1=662092&r2=662093&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/TableOfContents.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/plugin/TableOfContents.java
Sat May 31 14:52:23 2008
@@ -31,7 +31,13 @@
import java.io.IOException;
/**
- * Provides a table of contents.
+ * Provides a table of contents. Possible parameters are:
+ * <ul>
+ * <li><b>title</b> - The title of the table of contents.</li>
+ * <li><b>numbered</b> - if true, generates automatically numbers for the
headings.</li>
+ * <li><b>start</b> - If using a numbered list, sets the start number.</li>
+ * <li><b>prefix</b> - If using a numbered list, sets the prefix used for the
list.</li>
+ * </ul>
*
* @since 2.2
*/
@@ -40,9 +46,16 @@
{
private static Logger log = Logger.getLogger( TableOfContents.class );
+ /** Parameter name for setting the title. */
public static final String PARAM_TITLE = "title";
+
+ /** Parameter name for setting whether the headings should be numbered. */
public static final String PARAM_NUMBERED = "numbered";
+
+ /** Parameter name for setting where the numbering should start. */
public static final String PARAM_START = "start";
+
+ /** Parameter name for setting what the prefix for the heading is. */
public static final String PARAM_PREFIX = "prefix";
private static final String VAR_ALREADY_PROCESSING =
"__TableOfContents.processing";
@@ -56,6 +69,9 @@
private int m_level3Index = 0;
private int m_lastLevel = 0;
+ /**
+ * [EMAIL PROTECTED]
+ */
public void headingAdded( WikiContext context, Heading hd )
{
log.debug("HD: "+hd.m_level+", "+hd.m_titleText+", "+hd.m_titleAnchor);
@@ -123,6 +139,9 @@
m_lastLevel = hd.m_level;
}
+ /**
+ * [EMAIL PROTECTED]
+ */
public String execute( WikiContext context, Map params )
throws PluginException
{