* This method sets some default values for some properties
*/
private StringKeyValuePairs getPropertiesForSourceOrTarget(boolean isTarget) {
// This method is only used for setting default values now.
// Remove the commented code if this works...
StringKeyValuePairs keyValues = new StringKeyValuePairs();
keyValues.put("document_id", "0");
keyValues.put(DatabaseLocation.TIMEOUT_PROPERTY, "-1");
if (isTarget) {
// Nothing to add
} else {
keyValues.put(LocatableProperties.IGNORE_FIRST_LINES, "0");
keyValues.put(LocatableProperties.IGNORE_LAST_LINES, "0");
}
keyValues.put(FtpLocation.PROPERTY_TRANSFER_TYPE, "-1");
keyValues.put(FileLocation.PROPERTY_ENCRYPTION, "0");
keyValues.put(FtpLocation.PROPERTY_PORT, "-1");
keyValues.put(FtpLocation.PROPERTY_PASSIVE_MODE, "0");
// This can not be null so set the default values.
HttpVerb verb = isTarget ? HttpLocation.getDefaultVerb(SourceTarget.Target) :
HttpLocation.getDefaultVerb(SourceTarget.Source);
keyValues.putInt(HttpLocation.PROPERTY_HTTP_VERB, verb.getId());
// Add the properties from the base class.
keyValues.putAll(super.getPropertiesForDeploy());
return keyValues;
}