if((templates!=null)&&(templates.size()>0)){
Iterator<TestbedServiceTemplate> itTemplates = templates.iterator();
//iterate over all templates
while(itTemplates.hasNext()){
//the current template: iterate over all Serviceperations
TestbedServiceTemplate template = itTemplates.next();
//build new child node containing a serviceTemplate
TreeNodeBase nodeServiceTemplate = new TreeNodeBase("TBServiceTemplate",template.getName()+": "+template.getDescription(),template.getUUID(),false);
//addServiceTemplate properties
nodeServiceTemplate.getChildren().add(new TreeNodeBase("Description",template.getDescription(),true));
nodeServiceTemplate.getChildren().add(new TreeNodeBase("Endpoint",template.getEndpoint(),true));
nodeServiceTemplate.getChildren().add(new TreeNodeBase("WSDLContent",template.getWSDLContent(),true));
nodeServiceTemplate.getChildren().add(new TreeNodeBase("UUID",template.getUUID(),true));
nodeServiceTemplate.getChildren().add(new TreeNodeBase("DeploymentDate",template.getDeploymentDate().getTime()+"",true));
Collection<ServiceTag> tags = template.getAllTags();
if((tags!=null)&&(tags.size()>0)){
Iterator<ServiceTag> itTags = tags.iterator();
while(itTags.hasNext()){
ServiceTag tag = itTags.next();
TreeNodeBase nodeTag = new TreeNodeBase("Tag",tag.getName(),tag.getName(),false);
nodeTag.getChildren().add(new TreeNodeBase("TagValue",tag.getValue(),true));
nodeTag.getChildren().add(new TreeNodeBase("TagDescription",tag.getDescription(),true));
nodeTag.getChildren().add(new TreeNodeBase("TagPriority",tag.getPriority()+"",true));
//add to serviceTemplate node
nodeServiceTemplate.getChildren().add(nodeTag);
}
}
Collection<ServiceOperation> operations = template.getAllServiceOperations();
if((operations!=null)&&(operations.size()>0)){
//Iterate over all serviceOperations
Iterator<ServiceOperation> itOperations = operations.iterator();
while(itOperations.hasNext()){
ServiceOperation operation = itOperations.next();