title = "Service description";
question = "Are you sure that you want to remove the applications associated with \""
+ d.getType().getName() + "\"?";
break;
case APPLICATION:
ApplicationDeploymentDescription a = (ApplicationDeploymentDescription) getSelected();
title = "Service description";
question = "Are you sure that you want to remove the service description \""
+ a.getType().getApplicationName().getStringValue() + "\"?";
break;
}
if (askQuestion(title, question)) {
try {
switch (descriptorType){
case HOST:
HostDescription h = (HostDescription) getSelected();
getRegistry().deleteHostDescription(h.getType().getHostName());
break;
case SERVICE:
ServiceDescription d = (ServiceDescription) getSelected();
getRegistry().deleteServiceDescription(d.getType().getName());
break;
case APPLICATION:
ApplicationDeploymentDescription a = (ApplicationDeploymentDescription) getSelected();
String[] s = dlist.get(a).split("\\$");
getRegistry().deleteDeploymentDescription(s[0], s[1], a.getType().getApplicationName().getStringValue());
break;
}
loadDescriptors();
} catch (RegistryException e) {
this.engine.getGUI().getErrorWindow().error(e);