diff options
| author | Robert Gemmell <robbie@apache.org> | 2010-07-16 15:19:01 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2010-07-16 15:19:01 +0000 |
| commit | 3d8e2c4920613561403dc612f2c62a193fa732ac (patch) | |
| tree | e687ca0c868d60beddb7e311bdd1094f2fcb31a2 /qpid/java/management/eclipse-plugin/src | |
| parent | 838604b8c62ea9c062d9749a9f3bf8f2d10bd0b2 (diff) | |
| download | qpid-python-3d8e2c4920613561403dc612f2c62a193fa732ac.tar.gz | |
QPID-2731: enable the jmx management console to set boolean attribute values
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@964824 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/management/eclipse-plugin/src')
2 files changed, 13 insertions, 1 deletions
diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java index 2f5752db9b..855b2e2a1e 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/MBeanUtility.java @@ -426,6 +426,15 @@ public class MBeanUtility } newValue = new Integer(Integer.parseInt(value)); } + else if (attribute.getDataType().equals(Boolean.class.getName())) + { + if (!value.equalsIgnoreCase("true") && !value.equalsIgnoreCase("false")) + { + throw new ManagementConsoleException("Entered value was not true or false"); + } + + newValue = new Boolean(Boolean.valueOf(value)); + } mbsc.setAttribute(jmxbean.getObjectName(), new Attribute(attribute.getName(), newValue)); // Update the value in the registry, to avoid refreshing from mbsc diff --git a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java index f21647b2d2..01f81b9d34 100644 --- a/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java +++ b/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/views/AttributesTabControl.java @@ -502,7 +502,10 @@ public class AttributesTabControl extends TabControl if (attribute.isWritable()) { value = _toolkit.createText(parent, "", SWT.BEGINNING | SWT.BORDER); - value.addVerifyListener(new NumberVerifyListener()); + if(attribute.isNumber()) + { + value.addVerifyListener(new NumberVerifyListener()); + } // set data to access in the listener parent.setData(attribute); |
