whatever value it had before, that is, for all these, the default value of null. This would enable property-file based development to proceed more easily. Update documentantation to reflect this. PR: 34978 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278316 13f79535-47bb-0310-9956-ffa450edef68master
@@ -187,18 +187,33 @@ coming from your ftp server (ls -l on the ftp prompt). | |||||
</p><p> | </p><p> | ||||
If none of these is specified, the default mechanism of letting the system | If none of these is specified, the default mechanism of letting the system | ||||
auto-detect the server OS type based on the FTP SYST command and assuming | auto-detect the server OS type based on the FTP SYST command and assuming | ||||
standard formatting for that OS type will be used.</p> | |||||
</td> | |||||
standard formatting for that OS type will be used. | |||||
</p><p> | |||||
To aid in property-file-based development where a build script is configured | |||||
with property files, for any of these attributes, a value of <code>""</code> | |||||
is equivalent to not specifying it. | |||||
</p><p> | |||||
Please understand that these options are incompatible with the autodetection | |||||
scheme. If any of these options is specified, (other than with a value of | |||||
<code>""</code> ) a system type must be chosen and if systemTypeKey is not | |||||
specified, UNIX will be assumed. The philosophy behind this is that these | |||||
options are for setting non-standard formats, and a build-script author who | |||||
knows what system he is dealing with will know what options to need to be | |||||
set. Otherwise, these options should be left alone and the default | |||||
autodetection scheme can be used and will work in the majority of cases. | |||||
</p></td> | |||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
<td valign="top">systemTypeKey</td> | <td valign="top">systemTypeKey</td> | ||||
<td valign="top">Specifies the type of system in use on the server. | <td valign="top">Specifies the type of system in use on the server. | ||||
Supported values are "UNIX", "VMS", "WINDOWS", "OS/2", "OS/400", "MVS". | |||||
If not specified, and no other xxxConfig attributes are specified, the | |||||
autodectection mechanism based on the FTP SYST command will be used. | |||||
Supported values are <code>"UNIX", "VMS", "WINDOWS", "OS/2", "OS/400", | |||||
"MVS".</code> If not specified, (or specified as <code>""</code>) and if | |||||
no other xxxConfig attributes are specified, the autodectection mechanism | |||||
based on the FTP SYST command will be used. | |||||
</td> | </td> | ||||
<td valign="top" align="center">No, but if any of the following xxxConfig | <td valign="top" align="center">No, but if any of the following xxxConfig | ||||
attributes is specified, UNIX will be assumed. | |||||
attributes is specified, UNIX will be assumed, even if <code>""</code> | |||||
is specified here. | |||||
</td> | </td> | ||||
</tr> | </tr> | ||||
<tr> | <tr> | ||||
@@ -208,7 +223,8 @@ coming from your ftp server (ls -l on the ftp prompt). | |||||
<code>Asia/Jakarta</code>) the timezone | <code>Asia/Jakarta</code>) the timezone | ||||
used by the server for timestamps. This enables Ant timestamp dependency | used by the server for timestamps. This enables Ant timestamp dependency | ||||
checking even when the server is in a different timezone than the client. | checking even when the server is in a different timezone than the client. | ||||
If not specified, the timezone of the client is assumed. | |||||
If not specified, (or specified as <code>""</code>), the timezone of the | |||||
client is assumed. | |||||
</td> | </td> | ||||
<td valign="top" align="center">No</td> | <td valign="top" align="center">No</td> | ||||
</tr> | </tr> | ||||
@@ -219,8 +235,8 @@ coming from your ftp server (ls -l on the ftp prompt). | |||||
to parse dates. In some cases this will be the only date format used. | to parse dates. In some cases this will be the only date format used. | ||||
In others, (unix for example) this will be used for dates | In others, (unix for example) this will be used for dates | ||||
older than a year old. (See recentDateFormatConfig). If not specified, | older than a year old. (See recentDateFormatConfig). If not specified, | ||||
the default date format for the system type indicated by the | |||||
systemTypeKey attribute will be used. | |||||
(or specified as <code>""</code>), the default date format for the system | |||||
type indicated by the systemTypeKey attribute will be used. | |||||
</td> | </td> | ||||
<td valign="top" align="center"> | <td valign="top" align="center"> | ||||
No. | No. | ||||
@@ -230,9 +246,9 @@ coming from your ftp server (ls -l on the ftp prompt). | |||||
<td valign="top">recentDateFormatConfig</td> | <td valign="top">recentDateFormatConfig</td> | ||||
<td valign="top">Specify in java.text.SimpleDateFormat notation, | <td valign="top">Specify in java.text.SimpleDateFormat notation, | ||||
(e.g. <code>MMM dd hh:mm</code>) the date format used by the FTP server | (e.g. <code>MMM dd hh:mm</code>) the date format used by the FTP server | ||||
to parse dates less than a year old. If not specified, and if the system | |||||
type indicated by the system key uses a recent date format, its standard | |||||
format will be used. | |||||
to parse dates less than a year old. If not specified (or specified as | |||||
<code>""</code>), and if the system type indicated by the system key uses | |||||
a recent date format, its standard format will be used. | |||||
</td> | </td> | ||||
<td valign="top" align="center">No</td> | <td valign="top" align="center">No</td> | ||||
</tr> | </tr> | ||||
@@ -1257,67 +1257,96 @@ public class FTP | |||||
/** | /** | ||||
* Method for setting <code>FTPClientConfig</code> remote system key. | * Method for setting <code>FTPClientConfig</code> remote system key. | ||||
* | * | ||||
* @param systemTypeKey | |||||
* @param systemTypeKey the key to be set - BUT if blank | |||||
* the default value of null will be kept. | |||||
* @see org.apache.commons.net.ftp.FTPClientConfig | * @see org.apache.commons.net.ftp.FTPClientConfig | ||||
*/ | */ | ||||
public void setSystemTypeKey(String systemKey) { | public void setSystemTypeKey(String systemKey) { | ||||
this.systemTypeKey = systemKey; | |||||
configurationHasBeenSet(); | |||||
if (systemKey != null && !systemKey.equals("")) | |||||
{ | |||||
this.systemTypeKey = systemKey; | |||||
configurationHasBeenSet(); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
* Delegate method for <code>FTPClientConfig.setDefaultDateFormatStr(String)</code>. | |||||
* Delegate method for | |||||
* <code>FTPClientConfig.setDefaultDateFormatStr(String)</code>. | |||||
* | * | ||||
* @param defaultDateFormatConfig | |||||
* @param defaultDateFormatConfig configuration to be set, unless it is | |||||
* null or empty string, in which case ignored. | |||||
* @see org.apache.commons.net.ftp.FTPClientConfig | * @see org.apache.commons.net.ftp.FTPClientConfig | ||||
*/ | */ | ||||
public void setDefaultDateFormatConfig(String defaultDateFormat) { | public void setDefaultDateFormatConfig(String defaultDateFormat) { | ||||
this.defaultDateFormatConfig = defaultDateFormat; | |||||
configurationHasBeenSet(); | |||||
if (defaultDateFormat != null && !defaultDateFormat.equals("")) | |||||
{ | |||||
this.defaultDateFormatConfig = defaultDateFormat; | |||||
configurationHasBeenSet(); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
* Delegate method for <code>FTPClientConfig.setRecentDateFormatStr(String)</code>. | |||||
* Delegate method for | |||||
* <code>FTPClientConfig.setRecentDateFormatStr(String)</code>. | |||||
* | * | ||||
* @param recentDateFormatConfig | |||||
* @param recentDateFormatConfig configuration to be set, unless it is | |||||
* null or empty string, in which case ignored. | |||||
* @see org.apache.commons.net.ftp.FTPClientConfig | * @see org.apache.commons.net.ftp.FTPClientConfig | ||||
*/ | */ | ||||
public void setRecentDateFormatConfig(String recentDateFormat) { | public void setRecentDateFormatConfig(String recentDateFormat) { | ||||
this.recentDateFormatConfig = recentDateFormat; | |||||
configurationHasBeenSet(); | |||||
if (recentDateFormat != null && !recentDateFormat.equals("")) | |||||
{ | |||||
this.recentDateFormatConfig = recentDateFormat; | |||||
configurationHasBeenSet(); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
* Delegate method for <code>FTPClientConfig.setServerLanguageCode(String)</code>. | |||||
* Delegate method for | |||||
* <code>FTPClientConfig.setServerLanguageCode(String)</code>. | |||||
* | * | ||||
* @param serverLanguageCodeConfig | |||||
* @param serverLanguageCodeConfig configuration to be set, unless it is | |||||
* null or empty string, in which case ignored. | |||||
* @see org.apache.commons.net.ftp.FTPClientConfig | * @see org.apache.commons.net.ftp.FTPClientConfig | ||||
*/ | */ | ||||
public void setServerLanguageCodeConfig(String serverLanguageCode) { | public void setServerLanguageCodeConfig(String serverLanguageCode) { | ||||
this.serverLanguageCodeConfig = serverLanguageCode; | |||||
configurationHasBeenSet(); | |||||
if (serverLanguageCode != null && !serverLanguageCode.equals("")) | |||||
{ | |||||
this.serverLanguageCodeConfig = serverLanguageCode; | |||||
configurationHasBeenSet(); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
* Delegate method for <code>FTPClientConfig.setServerTimeZoneId(String)</code>. | |||||
* Delegate method for | |||||
* <code>FTPClientConfig.setServerTimeZoneId(String)</code>. | |||||
* | * | ||||
* @param serverTimeZoneConfig | |||||
* @param serverTimeZoneConfig configuration to be set, unless it is | |||||
* null or empty string, in which case ignored. | |||||
* @see org.apache.commons.net.ftp.FTPClientConfig | * @see org.apache.commons.net.ftp.FTPClientConfig | ||||
*/ | */ | ||||
public void setServerTimeZoneConfig(String serverTimeZoneId) { | public void setServerTimeZoneConfig(String serverTimeZoneId) { | ||||
this.serverTimeZoneConfig = serverTimeZoneId; | |||||
configurationHasBeenSet(); | |||||
if (serverTimeZoneId != null && !serverTimeZoneId.equals("")) | |||||
{ | |||||
this.serverTimeZoneConfig = serverTimeZoneId; | |||||
configurationHasBeenSet(); | |||||
} | |||||
} | } | ||||
/** | /** | ||||
* Delegate method for <code>FTPClientConfig.setShortMonthNames(String)</code>. | |||||
* Delegate method for | |||||
* <code>FTPClientConfig.setShortMonthNames(String)</code>. | |||||
* | * | ||||
* @param shortMonthNamesConfig | |||||
* @param shortMonthNamesConfig configuration to be set, unless it is | |||||
* null or empty string, in which case ignored. | |||||
* @see org.apache.commons.net.ftp.FTPClientConfig | * @see org.apache.commons.net.ftp.FTPClientConfig | ||||
*/ | */ | ||||
public void setShortMonthNamesConfig(String shortMonthNames) { | public void setShortMonthNamesConfig(String shortMonthNames) { | ||||
this.shortMonthNamesConfig = shortMonthNames; | |||||
configurationHasBeenSet(); | |||||
if (shortMonthNames != null && !shortMonthNames.equals("")) | |||||
{ | |||||
this.shortMonthNamesConfig = shortMonthNames; | |||||
configurationHasBeenSet(); | |||||
} | |||||
} | } | ||||