[jboss-cvs] JBossAS SVN: r86793 - branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sat Apr 4 14:53:18 EDT 2009
Author: emuckenhuber
Date: 2009-04-04 14:53:18 -0400 (Sat, 04 Apr 2009)
New Revision: 86793
Modified:
branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java
Log:
[JBAS-6721] exclude readOnly properties
Modified: branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java
===================================================================
--- branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java 2009-04-04 18:52:25 UTC (rev 86792)
+++ branches/Branch_5_x/profileservice/src/main/org/jboss/profileservice/management/templates/JmsDestinationTemplate.java 2009-04-04 18:53:18 UTC (rev 86793)
@@ -44,6 +44,7 @@
import org.jboss.deployers.vfs.spi.client.VFSDeployment;
import org.jboss.managed.api.DeploymentTemplateInfo;
import org.jboss.managed.api.ManagedProperty;
+import org.jboss.managed.api.annotation.ViewUse;
import org.jboss.metatype.api.types.CompositeMetaType;
import org.jboss.metatype.api.values.CompositeValue;
import org.jboss.metatype.api.values.MapCompositeValueSupport;
@@ -177,6 +178,12 @@
Map<String, ManagedProperty> properties = info.getProperties();
for(ManagedProperty p : properties.values())
{
+ if(p.hasViewUse(ViewUse.CONFIGURATION) == false)
+ continue;
+
+ if(p.isReadOnly())
+ continue;
+
MetaValue v = p.getValue();
if(v == null)
continue;
@@ -189,30 +196,32 @@
if(Character.isLowerCase(c))
name = Character.toUpperCase(c) + name.substring(1);
+ JmsAttribute attribute = null;
+
if(v.getMetaType().isSimple())
{
- JmsAttributeMetaData attributeMD = new JmsAttributeMetaData(name, "" + ((SimpleValue)v).getValue());
- attributes.add(attributeMD);
+ attribute = new JmsAttributeMetaData(name, "" + ((SimpleValue)v).getValue());
}
else
{
if(name.equals("DLQ"))
{
ObjectName n = (ObjectName) mvf.unwrap(v);
- attributes.add(new JmsAttributeMetaData("DLQ", n.getCanonicalName()));
+ attribute = new JmsAttributeMetaData("DLQ", n.getCanonicalName());
}
else if(name.equals("ExpiryQueue"))
{
ObjectName n = (ObjectName) mvf.unwrap(v);
- attributes.add(new JmsAttributeMetaData("ExpiryQueue", n.getCanonicalName()));
+ attribute = new JmsAttributeMetaData("ExpiryQueue", n.getCanonicalName());
}
else if(name.equals("SecurityConfig"))
{
Element e = unwrapMetaValue((MapCompositeValueSupport) v);
- attributes.add(new JmsElementMetaData("SecurityConfig", e));
+ attribute = new JmsElementMetaData("SecurityConfig", e);
}
-
}
+ if(attribute != null)
+ attributes.add(attribute);
}
// Add dependencies
More information about the jboss-cvs-commits
mailing list