use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.
the class FirefoxDriverConfig method addExtensions.
private void addExtensions(FirefoxProfile profile) {
JMeterProperty property = getProperty(EXTENSIONS_TO_LOAD);
if (property instanceof NullProperty) {
return;
}
CollectionProperty rows = (CollectionProperty) property;
for (int i = 0; i < rows.size(); i++) {
ArrayList row = (ArrayList) rows.get(i).getObjectValue();
String filename = ((JMeterProperty) row.get(0)).getStringValue();
try {
profile.addExtension(new File(filename));
} catch (IOException e) {
log.error("Failed to add extension " + filename, e);
}
}
}
use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.
the class FirefoxDriverConfigGui method configure.
@Override
public void configure(TestElement element) {
super.configure(element);
if (element instanceof FirefoxDriverConfig) {
FirefoxDriverConfig config = (FirefoxDriverConfig) element;
userAgentOverrideCheckbox.setSelected(config.isUserAgentOverridden());
userAgentOverrideText.setText(config.getUserAgentOverride());
userAgentOverrideText.setEnabled(config.isUserAgentOverridden());
JMeterProperty ext = config.getExtensions();
if (!(ext instanceof NullProperty)) {
JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) ext, extensions.getModel());
}
JMeterProperty pref = config.getPreferences();
if (!(ext instanceof NullProperty)) {
JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) pref, preferences.getModel());
}
}
}
use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.
the class VariableThroughputTimerGui method configure.
@Override
public void configure(TestElement tg) {
// log.info("Configure");
super.configure(tg);
VariableThroughputTimer utg = (VariableThroughputTimer) tg;
JMeterProperty threadValues = utg.getData();
if (threadValues instanceof NullProperty) {
log.warn("Received null property instead of collection");
return;
}
CollectionProperty columns = (CollectionProperty) threadValues;
tableModel.removeTableModelListener(this);
JMeterPluginsUtils.collectionPropertyToTableModelRows(columns, tableModel);
tableModel.addTableModelListener(this);
buttons.checkDeleteButtonStatus();
updateUI();
}
use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.
the class PerfMonGui method configure.
@Override
public void configure(TestElement te) {
super.configure(te);
PerfMonCollector pmte = (PerfMonCollector) te;
JMeterProperty perfmonValues = pmte.getMetricSettings();
if (!(perfmonValues instanceof NullProperty)) {
JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) perfmonValues, tableModel);
} else {
log.warn("Received null property instead of collection");
}
}
use of org.apache.jmeter.testelement.property.NullProperty in project jmeter-plugins by undera.
the class CompositeGraphGui method configure.
@Override
public void configure(TestElement te) {
// log.info("Configure");
super.configure(te);
((CompositeResultCollector) te).setCompositeModel(compositeModel);
JMeterProperty data = te.getProperty(CONFIG_PROPERTY);
if (!(data instanceof NullProperty)) {
setConfig((CollectionProperty) data);
}
}
Aggregations