You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by bc...@locus.apache.org on 2000/11/22 05:55:54 UTC

cvs commit: jakarta-slide/src/clients/webdav/src/org/apache/webdav/lib/methods MkcolMethod.java

bcholmes    00/11/21 20:55:54

  Modified:    src/clients/webdav/src/org/apache/webdav/lib/methods
                        MkcolMethod.java
  Log:
  - Remove the "do-nothing" implementation of generateQuery()
    (method now does what it's supposed to do).
  - add some Javadoc comments
  
  Revision  Changes    Path
  1.3       +39 -23    jakarta-slide/src/clients/webdav/src/org/apache/webdav/lib/methods/MkcolMethod.java
  
  Index: MkcolMethod.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/clients/webdav/src/org/apache/webdav/lib/methods/MkcolMethod.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MkcolMethod.java	2000/11/21 07:18:11	1.2
  +++ MkcolMethod.java	2000/11/22 04:55:53	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/clients/webdav/src/org/apache/webdav/lib/methods/MkcolMethod.java,v 1.2 2000/11/21 07:18:11 bcholmes Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/11/21 07:18:11 $
  + * $Header: /home/cvs/jakarta-slide/src/clients/webdav/src/org/apache/webdav/lib/methods/MkcolMethod.java,v 1.3 2000/11/22 04:55:53 bcholmes Exp $
  + * $Revision: 1.3 $
  + * $Date: 2000/11/22 04:55:53 $
    *
    * ====================================================================
    *
  @@ -63,16 +63,43 @@
   
   package org.apache.webdav.lib.methods;
   
  -import java.io.*;
  -import java.util.*;
  -import org.apache.webdav.lib.State;
  -import org.apache.webdav.lib.Header;
  -import org.apache.webdav.lib.WebdavStatus;
  +import java.io.InputStream;
  +import java.io.IOException;
   
  -
   /**
  - * MKCOL Method.
  + * The MKCOL method is used to create a new collection. All DAV compliant 
  + * resources must support the MKCOL method.  Collections are merely 
  + * the HTTP name for structures like directories or folders (and, in 
  + * fact, often map directly to a folder or directory on the web server.
  + * 
  + * <p>   This implementation of a MKCOL client method does not support a
  + * a request body, and the newly created web collection should therefore 
  + * have no members.
  + * 
  + * <p>   MKCOL creates a new collection resource at the location specified by 
  + * the Request-URI. If the resource identified by the Request-URI already
  + * exists on the server then the MKCOL will fail.  During MKCOL processing, 
  + * a server will make the Request-URI a member of the URI's parent collection 
  + * (unless the Request-URI is "/").  If no parent collection exists, the method 
  + * will fail.  Thus, for example, if a request to create collection 
  + * <code>/a/b/c/d/</code> is made, and neither <code>/a/b/</code> nor 
  + * <code>/a/b/c/</code> exists, the request will fail.
  + *
  + * <p>   MKCOL is not idempotent (that is to say, each MKCOL request should
  + * be handled by the web server, and the results of a MKCOL request should
  + * not be cached).
  + * 
  + * <h3>Example Request</h3>
  + * <pre>
  + * MKCOL /webdisc/xfiles/ HTTP/1.1
  + * Host: www.server.org
  + * </pre>
    * 
  + * <h3>Example Response</h3>
  + * <pre>
  + * HTTP/1.1 201 Created
  + * </pre>
  + * 
    * @author <a href="mailto:remm@apache.org">Remy Maucherat</a>
    */
   public class MkcolMethod
  @@ -96,23 +123,12 @@
       
       
       /**
  -     * Generate the query body.
  +     * Parse the response body.  The MKCOL method does not receive a response 
  +     * body.
        * 
  -     * @return String query
  -     */
  -    public String generateQuery() {
  -        return null;
  -    }
  -    
  -    
  -    /**
  -     * Parse response.
  -     * 
        * @param is Input stream
        */
       public void parseResponse(InputStream is)
           throws IOException {
       }
  -    
  -    
   }