Author: jvelociter
Date: 2008-02-01 09:49:17 +0100 (Fri, 01 Feb 2008)
New Revision: 7254

Modified:
   
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/api/Space.java
   
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java
Log:
Started improving spacemanager plugin documentation.
Applied XWiki style.



Modified: 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/api/Space.java
===================================================================
--- 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/api/Space.java
        2008-02-01 08:46:26 UTC (rev 7253)
+++ 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/api/Space.java
        2008-02-01 08:49:17 UTC (rev 7254)
@@ -1,185 +1,186 @@
+/*
+ * See the NOTICE file distributed with this work for additional
+ * information regarding copyright ownership.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
 package org.xwiki.plugin.spacemanager.api;
 
-import com.xpn.xwiki.XWikiContext;
+import java.util.Date;
+import java.util.List;
+
 import com.xpn.xwiki.XWikiException;
 
-import java.util.List;
-import java.util.Date;
-
 /**
- * Created by IntelliJ IDEA.
- * User: ludovic
- * Date: 28 nov. 2007
- * Time: 12:17:46
- *
- *
- * WikiSpaceName.WebPreferences
- * Object XWiki.XWikiPreferences
- * title
- * description
- * homeShortcutUrl
- * creator (creator of the WebPreference document
- * status
+ * Defines a Wiki Space interface
+ * 
+ * @version $Id: $
  */
-public interface Space {
-       
-       /**
-        * Determines if the space already exists or is newly created
-        * @return
-        */
-       public boolean isNew();
+public interface Space
+{
 
     /**
-     * Determines if the space has been marked as deleted
-     * @return
+     * @return true if the space already exists, false otherwise
      */
+    public boolean isNew();
+
+    /**
+     * @return true if the space has been marked as deleted, false otherwise
+     */
     public boolean isDeleted();
 
-
     /**
-     * Get the technical name
-     * @return space name
+     * @return the space wikiname
      */
     public String getSpaceName();
 
     /**
-        * Gets the type of the space
-        * @return
-        */
-       public String getType();
-       
-       /**
-        * Sets the type of the space
-        * @param type
-        * @return
-        */
-       public void setType( String type );
+     * @return the type of the space
+     */
+    public String getType();
 
     /**
-        * Gets the policy of the space
-        * @return
-        */
-       public String getPolicy();
+     * Sets the type of the space
+     * 
+     * @param type the new type
+     */
+    public void setType(String type);
 
-       /**
-        * Sets the policy of the space
-        * @param policy
-        * @return
-        */
-       public void setPolicy( String policy );
+    /**
+     * @return the policy of the space
+     */
+    public String getPolicy();
 
     /**
-        * Gets the name of the creator of this space
-        * @return
-        */
+     * Sets the policy of the space
+     * 
+     * @param policy the new policy
+     */
+    public void setPolicy(String policy);
+
+    /**
+     * @return the name of the creator of this space
+     */
     public String getCreator();
 
     /**
-     * Set the name of the creator of this space
-     * This should only be used to overide the creator
-       @return
+     * Set the name of the creator of this space This should only be used to 
overide the creator
      */
     public void setCreator(String creator);
 
-
     /**
-     * Gets the title of the space
-     * @return
+     * @return the nice title of the space
      */
     public String getDisplayTitle();
 
     /**
      * Set the display title of the space
-     * This will be saved on the call to "save"
-     * @param title
+     * 
+     * @param title the new title for the space
      */
     public void setDisplayTitle(String title);
 
     /**
-     * Get the description of the space
-     * @return
+     * @return the description of the space
      */
-    public  String getDescription();
+    public String getDescription();
 
-
     /**
      * Set the description title of a space
-     * This will be saved on the call to "save"
-     * @param description
+     * 
+     * @param the new description for the space
      */
     public void setDescription(String description);
 
     /**
      * Get a preference of a space
-     * @return
-     * TODO: do we need the context?
-     * @throws SpaceManagerException 
+     * 
+     * @param prefName the name of the preference to retrieve
+     * @return the value for asked the preference
+     * @throws SpaceManagerException
      */
     public String getPreference(String prefName) throws SpaceManagerException;
 
-
     /**
-     * Get the Home shortcut URL. The shortcut URL is manual and is not 
handled by the XWiki server but by the frontal server
-     * @return
+     * Get the Home shortcut URL. The shortcut URL is manual and is not 
handled by the XWiki server
+     * but by the frontal server
+     * 
+     * @return the home shortcut URL as stored in the space
      */
     public String getHomeShortcutURL();
 
     /**
      * Set the home shortcut URL
-     * @param homeShortCutURL
+     * 
+     * @param homeShortCutURL the new shortcut URL for the space
      */
     public void setHomeShortcutURL(String homeShortCutURL);
 
-
     /**
-     * Gets the Wiki Home page URL for the space
-     * @return
-     * @throws SpaceManagerException 
+     * @return the Home page URL for the space
+     * @throws SpaceManagerException
      */
     public String getHomeURL() throws SpaceManagerException;
 
     /**
-     * Get the list of editable fields for this space
-     * @return
-     * @throws SpaceManagerException 
+     * @return the list of editable fields for this space
+     * @throws SpaceManagerException
      */
     public List getFieldNames() throws SpaceManagerException;
 
     /**
      * Display a space field in view or edit mode
-     * @param fieldName
-     * @param mode
-     * @return
+     * 
+     * @param fieldName the field to display
+     * @param mode the mode to display the field in
+     * @return the HTML content to display
      */
     public String display(String fieldName, String mode);
 
     /**
      * Save the modified space
+     * 
      * @throws XWikiException
      */
     public void save() throws XWikiException;
 
     /**
-     * Save the modified space
+     * Save the modified space with programming rights
+     * 
      * @throws XWikiException
      */
     public void saveWithProgrammingRights() throws XWikiException;
 
     /**
-     * Update the space data from the request
+     * Update the space data from HTTP request parameters
      */
     public void updateSpaceFromRequest() throws SpaceManagerException;
 
     /**
      * Validate space data
-     * @return
+     * 
+     * @return true if the space data is valid, false otherwise
      * @throws SpaceManagerException
      */
     public boolean validateSpaceData() throws SpaceManagerException;
 
     /**
      * Set the creation date of the space
-     * @param date
+     * 
+     * @param date the new date of creation for the space
      */
     public void setCreationDate(Date date);
 }

Modified: 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java
===================================================================
--- 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java
    2008-02-01 08:46:26 UTC (rev 7253)
+++ 
xwiki-products/curriki/trunk/plugins/spacemanager/src/main/java/org/xwiki/plugin/spacemanager/impl/SpaceManagerImpl.java
    2008-02-01 08:49:17 UTC (rev 7254)
@@ -42,7 +42,10 @@
 import java.util.*;
 
 /**
- * Manages spaces
+ * Space manager plugin implementation class.
+ * Manages [EMAIL PROTECTED] Space} spaces
+ * 
+ * @version $Id: $
  */
 public class SpaceManagerImpl extends XWikiDefaultPlugin implements 
SpaceManager {
 

_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications

Reply via email to