commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ima...@apache.org
Subject cvs commit: jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp FtpClientFactory.java FtpFileProvider.java FtpFileSystem.java FtpFileSystemConfigBuilder.java
Date Thu, 26 Aug 2004 16:37:55 GMT
imario      2004/08/26 09:37:55

  Modified:    vfs/src/java/org/apache/commons/vfs/provider/ftp
                        FtpClientFactory.java FtpFileProvider.java
                        FtpFileSystem.java FtpFileSystemConfigBuilder.java
  Log:
  allow configuration of FTPFileEntryParserFactory
  
  Revision  Changes    Path
  1.2       +6 -6      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java
  
  Index: FtpClientFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpClientFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FtpClientFactory.java	26 May 2004 08:13:35 -0000	1.1
  +++ FtpClientFactory.java	26 Aug 2004 16:37:55 -0000	1.2
  @@ -18,7 +18,9 @@
   import org.apache.commons.net.ftp.FTP;
   import org.apache.commons.net.ftp.FTPClient;
   import org.apache.commons.net.ftp.FTPReply;
  +import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
   import org.apache.commons.vfs.FileSystemException;
  +import org.apache.commons.vfs.FileSystemOptions;
   
   import java.io.IOException;
   
  @@ -37,7 +39,7 @@
       /**
        * Creates a new connection to the server.
        */
  -    public static FTPClient createConnection(String hostname, int port, String username,
String password, String workingDirectory) throws FileSystemException
  +    public static FTPClient createConnection(String hostname, int port, String username,
String password, String workingDirectory, FileSystemOptions fileSystemOptions) throws FileSystemException
       {
           // Determine the username and password to use
           if (username == null)
  @@ -54,13 +56,11 @@
           {
               final FTPClient client = new FTPClient();
   
  -            /* as soon as commons-1.2 will be released
  -            FTPFileEntryParserFactory myFactory = FtpFileSystemConfigBuilder.getInstance().getFTPFileEntryParserFactory(getFileSystemOptions());
  +            FTPFileEntryParserFactory myFactory = FtpFileSystemConfigBuilder.getInstance().getFTPFileEntryParserFactory(fileSystemOptions);
               if (myFactory != null)
               {
  -            client.setParserFactory(myFactory);
  +                client.setParserFactory(myFactory);
               }
  -            */
   
               try
               {
  
  
  
  1.10      +3 -2      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java
  
  Index: FtpFileProvider.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileProvider.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FtpFileProvider.java	30 Jun 2004 19:06:38 -0000	1.9
  +++ FtpFileProvider.java	26 Aug 2004 16:37:55 -0000	1.10
  @@ -84,7 +84,8 @@
               rootName.getPort(),
               rootName.getUserName(),
               rootName.getPassword(),
  -            rootName.getPath());
  +            rootName.getPath(),
  +            fileSystemOptions);
   
           return new FtpFileSystem(rootName, ftpClient, fileSystemOptions);
       }
  
  
  
  1.31      +2 -1      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java
  
  Index: FtpFileSystem.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystem.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- FtpFileSystem.java	4 Jul 2004 18:45:56 -0000	1.30
  +++ FtpFileSystem.java	26 Aug 2004 16:37:55 -0000	1.31
  @@ -107,7 +107,8 @@
                   rootName.getPort(),
                   rootName.getUserName(),
                   rootName.getPassword(),
  -                rootName.getPath());
  +                rootName.getPath(),
  +                getFileSystemOptions());
               // return createConnection();
           }
           else
  
  
  
  1.5       +3 -3      jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java
  
  Index: FtpFileSystemConfigBuilder.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/vfs/src/java/org/apache/commons/vfs/provider/ftp/FtpFileSystemConfigBuilder.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FtpFileSystemConfigBuilder.java	19 May 2004 19:34:06 -0000	1.4
  +++ FtpFileSystemConfigBuilder.java	26 Aug 2004 16:37:55 -0000	1.5
  @@ -15,7 +15,9 @@
    */
   package org.apache.commons.vfs.provider.ftp;
   
  +import org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory;
   import org.apache.commons.vfs.FileSystemConfigBuilder;
  +import org.apache.commons.vfs.FileSystemOptions;
   
   /**
    * The config builder for various ftp configuration options
  @@ -36,7 +38,6 @@
       {
       }
   
  -    /* as soon as commons-1.2 will be released
       public void setFTPFileEntryParserFactory(FileSystemOptions opts, FTPFileEntryParserFactory
factory)
       {
           setParam(opts, FTPFileEntryParserFactory.class.getName(), factory);
  @@ -46,7 +47,6 @@
       {
           return (FTPFileEntryParserFactory) getParam(opts, FTPFileEntryParserFactory.class.getName());
       }
  -    */
   
       protected Class getConfigClass()
       {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message