return ok;
}
private void placeConfigElement(UrlConfig config)
{
UrlConfig urlConfig = null;
JMeterTreeModel treeModel = GuiPackage.getInstance().getTreeModel();
List nodes = treeModel.getNodesOfType(LogicController.class);
if(nodes.size() == 0)
{
nodes = treeModel.getNodesOfType(ThreadGroup.class);
}
Iterator iter = nodes.iterator();
while (iter.hasNext())
{
JMeterTreeNode node = (JMeterTreeNode)iter.next();
JMeterComponentModel sample = (JMeterComponentModel)node.getUserObject();
if(sample instanceof LogicController)
{
treeModel.compileComponent(node);
Iterator iter2 = ((LogicController)sample).getConfigElements().iterator();
while(iter2.hasNext())
{
try
{
urlConfig = (UrlConfig)iter2.next();
break;
}
catch(ClassCastException e)
{
urlConfig = null;
}
}
}
if(urlConfig == null || (urlConfig.getDomain() == null ||
urlConfig.getDomain().equals("") ||
urlConfig.getDomain().equals(config.getDomain())) &&
(urlConfig.getPath() == null ||
urlConfig.getPath().equals("/") ||
urlConfig.getPath().equals(config.getPath())))
{
if(urlConfig != null && urlConfig.getDomain() != null &&
!urlConfig.getDomain().equals(""))
{
config.setDomain("");
}
if(urlConfig != null && urlConfig.getPath() != null &&
!urlConfig.getPath().equals("/"))
{
config.setPath("");
}
HttpTestSample test = new HttpTestSample();
test.setDefaultUrl(config);