// Path: tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotificationProxyConfig.java
// public class SlackNotificationProxyConfig {
// 	private Credentials creds = null;
// 	private String proxyHost = null;
// 	private Integer proxyPort = null;
// 	private String proxyUsername = null;
// 	private String proxyPassword = null;
// 
// 	public SlackNotificationProxyConfig(String hostname, Integer port, String username, String password) {
// 		this.proxyUsername = username;
// 		this.proxyPassword = password;
// 		this.proxyHost = hostname;
// 		this.proxyPort = port;
// 		this.setCreds();
// 	}
// 
// 	public SlackNotificationProxyConfig(String hostname, Integer port) {
// 		this.proxyHost = hostname;
// 		this.proxyPort = port;
// 	}
// 	
// 	private void setCreds() {
// 		if (   this.proxyUsername != null && this.proxyUsername.length() > 0 
// 			&& this.proxyPassword != null && this.proxyPassword.length() > 0){
// 			this.creds = new UsernamePasswordCredentials(this.proxyUsername,this.proxyPassword);
// 		}
// 	}
// 	
// 	public Credentials getCreds(){
// 		return this.creds;
// 	}
// 
// 	public String getProxyHost() {
// 		return proxyHost;
// 	}
// 
// 	public void setProxyHost(String proxyHost) {
// 		this.proxyHost = proxyHost;
// 	}
// 
// 	public Integer getProxyPort() {
// 		return proxyPort;
// 	}
// 
// 	public void setProxyPort(Integer proxyPort) {
// 		this.proxyPort = proxyPort;
// 	}
// 	
// }
// 
// Path: tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/Loggers.java
// public final class Loggers {
// 	
// 	private Loggers(){}
// 	public static final Logger SERVER 		= Logger.getInstance("jetbrains.buildServer.SERVER");
// 	public static final Logger ACTIVITIES  	= Logger.getInstance("jetbrains.buildServer.ACTIVITIES");
// }


import com.intellij.openapi.util.JDOMUtil;
import com.intellij.openapi.util.text.StringUtil;
import jetbrains.buildServer.configuration.ChangeListener;
import jetbrains.buildServer.configuration.FileWatcher;
import jetbrains.buildServer.serverSide.ServerPaths;
import jetbrains.buildServer.util.FileUtil;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import slacknotifications.SlackNotificationProxyConfig;
import slacknotifications.teamcity.Loggers;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
            {
                if (proxyElement.getAttribute("proxyShortNames") != null){
                    setProxyShortNames(Boolean.parseBoolean(proxyElement.getAttributeValue("proxyShortNames")));
                }

                if (proxyElement.getAttribute("host") != null){
                    setProxyHost(proxyElement.getAttributeValue("host"));
                }

                if (proxyElement.getAttribute("port") != null){
                    setProxyPort(Integer.parseInt(proxyElement.getAttributeValue("port")));
                }

                if (proxyElement.getAttribute(USERNAME) != null){
                    setProxyUsername(proxyElement.getAttributeValue(USERNAME));
                }

                if (proxyElement.getAttribute(PASSWORD) != null){
                    setProxyPassword(proxyElement.getAttributeValue(PASSWORD));
                }
            }
            else {
                setProxyHost(null);
                setProxyPort(null);
                setProxyUsername(null);
                setProxyPassword(null);
            }
        }
    }

// Path: tcslackbuildnotifier-core/src/main/java/slacknotifications/SlackNotificationProxyConfig.java
// public class SlackNotificationProxyConfig {
// 	private Credentials creds = null;
// 	private String proxyHost = null;
// 	private Integer proxyPort = null;
// 	private String proxyUsername = null;
// 	private String proxyPassword = null;
// 
// 	public SlackNotificationProxyConfig(String hostname, Integer port, String username, String password) {
// 		this.proxyUsername = username;
// 		this.proxyPassword = password;
// 		this.proxyHost = hostname;
// 		this.proxyPort = port;
// 		this.setCreds();
// 	}
// 
// 	public SlackNotificationProxyConfig(String hostname, Integer port) {
// 		this.proxyHost = hostname;
// 		this.proxyPort = port;
// 	}
// 	
// 	private void setCreds() {
// 		if (   this.proxyUsername != null && this.proxyUsername.length() > 0 
// 			&& this.proxyPassword != null && this.proxyPassword.length() > 0){
// 			this.creds = new UsernamePasswordCredentials(this.proxyUsername,this.proxyPassword);
// 		}
// 	}
// 	
// 	public Credentials getCreds(){
// 		return this.creds;
// 	}
// 
// 	public String getProxyHost() {
// 		return proxyHost;
// 	}
// 
// 	public void setProxyHost(String proxyHost) {
// 		this.proxyHost = proxyHost;
// 	}
// 
// 	public Integer getProxyPort() {
// 		return proxyPort;
// 	}
// 
// 	public void setProxyPort(Integer proxyPort) {
// 		this.proxyPort = proxyPort;
// 	}
// 	
// }
// 
// Path: tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/Loggers.java
// public final class Loggers {
// 	
// 	private Loggers(){}
// 	public static final Logger SERVER 		= Logger.getInstance("jetbrains.buildServer.SERVER");
// 	public static final Logger ACTIVITIES  	= Logger.getInstance("jetbrains.buildServer.ACTIVITIES");
// }


// Path: tcslackbuildnotifier-core/src/main/java/slacknotifications/teamcity/settings/SlackNotificationMainConfig.java
import com.intellij.openapi.util.JDOMUtil;
import com.intellij.openapi.util.text.StringUtil;
import jetbrains.buildServer.configuration.ChangeListener;
import jetbrains.buildServer.configuration.FileWatcher;
import jetbrains.buildServer.serverSide.ServerPaths;
import jetbrains.buildServer.util.FileUtil;
import org.jdom.Document;
import org.jdom.Element;
import org.jdom.JDOMException;
import slacknotifications.SlackNotificationProxyConfig;
import slacknotifications.teamcity.Loggers;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;

            {
                if (proxyElement.getAttribute("proxyShortNames") != null){
                    setProxyShortNames(Boolean.parseBoolean(proxyElement.getAttributeValue("proxyShortNames")));
                }

                if (proxyElement.getAttribute("host") != null){
                    setProxyHost(proxyElement.getAttributeValue("host"));
                }

                if (proxyElement.getAttribute("port") != null){
                    setProxyPort(Integer.parseInt(proxyElement.getAttributeValue("port")));
                }

                if (proxyElement.getAttribute(USERNAME) != null){
                    setProxyUsername(proxyElement.getAttributeValue(USERNAME));
                }

                if (proxyElement.getAttribute(PASSWORD) != null){
                    setProxyPassword(proxyElement.getAttributeValue(PASSWORD));
                }
            }
            else {
                setProxyHost(null);
                setProxyPort(null);
                setProxyUsername(null);
                setProxyPassword(null);
            }
        }
    }

    public SlackNotificationProxyConfig getProxyConfig() {