[jboss-cvs] jboss-seam/src/main/org/jboss/seam/init ...
Norman Richards
norman.richards at jboss.com
Tue Dec 11 16:21:41 EST 2007
User: nrichards
Date: 07/12/11 16:21:41
Modified: src/main/org/jboss/seam/init Initialization.java
Log:
JBSEAM-2317
Revision Changes Path
1.199 +23 -10 jboss-seam/src/main/org/jboss/seam/init/Initialization.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Initialization.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/init/Initialization.java,v
retrieving revision 1.198
retrieving revision 1.199
diff -u -b -r1.198 -r1.199
--- Initialization.java 9 Dec 2007 06:03:45 -0000 1.198
+++ Initialization.java 11 Dec 2007 21:21:41 -0000 1.199
@@ -75,6 +75,19 @@
private Map<String, EventListenerDescriptor> eventListenerDescriptors = new HashMap<String, EventListenerDescriptor>();
private Collection<String> globalImports = new ArrayList<String>();
+ private Set<String> nonPropertyAttributes = new HashSet<String>();
+
+ {
+ nonPropertyAttributes.add("name");
+ nonPropertyAttributes.add("installed");
+ nonPropertyAttributes.add("scope");
+ nonPropertyAttributes.add("startup");
+ nonPropertyAttributes.add("class");
+ nonPropertyAttributes.add("jndi-name");
+ nonPropertyAttributes.add("precedence");
+ nonPropertyAttributes.add("auto-create");
+ }
+
public Initialization(ServletContext servletContext)
{
this.servletContext = servletContext;
@@ -390,15 +403,7 @@
for ( Attribute prop: (List<Attribute>) component.attributes() )
{
String attributeName = prop.getName();
- boolean isProperty = !"name".equals(attributeName) &&
- !"installed".equals(attributeName) &&
- !"scope".equals(attributeName) &&
- !"startup".equals(attributeName) &&
- !"class".equals(attributeName) &&
- !"jndi-name".equals(attributeName) &&
- !"precedence".equals(attributeName) &&
- !"auto-create".equals(attributeName);
- if (isProperty)
+ if (isProperty(prop.getNamespaceURI(),attributeName))
{
String qualifiedPropName = name + '.' + toCamelCase( prop.getQName().getName(), false );
Conversions.PropertyValue propValue = null;
@@ -418,6 +423,14 @@
}
}
+ /**
+ * component properties are non-namespaced and not in the reserved attribute list
+ */
+ private boolean isProperty(String namespaceURI, String attributeName) {
+ return (namespaceURI == null || namespaceURI.length()==0) &&
+ !nonPropertyAttributes.contains(attributeName);
+ }
+
private Class<?> getClassUsingImports(String className) throws ClassNotFoundException
{
Class<?> clazz = null;
More information about the jboss-cvs-commits
mailing list