From 28e4e6182a06c7b247f5d51e05b3350456ce92e9 Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Thu, 21 Aug 2014 20:59:01 +0000 Subject: QPID-6027 : Add persisted derived attributes to the initial configuration extract git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1619584 13f79535-47bb-0310-9956-ffa450edef68 --- .../plugin/servlet/rest/ConfiguredObjectToMapConverter.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'qpid/java/broker-plugins') diff --git a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java index c8bce09485..7769263e5a 100644 --- a/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java +++ b/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java @@ -34,6 +34,7 @@ import java.util.Set; import java.util.TreeMap; import org.apache.qpid.server.model.ConfiguredObject; +import org.apache.qpid.server.model.ConfiguredObjectAttribute; public class ConfiguredObjectToMapConverter { @@ -148,6 +149,18 @@ public class ConfiguredObjectToMapConverter { object.put(name, value); } + else if (extractAsConfig) + { + ConfiguredObjectAttribute attribute = confObject.getModel() + .getTypeRegistry() + .getAttributeTypes(confObject.getClass()) + .get(name); + + if(attribute.isPersisted() && attribute.isDerived()) + { + object.put(name, confObject.getAttribute(name)); + } + } } } } -- cgit v1.2.1