From 275bf52cfeacbb93083c2dda50a649ae29ec8f05 Mon Sep 17 00:00:00 2001 From: Alex Rudyy Date: Tue, 21 Jan 2014 10:07:08 +0000 Subject: QPID-5413: Add getAttributeNames method into RemoteReplicationNode in order to produce json representation of the node with correct attributes git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/java-broker-bdb-ha@1559958 13f79535-47bb-0310-9956-ffa450edef68 --- .../replication/RemoteReplicationNode.java | 27 +++++++++++++++++++++- .../js/qpid/management/virtualhost/bdb_ha/show.js | 2 +- 2 files changed, 27 insertions(+), 2 deletions(-) (limited to 'qpid/java') diff --git a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/RemoteReplicationNode.java b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/RemoteReplicationNode.java index bff20fb306..06fffddc0a 100644 --- a/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/RemoteReplicationNode.java +++ b/qpid/java/bdbstore/src/main/java/org/apache/qpid/server/store/berkeleydb/replication/RemoteReplicationNode.java @@ -158,7 +158,27 @@ public class RemoteReplicationNode extends AbstractAdapter implements Replicatio @Override public Object getAttribute(String name) { - if (ROLE.equals(name)) + if (ReplicationNode.ID.equals(name)) + { + return getId(); + } + else if (ReplicationNode.LIFETIME_POLICY.equals(name)) + { + return getLifetimePolicy(); + } + else if (ReplicationNode.DURABLE.equals(name)) + { + return isDurable(); + } + else if(STATE.equals(name)) + { + return getActualState(); + } + else if(TIME_TO_LIVE.equals(name)) + { + return getLifetimePolicy(); + } + else if (ROLE.equals(name)) { return _role; } @@ -227,4 +247,9 @@ public class RemoteReplicationNode extends AbstractAdapter implements Replicatio } } + @Override + public Collection getAttributeNames() + { + return ReplicationNode.AVAILABLE_ATTRIBUTES; + } } diff --git a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js index 2fa94fdcc2..cbb9c71913 100644 --- a/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js +++ b/qpid/java/bdbstore/src/main/java/resources/js/qpid/management/virtualhost/bdb_ha/show.js @@ -162,7 +162,7 @@ define(["dojo/_base/xhr", { name: 'Name', field: 'name', width: '50%' }, { name: 'Value', field: 'value', width: '50%' } ], - null, null, null, true ); + null, null, null, false ); this.replicationParametersGrid = new UpdatableStore([], findNode("replicationParameters", containerNode), -- cgit v1.2.1