jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dvit...@apache.org
Subject svn commit: r1656018 - /jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/modules/WikiModuleInfo.java
Date Fri, 30 Jan 2015 14:21:14 GMT
Author: dvittor
Date: Fri Jan 30 14:21:13 2015
New Revision: 1656018

URL: http://svn.apache.org/r1656018
Log:
JSPWIKI-866: Additional parameters (url,version,desc,htmltemplate,authorurl) to jspwiki_module.xml
WikiModuleInfo

Modified:
    jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/modules/WikiModuleInfo.java

Modified: jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/modules/WikiModuleInfo.java
URL: http://svn.apache.org/viewvc/jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/modules/WikiModuleInfo.java?rev=1656018&r1=1656017&r2=1656018&view=diff
==============================================================================
--- jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/modules/WikiModuleInfo.java (original)
+++ jspwiki/trunk/jspwiki-war/src/main/java/org/apache/wiki/modules/WikiModuleInfo.java Fri
Jan 30 14:21:13 2015
@@ -37,11 +37,16 @@ public class WikiModuleInfo
     implements Comparable<WikiModuleInfo>
 {
     protected String m_name;
+    protected String m_description;
+    protected String m_moduleUrl;
+    protected String m_moduleVersion;
+    protected String m_htmlTemplate;
     protected String m_scriptLocation;
     protected String m_scriptText;
     protected String m_stylesheetLocation;
     protected String m_stylesheetText;
     protected String m_author;
+    protected String m_authorUrl;
     protected URL    m_resource;
     protected String m_minVersion;
     protected String m_maxVersion;
@@ -52,8 +57,7 @@ public class WikiModuleInfo
      *  
      *  @param name The name of the module.
      */
-    public WikiModuleInfo( String name )
-    {
+    public WikiModuleInfo( String name ) {
         m_name = name;
     }
     
@@ -65,8 +69,7 @@ public class WikiModuleInfo
      *  @return {@inheritDoc}
      */
     @Override
-    public boolean equals(Object obj)
-    {
+    public boolean equals(Object obj) {
         if( obj instanceof WikiModuleInfo )
         {
             return ((WikiModuleInfo)obj).m_name.equals( m_name );
@@ -79,8 +82,7 @@ public class WikiModuleInfo
      *  {@inheritDoc}
      */
     @Override
-    public int hashCode()
-    {
+    public int hashCode() {
         return m_name.hashCode();
     }
 
@@ -90,11 +92,15 @@ public class WikiModuleInfo
      *  
      *  @param el The element to parse.
      */
-    protected void initializeFromXML( Element el )
-    {
+    protected void initializeFromXML( Element el ) {
+    	m_description        = el.getChildText("description");
+    	m_moduleUrl          = el.getChildText("url");
+    	m_moduleVersion      = el.getChildText("version");
+        m_htmlTemplate       = el.getChildText("template");
         m_scriptLocation     = el.getChildText("script");
         m_stylesheetLocation = el.getChildText("stylesheet");
         m_author             = el.getChildText("author");
+        m_authorUrl          = el.getChildText("authorUrl");
         m_minVersion         = el.getChildText("minVersion");
         m_maxVersion         = el.getChildText("maxVersion");
         m_adminBeanClass     = el.getChildText("adminBean");
@@ -105,8 +111,7 @@ public class WikiModuleInfo
      *  
      *  @return A class name.
      */
-    public String getAdminBeanClass()
-    {
+    public String getAdminBeanClass() {
         return m_adminBeanClass;
     }
     
@@ -119,18 +124,52 @@ public class WikiModuleInfo
      *  
      *  @return A module name.
      */
-    public String getName()
-    {
+    public String getName() {
         return m_name;
     }
+    
+    /**
+     *  The description of what this module does.
+     *  
+     *  @return A module description.
+     */
+    public String getDescription() {
+        return m_description;
+    }
+    
+    /**
+     *  The URL for this getting more information about this module.
+     *  
+     *  @return A module URL.
+     */
+    public String getModuleUrl() {
+        return m_moduleUrl;
+    }
+    
+    /**
+     *  The current version of the implemented module
+     *  
+     *  @return A module version.
+     */
+    public String getModuleVersion() {
+        return m_moduleVersion;
+    }
+    
+    /**
+     *  Return the location of the html template for this module.
+     *  
+     *  @return The path to the location.
+     */
+    public String getHtmlTemplate() {
+        return m_htmlTemplate;
+    }
 
     /**
      *  Returns the style sheet location for this module.
      *  
      *  @return The path to the location.
      */
-    public String getStylesheetLocation()
-    {
+    public String getStylesheetLocation() {
         return m_stylesheetLocation;
     }
 
@@ -139,8 +178,7 @@ public class WikiModuleInfo
      *  
      *  @return The path to the location.
      */
-    public String getScriptLocation()
-    {
+    public String getScriptLocation() {
         return m_scriptLocation;
     }
 
@@ -148,18 +186,23 @@ public class WikiModuleInfo
      *  Returns the name of the author of this plugin (if defined).
      * @return Author name, or null.
      */
-    public String getAuthor()
-    {
+    public String getAuthor() {
         return m_author;
     }
 
     /**
+     *  Returns the url of the author of this plugin (if defined).
+     */
+    public String getAuthorUrl() {
+        return m_authorUrl;
+    }
+    
+    /**
      *  Returns the minimum version of JSPWiki that this module supports.
      *  
      *  @return The minimum version.
      */
-    public String getMinVersion()
-    {
+    public String getMinVersion() {
         return m_minVersion;
     }
     
@@ -168,8 +211,7 @@ public class WikiModuleInfo
      *  
      *  @return The maximum version.
      */
-    public String getMaxVersion()
-    {
+    public String getMaxVersion() {
         return m_maxVersion;
     }
 



Mime
View raw message