org.apache.commons.vfs2.provider.ftps
Class FtpsFileSystemConfigBuilder

java.lang.Object
  extended by org.apache.commons.vfs2.FileSystemConfigBuilder
      extended by org.apache.commons.vfs2.provider.ftps.FtpsFileSystemConfigBuilder

public final class FtpsFileSystemConfigBuilder
extends FileSystemConfigBuilder

The config BUILDER for various ftp configuration options.

Since:
2.0
Author:
Commons VFS team

Method Summary
protected  Class<? extends FileSystem> getConfigClass()
           
 Integer getDataTimeout(FileSystemOptions opts)
           
 String getDefaultDateFormat(FileSystemOptions opts)
          get the language code used by the server.
 String getEntryParser(FileSystemOptions opts)
           
 org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions opts)
           
 String getFtpsType(FileSystemOptions opts)
          Return the FTPS security mode.
static FtpsFileSystemConfigBuilder getInstance()
           
 Boolean getPassiveMode(FileSystemOptions opts)
           
 String getRecentDateFormat(FileSystemOptions opts)
          see FTPClientConfig for details and examples.
 String getServerLanguageCode(FileSystemOptions opts)
          get the language code used by the server.
 String getServerTimeZoneId(FileSystemOptions opts)
          see FTPClientConfig for details and examples.
 String[] getShortMonthNames(FileSystemOptions opts)
          see FTPClientConfig for details and examples.
 Boolean getUserDirIsRoot(FileSystemOptions opts)
           
 void setDataTimeout(FileSystemOptions opts, Integer dataTimeout)
          set the data timeout for the ftp client.
If you set the dataTimeout to null no dataTimeout will be set on the ftp client.
 void setDefaultDateFormat(FileSystemOptions opts, String defaultDateFormat)
          set the language code used by the server.
 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 setFtpsType(FileSystemOptions opts, String ftpsType)
          Set FTPS security mode, either "implicit" or "explicit".
 void setPassiveMode(FileSystemOptions opts, boolean passiveMode)
          Enter into passive mode.
 void setRecentDateFormat(FileSystemOptions opts, String recentDateFormat)
          see FTPClientConfig for details and examples.
 void setServerLanguageCode(FileSystemOptions opts, String serverLanguageCode)
          set the language code used by the server.
 void setServerTimeZoneId(FileSystemOptions opts, String serverTimeZoneId)
          see FTPClientConfig for details and examples.
 void setShortMonthNames(FileSystemOptions opts, String[] shortMonthNames)
          see FTPClientConfig for details and examples.
 void setUserDirIsRoot(FileSystemOptions opts, boolean userDirIsRoot)
          use user directory as root (do not change to fs root).
 
Methods inherited from class org.apache.commons.vfs2.FileSystemConfigBuilder
getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getCharacter, getCharacter, getCharacter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInteger, getInteger, getInteger, getLong, getLong, getLong, getParam, getRootURI, getShort, getShort, getShort, getString, getString, hasObject, hasParam, setParam, setRootURI
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static FtpsFileSystemConfigBuilder 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 - The FileSystemOptions.
factory - instance of your factory

getEntryParserFactory

public org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory getEntryParserFactory(FileSystemOptions opts)
Parameters:
opts - The FileSystemOptions
Returns:
The FTPFileEntryParserFactory.
See Also:
setEntryParserFactory(org.apache.commons.vfs2.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.vfs2.FileSystemOptions, org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory) this is the "key" parameter passed as argument into your custom factory

Parameters:
opts - The FileSystemOptions.
key - The key.

getEntryParser

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

getConfigClass

protected Class<? extends FileSystem> getConfigClass()
Specified by:
getConfigClass in class FileSystemConfigBuilder

setPassiveMode

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

Parameters:
opts - The FileSystemOptions.
passiveMode - true if passive mode should be used, false otherwise.

getPassiveMode

public Boolean getPassiveMode(FileSystemOptions opts)
Parameters:
opts - The FileSystemOptions.
Returns:
true if passive mode is being used.
See Also:
setPassiveMode(org.apache.commons.vfs2.FileSystemOptions, boolean)

setUserDirIsRoot

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

Parameters:
opts - The FileSystemOptions.
userDirIsRoot - true if the user directory should be the root.

getUserDirIsRoot

public Boolean getUserDirIsRoot(FileSystemOptions opts)
Parameters:
opts - The FileSystemOptions.
Returns:
true if the user directory is the root.
See Also:
setUserDirIsRoot(org.apache.commons.vfs2.FileSystemOptions, boolean)

setFtpsType

public void setFtpsType(FileSystemOptions opts,
                        String ftpsType)
Set FTPS security mode, either "implicit" or "explicit".

Parameters:
opts - The FileSystemOptions.
ftpsType - The file type.

getFtpsType

public String getFtpsType(FileSystemOptions opts)
Return the FTPS security mode. Defaults to "explicit" if not defined.

Parameters:
opts - The FileSystemOptions.
Returns:
The file type.
See Also:
setFtpsType(org.apache.commons.vfs2.FileSystemOptions, java.lang.String)

getDataTimeout

public Integer getDataTimeout(FileSystemOptions opts)
Parameters:
opts - The FileSystemOptions.
Returns:
The timeout value.
See Also:
setDataTimeout(org.apache.commons.vfs2.FileSystemOptions, java.lang.Integer)

setDataTimeout

public void setDataTimeout(FileSystemOptions opts,
                           Integer dataTimeout)
set the data timeout for the ftp client.
If you set the dataTimeout to null no dataTimeout will be set on the ftp client.

Parameters:
opts - The FileSystemOptions.
dataTimeout - The timeout value.

getServerLanguageCode

public String getServerLanguageCode(FileSystemOptions opts)
get the language code used by the server. see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
Returns:
The language code.

setServerLanguageCode

public void setServerLanguageCode(FileSystemOptions opts,
                                  String serverLanguageCode)
set the language code used by the server. see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
serverLanguageCode - the language code.

getDefaultDateFormat

public String getDefaultDateFormat(FileSystemOptions opts)
get the language code used by the server. see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
Returns:
The default date format.

setDefaultDateFormat

public void setDefaultDateFormat(FileSystemOptions opts,
                                 String defaultDateFormat)
set the language code used by the server. see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
defaultDateFormat - The default date format.

getRecentDateFormat

public String getRecentDateFormat(FileSystemOptions opts)
see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
Returns:
The recent date format.

setRecentDateFormat

public void setRecentDateFormat(FileSystemOptions opts,
                                String recentDateFormat)
see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions
recentDateFormat - The recent date format.

getServerTimeZoneId

public String getServerTimeZoneId(FileSystemOptions opts)
see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
Returns:
The server timezone id.

setServerTimeZoneId

public void setServerTimeZoneId(FileSystemOptions opts,
                                String serverTimeZoneId)
see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
serverTimeZoneId - The server's timezone id.

getShortMonthNames

public String[] getShortMonthNames(FileSystemOptions opts)
see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
Returns:
An array of short month names.

setShortMonthNames

public void setShortMonthNames(FileSystemOptions opts,
                               String[] shortMonthNames)
see FTPClientConfig for details and examples.

Parameters:
opts - The FileSystemOptions.
shortMonthNames - An array of short month names.


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