package cn.base.conf;

/**
 * ftp
 * @author Lenovo
 *
 */
public class Ftp extends NodeHome{
	private String ftpIp;
	private Integer ftpPort;
	private String ftpUser;
	private String ftpUserPassword;
	
	private String ftpPath;
	
	public String getFtpIp() {
		return ftpIp;
	}

	public void setFtpIp(String ftpIp) {
		this.ftpIp = ftpIp;
	}

	public Integer getFtpPort() {
		return ftpPort;
	}

	public void setFtpPort(Integer ftpPort) {
		this.ftpPort = ftpPort;
	}

	public String getFtpUser() {
		return ftpUser;
	}

	public void setFtpUser(String ftpUser) {
		this.ftpUser = ftpUser;
	}

	public String getFtpUserPassword() {
		return ftpUserPassword;
	}

	public void setFtpUserPassword(String ftpUserPassword) {
		this.ftpUserPassword = ftpUserPassword;
	}
	public String getFtpPath() {
		return ftpPath;
	}

	public void setFtpPath(String ftpPath) {
		this.ftpPath = ftpPath;
	}
	public void fillField(){
		for(int i=0;i<this.getList().size();i++){
			String name=this.getList().get(i).getName();
			String value=this.getList().get(i).getValue();
			if(name.equalsIgnoreCase("ftpIp")==true)this.ftpIp=value;
			if(name.equalsIgnoreCase("ftpPort")==true)this.ftpPort=Integer.valueOf(value);
			if(name.equalsIgnoreCase("ftpUser")==true)this.ftpUser=value;
			if(name.equalsIgnoreCase("ftpUserPassword")==true)this.ftpUserPassword=value;
			if(name.equalsIgnoreCase("ftpPath")==true)this.ftpPath=value;
		}
	}
}
