org.apache.commons.vfs.provider.ftp
Class FtpFileSystemConfigBuilder

java.lang.Object
  extended byorg.apache.commons.vfs.FileSystemConfigBuilder
      extended byorg.apache.commons.vfs.provider.ftp.FtpFileSystemConfigBuilder

public class FtpFileSystemConfigBuilder
extends FileSystemConfigBuilder

The config builder for various ftp configuration options

Version:
$Revision: 227075 $ $Date: 2005-08-02 22:09:42 +0200 (Tue, 02 Aug 2005) $
Author:
Mario Ivankovits

Method Summary
protected  Class getConfigClass()
           
 String getEntryParser(FileSystemOptions opts)
           
 org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions opts)
           
static FtpFileSystemConfigBuilder getInstance()
           
 Boolean getPassiveMode(FileSystemOptions opts)
           
 Boolean getUserDirIsRoot(FileSystemOptions opts)
           
 void setEntryParser(FileSystemOptions opts, String key)
          set the FQCN of your FileEntryParser used to parse the directory listing from your server.

If you do not use the default commons-net FTPFileEntryParserFactory e.g.
 void setEntryParserFactory(FileSystemOptions opts, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory)
          FTPFileEntryParserFactory which will be used for ftp-entry parsing
 void setPassiveMode(FileSystemOptions opts, boolean passiveMode)
          enter into passive mode
 void setUserDirIsRoot(FileSystemOptions opts, boolean userDirIsRoot)
          use user directory as root (do not change to fs root)
 
Methods inherited from class org.apache.commons.vfs.FileSystemConfigBuilder
getParam, hasParam, setParam
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FtpFileSystemConfigBuilder getInstance()

setEntryParserFactory

public void setEntryParserFactory(FileSystemOptions opts,
                                  org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory factory)
FTPFileEntryParserFactory which will be used for ftp-entry parsing

Parameters:
opts -
factory - instance of your factory

getEntryParserFactory

public org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions opts)
Parameters:
opts -
Returns:
See Also:
setEntryParserFactory(org.apache.commons.vfs.FileSystemOptions, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory)

setEntryParser

public void setEntryParser(FileSystemOptions opts,
                           String key)
set the FQCN of your FileEntryParser used to parse the directory listing from your server.

If you do not use the default commons-net FTPFileEntryParserFactory e.g. by using setEntryParserFactory(org.apache.commons.vfs.FileSystemOptions, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory) this is the "key" parameter passed as argument into your custom factory

Parameters:
opts -
key -

getEntryParser

public String getEntryParser(FileSystemOptions opts)
Parameters:
opts -
Returns:
See Also:
setEntryParser(org.apache.commons.vfs.FileSystemOptions, java.lang.String)

getConfigClass

protected Class getConfigClass()
Specified by:
getConfigClass in class FileSystemConfigBuilder

setPassiveMode

public void setPassiveMode(FileSystemOptions opts,
                           boolean passiveMode)
enter into passive mode

Parameters:
opts -
passiveMode -

getPassiveMode

public Boolean getPassiveMode(FileSystemOptions opts)
Parameters:
opts -
Returns:
See Also:
setPassiveMode(org.apache.commons.vfs.FileSystemOptions, boolean)

setUserDirIsRoot

public void setUserDirIsRoot(FileSystemOptions opts,
                             boolean userDirIsRoot)
use user directory as root (do not change to fs root)

Parameters:
opts -
userDirIsRoot -

getUserDirIsRoot

public Boolean getUserDirIsRoot(FileSystemOptions opts)
Parameters:
opts -
Returns:
See Also:
setUserDirIsRoot(org.apache.commons.vfs.FileSystemOptions, boolean)


Copyright © 2002-2005 The Apache Software Foundation. All Rights Reserved.