1 18 19 package org.apache.jmeter.protocol.ldap.config; 20 21 import java.io.Serializable ; 22 23 import org.apache.jmeter.config.Arguments; 24 import org.apache.jmeter.config.ConfigTestElement; 25 import org.apache.jmeter.protocol.ldap.sampler.LDAPSampler; 26 import org.apache.jmeter.testelement.property.BooleanProperty; 27 import org.apache.jmeter.testelement.property.TestElementProperty; 28 29 38 public class LdapConfig extends ConfigTestElement implements Serializable 39 { 40 43 public LdapConfig() 44 { 45 } 46 47 52 public void setRootdn(String newRootdn) 53 { 54 this.setProperty(LDAPSampler.ROOTDN,newRootdn); 55 } 56 57 62 public String getRootdn() 63 { 64 return getPropertyAsString(LDAPSampler.ROOTDN); 65 } 66 67 72 public void setTest(String newTest) 73 { 74 this.setProperty(LDAPSampler.TEST,newTest); 75 } 76 77 82 public String getTest() 83 { 84 return getPropertyAsString(LDAPSampler.TEST); 85 } 86 87 92 public void setUserDefinedTest(boolean value) 93 { 94 setProperty(new BooleanProperty(LDAPSampler.USER_DEFINED, value)); 95 } 96 97 103 public boolean getUserDefinedTest() 104 { 105 return getPropertyAsBoolean(LDAPSampler.USER_DEFINED); 106 } 107 108 109 116 public void setArguments(Arguments value) 117 { 118 setProperty(new TestElementProperty(LDAPSampler.ARGUMENTS, value)); 119 } 120 121 126 public Arguments getArguments() 127 { 128 return (Arguments) getProperty(LDAPSampler.ARGUMENTS).getObjectValue(); 129 } 130 131 136 public String getLabel() 137 { 138 return ("ldap://" + "this.getServername()" + "/" + this.getRootdn()); 139 } 140 } 141 | Popular Tags |