void updateOpString(final ProvisionMonitor monitor, final OperationalString opString) {
synchronized(vis) {
vis.cancel("filter");
GraphNode opStringNode = getOpStringNode(opString.getName());
if(opStringNode!=null) {
OperationalStringManager mgr;
try {
mgr = Util.getOperationalStringManager(monitor,
opString.getName());
} catch (Exception e) {
Util.showError(e, frame,
"Could not get an OperationalStringManager");
GraphUtil.removeOpString(g, vis, opString.getName());
vis.run("filter");
return;
}
opStringNode.setOpString(opString);
opStringNode.setProvisionMonitor(monitor);
ServiceElement[] services = opString.getServices();
// TODO: If there are existing ServiceEements that are no longer
// in the opstring they need to be removed
for(ServiceElement service : services) {
GraphNode sElemNode = getServiceElementNode(opStringNode,
service);
if(sElemNode!=null) {
sElemNode.setServiceElement(service);
sElemNode.setProvisionMonitor(monitor);
Node serviceNode = sElemNode.getTableNode();
/* Fetch the known ServiceBeanInstances */
ServiceBeanInstance[] instances =
new ServiceBeanInstance[0];
try {
instances = mgr.getServiceBeanInstances(service);
} catch (Exception e) {
Util.showError(e, frame,
"Fetching ServiceBean Instances");
}