1 18 19 package org.apache.jmeter.protocol.ftp.config; 20 21 import java.io.Serializable ; 22 23 import org.apache.jmeter.config.ConfigTestElement; 24 import org.apache.jmeter.protocol.ftp.sampler.FTPSampler; 25 26 30 public class FtpConfig extends ConfigTestElement implements Serializable 31 { 32 33 public FtpConfig() 34 { 35 } 36 37 public boolean isComplete() 38 { 39 if ((getServer() != null) 40 && (getFilename() != null) 41 && (!getServer().equals("")) 42 && (!getFilename().equals(""))) 43 { 44 return true; 45 } 46 else 47 { 48 return false; 49 } 50 51 } 52 53 public void setServer(String newServer) 54 { 55 this.setProperty(FTPSampler.SERVER, newServer); 56 } 57 public String getServer() 58 { 59 return getPropertyAsString(FTPSampler.SERVER); 60 } 61 public void setFilename(String newFilename) 62 { 63 this.setProperty(FTPSampler.FILENAME, newFilename); 64 } 65 public String getFilename() 66 { 67 return getPropertyAsString(FTPSampler.FILENAME); 68 } 69 70 77 public String getLabel() 78 { 79 return ("ftp://" + this.getServer() + "/" + this.getFilename()); 80 } 81 } 82 | Popular Tags |