// Path: deploy-runner-common/src/main/java/jetbrains/buildServer/deployer/common/DeployerRunnerConstants.java
// public class DeployerRunnerConstants {
//   public static final String SSH_RUN_TYPE = "ssh-deploy-runner";
//   public static final String SMB_RUN_TYPE = "smb-deploy-runner";
//   public static final String SMB2_RUN_TYPE = "smb2-deploy-runner";
//   public static final String FTP_RUN_TYPE = "ftp-deploy-runner";
//   public static final String TOMCAT_RUN_TYPE = "tomcat-deploy-runner";
//   public static final String CARGO_RUN_TYPE = "cargo-deploy-runner";
// 
// 
//   public static final String PARAM_USERNAME = "jetbrains.buildServer.deployer.username";
//   public static final String PARAM_PASSWORD = "secure:jetbrains.buildServer.deployer.password";
//   @Deprecated
//   public static final String PARAM_PLAIN_PASSWORD = "jetbrains.buildServer.deployer.password";
//   @Deprecated
//   public static final String PARAM_DOMAIN = "jetbrains.buildServer.deployer.domain";
//   public static final String PARAM_TARGET_URL = "jetbrains.buildServer.deployer.targetUrl";
//   public static final String PARAM_SOURCE_PATH = "jetbrains.buildServer.deployer.sourcePath";
//   public static final String PARAM_CONTAINER_CONTEXT_PATH = "jetbrains.buildServer.deployer.container.contextPath";
//   public static final String PARAM_CONTAINER_TYPE = "jetbrains.buildServer.deployer.container.type";
// 
//   public static final String BUILD_PROBLEM_TYPE = "jetbrains.buildServer.deployer";
// }
// 
// Path: deploy-runner-common/src/main/java/jetbrains/buildServer/deployer/common/FTPRunnerConstants.java
// public class FTPRunnerConstants {
//   public static final String PARAM_AUTH_METHOD = "jetbrains.buildServer.deployer.ftp.authMethod";
//   public static final String PARAM_TRANSFER_MODE = "jetbrains.buildServer.deployer.ftp.transferMethod";
//   public static final String TRANSFER_MODE_AUTO = "AUTO";
//   public static final String TRANSFER_MODE_BINARY = "BINARY";
//   public static final String TRANSFER_MODE_ASCII = "ASCII";
//   public static final String AUTH_METHOD_USER_PWD = "USER_PWD";
//   public static final String AUTH_METHOD_ANONYMOUS = "ANONYMOUS";
//   public static final String PARAM_SSL_MODE = "jetbrains.buildServer.deployer.ftp.securityMode";
//   public static final String DATA_CHANNEL_PROTECTION = "jetbrains.buildServer.deployer.ftp.dataChannelProtection";
//   public static final String PARAM_FTP_MODE = "jetbrains.buildServer.deployer.ftp.ftpMode";
//   public static final String PARAM_FTP_CONNECT_TIMEOUT = "jetbrains.deployer.ftp.connectTimeout";
//   public static final String PARAM_FTP_CONTROL_KEEP_ALIVE_TIMEOUT = "jetbrains.deployer.ftp.controlKeepAliveTimeout.seconds";
// }


import jetbrains.buildServer.deployer.common.DeployerRunnerConstants;
import jetbrains.buildServer.deployer.common.FTPRunnerConstants;
import jetbrains.buildServer.serverSide.InvalidProperty;
import java.util.Collection;
import java.util.Map;
package jetbrains.buildServer.deployer.server;



public class FtpDeployerPropertiesProcessor extends DeployerPropertiesProcessor {

    @Override
    public Collection<InvalidProperty> process(Map<String, String> properties) {
        if (!FTPRunnerConstants.AUTH_METHOD_USER_PWD.equals(properties.get(FTPRunnerConstants.PARAM_AUTH_METHOD))) {
// Path: deploy-runner-common/src/main/java/jetbrains/buildServer/deployer/common/DeployerRunnerConstants.java
// public class DeployerRunnerConstants {
//   public static final String SSH_RUN_TYPE = "ssh-deploy-runner";
//   public static final String SMB_RUN_TYPE = "smb-deploy-runner";
//   public static final String SMB2_RUN_TYPE = "smb2-deploy-runner";
//   public static final String FTP_RUN_TYPE = "ftp-deploy-runner";
//   public static final String TOMCAT_RUN_TYPE = "tomcat-deploy-runner";
//   public static final String CARGO_RUN_TYPE = "cargo-deploy-runner";
// 
// 
//   public static final String PARAM_USERNAME = "jetbrains.buildServer.deployer.username";
//   public static final String PARAM_PASSWORD = "secure:jetbrains.buildServer.deployer.password";
//   @Deprecated
//   public static final String PARAM_PLAIN_PASSWORD = "jetbrains.buildServer.deployer.password";
//   @Deprecated
//   public static final String PARAM_DOMAIN = "jetbrains.buildServer.deployer.domain";
//   public static final String PARAM_TARGET_URL = "jetbrains.buildServer.deployer.targetUrl";
//   public static final String PARAM_SOURCE_PATH = "jetbrains.buildServer.deployer.sourcePath";
//   public static final String PARAM_CONTAINER_CONTEXT_PATH = "jetbrains.buildServer.deployer.container.contextPath";
//   public static final String PARAM_CONTAINER_TYPE = "jetbrains.buildServer.deployer.container.type";
// 
//   public static final String BUILD_PROBLEM_TYPE = "jetbrains.buildServer.deployer";
// }
// 
// Path: deploy-runner-common/src/main/java/jetbrains/buildServer/deployer/common/FTPRunnerConstants.java
// public class FTPRunnerConstants {
//   public static final String PARAM_AUTH_METHOD = "jetbrains.buildServer.deployer.ftp.authMethod";
//   public static final String PARAM_TRANSFER_MODE = "jetbrains.buildServer.deployer.ftp.transferMethod";
//   public static final String TRANSFER_MODE_AUTO = "AUTO";
//   public static final String TRANSFER_MODE_BINARY = "BINARY";
//   public static final String TRANSFER_MODE_ASCII = "ASCII";
//   public static final String AUTH_METHOD_USER_PWD = "USER_PWD";
//   public static final String AUTH_METHOD_ANONYMOUS = "ANONYMOUS";
//   public static final String PARAM_SSL_MODE = "jetbrains.buildServer.deployer.ftp.securityMode";
//   public static final String DATA_CHANNEL_PROTECTION = "jetbrains.buildServer.deployer.ftp.dataChannelProtection";
//   public static final String PARAM_FTP_MODE = "jetbrains.buildServer.deployer.ftp.ftpMode";
//   public static final String PARAM_FTP_CONNECT_TIMEOUT = "jetbrains.deployer.ftp.connectTimeout";
//   public static final String PARAM_FTP_CONTROL_KEEP_ALIVE_TIMEOUT = "jetbrains.deployer.ftp.controlKeepAliveTimeout.seconds";
// }


// Path: deploy-runner-server/src/main/java/jetbrains/buildServer/deployer/server/FtpDeployerPropertiesProcessor.java
import jetbrains.buildServer.deployer.common.DeployerRunnerConstants;
import jetbrains.buildServer.deployer.common.FTPRunnerConstants;
import jetbrains.buildServer.serverSide.InvalidProperty;
import java.util.Collection;
import java.util.Map;

package jetbrains.buildServer.deployer.server;



public class FtpDeployerPropertiesProcessor extends DeployerPropertiesProcessor {

    @Override
    public Collection<InvalidProperty> process(Map<String, String> properties) {
        if (!FTPRunnerConstants.AUTH_METHOD_USER_PWD.equals(properties.get(FTPRunnerConstants.PARAM_AUTH_METHOD))) {
            properties.remove(DeployerRunnerConstants.PARAM_USERNAME);