jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juanpa...@apache.org
Subject svn commit: r1243340 - in /incubator/jspwiki/trunk: ChangeLog etc/ini/classmappings.xml src/org/apache/wiki/Release.java src/org/apache/wiki/util/ClassUtil.java
Date Sun, 12 Feb 2012 22:16:08 GMT
Author: juanpablo
Date: Sun Feb 12 22:16:07 2012
New Revision: 1243340

URL: http://svn.apache.org/viewvc?rev=1243340&view=rev
Log:
* 2.9.0-svn-5
        
* small refactor on ClassUtil.getMappedObject: it uses varargs, so we can take away 
  a couple of methods. Also /etc/ini/classmappings.xml file is fully populated with  
  all ClassUtil.getMappedObject calls

Modified:
    incubator/jspwiki/trunk/ChangeLog
    incubator/jspwiki/trunk/etc/ini/classmappings.xml
    incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
    incubator/jspwiki/trunk/src/org/apache/wiki/util/ClassUtil.java

Modified: incubator/jspwiki/trunk/ChangeLog
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/ChangeLog?rev=1243340&r1=1243339&r2=1243340&view=diff
==============================================================================
--- incubator/jspwiki/trunk/ChangeLog (original)
+++ incubator/jspwiki/trunk/ChangeLog Sun Feb 12 22:16:07 2012
@@ -1,3 +1,11 @@
+2012-02-12  Juan Pablo Santos (juanpablo AT apache DOT org)
+        
+        * 2.9.0-svn-5
+        
+        * small refactor on ClassUtil.getMappedObject: it uses varargs so we can take away

+          a couple of methods. Also /etc/ini/classmappings.xml file is fully populated with
 
+          all ClassUtil.getMappedObject calls 
+        
 2012-02-07  Juan Pablo Santos (juanpablo AT apache DOT org)
         
         * tests are now part of the main build. Also, they can be desactivated through 

Modified: incubator/jspwiki/trunk/etc/ini/classmappings.xml
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/etc/ini/classmappings.xml?rev=1243340&r1=1243339&r2=1243340&view=diff
==============================================================================
--- incubator/jspwiki/trunk/etc/ini/classmappings.xml (original)
+++ incubator/jspwiki/trunk/etc/ini/classmappings.xml Sun Feb 12 22:16:07 2012
@@ -28,7 +28,79 @@
   
 <classmappings>
   <mapping>
+    <requestedClass>org.apache.wiki.PageManager</requestedClass>
+    <mappedClass>org.apache.wiki.PageManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.ReferenceManager</requestedClass>
+    <mappedClass>org.apache.wiki.ReferenceManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.VariableManager</requestedClass>
+    <mappedClass>org.apache.wiki.VariableManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.attachment.AttachmentManager</requestedClass>
+    <mappedClass>org.apache.wiki.attachment.AttachmentManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.auth.acl.DefaultAclManager</requestedClass>
+    <mappedClass>org.apache.wiki.auth.acl.DefaultAclManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.auth.AuthenticationManager</requestedClass>
+    <mappedClass>org.apache.wiki.auth.AuthenticationManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.auth.AuthorizationManager</requestedClass>
+    <mappedClass>org.apache.wiki.auth.AuthorizationManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.auth.UserManager</requestedClass>
+    <mappedClass>org.apache.wiki.auth.UserManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.auth.authorize.GroupManager</requestedClass>
+    <mappedClass>org.apache.wiki.auth.authorize.GroupManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.diff.DifferenceManager</requestedClass>
+    <mappedClass>org.apache.wiki.diff.DifferenceManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.filters.FilterManager</requestedClass>
+    <mappedClass>org.apache.wiki.filters.FilterManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.i18n.InternationalizationManager</requestedClass>
+    <mappedClass>org.apache.wiki.i18n.InternationalizationManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.plugin.PluginManager</requestedClass>
+    <mappedClass>org.apache.wiki.plugin.PluginManager</mappedClass>
+  </mapping>
+  <mapping>
     <requestedClass>org.apache.wiki.render.RenderingManager</requestedClass>
     <mappedClass>org.apache.wiki.render.RenderingManager</mappedClass>
   </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.search.SearchManager</requestedClass>
+    <mappedClass>org.apache.wiki.search.SearchManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.ui.EditorManager</requestedClass>
+    <mappedClass>org.apache.wiki.ui.EditorManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.ui.TemplateManager</requestedClass>
+    <mappedClass>org.apache.wiki.ui.TemplateManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.ui.admin.AdminBeanManager</requestedClass>
+    <mappedClass>org.apache.wiki.ui.admin.AdminBeanManager</mappedClass>
+  </mapping>
+  <mapping>
+    <requestedClass>org.apache.wiki.workflow.WorkflowManager</requestedClass>
+    <mappedClass>org.apache.wiki.workflow.WorkflowManager</mappedClass>
+  </mapping>
 </classmappings>

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/Release.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/Release.java?rev=1243340&r1=1243339&r2=1243340&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/Release.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/Release.java Sun Feb 12 22:16:07 2012
@@ -77,7 +77,7 @@ public final class Release
      *  <p>
      *  If the build identifier is empty, it is not added.
      */
-    public static final String     BUILD         = "4";
+    public static final String     BUILD         = "5";
     
     /**
      *  This is the generic version string you should use

Modified: incubator/jspwiki/trunk/src/org/apache/wiki/util/ClassUtil.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/org/apache/wiki/util/ClassUtil.java?rev=1243340&r1=1243339&r2=1243340&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/org/apache/wiki/util/ClassUtil.java (original)
+++ incubator/jspwiki/trunk/src/org/apache/wiki/util/ClassUtil.java Sun Feb 12 22:16:07 2012
@@ -196,53 +196,6 @@ public final class ClassUtil
     /**
      *  This method is used to locate and instantiate a mapped class.
      *  You may redefine anything in the resource file which is located in your classpath
-     *  under the name <code>ClassUtil.MAPPINGS ({@value #MAPPINGS})</code>.
-     *  <p>
-     *  This is an extremely powerful system, which allows you to remap many of
-     *  the JSPWiki core classes to your own class.  Please read the documentation
-     *  included in the default <code>{@value #MAPPINGS}</code> file to see
-     *  how this method works. 
-     *  
-     *  @param requestedClass The name of the class you wish to instantiate.
-     *  @param arg1 Argument for the constructor.
-     *  @return An instantiated Object.
-     *  @throws WikiException If the class cannot be found or instantiated.
-     *  @since 2.5.40
-     */
-    public static Object getMappedObject( String requestedClass, Object arg1 )
-        throws WikiException
-    {
-        Object[] initargs = { arg1 };
-        return getMappedObject(requestedClass, initargs );
-    }
-
-    /**
-     *  This method is used to locate and instantiate a mapped class.
-     *  You may redefine anything in the resource file which is located in your classpath
-     *  under the name <code>ClassUtil.MAPPINGS ({@value #MAPPINGS})</code>.
-     *  <p>
-     *  This is an extremely powerful system, which allows you to remap many of
-     *  the JSPWiki core classes to your own class.  Please read the documentation
-     *  included in the default <code>{@value #MAPPINGS}</code> file to see
-     *  how this method works. 
-     *  
-     *  @param requestedClass The name of the class you wish to instantiate.
-     *  @param arg1 Argument for the constructor
-     *  @param arg2 A second argument for the constructor
-     *  @return An instantiated Object.
-     *  @throws WikiException If the class cannot be found or instantiated.
-     *  @since 2.5.40
-     */
-    public static Object getMappedObject( String requestedClass, Object arg1, Object arg2
)
-        throws WikiException
-    {
-        Object[] initargs = { arg1, arg2 };
-        return getMappedObject(requestedClass, initargs );
-    }
-
-    /**
-     *  This method is used to locate and instantiate a mapped class.
-     *  You may redefine anything in the resource file which is located in your classpath
      *  under the name <code>{@value #MAPPINGS}</code>.
      *  <p>
      *  This is an extremely powerful system, which allows you to remap many of
@@ -259,7 +212,7 @@ public final class ClassUtil
      *  @throws WikiException If the class cannot be found or instantiated.  The error is
logged.
      *  @since 2.5.40
      */
-    public static Object getMappedObject( String requestedClass, Object[] initargs )
+    public static Object getMappedObject( String requestedClass, Object... initargs )
         throws WikiException
     {
         try
@@ -333,7 +286,7 @@ public final class ClassUtil
      *  @return A Class object which you can then instantiate.
      *  @throws WikiException
      */
-    private static Class getMappedClass( String requestedClass )
+    private static Class< ? > getMappedClass( String requestedClass )
         throws WikiException
     {
         String mappedClass = c_classMappings.get( requestedClass );
@@ -345,7 +298,7 @@ public final class ClassUtil
         
         try
         {
-            Class cl = Class.forName(mappedClass);
+            Class< ? > cl = Class.forName(mappedClass);
             
             return cl;
         }



Mime
View raw message