Interface FtpTarget
- All Superinterfaces:
DeployTarget
Deployment of contents using the file transfer protocol (FTP).
- Since:
- 4.0.17
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Definition of several ftp proxy types.static enum
Definition of several ftp server types. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Deprecated.static final String
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.WIN
.getId()
static final String
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.OS400
.getId()
static final String
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.UNIX
.getId()
static final String
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.VMS
.getId()
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get ftp connection timeout parameter in seconds. -1 means no timeout.long
Get ftp data transfer timeout parameter in seconds. -1 means no timeout.The default time format used to parse the directory listings provided by the ftp server.
Anull
value means that a default date format of the locale en_US is used.The fallback time format used to parse the directory listings provided by the ftp server, if this cannot be parsed with thedefault time format
Anull
value means that a server type dependent default fallback will be used.@Nullable String
There are some predefined types which may be returned:SYST_UNIX
SYST_NT
SYST_OS400
SYST_MVS
SYST_VMS
Anull
value signals auto detection.
Every other value should be a fully qualified class name of a custom class implementingorg.apache.commons.net.ftp.FTPFileEntryParser
andorg.apache.commons.net.ftp.Configurable
getHost()
The host of the ftp serverboolean
The client to server communication may be performed in local active or passive mode.getLogin()
The login name, used to log on the ftp serverThe password, used for loginThe host for ftp proxy.The login used for ftp proxy.The password used for ftp proxy login.int
The port for ftp proxy.The protocol used for ftp proxy.If the ftp server uses alphabetic month names in it's timestamps the short month names of this locale is used for date parsing.@Nullable TimeZone
This property is used to interpret file dates, for the format seeTimeZone
.
Anull
value means that the time zone of the FirstSpirit server is used.The relative source directory, typically empty.boolean
true
if text files should be transfered in ASCII mode (default).
Transferring files in text mode may convert line breaks from \r\n to \n (for Windows to Unix transfer) or vice versa (for Unix to Windows transfer).boolean
true
if ftp proxy should be used,false
otherwise (default).void
setConnectionTimeout
(@Nullable Long value) Set ftp connection timeout parameter in seconds. -1 means no timeout,null
means "use default value".void
setDataTimeout
(@Nullable Long value) Set ftp data transfer timeout parameter in seconds. -1 means no timeout,null
means "use default value".void
setDefaultTimeFormat
(String value) Set the default time format used to parse the directory listings provided by the ftp server.
Anull
value means that a default date format of the locale en_US is used.void
setFallbackTimeFormat
(String value) Set the fallback time format used to parse the directory listings provided by the ftp server, if this cannot be parsed with thedefault time format
.void
setFtpServerType
(@Nullable String value) Provide the ftp server type.void
Provide the host of the ftp servervoid
setLocalActiveMode
(boolean value) The client to server communication may be performed in local active (default) or passive mode.void
Set the login name which is used to log on the ftp servervoid
setPassword
(String value) Set the password which is used for loginvoid
setProxyHost
(String value) Set the host for ftp proxy.void
setProxyLogin
(String value) Set the login used for ftp proxy.void
setProxyPassword
(String value) Set the password used for ftp proxy login.void
setProxyPort
(int value) Set the port for ftp proxy.void
Set the protocol used for ftp proxy.void
setServerLanguageLocale
(Locale value) If the ftp server uses alphabetic month names in it's timestamps the short month names of this locale is used for date parsing.void
setServerTimeZone
(TimeZone value) This property is used to interpret file dates, for a list of valid id's seeTimeZone
.
Anull
value means that the time zone of the FirstSpirit server is used.void
setSourceDirectory
(String value) Provide the source directory, relative to the schedule directory.void
setUseAsciiMode
(boolean value) Providetrue
if text files should be transfered in ASCII mode (default).void
setUseBlockTransferMode
(boolean value) Toggle between block transfer mode and stream mode (default).void
setUseProxy
(boolean value) Providetrue
if ftp proxy should be used,false
otherwise (default).boolean
Is block or stream mode (default) used?Methods inherited from interface de.espirit.firstspirit.access.schedule.DeployTarget
checkParams, createWebServerConfiguration, getPath, getTargetType, getWebServerConfiguration, setPath
-
Field Details
-
SYST_UNIX
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.UNIX
.getId()
- Since:
- 4.0.17
-
SYST_NT
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.WIN
.getId()
- Since:
- 4.0.17
-
SYST_OS400
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.OS400
.getId()
- Since:
- 4.0.17
-
SYST_VMS
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.VMS
.getId()
- Since:
- 4.0.17
-
SYST_MVS
Deprecated.since 4.2.34 - replaced byFtpTarget.FtpServerType.MVS
.getId()
- Since:
- 4.0.17
-
-
Method Details
-
getHost
String getHost()The host of the ftp server- Since:
- 4.0.17
-
setHost
Provide the host of the ftp server- Parameters:
value
- the host of the ftp server- Since:
- 4.0.17
-
getLogin
String getLogin()The login name, used to log on the ftp server- Since:
- 4.0.17
-
setLogin
Set the login name which is used to log on the ftp server- Parameters:
value
- the login name which is used to log on the ftp server- Since:
- 4.0.17
-
getPassword
String getPassword()The password, used for login- Since:
- 4.0.17
-
setPassword
Set the password which is used for login- Parameters:
value
- the password which is used for login- Since:
- 4.0.17
-
getFtpServerType
There are some predefined types which may be returned: Anull
value signals auto detection.
Every other value should be a fully qualified class name of a custom class implementingorg.apache.commons.net.ftp.FTPFileEntryParser
andorg.apache.commons.net.ftp.Configurable
- Returns:
null
for auto detection of ftp server type, a predifined type constant (SYST_*) or a full qualified class name- Since:
- 4.0.17
- See Also:
-
setFtpServerType
Provide the ftp server type.- Parameters:
value
-null
for auto detection of ftp server type or aFtpServerType
usinggetId()
.- Since:
- 4.0.17
- See Also:
-
getLocalActiveMode
boolean getLocalActiveMode()The client to server communication may be performed in local active or passive mode.- Returns:
true
for local active mode (default),false
for local passive mode- Since:
- 4.0.17
- See Also:
-
setLocalActiveMode
void setLocalActiveMode(boolean value) The client to server communication may be performed in local active (default) or passive mode.- Parameters:
value
- usetrue
for local active mode,false
for local passive mode- Since:
- 4.0.17
- See Also:
-
getSourceDirectory
String getSourceDirectory()The relative source directory, typically empty. The path is relative to the schedule directory.- Since:
- 4.0.17
-
setSourceDirectory
Provide the source directory, relative to the schedule directory.- Parameters:
value
- a directory relative to the schedule directory- Since:
- 4.0.17
-
getServerTimeZone
This property is used to interpret file dates, for the format seeTimeZone
.
Anull
value means that the time zone of the FirstSpirit server is used.- Since:
- 4.0.17
- See Also:
-
setServerTimeZone
This property is used to interpret file dates, for a list of valid id's seeTimeZone
.
Anull
value means that the time zone of the FirstSpirit server is used.- Since:
- 4.0.17
- See Also:
-
getServerLanguageLocale
Locale getServerLanguageLocale()If the ftp server uses alphabetic month names in it's timestamps the short month names of this locale is used for date parsing. By default the locale en_US is used.- Since:
- 4.0.17
- See Also:
-
setServerLanguageLocale
If the ftp server uses alphabetic month names in it's timestamps the short month names of this locale is used for date parsing. By default the locale en_US is used.- Since:
- 4.0.17
- See Also:
-
getDefaultTimeFormat
String getDefaultTimeFormat()The default time format used to parse the directory listings provided by the ftp server.
Anull
value means that a default date format of the locale en_US is used.- Since:
- 4.0.17
- See Also:
-
setDefaultTimeFormat
Set the default time format used to parse the directory listings provided by the ftp server.
Anull
value means that a default date format of the locale en_US is used.- Since:
- 4.0.17
- See Also:
-
getFallbackTimeFormat
String getFallbackTimeFormat()The fallback time format used to parse the directory listings provided by the ftp server, if this cannot be parsed with thedefault time format
Anull
value means that a server type dependent default fallback will be used.- Since:
- 4.0.17
- See Also:
-
setFallbackTimeFormat
Set the fallback time format used to parse the directory listings provided by the ftp server, if this cannot be parsed with thedefault time format
. This is usally the case for 'recent dates', which omit the year, e.g. "Mar 1 12:04".
Somtimes the month abbreviations used by the ftp server are not iso-conform. You may specify these abbreviations here as a suffix, delimited by pipe (|) characters:"MMM d hh24:mm|Jan|Feb|Mär|Apr|Mai|Jun|Jul|Aug|Sep|Okt|Nov|Dez"
Anull
value means that no fallback will be used- Since:
- 4.0.17
- See Also:
-
getUseAsciiMode
boolean getUseAsciiMode()true
if text files should be transfered in ASCII mode (default).
Transferring files in text mode may convert line breaks from \r\n to \n (for Windows to Unix transfer) or vice versa (for Unix to Windows transfer). In non ASCII mode files are transferred in BIN mode and no convertion will take place.- Since:
- 4.0.17
- See Also:
-
setUseAsciiMode
void setUseAsciiMode(boolean value) Providetrue
if text files should be transfered in ASCII mode (default).- Parameters:
value
-true
if text files should be transfered in ASCII mode (default)- Since:
- 4.0.17
- See Also:
-
getUseProxy
boolean getUseProxy()true
if ftp proxy should be used,false
otherwise (default).- Since:
- 4.0.17
-
setUseProxy
void setUseProxy(boolean value) Providetrue
if ftp proxy should be used,false
otherwise (default).- Parameters:
value
-true
if ftp proxy should be used,false
otherwise (default)- Since:
- 4.0.17
-
getProxyHost
String getProxyHost()The host for ftp proxy.- Since:
- 4.0.17
-
setProxyHost
Set the host for ftp proxy.- Parameters:
value
- the host for ftp proxy- Since:
- 4.0.17
-
getProxyPort
int getProxyPort()The port for ftp proxy.- Since:
- 4.0.17
-
setProxyPort
void setProxyPort(int value) Set the port for ftp proxy.- Parameters:
value
- the port for ftp proxy- Since:
- 4.0.17
-
getProxyType
FtpTarget.FtpProxyType getProxyType()The protocol used for ftp proxy.- Since:
- 4.0.17
-
setProxyType
Set the protocol used for ftp proxy.- Parameters:
value
- the protocol used for ftp proxy- Since:
- 4.0.17
-
getProxyLogin
String getProxyLogin()The login used for ftp proxy.- Since:
- 4.0.17
-
setProxyLogin
Set the login used for ftp proxy.- Parameters:
value
- the login used for ftp proxy- Since:
- 4.0.17
-
getProxyPassword
String getProxyPassword()The password used for ftp proxy login.- Since:
- 4.0.17
-
setProxyPassword
Set the password used for ftp proxy login.- Parameters:
value
- the password used for ftp proxy login- Since:
- 4.0.17
-
setConnectionTimeout
Set ftp connection timeout parameter in seconds. -1 means no timeout,null
means "use default value". Default value is set via fs-server.conf entry FTP_CONNECT_TIMEOUT.- Since:
- 4.2.16
- See Also:
-
getConnectionTimeout
long getConnectionTimeout()Get ftp connection timeout parameter in seconds. -1 means no timeout. Default value is set via fs-server.conf entry FTP_CONNECT_TIMEOUT.- Since:
- 4.2.16
- See Also:
-
setDataTimeout
Set ftp data transfer timeout parameter in seconds. -1 means no timeout,null
means "use default value". Default value is set via fs-server.conf entry FTP_DATA_TIMEOUT.- Since:
- 4.2.16
- See Also:
-
getDataTimeout
long getDataTimeout()Get ftp data transfer timeout parameter in seconds. -1 means no timeout. Default value is set via fs-server.conf entry FTP_DATA_TIMEOUT- Since:
- 4.2.16
- See Also:
-
useBlockTransferMode
boolean useBlockTransferMode()Is block or stream mode (default) used?- Returns:
true
for block transfer mode,false
for stream mode (default).- Since:
- 4.2.472
- See Also:
-
setUseBlockTransferMode
void setUseBlockTransferMode(boolean value) Toggle between block transfer mode and stream mode (default).- Parameters:
value
-true
to switch to block transfer mode,false
for stream mode (default).- Since:
- 4.2.472
- See Also:
-
FtpTarget.FtpServerType.MVS
.getId()