Author: chathura
Date: Wed Feb  6 23:24:54 2008
New Revision: 13379

Log:


Adding more javadocs.



Modified:
   
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Registry.java
   
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Resource.java
   
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/mediatypes/MediaTypeHandler.java
   
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/queries/QueryProcessor.java
   
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/urlhandlers/URLHandler.java

Modified: 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Registry.java
==============================================================================
--- 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Registry.java
    (original)
+++ 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Registry.java
    Wed Feb  6 23:24:54 2008
@@ -135,8 +135,11 @@
      * Change the text of an existing comment.
      *
      * @param commentPath path to comment resource ("..foo/r1;comment:1")
-     * @param text        new text
-     * @throws RegistryException
+     *
+     * @param text new text for the comment.
+     *
+     * @throws RegistryException Registry implementations may handle 
exceptions and thorw
+     * RegistryException if the exception has to be propagated to the client.
      */
     void editComment(String commentPath, String text) throws RegistryException;
 
@@ -144,8 +147,11 @@
      * Get all comments for the given resource.
      *
      * @param resourcePath path of the resource.
+     *
      * @return an array of Comment objects.
-     * @throws RegistryException if an error occurs
+     *
+     * @throws RegistryException Registry implementations may handle 
exceptions and thorw
+     * RegistryException if the exception has to be propagated to the client.
      */
     Comment[] getComments(String resourcePath) throws RegistryException;
 
@@ -157,8 +163,11 @@
      * Rate the given resource.
      *
      * @param resourcePath Path of the resource.
-     * @param rating       rating value between 1 and 5.
-     * @throws RegistryException is thrown if a resource does not exist in the 
given path.
+     *
+     * @param rating Rating value between 1 and 5.
+     *
+     * @throws RegistryException Registry implementations may handle 
exceptions and thorw
+     * RegistryException if the exception has to be propagated to the client.
      */
     void rateResource(String resourcePath, int rating) throws 
RegistryException;
 

Modified: 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Resource.java
==============================================================================
--- 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Resource.java
    (original)
+++ 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/Resource.java
    Wed Feb  6 23:24:54 2008
@@ -294,7 +294,8 @@
      * This method is used to explicitly set the content modified state of the 
resource. Normal
      * users of the Registry API should not call this method.
      *
-     * @param contentModified
+     * @param contentModified true if we want to add a new version upon 
putting this to the
+     * registry. false otherwise.
      */
     public void setContentModified(boolean contentModified) {
         this.contentModified = contentModified;

Modified: 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/mediatypes/MediaTypeHandler.java
==============================================================================
--- 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/mediatypes/MediaTypeHandler.java
    (original)
+++ 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/mediatypes/MediaTypeHandler.java
    Wed Feb  6 23:24:54 2008
@@ -95,8 +95,10 @@
     /**
      * Processes the PUT action of the media type.
      *
-     * @param path     to put the resource.
+     * @param path to put the resource.
+     *
      * @param resource to put.
+     *
      * @return true if the media type handler processes the PUT action. If 
true is returned it
      *         should perform all tasks to fulfill the PUT request. Returns 
false if the media type
      *         handler does not process the PUT action. If false is returned, 
put(...) method of the
@@ -110,9 +112,14 @@
     /**
      * Creates a resource in the given path by fetching the resource content 
from the given URL.
      *
-     * @param path      Path to add the new resource.
+     * @param path Path to add the new resource.
+     *
      * @param sourceURL URL to fetch the resource content
-     * @param metadata
+     *
+     * @param metadata Resource instance containing the metadata for the 
resource to be imported.
+     * Once import is done, new resource is created combining the metadata of 
this metadata object
+     * and the imported content.
+     *
      * @return true if the media type handler processes the import action. If 
true is returned it
      *         should perform all tasks to fulfill the import request. Returns 
false if the media
      *         type handler does not process the import action. If false is 
returned,

Modified: 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/queries/QueryProcessor.java
==============================================================================
--- 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/queries/QueryProcessor.java
 (original)
+++ 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/queries/QueryProcessor.java
 Wed Feb  6 23:24:54 2008
@@ -53,9 +53,16 @@
      * This method will be called when a query of a registered type is 
executed.
      *
      * @param query      query resource, possibly containing the query string
+     *
      * @param parameters query parameters as name->value pairs
-     * @return
-     * @throws RegistryException
+     *
+     * @return QueryProcessor impl should map the query results to a resource 
and return the
+     * resource. If the query may return multiple results it can return a 
collection resource,
+     * containing the paths of individual results. Then a URL handler can be 
registered to process
+     * those individual paths and return actual resulting resource.
+     *
+     * @throws RegistryException QueryProcessor impl should handle all 
exceptions and throw
+     * RegisrtyException if the exception has to propagated to the client.
      */
     public abstract Resource executeQuery(Resource query, Map parameters)
             throws RegistryException;

Modified: 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/urlhandlers/URLHandler.java
==============================================================================
--- 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/urlhandlers/URLHandler.java
 (original)
+++ 
branches/registry/1_0/modules/core/src/main/java/org/wso2/registry/jdbc/urlhandlers/URLHandler.java
 Wed Feb  6 23:24:54 2008
@@ -62,10 +62,13 @@
      * returned. If the given url cannot be handled return null, which causes 
other url handlers to
      * process the request, or the request to be reached the media type 
handlers.
      *
-     * @param url URL to process
+     * @param url URL to identify the resource to be retrieved.
+     *
      * @return Resource instance if the URL can be processed. Null if the 
request cannot be
      *         processed.
-     * @throws RegistryException
+     *
+     * @throws RegistryException URL handler implementations should handle all 
exceptions and
+     * throw RegistryException if the exception has to propagated to the 
client.
      */
     public Resource get(String url) throws RegistryException {
         return null;
@@ -77,10 +80,16 @@
      * (actual path) is returned. If the given url cannot be handled return 
null, which causes other
      * url handlers to process the request, or the request to be reached the 
media type handlers.
      *
-     * @param suggestPath
-     * @param resource
-     * @return
-     * @throws RegistryException
+     * @param suggestPath Suggested path to store the resource.
+     *
+     * @param resource Resource to be stored.
+     *
+     * @return If the URL handler impl processes the put request, it returns 
the actual path
+     * on which resource is stored. If it does not process the resource, null 
should be returned
+     * indicating that the request has to be propagated to the next handler.
+     *
+     * @throws RegistryException URL handler implementations should handle all 
exceptions and
+     * throw RegistryException if the exception has to propagated to the 
client.
      */
     public String put(String suggestPath, Resource resource) throws 
RegistryException {
         return null;
@@ -92,9 +101,13 @@
      * returned. If the given url cannot be handled return false, which causes 
other url handlers to
      * process the request, or the request to be reached the media type 
handlers.
      *
-     * @param path
-     * @return
-     * @throws RegistryException
+     * @param path Path of the resource to be deleted.
+     *
+     * @return true if the URL handler impl processes the delete request. 
false if it does not
+     * process the delete request. 
+     *
+     * @throws RegistryException URL handler implementations should handle all 
exceptions and
+     * throw RegistryException if the exception has to propagated to the 
client.
      */
     public boolean delete(String path) throws RegistryException {
         return false;

_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev

Reply via email to