Class FtpFileSystemConfigBuilder
- java.lang.Object
-
- org.apache.commons.vfs.FileSystemConfigBuilder
-
- org.apache.commons.vfs.provider.ftp.FtpFileSystemConfigBuilder
-
public class FtpFileSystemConfigBuilder extends FileSystemConfigBuilder
The config builder for various ftp configuration options- Version:
- $Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Wed, 29 Nov 2006) $
- Author:
- Mario Ivankovits
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.Class
getConfigClass()
java.lang.Integer
getDataTimeout(FileSystemOptions opts)
java.lang.String
getDefaultDateFormat(FileSystemOptions opts)
get the language code used by the server.java.lang.String
getEntryParser(FileSystemOptions opts)
org.apache.commons.net.ftp.parser.FTPFileEntryParserFactory
getEntryParserFactory(FileSystemOptions opts)
static FtpFileSystemConfigBuilder
getInstance()
java.lang.Boolean
getPassiveMode(FileSystemOptions opts)
java.lang.String
getRecentDateFormat(FileSystemOptions opts)
seeFTPClientConfig
for details and examples.java.lang.String
getServerLanguageCode(FileSystemOptions opts)
get the language code used by the server.java.lang.String
getServerTimeZoneId(FileSystemOptions opts)
seeFTPClientConfig
for details and examples.java.lang.String[]
getShortMonthNames(FileSystemOptions opts)
seeFTPClientConfig
for details and examples.java.lang.Boolean
getUserDirIsRoot(FileSystemOptions opts)
void
setDataTimeout(FileSystemOptions opts, java.lang.Integer dataTimeout)
set the data timeout for the ftp client.
If you set the dataTimeout tonull
no dataTimeout will be set on the ftp client.void
setDefaultDateFormat(FileSystemOptions opts, java.lang.String defaultDateFormat)
set the language code used by the server.void
setEntryParser(FileSystemOptions opts, java.lang.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 parsingvoid
setPassiveMode(FileSystemOptions opts, boolean passiveMode)
enter into passive modevoid
setRecentDateFormat(FileSystemOptions opts, java.lang.String recentDateFormat)
seeFTPClientConfig
for details and examples.void
setServerLanguageCode(FileSystemOptions opts, java.lang.String serverLanguageCode)
set the language code used by the server.void
setServerTimeZoneId(FileSystemOptions opts, java.lang.String serverTimeZoneId)
seeFTPClientConfig
for details and examples.void
setShortMonthNames(FileSystemOptions opts, java.lang.String[] shortMonthNames)
seeFTPClientConfig
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.vfs.FileSystemConfigBuilder
getParam, hasParam, setParam
-
-
-
-
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)
-
setEntryParser
public void setEntryParser(FileSystemOptions opts, java.lang.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 usingsetEntryParserFactory(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 java.lang.String getEntryParser(FileSystemOptions opts)
- Parameters:
opts
-- See Also:
setEntryParser(org.apache.commons.vfs.FileSystemOptions, java.lang.String)
-
getConfigClass
protected java.lang.Class getConfigClass()
- Specified by:
getConfigClass
in classFileSystemConfigBuilder
-
setPassiveMode
public void setPassiveMode(FileSystemOptions opts, boolean passiveMode)
enter into passive mode- Parameters:
opts
-passiveMode
-
-
getPassiveMode
public java.lang.Boolean getPassiveMode(FileSystemOptions opts)
- Parameters:
opts
-- 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 java.lang.Boolean getUserDirIsRoot(FileSystemOptions opts)
- Parameters:
opts
-- See Also:
setUserDirIsRoot(org.apache.commons.vfs.FileSystemOptions, boolean)
-
getDataTimeout
public java.lang.Integer getDataTimeout(FileSystemOptions opts)
- Parameters:
opts
-- See Also:
setDataTimeout(org.apache.commons.vfs.FileSystemOptions, java.lang.Integer)
-
setDataTimeout
public void setDataTimeout(FileSystemOptions opts, java.lang.Integer dataTimeout)
set the data timeout for the ftp client.
If you set the dataTimeout tonull
no dataTimeout will be set on the ftp client.- Parameters:
opts
-dataTimeout
-
-
getServerLanguageCode
public java.lang.String getServerLanguageCode(FileSystemOptions opts)
get the language code used by the server. seeFTPClientConfig
for details and examples.
-
setServerLanguageCode
public void setServerLanguageCode(FileSystemOptions opts, java.lang.String serverLanguageCode)
set the language code used by the server. seeFTPClientConfig
for details and examples.
-
getDefaultDateFormat
public java.lang.String getDefaultDateFormat(FileSystemOptions opts)
get the language code used by the server. seeFTPClientConfig
for details and examples.
-
setDefaultDateFormat
public void setDefaultDateFormat(FileSystemOptions opts, java.lang.String defaultDateFormat)
set the language code used by the server. seeFTPClientConfig
for details and examples.
-
getRecentDateFormat
public java.lang.String getRecentDateFormat(FileSystemOptions opts)
seeFTPClientConfig
for details and examples.
-
setRecentDateFormat
public void setRecentDateFormat(FileSystemOptions opts, java.lang.String recentDateFormat)
seeFTPClientConfig
for details and examples.
-
getServerTimeZoneId
public java.lang.String getServerTimeZoneId(FileSystemOptions opts)
seeFTPClientConfig
for details and examples.
-
setServerTimeZoneId
public void setServerTimeZoneId(FileSystemOptions opts, java.lang.String serverTimeZoneId)
seeFTPClientConfig
for details and examples.
-
getShortMonthNames
public java.lang.String[] getShortMonthNames(FileSystemOptions opts)
seeFTPClientConfig
for details and examples.
-
setShortMonthNames
public void setShortMonthNames(FileSystemOptions opts, java.lang.String[] shortMonthNames)
seeFTPClientConfig
for details and examples.
-
-