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 re...@apache.org on 2001/05/01 23:29:42 UTC

cvs commit: jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs Get.java Put.java WebdavMatchingTask.java

remm        01/05/01 14:29:42

  Modified:    src/webdav/client/src/org/apache/webdav/ant
                        CollectionScanner.java
               src/webdav/client/src/org/apache/webdav/ant/taskdefs
                        Get.java Put.java WebdavMatchingTask.java
  Log:
  - Update some package names to org.apache.commons.httpclient.
  - Rename some class names from WebdavXXX to HttpXXX.
  
  Revision  Changes    Path
  1.4       +10 -10    jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/CollectionScanner.java
  
  Index: CollectionScanner.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/CollectionScanner.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CollectionScanner.java	2000/12/07 06:56:58	1.3
  +++ CollectionScanner.java	2001/05/01 21:29:40	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/CollectionScanner.java,v 1.3 2000/12/07 06:56:58 bcholmes Exp $
  - * $Revision: 1.3 $
  - * $Date: 2000/12/07 06:56:58 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/CollectionScanner.java,v 1.4 2001/05/01 21:29:40 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/05/01 21:29:40 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -69,10 +69,10 @@
   import java.util.StringTokenizer;
   import java.util.Vector;
   
  -import org.apache.webdav.lib.Property;
  -import org.apache.webdav.lib.WebdavClient;
  -import org.apache.webdav.lib.WebdavException;
  +import org.apache.commons.httpclient.HttpClient;
  +import org.apache.commons.httpclient.HttpException;
   
  +import org.apache.webdav.lib.Property;
   import org.apache.webdav.lib.methods.PropFindMethod;
   import org.apache.webdav.lib.methods.OptionsMethod;
   
  @@ -91,7 +91,7 @@
   
       private URL baseURL = null;
   
  -    private WebdavClient client = null;
  +    private HttpClient client = null;
   
       private static final Vector PROPERTY_NAMES = new Vector();
   
  @@ -159,7 +159,7 @@
   
           } catch (ScanException e) {
               throw e;
  -        } catch (WebdavException e) {
  +        } catch (HttpException e) {
               throw new ScanException(e.getMessage(), e);
           } catch (UnknownHostException e) {
               throw new ScanException(e.getMessage(), e);
  @@ -212,7 +212,7 @@
           this.baseURL = baseURL;
       }
   
  -    public void setWebdavClient(WebdavClient client) {
  +    public void setHttpClient(HttpClient client) {
           this.client = client;
       }
   
  @@ -223,4 +223,4 @@
       protected char getSeparatorChar() {
           return '/';
       }
  -}
  \ No newline at end of file
  +}
  
  
  
  1.3       +8 -8      jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Get.java
  
  Index: Get.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Get.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Get.java	2000/12/04 06:52:25	1.2
  +++ Get.java	2001/05/01 21:29:40	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Get.java,v 1.2 2000/12/04 06:52:25 bcholmes Exp $
  - * $Revision: 1.2 $
  - * $Date: 2000/12/04 06:52:25 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Get.java,v 1.3 2001/05/01 21:29:40 remm Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/05/01 21:29:40 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -73,10 +73,10 @@
   
   import org.apache.webdav.ant.taskdefs.WebdavMatchingTask;
   
  -import org.apache.webdav.lib.Credentials;
  -import org.apache.webdav.lib.WebdavClient;
  -import org.apache.webdav.lib.WebdavException;
  -import org.apache.webdav.lib.methods.GetMethod;
  +import org.apache.commons.httpclient.Credentials;
  +import org.apache.commons.httpclient.HttpClient;
  +import org.apache.commons.httpclient.HttpException;
  +import org.apache.commons.httpclient.methods.GetMethod;
   
   /**
    * Get a particular resource or collection of resources from a
  @@ -190,7 +190,7 @@
                   throw e;
               }
   
  -        } catch (WebdavException e) {
  +        } catch (HttpException e) {
               throw new BuildException(e.toString());
   
           } catch (MalformedURLException e) {
  
  
  
  1.4       +17 -17    jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Put.java
  
  Index: Put.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Put.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Put.java	2001/03/23 05:06:29	1.3
  +++ Put.java	2001/05/01 21:29:41	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Put.java,v 1.3 2001/03/23 05:06:29 remm Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/03/23 05:06:29 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/Put.java,v 1.4 2001/05/01 21:29:41 remm Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/05/01 21:29:41 $
    *
    * ====================================================================
    * The Apache Software License, Version 1.1
  @@ -76,13 +76,13 @@
   
   import org.apache.tools.ant.types.FileSet;
   
  -import org.apache.util.WebdavStatus;
  -import org.apache.webdav.lib.Credentials;
  -import org.apache.webdav.lib.WebdavClient;
  -import org.apache.webdav.lib.WebdavException;
  +import org.apache.commons.httpclient.HttpStatus;
  +import org.apache.commons.httpclient.Credentials;
  +import org.apache.commons.httpclient.HttpClient;
  +import org.apache.commons.httpclient.HttpException;
   
   import org.apache.webdav.lib.methods.OptionsMethod;
  -import org.apache.webdav.lib.methods.PutMethod;
  +import org.apache.commons.httpclient.methods.PutMethod;
   
   /**
    * Put a bunch of files on to a WebDAV-compliant web server.
  @@ -108,7 +108,7 @@
    * <PRE>
    *
    * @author <a href="mailto:bcholmes@interlog.com">B.C. Holmes</a>
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   public class Put extends MatchingTask {
   
  @@ -122,7 +122,7 @@
        */
       private Vector filesets = new Vector();
   
  -    protected WebdavClient client = new WebdavClient();
  +    protected HttpClient client = new HttpClient();
   
       public Put() {
       }
  @@ -253,13 +253,13 @@
               throw new BuildException(e.getMessage(), e);
           } catch (IOException e) {
               throw new BuildException(e.getMessage(), e);
  -        } catch (WebdavException e) {
  +        } catch (HttpException e) {
               throw new BuildException(e.getMessage(), e);
           }
       }
   
       protected void uploadFiles(String urlFile, FileScanner scanner)
  -        throws WebdavException, IOException {
  +        throws HttpException, IOException {
   
           File baseDir = scanner.getBasedir();
   
  @@ -284,13 +284,13 @@
               method.sendData(connection.getInputStream());
               client.executeMethod(method);
               int status = method.getStatusCode();
  -            if ((status != WebdavStatus.SC_OK) &&
  -                (status != WebdavStatus.SC_CREATED) &&
  -                (status != WebdavStatus.SC_ACCEPTED) &&
  -                (status != WebdavStatus.SC_NO_CONTENT)) {
  +            if ((status != HttpStatus.SC_OK) &&
  +                (status != HttpStatus.SC_CREATED) &&
  +                (status != HttpStatus.SC_ACCEPTED) &&
  +                (status != HttpStatus.SC_NO_CONTENT)) {
   
                   log("Status code " + method.getStatusCode() +
  -                    " (" + WebdavStatus.getStatusText(method.getStatusCode()) +
  +                    " (" + HttpStatus.getStatusText(method.getStatusCode()) +
                       ") received while uploading " + method.getPath());
               }
           }
  
  
  
  1.2       +6 -6      jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/WebdavMatchingTask.java
  
  Index: WebdavMatchingTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/WebdavMatchingTask.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- WebdavMatchingTask.java	2000/11/22 06:19:07	1.1
  +++ WebdavMatchingTask.java	2001/05/01 21:29:41	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/WebdavMatchingTask.java,v 1.1 2000/11/22 06:19:07 remm Exp $
  - * $Revision: 1.1 $
  - * $Date: 2000/11/22 06:19:07 $
  + * $Header: /home/cvs/jakarta-slide/src/webdav/client/src/org/apache/webdav/ant/taskdefs/WebdavMatchingTask.java,v 1.2 2001/05/01 21:29:41 remm Exp $
  + * $Revision: 1.2 $
  + * $Date: 2001/05/01 21:29:41 $
    *
    * ====================================================================
    *
  @@ -78,14 +78,14 @@
   import org.apache.webdav.ant.ScanException;
   import org.apache.webdav.ant.Scanner;
   
  -import org.apache.webdav.lib.WebdavClient;
  -import org.apache.webdav.lib.WebdavException;
  +import org.apache.commons.httpclient.HttpClient;
  +import org.apache.commons.httpclient.HttpException;
   
   public abstract class WebdavMatchingTask extends Task { // ... extends MatchingTask {
   
       // TODO: update for PatternSets, et al
   
  -    protected WebdavClient client = new WebdavClient();
  +    protected HttpClient client = new HttpClient();
   
       protected Vector includeList = new Vector();
       protected Vector excludeList = new Vector();
  @@ -99,7 +99,7 @@
           scanner.setBaseURL(baseURL);
           scanner.setIncludes(makeArray(includeList));
           scanner.setExcludes(makeArray(excludeList));
  -        scanner.setWebdavClient(client);
  +        scanner.setHttpClient(client);
           if (useDefaultExcludes) {
               scanner.addDefaultExcludes();
           }