use of com.sun.messaging.jmq.admin.objstore.ObjStoreAttrs in project openmq by eclipse-ee4j.
the class ObjStoreAddDialog method doOK.
@Override
public void doOK() {
String osName = null;
// if (osTextButton.isSelected()) {
osName = osText.getText();
osName = osName.trim();
//
if (osName.equals("")) {
JOptionPane.showOptionDialog(this, acr.getString(acr.E_NO_OBJSTORE_NAME), acr.getString(acr.I_ADD_OBJSTORE) + ": " + acr.getString(acr.I_ERROR_CODE, AdminConsoleResources.E_NO_OBJSTORE_NAME), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, close, close[0]);
osText.requestFocus();
return;
}
/*
* } else if (urlButton.isSelected()) { // Make sure a provider.url property was set. osName =
* jndiProps.getProperty(Context.PROVIDER_URL); if (osName == null || osName.equals("")) {
* JOptionPane.showOptionDialog(this, acr.getString(acr.E_NO_PROVIDER_URL, Context.PROVIDER_URL),
* acr.getString(acr.I_ADD_OBJSTORE) + ": " + acr.getString(acr.I_ERROR_CODE, AdminConsoleResources.E_NO_PROVIDER_URL),
* JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, close, close[0]);
* comboBox.setSelectedItem(Context.PROVIDER_URL); valueText.requestFocus(); return; } }
*/
ObjAdminEvent oae;
ObjStoreAttrs osa = constructAttrs(osName);
if (osa == null) {
return;
}
oae = new ObjAdminEvent(this, ObjAdminEvent.ADD_OBJSTORE);
oae.setObjStoreAttrs(osa);
// oae.setConnectAttempt(checkBox.isSelected());
oae.setConnectAttempt(false);
oae.setOKAction(true);
fireAdminEventDispatched(oae);
}
use of com.sun.messaging.jmq.admin.objstore.ObjStoreAttrs in project openmq by eclipse-ee4j.
the class ObjStoreAddDialog method constructAttrs.
private ObjStoreAttrs constructAttrs(String osName) {
//
if (osMgr != null && osMgr.getStore(osName) != null) {
JOptionPane.showOptionDialog(this, acr.getString(acr.E_OBJSTORE_NAME_IN_USE, osName), acr.getString(acr.I_ADD_OBJSTORE) + ": " + acr.getString(acr.I_ERROR_CODE, AdminConsoleResources.E_OBJSTORE_NAME_IN_USE), JOptionPane.YES_NO_OPTION, JOptionPane.ERROR_MESSAGE, null, close, close[0]);
// if (osTextButton.isSelected()) {
osText.requestFocus();
osText.selectAll();
// }
return (null);
}
ObjStoreAttrs osa = new ObjStoreAttrs(osName, osName);
if (jndiProps == null) {
return (osa);
}
// Check for any properties that MUST be set.
if (checkMandatoryProps() == 0) {
return null;
}
for (Enumeration e = jndiProps.propertyNames(); e.hasMoreElements(); ) {
String propName = (String) e.nextElement();
osa.put(propName, jndiProps.getProperty(propName));
}
return (osa);
}
Aggregations