}
private void doRefreshObjStore(ConsoleObj selObj) {
ObjStore os = null;
ConsoleObj cObj = selObj;
if (selObj instanceof ObjStoreCObj) {
os =((ObjStoreCObj)selObj).getObjStore();
cObj = selObj;
} else if (selObj instanceof ObjStoreDestListCObj) {
os = ((ObjStoreDestListCObj)selObj).getObjStore();
cObj = (ConsoleObj)selObj.getParent();
} else if (selObj instanceof ObjStoreConFactoryListCObj) {
os = ((ObjStoreConFactoryListCObj)selObj).getObjStore();
cObj = (ConsoleObj)selObj.getParent();
}
if (!os.isOpen()) {
JOptionPane.showOptionDialog(app.getFrame(),
acr.getString(acr.E_OBJSTORE_NOT_CONNECTED,
selObj.toString()),
acr.getString(acr.I_OBJSTORE_REFRESH) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_OBJSTORE_NOT_CONNECTED),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);
return;
}
boolean success = finishDoConnectObjStore(cObj, os);
if (success) {
// Update menu items, buttons.
controller.setActions(selObj);
// XXX This causes selection in inspector to go away.
app.getInspector().refresh();
if (selObj instanceof ObjStoreCObj) {
app.getStatusArea().appendText(acr.getString(acr.S_OS_REFRESH,
os.getID()));
} else if (selObj instanceof ObjStoreDestListCObj) {
app.getStatusArea().appendText(acr.getString(acr.S_OS_DESTLIST_REFRESH,
os.getID()));
} else if (selObj instanceof ObjStoreConFactoryListCObj) {
app.getStatusArea().appendText(acr.getString(acr.S_OS_CFLIST_REFRESH,
os.getID()));
}
}
}