You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2014/08/21 22:59:01 UTC

svn commit: r1619584 - /qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java

Author: rgodfrey
Date: Thu Aug 21 20:59:01 2014
New Revision: 1619584

URL: http://svn.apache.org/r1619584
Log:
QPID-6027 : Add persisted derived attributes to the initial configuration extract

Modified:
    qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java

Modified: qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java?rev=1619584&r1=1619583&r2=1619584&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java (original)
+++ qpid/trunk/qpid/java/broker-plugins/management-http/src/main/java/org/apache/qpid/server/management/plugin/servlet/rest/ConfiguredObjectToMapConverter.java Thu Aug 21 20:59:01 2014
@@ -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 ConfiguredObjectToMapConver
                 {
                     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));
+                    }
+                }
             }
         }
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org