jspwiki-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jalka...@apache.org
Subject svn commit: r662265 - in /incubator/jspwiki/trunk/src/com/ecyrd/jspwiki: ./ auth/login/ auth/permissions/
Date Sun, 01 Jun 2008 18:51:23 GMT
Author: jalkanen
Date: Sun Jun  1 11:51:22 2008
New Revision: 662265

URL: http://svn.apache.org/viewvc?rev=662265&view=rev
Log:
Javadoc fixes.

Added:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/package.html
Modified:
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ReferenceManager.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/TranslatorReader.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AuthorizerCallback.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseCallback.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/AllPermissionCollection.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java
    incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/WikiPermission.java

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ReferenceManager.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ReferenceManager.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ReferenceManager.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/ReferenceManager.java Sun Jun  1 11:51:22
2008
@@ -169,14 +169,15 @@
     /**
      *  Does a full reference update.  Does not sync; assumes that you do it afterwards.
      */
+    @SuppressWarnings("unchecked")
     private void updatePageReferences( WikiPage page )
         throws ProviderException
     {
         String content = m_engine.getPageManager().getPageText( page.getName(),
                                                                 WikiPageProvider.LATEST_VERSION
);
 
-        TreeSet res = new TreeSet();
-        Collection links = m_engine.scanWikiLinks( page, content );
+        TreeSet<String> res = new TreeSet<String>();
+        Collection<String> links = m_engine.scanWikiLinks( page, content );
 
         res.addAll( links );
         Collection attachments = m_engine.getAttachmentManager().listAttachments( page );
@@ -196,6 +197,7 @@
      *  @param pages A collection of all pages you want to be included in the reference
      *               count.
      *  @since 2.2
+     *  @throws ProviderException If reading of pages fail.
      */
     public void initialize( Collection pages )
         throws ProviderException
@@ -302,6 +304,7 @@
      *  Reads the serialized data from the disk back to memory.
      *  Returns the date when the data was last written on disk
      */
+    @SuppressWarnings("unchecked")
     private synchronized long unserializeFromDisk()
         throws IOException,
                ClassNotFoundException
@@ -559,6 +562,9 @@
 
     /**
      *  After the page has been saved, updates the reference lists.
+     *  
+     *  @param context {@inheritDoc}
+     *  @param content {@inheritDoc}
      */
     public void postSave( WikiContext context, String content )
     {
@@ -595,10 +601,10 @@
 
         if( refTo != null )
         {
-            Iterator it_refTo = refTo.iterator();
-            while( it_refTo.hasNext() )
+            Iterator itRefTo = refTo.iterator();
+            while( itRefTo.hasNext() )
             {
-                String referredPageName = (String)it_refTo.next();
+                String referredPageName = (String)itRefTo.next();
                 Set<String> refBy = m_referredBy.get( referredPageName );
 
                 if( refBy == null )
@@ -727,6 +733,8 @@
 
     /**
      * Returns the refers-to list. For debugging.
+     * 
+     * @return The refers-to list.
      */
     protected Map getRefersTo()
     {
@@ -735,6 +743,8 @@
 
     /**
      * Returns the referred-by list. For debugging.
+     * 
+     * @return Referred-by lists.
      */
     protected Map getReferredBy()
     {
@@ -848,7 +858,7 @@
             }
         }
 
-        Set<String> referrers = (Set<String>)m_referredBy.get( page );
+        Set<String> referrers = m_referredBy.get( page );
 
         // Even if 'page' has not been created yet, it can still be referenced.
         // This requires we don't use m_referredBy keys when looking up missing
@@ -898,6 +908,8 @@
     /**
      *  Finds all unreferenced pages. This requires a linear scan through
      *  m_referredBy to locate keys with null or empty values.
+     *  
+     *  @return The Collection of Strings
      */
     public synchronized Collection findUnreferenced()
     {
@@ -926,6 +938,8 @@
      * Returns a Collection containing Strings of unreferenced page names.
      * Each non-existant page name is shown only once - we don't return information
      * on who referred to it.
+     * 
+     * @return A Collection of Strings
      */
     public synchronized Collection findUncreated()
     {
@@ -1072,12 +1086,12 @@
      *         ReferenceManager
      * @since 2.3.24
      */
-    /*
-       This method traps and retries if a concurrent
-       modifcaition occurs.
-       TODO: It is unnecessary to calculate the hashcode; it should be calculated only
-             when the hashmaps are changed.  This is slow.
-    */
+    //
+    //   This method traps and retries if a concurrent
+    //   modifcaition occurs.
+    //   TODO: It is unnecessary to calculate the hashcode; it should be calculated only
+    //         when the hashmaps are changed.  This is slow.
+    //
     public int deepHashCode()
     {
         boolean failed = true;
@@ -1113,7 +1127,7 @@
      */
     public Set findCreated()
     {
-        return new HashSet( m_refersTo.keySet() );
+        return new HashSet<String>( m_refersTo.keySet() );
     }
 
     private String getFinalPageName( String orig )
@@ -1134,6 +1148,9 @@
         }
     }
 
+    /**
+     *  {@inheritDoc}
+     */
     public void actionPerformed(WikiEvent event)
     {
         if( (event instanceof WikiPageEvent) && (event.getType() == WikiPageEvent.PAGE_DELETED)
)

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/TranslatorReader.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/TranslatorReader.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/TranslatorReader.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/TranslatorReader.java Sun Jun  1 11:51:22
2008
@@ -178,7 +178,9 @@
         m_parser.addAttachmentLinkHook( mutator );
     }
 
-    /** Adds a listener to headings. */
+    /** Adds a listener to headings.
+     *  @param listener Listener to add.
+     */
     public void addHeadingListener( HeadingListener listener )
     {
         m_parser.addHeadingListener( listener );
@@ -297,4 +299,4 @@
     {
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/WikiEngine.java Sun Jun  1 11:51:22 2008
@@ -262,6 +262,9 @@
 
     private AdminBeanManager m_adminBeanManager;
 
+    /** Stores wikiengine attributes. */
+    private Map<String,Object> m_attributes = Collections.synchronizedMap(new HashMap<String,Object>());
+
     /**
      *  Gets a WikiEngine related to this servlet.  Since this method
      *  is only called from JSP pages (and JspInit()) to be specific,
@@ -654,11 +657,12 @@
      *
      *  @throws WikiException If the reference manager initialization fails.
      */
+    @SuppressWarnings("unchecked")
     public void initReferenceManager() throws WikiException
     {
         try
         {
-            ArrayList pages = new ArrayList();
+            ArrayList<WikiPage> pages = new ArrayList<WikiPage>();
             pages.addAll( m_pageManager.getAllPages() );
             pages.addAll( m_attachmentManager.getAllAttachments() );
 
@@ -733,6 +737,7 @@
      *  Don't use.
      *  @since 1.8.0
      *  @deprecated
+     *  @return Something magical.
      */
     public String getPluginSearchPath()
     {
@@ -814,6 +819,9 @@
      *  @see #getURL(String, String, String, boolean)
      *  @see WikiContext#getURL(String, String)
      *  @deprecated
+     *  
+     *  @param pageName The name of the page.
+     *  @return An URI.
      *
      *  @since 2.0.3
      */
@@ -831,6 +839,7 @@
      *  @since 2.0.42.
      *  @param attName Attachment name
      *  @deprecated
+     *  @return An URI.
      */
     public String getAttachmentURL( String attName )
     {
@@ -890,6 +899,9 @@
      *  Incidentally, this is almost the same as encodeName(), below.
      *  I am not yet entirely sure if it's safe to merge the code.
      *
+     *  @param request The servlet request
+     *  @param name    The parameter name to get.
+     *  @return The parameter value or null
      *  @since 1.5.3
      *  @deprecated JSPWiki now requires servlet API 2.3, which has a better
      *              way of dealing with this stuff.  This will be removed in
@@ -986,7 +998,7 @@
      */
     public Collection getAllInterWikiLinks()
     {
-        Vector v = new Vector();
+        Vector<String> v = new Vector<String>();
 
         for( Enumeration i = m_properties.propertyNames(); i.hasMoreElements(); )
         {
@@ -1767,14 +1779,15 @@
 
     // FIXME: Should really get a Date object and do proper comparisons.
     //        This is terribly wasteful.
+    @SuppressWarnings("unchecked")
     public Collection getRecentChanges()
     {
         try
         {
-            Collection pages = m_pageManager.getAllPages();
-            Collection  atts = m_attachmentManager.getAllAttachments();
+            Collection<WikiPage>   pages = m_pageManager.getAllPages();
+            Collection<Attachment>  atts = m_attachmentManager.getAllAttachments();
 
-            TreeSet sortedPages = new TreeSet( new PageTimeComparator() );
+            TreeSet<WikiPage> sortedPages = new TreeSet<WikiPage>( new PageTimeComparator()
);
 
             sortedPages.addAll( pages );
             sortedPages.addAll( atts );
@@ -2363,8 +2376,6 @@
         }
     }
 
-    private Map m_attributes = Collections.synchronizedMap(new HashMap());
-
     /**
      * Adds an attribute to the engine for the duration of this engine.  The
      * value is not persisted.

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AuthorizerCallback.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AuthorizerCallback.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AuthorizerCallback.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/AuthorizerCallback.java Sun Jun
 1 11:51:22 2008
@@ -55,4 +55,4 @@
         return m_authorizer;
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseCallback.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseCallback.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseCallback.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/UserDatabaseCallback.java Sun
Jun  1 11:51:22 2008
@@ -55,4 +55,4 @@
         this.m_database = database;
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerCallbackHandler.java
Sun Jun  1 11:51:22 2008
@@ -44,6 +44,13 @@
 
     private final WikiEngine         m_engine;
 
+    /**
+     *  Create a new handler.
+     *  
+     *  @param engine The WikiEngine
+     *  @param request The request to look into
+     *  @param authorizer The authorizer which does all these things.
+     */
     public WebContainerCallbackHandler( WikiEngine engine, HttpServletRequest request, Authorizer
authorizer )
     {
         m_engine  = engine;

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WebContainerLoginModule.java
Sun Jun  1 11:51:22 2008
@@ -175,4 +175,4 @@
         m_principals.addAll( foundRoles );
     }
 
-}
\ No newline at end of file
+}

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/WikiCallbackHandler.java Sun
Jun  1 11:51:22 2008
@@ -48,6 +48,13 @@
 
     private final String       m_username;
 
+    /**
+     *  Create a new callback handler.
+     *  
+     *  @param database The Userdatabase to use
+     *  @param username The username
+     *  @param password The password
+     */
     public WikiCallbackHandler( UserDatabase database, String username, String password )
     {
         m_database = database;

Added: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/package.html
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/package.html?rev=662265&view=auto
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/package.html (added)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/login/package.html Sun Jun  1 11:51:22
2008
@@ -0,0 +1,14 @@
+
+<body>
+
+Provides the different login modules that JSPWiki uses.
+
+<h3>Package Specification</h3>
+
+TBD
+
+<h3>Related Documentation</h3>
+
+TBD
+
+</body>

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/AllPermissionCollection.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/AllPermissionCollection.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/AllPermissionCollection.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/AllPermissionCollection.java
Sun Jun  1 11:51:22 2008
@@ -46,7 +46,10 @@
      * is not of type {@link AllPermission}, a {@link SecurityException} is
      * thrown.
      * @see java.security.PermissionCollection#add(java.security.Permission)
+     * 
+     * @param permission {@inheritDoc}
      */
+    @Override
     public void add( Permission permission )
     {
         if ( !AllPermission.isJSPWikiPermission( permission ) )
@@ -71,7 +74,10 @@
      * Returns an enumeration of all AllPermission objects stored in this
      * collection.
      * @see java.security.PermissionCollection#elements()
+     * 
+     * @return {@inheritDoc}
      */
+    @Override
     public Enumeration<Permission> elements()
     {
         return m_permissions.elements();
@@ -90,6 +96,8 @@
      * but only the AllPermission, PagePermission or WikiPermission types are
      * actually evaluated.
      * @see java.security.PermissionCollection#implies(java.security.Permission)
+     * 
+     * @return {@inheritDoc}
      */
     public boolean implies( Permission permission )
     {
@@ -119,7 +127,7 @@
     }
 
     /**
-     * @see java.security.PermissionCollection#isReadOnly()
+     * {@inheritDoc}
      */
     public boolean isReadOnly()
     {

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PagePermission.java Sun
Jun  1 11:51:22 2008
@@ -70,18 +70,25 @@
 {
     private static final long          serialVersionUID = 2L;
 
+    /** Action name for the comment permission. */
     public static final String         COMMENT_ACTION = "comment";
 
+    /** Action name for the delete permission. */
     public static final String         DELETE_ACTION  = "delete";
 
+    /** Action name for the edit permission. */
     public static final String         EDIT_ACTION    = "edit";
 
+    /** Action name for the modify permission. */
     public static final String         MODIFY_ACTION  = "modify";
 
+    /** Action name for the rename permission. */
     public static final String         RENAME_ACTION  = "rename";
 
+    /** Action name for the upload permission. */
     public static final String         UPLOAD_ACTION  = "upload";
 
+    /** Action name for the view permission. */
     public static final String         VIEW_ACTION    = "view";
 
     protected static final int         COMMENT_MASK   = 0x4;
@@ -98,18 +105,25 @@
 
     protected static final int         VIEW_MASK      = 0x1;
 
+    /** A static instance of the comment permission. */
     public static final PagePermission COMMENT        = new PagePermission( COMMENT_ACTION
);
 
+    /** A static instance of the delete permission. */
     public static final PagePermission DELETE         = new PagePermission( DELETE_ACTION
);
 
+    /** A static instance of the edit permission. */
     public static final PagePermission EDIT           = new PagePermission( EDIT_ACTION );
 
+    /** A static instance of the rename permission. */
     public static final PagePermission RENAME         = new PagePermission( RENAME_ACTION
);
 
+    /** A static instance of the modify permission. */
     public static final PagePermission MODIFY         = new PagePermission( MODIFY_ACTION
);
 
+    /** A static instance of the upload permission. */
     public static final PagePermission UPLOAD         = new PagePermission( UPLOAD_ACTION
);
 
+    /** A static instance of the view permission. */
     public static final PagePermission VIEW           = new PagePermission( VIEW_ACTION );
 
     private static final String        ACTION_SEPARATOR = ",";
@@ -205,7 +219,8 @@
     /**
      * Two PagePermission objects are considered equal if their actions (after
      * normalization), wiki and target are equal.
-     * @see java.lang.Object#equals(java.lang.Object)
+     * @param obj {@inheritDoc}
+     * @return {@inheritDoc}
      */
     public final boolean equals( Object obj )
     {
@@ -222,7 +237,8 @@
      * Returns the actions for this permission: "view", "edit", "comment",
      * "modify", "upload" or "delete". The actions will always be sorted in alphabetic
      * order, and will always appear in lower case.
-     * @see java.security.Permission#getActions()
+     *
+     * @return {@inheritDoc}
      */
     public final String getActions()
     {
@@ -250,7 +266,7 @@
 
     /**
      * Returns the hash code for this PagePermission.
-     * @see java.lang.Object#hashCode()
+     * @return {@inheritDoc}
      */
     public final int hashCode()
     {
@@ -280,6 +296,9 @@
      * those of this permission</li>
      * </ol>
      * @see java.security.Permission#implies(java.security.Permission)
+     * 
+     * @param permission {@inheritDoc}
+     * @return {@inheritDoc}
      */
     public final boolean implies( Permission permission )
     {
@@ -312,7 +331,9 @@
     /**
      * Returns a new {@link AllPermissionCollection}.
      * @see java.security.Permission#newPermissionCollection()
+     * @return {@inheritDoc}
      */
+    @Override
     public PermissionCollection newPermissionCollection()
     {
         return new AllPermissionCollection();
@@ -321,6 +342,8 @@
     /**
      * Prints a human-readable representation of this permission.
      * @see java.lang.Object#toString()
+     * 
+     * @return Something human-readable
      */
     public final String toString()
     {
@@ -458,4 +481,4 @@
         }
         return mask;
     }
-}
\ No newline at end of file
+}

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java
(original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/PermissionFactory.java
Sun Jun  1 11:51:22 2008
@@ -29,12 +29,16 @@
  *  and creating them takes a bit of time, caching them makes sense.
  *  <p>
  *  This class stores the permissions in a static HashMap.
- *  @author Janne Jalkanen
  *  @since 2.5.54
  */
-public class PermissionFactory
+public final class PermissionFactory
 {
     /**
+     *  Prevent instantiation.
+     */
+    private PermissionFactory() {}
+    
+    /**
      *  This is a WeakHashMap<Integer,PagePermission>, which stores the
      *  cached page permissions.
      */

Modified: incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/WikiPermission.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/WikiPermission.java?rev=662265&r1=662264&r2=662265&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/WikiPermission.java (original)
+++ incubator/jspwiki/trunk/src/com/ecyrd/jspwiki/auth/permissions/WikiPermission.java Sun
Jun  1 11:51:22 2008
@@ -42,16 +42,22 @@
 {
     private static final long          serialVersionUID        = 1L;
 
+    /** Name of the action for createGroups permission. */
     public static final String         CREATE_GROUPS_ACTION    = "createGroups";
 
+    /** Name of the action for createPages permission. */   
     public static final String         CREATE_PAGES_ACTION     = "createPages";
 
+    /** Name of the action for login permission. */
     public static final String         LOGIN_ACTION            = "login";
 
+    /** Name of the action for editPreferences permission. */
     public static final String         EDIT_PREFERENCES_ACTION = "editPreferences";
 
+    /** Name of the action for editProfile permission. */
     public static final String         EDIT_PROFILE_ACTION     = "editProfile";
 
+    /** Value for a generic wildcard. */
     public static final String         WILDCARD                = "*";
 
     protected static final int         CREATE_GROUPS_MASK      = 0x1;
@@ -64,14 +70,19 @@
 
     protected static final int         LOGIN_MASK              = 0x10;
 
+    /** A static instance of the createGroups permission. */
     public static final WikiPermission CREATE_GROUPS           = new WikiPermission( WILDCARD,
CREATE_GROUPS_ACTION );
 
+    /** A static instance of the createPages permission. */
     public static final WikiPermission CREATE_PAGES            = new WikiPermission( WILDCARD,
CREATE_PAGES_ACTION );
 
+    /** A static instance of the login permission. */
     public static final WikiPermission LOGIN                   = new WikiPermission( WILDCARD,
LOGIN_ACTION );
 
+    /** A static instance of the editPreferences permission. */
     public static final WikiPermission EDIT_PREFERENCES        = new WikiPermission( WILDCARD,
EDIT_PREFERENCES_ACTION );
 
+    /** A static instance of the editProfile permission. */
     public static final WikiPermission EDIT_PROFILE            = new WikiPermission( WILDCARD,
EDIT_PROFILE_ACTION );
 
     private final String               m_actionString;
@@ -83,6 +94,7 @@
     /**
      * Creates a new WikiPermission for a specified set of actions.
      * @param actions the actions for this permission
+     * @param wiki The name of the wiki the permission belongs to.
      */
     public WikiPermission( String wiki, String actions )
     {
@@ -145,7 +157,7 @@
 
     /**
      * Returns the hash code for this WikiPermission.
-     * @see java.lang.Object#hashCode()
+     * @return {@inheritDoc}
      */
     public final int hashCode()
     {
@@ -184,7 +196,7 @@
 
     /**
      * Returns a new {@link AllPermissionCollection}.
-     * @see java.security.Permission#newPermissionCollection()
+     * @return {@inheritDoc}
      */
     public PermissionCollection newPermissionCollection()
     {
@@ -193,7 +205,7 @@
 
     /**
      * Prints a human-readable representation of this permission.
-     * @see java.lang.Object#toString()
+     * @return {@inheritDoc}
      */
     public final String toString()
     {
@@ -259,4 +271,4 @@
         }
         return mask;
     }
-}
\ No newline at end of file
+}



Mime
View raw message