[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-dev
Subject:    cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd Slide.java
From:       jericho () apache ! org
Date:       2001-05-17 0:34:02
[Download RAW message or body]

jericho     01/05/16 17:34:02

  Modified:    src/webdav/client/src/org/apache/webdav/lib
                        WebdavResource.java
               src/webdav/client/src/org/apache/webdav/cmd Slide.java
  Log:
  - Update comments for javadoc.
  - Update help messages for the command line client.
  
  Revision  Changes    Path
  1.12      +25 -20    \
jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java  
  Index: WebdavResource.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- WebdavResource.java	2001/05/16 16:51:43	1.11
  +++ WebdavResource.java	2001/05/17 00:34:01	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v \
                1.11 2001/05/16 16:51:43 jericho Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/05/16 16:51:43 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/lib/WebdavResource.java,v \
1.12 2001/05/17 00:34:01 jericho Exp $  + * $Revision: 1.12 $
  + * $Date: 2001/05/17 00:34:01 $
    *
    * ====================================================================
    *
  @@ -97,27 +97,27 @@
    * for WebDAV resource.<p>
    *
    * <pre>
  - * A functional comparison of WebdavResource and JDK(It's somewhat different).
  + * A functional comparison of WebdavResource and JDK(It's different a lot).
    * ----------------------------------+------------------------------------- 
    *   File class (JDK 1.3.x)          |  WebdavResource class
    * ----------------------------------+------------------------------------- 
    *   File(String, String)            |  WebdavResource(...) 
    *   File(File, String)              |  setHttpURL(HttpURL, String) 
  - *   getName()                       |  *see HttpURL
  - *   getParaent()                    |  *see HttpURL
  + *   getName()                       |  *see getHttpURL() and HttpURL
  + *   getParaent()                    |  *see getHttpURL() and HttpURL
    *   getParentFile()                 |  X (not yet) 
  - *   getPath()                       |  *see HttpURL
  + *   getPath()                       |  *see getHttpURL() and HttpURL
    *   isAbsolute()                    |  X 
  - *   getAbsolutePath()               |  *see getHttpURL() and HttpURL class 
  + *   getAbsolutePath()               |  *see getHttpURL() and HttpURL
    *   getAbsoluteFile()               |  X 
  - *   getCanonicalPath()              |  X 
  + *   getCanonicalPath()              |  
    *   getCanonicalFile()              |  X 
    *   toURL()                         |  *see HttpURL
    *   canRead()                       |  
  - *   canWrite()                      |  isLocked() 
  + *   !canWrite()                     |  !isLocked() 
    *   exists()                        |  exists() 
    *   isDirectory()                   |  isCollection() 
  - *   isFile()                        |  isCollection() 
  + *   isFile()                        |  !isCollection() 
    *   isHidden()                      |  getIsHidden() 
    *   lastModified()                  |  getGetLastModified() 
    *   length()                        |  getGetContentLength() 
  @@ -262,15 +262,16 @@
   
       /**
        * The constructor.
  +     * It must be put an escaped http URL as an arguement.
        *
  -     * @param httpURL The specified http URL string.
  +     * @param escapedHttpURL The escaped http URL string.
        * @exception HttpException
        * @exception IOException
        */
  -    public WebdavResource(String httpURL)
  +    public WebdavResource(String escapedHttpURL)
           throws HttpException, IOException {
   
  -        setHttpURL(httpURL);
  +        setHttpURL(escapedHttpURL);
       }
   
   
  @@ -997,9 +998,10 @@
   
       /**
        * Set the HttpURL for this WebdavResource.
  +     * It must be put an escaped path part of the http URL as an arguement.
        *
        * @param httpURL The specified HttpURL.
  -     * @param additionalPath The added relative path.
  +     * @param additionalPath The added escaped relative path.
        * @param action The action to decide properties to find.
        * @param depth The depth.
        * @exception HttpException
  @@ -1019,9 +1021,10 @@
   
       /**
        * Set the HttpURL for this WebdavResource.
  +     * It must be put an escaped path part of the http URL as an arguement.
        *
        * @param httpURL The specified HttpURL.
  -     * @param additionalPath The added relative path.
  +     * @param additionalPath The added escaped relative path.
        * @param action The action to decide properties to find.
        * @exception HttpException
        * @exception IOException
  @@ -1040,9 +1043,10 @@
   
       /**
        * Set the HttpURL for this WebdavResource.
  +     * It must be put an escaped path part of the http URL as an arguement.
        *
        * @param httpURL The specified HttpURL.
  -     * @param additionalPath The added relative path.
  +     * @param additionalPath The added escaped relative path.
        * @exception HttpException
        * @exception IOException
        * @see #setHttpURL(java.lang.String)
  @@ -1076,18 +1080,19 @@
   
       /**
        * Set the HttpURL of this WebdavResource.
  +     * It must be put an escaped http URL as an arguement.
        *
  -     * @param httpURL the specified http URL string.
  +     * @param escapedHttpURL The escaped http URL string.
        * @exception HttpException
        * @exception IOException
        * @see #setHttpURL(HttpURL)
        * @see #setUserInfo(java.lang.String, java.lang.String)
        * @see #setPath(java.lang.String)
        */
  -    public void setHttpURL(String httpURL)
  +    public void setHttpURL(String escapedHttpURL)
           throws HttpException, IOException {
   
  -        setHttpURL(new HttpURL(httpURL));
  +        setHttpURL(new HttpURL(escapedHttpURL));
       }
   
   
  
  
  
  1.28      +9 -6      \
jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java  
  Index: Slide.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- Slide.java	2001/05/10 18:10:18	1.27
  +++ Slide.java	2001/05/17 00:34:01	1.28
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java,v \
                1.27 2001/05/10 18:10:18 jericho Exp $
  - * $Revision: 1.27 $
  - * $Date: 2001/05/10 18:10:18 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/cmd/Slide.java,v \
1.28 2001/05/17 00:34:01 jericho Exp $  + * $Revision: 1.28 $
  + * $Date: 2001/05/17 00:34:01 $
    *
    * ====================================================================
    *
  @@ -234,6 +234,7 @@
                               if (password != null)
                                   password= password.trim();
                               try {
  +                                // It should be used like this way.
                                   httpURL.setUserInfo(userName, password);
                                   if (webdavResource != null) {
                                       webdavResource.setHttpURL(httpURL);
  @@ -309,7 +310,7 @@
                       default:
                           System.err.println
                               ("[Help] open " +
  -                             "http://username:password@hostname:port/path");
  +                             "http://hostname[:port][/path]");
                           continue;
                       }
   
  @@ -346,6 +347,7 @@
                                           webdavResource = null;
                                       }
                                       httpURL = new HttpURL(inputUrl);
  +                                    // It should be used like this way.
                                       httpURL.setUserInfo(userName, password);
                                       if (webdavResource != null) {
                                           webdavResource.setHttpURL(inputUrl);
  @@ -670,8 +672,9 @@
                                       if (password != null)
                                           password= password.trim();
                                       try {
  +                                        // It should be used like this way.
                                           httpURL.setUserInfo(userName,
  -                                            password);
  +                                        password);
                                           webdavResource.close();
                                           webdavResource =
                                               new WebdavResource(httpURL);
  @@ -1295,7 +1298,7 @@
       private static void printCmdLineUsage() {
   
           System.out.println("Usage: Slide [-vdh] " +
  -            "[http://][username:password@]hostname[:port]/path");
  +            "http://hostname[:port][/path]");
           System.out.println
               ("  Default protocol: http, port: 80, path: /");
           System.out.println("Options:");
  
  
  


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic