Author: juanpablo
Date: Wed Dec 26 22:22:00 2012
New Revision: 1426061
URL: http://svn.apache.org/viewvc?rev=1426061&view=rev
Log:
no need for methods in there to be declared public
promoted public constants from DefaultPluginManager to api
Modified:
incubator/jspwiki/trunk/src/org/apache/wiki/api/PluginManager.java
incubator/jspwiki/trunk/src/org/apache/wiki/plugin/DefaultPluginManager.java
Modified: incubator/jspwiki/trunk/src/org/apache/wiki/api/PluginManager.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/api/PluginManager.java?rev=1426061&r1=1426060&r2=1426061&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/api/PluginManager.java
(original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/api/PluginManager.java Wed Dec
26 22:22:00 2012
@@ -10,17 +10,36 @@ import org.apache.wiki.parser.PluginCont
public interface PluginManager
{
+ /** The property name defining which packages will be searched for
properties. */
+ static final String PROP_SEARCHPATH = "jspwiki.plugin.searchPath";
+
+ /** This is the default package to try in case the instantiation fails. */
+ static final String DEFAULT_PACKAGE = "org.apache.wiki.plugin";
+
/**
- * The property name defining which packages will be searched for
properties.
+ * The name of the body content. Current value is "_body".
*/
- public static final String PROP_SEARCHPATH = "jspwiki.plugin.searchPath";
-
+ static final String PARAM_BODY = "_body";
+
+ /** The name of the command line content parameter. The value is
"_cmdline". */
+ static final String PARAM_CMDLINE = "_cmdline";
+
+ /**
+ * The name of the parameter containing the start and end positions in the
+ * read stream of the plugin text (stored as a two-element int[], start
+ * and end resp.).
+ */
+ static final String PARAM_BOUNDS = "_bounds";
+
+ /** A special name to be used in case you want to see debug output */
+ static final String PARAM_DEBUG = "debug";
+
/**
* Enables or disables plugin execution.
*
* @param enabled True, if plugins should be globally enabled; false, if
disabled.
*/
- public void enablePlugins( boolean enabled );
+ void enablePlugins( boolean enabled );
/**
* Returns plugin execution status. If false, plugins are not
@@ -29,7 +48,7 @@ public interface PluginManager
*
* @return True, if plugins are enabled; false otherwise.
*/
- public boolean pluginsEnabled();
+ boolean pluginsEnabled();
/**
* Executes a plugin class in the given context.
@@ -49,9 +68,7 @@ public interface PluginManager
*
* @since 2.0
*/
- public String execute( WikiContext context,
- String classname,
- Map< String, String > params )
+ String execute( WikiContext context, String classname, Map< String, String
> params )
throws PluginException;
/**
@@ -74,7 +91,7 @@ public interface PluginManager
*
* @throws IOException If the parsing fails.
*/
- public Map<String, String> parseArgs( String argstring )
+ Map< String, String > parseArgs( String argstring )
throws IOException;
/**
@@ -93,8 +110,7 @@ public interface PluginManager
*
* @throws PluginException From the plugin itself, it propagates, waah!
*/
- public String execute( WikiContext context,
- String commandline )
+ String execute( WikiContext context, String commandline )
throws PluginException;
/**
@@ -106,7 +122,7 @@ public interface PluginManager
* @return A DOM element
* @throws PluginException If plugin invocation is faulty
*/
- public PluginContent parsePluginLine( WikiContext context, String
commandline, int pos )
+ PluginContent parsePluginLine( WikiContext context, String commandline,
int pos )
throws PluginException;
/**
@@ -116,7 +132,7 @@ public interface PluginManager
*
* @return A Collection of WikiModuleInfo instances.
*/
- public Collection modules();
+ Collection modules();
/**
* Executes parse stage, unless plugins are disabled.
@@ -125,7 +141,7 @@ public interface PluginManager
* @param context A WikiContext
* @throws PluginException If something goes wrong.
*/
- public void executeParse(PluginContent content, WikiContext context)
+ void executeParse(PluginContent content, WikiContext context)
throws PluginException;
}
Modified:
incubator/jspwiki/trunk/src/org/apache/wiki/plugin/DefaultPluginManager.java
URL:
http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/plugin/DefaultPluginManager.java?rev=1426061&r1=1426060&r2=1426061&view=diff
==============================================================================
---
incubator/jspwiki/trunk/src/org/apache/wiki/plugin/DefaultPluginManager.java
(original)
+++
incubator/jspwiki/trunk/src/org/apache/wiki/plugin/DefaultPluginManager.java
Wed Dec 26 22:22:00 2012
@@ -140,36 +140,8 @@ public class DefaultPluginManager extend
private static Logger log = Logger.getLogger( DefaultPluginManager.class );
- /**
- * This is the default package to try in case the instantiation
- * fails.
- */
- public static final String DEFAULT_PACKAGE = "org.apache.wiki.plugin";
-
private static final String DEFAULT_FORMS_PACKAGE =
"org.apache.wiki.forms";
- /**
- * The name of the body content. Current value is "_body".
- */
- public static final String PARAM_BODY = "_body";
-
- /**
- * The name of the command line content parameter. The value is
"_cmdline".
- */
- public static final String PARAM_CMDLINE = "_cmdline";
-
- /**
- * The name of the parameter containing the start and end positions in the
- * read stream of the plugin text (stored as a two-element int[], start
- * and end resp.).
- */
- public static final String PARAM_BOUNDS = "_bounds";
-
- /**
- * A special name to be used in case you want to see debug output
- */
- public static final String PARAM_DEBUG = "debug";
-
private ArrayList<String> m_searchPath = new ArrayList<String>();
private Pattern m_pluginPattern;
@@ -408,7 +380,7 @@ public class DefaultPluginManager extend
public Map<String, String> parseArgs( String argstring )
throws IOException
{
- HashMap<String, String> arglist = new HashMap<String, String>();
+ Map<String, String> arglist = new HashMap<String, String>();
//
// Protection against funny users.