title = "Service description";
question = "Are you sure that you want to remove the applications associated with \""
+ d.getType().getName() + "\"?";
break;
case APPLICATION:
ApplicationDescription a = (ApplicationDescription) 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)) {
switch (descriptorType){
case HOST:
HostDescription h = (HostDescription) getSelected();
getRegistry().getApplicationManager().deleteHostDescription(h.getType().getHostName());
loadDescriptors();
break;
case SERVICE:
ServiceDescription d = (ServiceDescription) getSelected();
getRegistry().getApplicationManager().deleteServiceDescription(d.getType().getName());
loadDescriptors();
break;
case APPLICATION:
ApplicationDescription a = (ApplicationDescription) getSelected();
String[] s = dlist.get(a).split("\\$");
getRegistry().getApplicationManager().deleteApplicationDescription(s[0], s[1], a.getType().getApplicationName().getStringValue());
loadDescriptors();
break;
}
// loadDescriptors();
}