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
Version:
$Revision: 480428 $ $Date: 2006-11-29 07:15:24 +0100 (Mi, 29 Nov 2006) $
Author:
Commons VFS team

Method Summary
protected  Class<? extends FileSystem> getConfigClass()
           
 FtpsDataChannelProtectionLevel getDataChannelProtectionLevel(FileSystemOptions opts)
           
 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()
           
 String getKeyPW(FileSystemOptions opts)
          get the key password.
 String getKeyStore(FileSystemOptions opts)
          get the keyStore path.
 String getKeyStorePW(FileSystemOptions opts)
          get the keyStore password.
 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.
 String getTrustStore(FileSystemOptions opts)
          get the keyStore path.
 String getTrustStorePW(FileSystemOptions opts)
          get the trustStore password.
 Boolean getUserDirIsRoot(FileSystemOptions opts)
           
 void setDataChannelProtectionLevel(FileSystemOptions opts, FtpsDataChannelProtectionLevel prot)
           
 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 setKeyPW(FileSystemOptions opts, String keyPW)
          Set the Key password.
 void setKeyStore(FileSystemOptions opts, String keyStore)
          Set the key store.
 void setKeyStorePW(FileSystemOptions opts, String keyStorePW)
          Set the key store password.
 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 setTrustStore(FileSystemOptions opts, String trustStore)
          Set the key store.
 void setTrustStorePW(FileSystemOptions opts, String trustStorePW)
          Set the trust store password.
 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)

setKeyStore

public void setKeyStore(FileSystemOptions opts,
                        String keyStore)
Set the key store.

Parameters:
opts - The FileSystemOptions.
keyStore - The path for the keyStore.

getKeyStore

public String getKeyStore(FileSystemOptions opts)
get the keyStore path.

Parameters:
opts - The FileSystemOptions.
Returns:
the key store path.

setTrustStore

public void setTrustStore(FileSystemOptions opts,
                          String trustStore)
Set the key store.

Parameters:
opts - The FileSystemOptions.
trustStore - The path for the keyStore.

getTrustStore

public String getTrustStore(FileSystemOptions opts)
get the keyStore path.

Parameters:
opts - The FileSystemOptions.
Returns:
the key store path.

setKeyStorePW

public void setKeyStorePW(FileSystemOptions opts,
                          String keyStorePW)
Set the key store password.

Parameters:
opts - The FileSystemOptions.
keyStorePW - The keyStore password.

getKeyStorePW

public String getKeyStorePW(FileSystemOptions opts)
get the keyStore password.

Parameters:
opts - The FileSystemOptions.
Returns:
the key store password.

setTrustStorePW

public void setTrustStorePW(FileSystemOptions opts,
                            String trustStorePW)
Set the trust store password.

Parameters:
opts - The FileSystemOptions.
trustStorePW - The trustStore password.

getTrustStorePW

public String getTrustStorePW(FileSystemOptions opts)
get the trustStore password.

Parameters:
opts - The FileSystemOptions.
Returns:
the trust store password.

setKeyPW

public void setKeyPW(FileSystemOptions opts,
                     String keyPW)
Set the Key password.

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

getKeyPW

public String getKeyPW(FileSystemOptions opts)
get the key password.

Parameters:
opts - The FileSystemOptions.
Returns:
the key password.

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.

setDataChannelProtectionLevel

public void setDataChannelProtectionLevel(FileSystemOptions opts,
                                          FtpsDataChannelProtectionLevel prot)

getDataChannelProtectionLevel

public FtpsDataChannelProtectionLevel getDataChannelProtectionLevel(FileSystemOptions opts)


Copyright © 2002–2015 WSO2. All rights reserved.