// compatible with the current product version.
// No need to check for invalid/missing version number, as
// an exception must have been already thrown if that
// was the case.
if (object instanceof AdministeredObject) {
AdministeredObject adminObj = (AdministeredObject)object;
String curVersion = adminObj.getVERSION();
String objVersion = adminObj.getStoredVersion();
if (!adminObj.isStoredVersionCompatible()) {
int response = JOptionPane.showOptionDialog(this,
acr.getString(acr.W_INCOMPATIBLE_OBJ, objVersion, curVersion),
acr.getString(acr.I_OBJSTORE_DEST_PROPS)
+ ": "
+ acr.getString(acr.I_WARNING_CODE, acr.W_INCOMPATIBLE_OBJ),
JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE,
null, okcancel, okcancel[1]);
if (response == JOptionPane.NO_OPTION)
return;
}
}
/*
* Lookup Name
*/
String lookupName = lookupLabel.getText();
lookupName = lookupName.trim();
if (lookupName == null || lookupName.equals("")) {
JOptionPane.showOptionDialog(this,
acr.getString(acr.E_NO_LOOKUP_NAME),
acr.getString(acr.I_OBJSTORE_DEST_PROPS) + ": " +
acr.getString(acr.I_ERROR_CODE,
AdminConsoleResources.E_NO_LOOKUP_NAME),
JOptionPane.YES_NO_OPTION,
JOptionPane.ERROR_MESSAGE, null, close, close[0]);
return;
}
/*
* Destination Type
*/
int type = ObjAdminEvent.QUEUE;
AdministeredObject tempObj = null;
if (destLabel.getText().equals(acr.getString(acr.I_QUEUE))) {
type = ObjAdminEvent.QUEUE;
tempObj = (AdministeredObject)new com.sun.messaging.Queue();
}
else if (destLabel.getText().equals(acr.getString(acr.I_TOPIC))) {
type = ObjAdminEvent.TOPIC;
tempObj = (AdministeredObject)new com.sun.messaging.Topic();
}
/*
* Object Properties (dest name, ...);
*/
int i = 0;
Properties props = tempObj.getConfiguration();
for (Enumeration e = tempObj.enumeratePropertyNames();
e.hasMoreElements(); i++) {
String propName = (String)e.nextElement();
String value = textItems[i].getText();
value = value.trim();