[jboss-cvs] JBossAS SVN: r106804 - in projects/jboss-jca/trunk/common/src/main: java/org/jboss/jca/common/metadata/jbossra/jbossra10 and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 19 04:17:15 EDT 2010
Author: maeste
Date: 2010-07-19 04:17:14 -0400 (Mon, 19 Jul 2010)
New Revision: 106804
Added:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroup.java
Removed:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroups.java
Modified:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/JbossRaParser.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra10/JbossRa10.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/JbossRa20.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/RaConfigProperty.java
projects/jboss-jca/trunk/common/src/main/resources/schema/jboss-ra_2_0.xsd
Log:
JBJCA-385: full support of jboss-ra-2.0. FIxing problem with namesapces, adding forgotten attribute, code clean up
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/JbossRaParser.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/JbossRaParser.java 2010-07-18 10:48:24 UTC (rev 106803)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/JbossRaParser.java 2010-07-19 08:17:14 UTC (rev 106804)
@@ -24,7 +24,9 @@
import org.jboss.jca.common.metadata.MetadataParser;
import org.jboss.jca.common.metadata.ParserException;
import org.jboss.jca.common.metadata.jbossra.jbossra10.JbossRa10;
+import org.jboss.jca.common.metadata.jbossra.jbossra20.BeanValidationGroup;
import org.jboss.jca.common.metadata.jbossra.jbossra20.JbossRa20;
+import org.jboss.jca.common.metadata.jbossra.jbossra20.OverrideElementAttribute;
import org.jboss.jca.common.metadata.jbossra.jbossra20.RaConfigProperty;
import java.io.File;
@@ -32,15 +34,15 @@
import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.LinkedList;
-import java.util.List;
import java.util.Map;
import javax.xml.stream.XMLInputFactory;
import javax.xml.stream.XMLStreamException;
import javax.xml.stream.XMLStreamReader;
-import static javax.xml.stream.XMLStreamConstants.*;
+import static javax.xml.stream.XMLStreamConstants.END_ELEMENT;
+import static javax.xml.stream.XMLStreamConstants.START_ELEMENT;
+
/**
* A JbossRaParser.
*
@@ -114,9 +116,54 @@
}
- private JbossRa20 parseJbossRa20(XMLStreamReader reader, JbossRa jbossRa) throws XMLStreamException
+ private JbossRa20 parseJbossRa20(XMLStreamReader reader, JbossRa jbossRa) throws XMLStreamException, ParserException
{
- return null;
+ ArrayList<RaConfigProperty<?>> raConfigProperties = new ArrayList<RaConfigProperty<?>>();
+ ArrayList<BeanValidationGroup> beanValidationGroups = new ArrayList<BeanValidationGroup>();
+ String bootStrapContext = null;
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (Tag.forName(reader.getLocalName()) == Tag.JBOSSRA)
+ {
+ raConfigProperties.trimToSize();
+ beanValidationGroups.trimToSize();
+ return new JbossRa20(raConfigProperties, bootStrapContext, beanValidationGroups);
+ }
+ else
+ {
+ if (JbossRa10.Tag.forName(reader.getLocalName()) == JbossRa10.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (JbossRa20.Tag.forName(reader.getLocalName()))
+ {
+ case RA_CONFIG_PROPERTY : {
+ raConfigProperties.add(parseConfigProperty(reader));
+ break;
+ }
+ case BOOTSTRAP_CONTEXT : {
+ bootStrapContext = reader.getElementText();
+ break;
+ }
+ case BEAN_VALIDATION_GROUPS : {
+ beanValidationGroups.add(parseBeanValidationGroups(reader));
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
}
private JbossRa10 parseJbossRa10(XMLStreamReader reader) throws XMLStreamException, ParserException
@@ -163,21 +210,23 @@
String value = null;
String type = null;
String name = null;
+ //do it now because we are on right START_ELEMENT
+ OverrideElementAttribute overrideElementAttribute = OverrideElementAttribute.forName(reader.getAttributeValue(0));
while (reader.hasNext())
{
switch (reader.nextTag())
{
case END_ELEMENT : {
- //maeste: to be verified
if (JbossRa10.Tag.forName(reader.getLocalName()) == JbossRa10.Tag.RA_CONFIG_PROPERTY
|| JbossRa20.Tag.forName(reader.getLocalName()) == JbossRa20.Tag.RA_CONFIG_PROPERTY)
{
- return RaConfigProperty.buildRaConfigProperty(name, value, type);
+ return RaConfigProperty.buildRaConfigProperty(name, value, type, overrideElementAttribute);
}
else
{
if (JbossRa10.Tag.forName(reader.getLocalName()) == JbossRa10.Tag.UNKNOWN
- && JbossRa20.Tag.forName(reader.getLocalName()) == JbossRa20.Tag.UNKNOWN)
+ && JbossRa20.Tag.forName(reader.getLocalName()) == JbossRa20.Tag.UNKNOWN
+ && RaConfigProperty.Tag.forName(reader.getLocalName()) == RaConfigProperty.Tag.UNKNOWN)
{
throw new ParserException("unexpected end tag" + reader.getLocalName());
}
@@ -209,6 +258,49 @@
throw new ParserException("Reached end of xml document unexpectedly");
}
+ private BeanValidationGroup parseBeanValidationGroups(XMLStreamReader reader) throws XMLStreamException,
+ ParserException
+ {
+ ArrayList<String> beanValidationGroup = new ArrayList<String>();
+ while (reader.hasNext())
+ {
+ switch (reader.nextTag())
+ {
+ case END_ELEMENT : {
+ if (JbossRa10.Tag.forName(reader.getLocalName()) == JbossRa10.Tag.RA_CONFIG_PROPERTY
+ || JbossRa20.Tag.forName(reader.getLocalName()) == JbossRa20.Tag.RA_CONFIG_PROPERTY)
+ {
+ beanValidationGroup.trimToSize();
+ return new BeanValidationGroup(beanValidationGroup);
+ }
+ else
+ {
+ if (JbossRa10.Tag.forName(reader.getLocalName()) == JbossRa10.Tag.UNKNOWN
+ && JbossRa20.Tag.forName(reader.getLocalName()) == JbossRa20.Tag.UNKNOWN
+ && BeanValidationGroup.Tag.forName(reader.getLocalName()) == BeanValidationGroup.Tag.UNKNOWN)
+ {
+ throw new ParserException("unexpected end tag" + reader.getLocalName());
+ }
+ }
+ break;
+ }
+ case START_ELEMENT : {
+ switch (BeanValidationGroup.Tag.forName(reader.getLocalName()))
+ {
+ case BEAN_VALIDATION_GROUP : {
+ beanValidationGroup.add(reader.getElementText());
+ break;
+ }
+ default :
+ throw new ParserException("Unexpected element:" + reader.getLocalName());
+ }
+ break;
+ }
+ }
+ }
+ throw new ParserException("Reached end of xml document unexpectedly");
+ }
+
/**
*
* A Tag.
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra10/JbossRa10.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra10/JbossRa10.java 2010-07-18 10:48:24 UTC (rev 106803)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra10/JbossRa10.java 2010-07-19 08:17:14 UTC (rev 106804)
@@ -41,7 +41,7 @@
/**
* NAMESPACE of xml file for which this metadata is generated
*/
- public static final String NAMESPACE = "http://www.jboss.org/schema/ra/1.0";
+ public static final String NAMESPACE = "http://www.jboss.org/schema/ra";
/** The serialVersionUID */
private static final long serialVersionUID = 1L;
Copied: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroup.java (from rev 106798, projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroups.java)
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroup.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroup.java 2010-07-19 08:17:14 UTC (rev 106804)
@@ -0,0 +1,183 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.jbossra.jbossra20;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class BeanValidationGroup implements JCAMetadata
+{
+
+ /**
+ */
+ private static final long serialVersionUID = 6856138720550993874L;
+
+ private final List<String> beanValidationGroup;
+
+ /**
+ * @param beanValidationGroup List of bean validation group
+ */
+ public BeanValidationGroup(List<String> beanValidationGroup)
+ {
+ super();
+ this.beanValidationGroup = beanValidationGroup;
+ }
+
+ /**
+ * @return beanValidationGroup the list of bena validation group
+ */
+ public List<String> getBeanValidationGroup()
+ {
+ return Collections.unmodifiableList(beanValidationGroup);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((beanValidationGroup == null) ? 0 : beanValidationGroup.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof BeanValidationGroup))
+ return false;
+ BeanValidationGroup other = (BeanValidationGroup) obj;
+ if (beanValidationGroup == null)
+ {
+ if (other.beanValidationGroup != null)
+ return false;
+ }
+ else if (!beanValidationGroup.equals(other.beanValidationGroup))
+ return false;
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "BeanValidationGroups [beanValidationGroup=" + beanValidationGroup + ", getBeanValidationGroup()="
+ + getBeanValidationGroup() + ", hashCode()=" + hashCode() + "]";
+ }
+
+ /**
+ *
+ * A Tag.
+ *
+ * @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
+ *
+ */
+ public enum Tag
+ {
+ /**always first
+ *
+ */
+ UNKNOWN(null),
+
+ /**
+ * bean-validation-group tag name
+ */
+ BEAN_VALIDATION_GROUP("bean-validation-group");
+
+ private final String name;
+
+ /**
+ *
+ * Create a new Tag.
+ *
+ * @param name a name
+ */
+ Tag(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+
+ private static final Map<String, Tag> MAP;
+
+ static
+ {
+ final Map<String, Tag> map = new HashMap<String, Tag>();
+ for (Tag element : values())
+ {
+ final String name = element.getLocalName();
+ if (name != null)
+ map.put(name, element);
+ }
+ MAP = map;
+ }
+
+ /**
+ *
+ * Static method to get enum instance given localName string
+ *
+ * @param localName a string used as localname (typically tag name as defined in xsd)
+ * @return the enum instance
+ */
+ public static Tag forName(String localName)
+ {
+ final Tag element = MAP.get(localName);
+ return element == null ? UNKNOWN : element;
+ }
+
+ }
+
+}
Deleted: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroups.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroups.java 2010-07-18 10:48:24 UTC (rev 106803)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/BeanValidationGroups.java 2010-07-19 08:17:14 UTC (rev 106804)
@@ -1,110 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.jca.common.metadata.jbossra.jbossra20;
-
-import org.jboss.jca.common.metadata.JCAMetadata;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
- *
- */
-public class BeanValidationGroups implements JCAMetadata
-{
-
- /**
- */
- private static final long serialVersionUID = 6856138720550993874L;
-
- private final List<String> beanValidationGroup;
-
- /**
- * @param beanValidationGroup List of bean validation group
- */
- public BeanValidationGroups(List<String> beanValidationGroup)
- {
- super();
- this.beanValidationGroup = beanValidationGroup;
- }
-
- /**
- * @return beanValidationGroup the list of bena validation group
- */
- public List<String> getBeanValidationGroup()
- {
- return Collections.unmodifiableList(beanValidationGroup);
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#hashCode()
- */
- @Override
- public int hashCode()
- {
- final int prime = 31;
- int result = 1;
- result = prime * result + ((beanValidationGroup == null) ? 0 : beanValidationGroup.hashCode());
- return result;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
- @Override
- public boolean equals(Object obj)
- {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (!(obj instanceof BeanValidationGroups))
- return false;
- BeanValidationGroups other = (BeanValidationGroups) obj;
- if (beanValidationGroup == null)
- {
- if (other.beanValidationGroup != null)
- return false;
- }
- else if (!beanValidationGroup.equals(other.beanValidationGroup))
- return false;
- return true;
- }
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Object#toString()
- */
- @Override
- public String toString()
- {
- return "BeanValidationGroups [beanValidationGroup=" + beanValidationGroup + ", getBeanValidationGroup()="
- + getBeanValidationGroup() + ", hashCode()=" + hashCode() + "]";
- }
-
-}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/JbossRa20.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/JbossRa20.java 2010-07-18 10:48:24 UTC (rev 106803)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/JbossRa20.java 2010-07-19 08:17:14 UTC (rev 106804)
@@ -37,13 +37,13 @@
/**
* NAMESPACE of xml file for which this metadata is generated
*/
- public static final String NAMESPACE = "http://www.jboss.org/schema/ra/1.0";
+ public static final String NAMESPACE = "http://www.jboss.org/schema/ra/2.0";
private static final long serialVersionUID = -1494921311038998843L;
private final String bootstrapContext;
- private final List<BeanValidationGroups> beanValidationGroups;
+ private final List<BeanValidationGroup> beanValidationGroups;
/**
* @param raConfigProperties List of properties for configuration
@@ -51,7 +51,7 @@
* @param beanValidationGroups for validations
*/
public JbossRa20(List<RaConfigProperty<?>> raConfigProperties, String bootstrapContext,
- List<BeanValidationGroups> beanValidationGroups)
+ List<BeanValidationGroup> beanValidationGroups)
{
super(raConfigProperties);
this.bootstrapContext = bootstrapContext;
@@ -69,7 +69,7 @@
/**
* @return beanValidationGroups
*/
- public List<BeanValidationGroups> getBeanValidationGroups()
+ public List<BeanValidationGroup> getBeanValidationGroups()
{
return Collections.unmodifiableList(beanValidationGroups);
}
@@ -146,8 +146,18 @@
/** ra-config-property tag name
*
*/
- RA_CONFIG_PROPERTY("ra-config-property");
+ RA_CONFIG_PROPERTY("ra-config-property"),
+ /**
+ * bootstrap-context tag name
+ */
+ BOOTSTRAP_CONTEXT("bootstrap-context"),
+
+ /**
+ * bean-validation-groups tag name
+ */
+ BEAN_VALIDATION_GROUPS ("bean-validation-groups");
+
private final String name;
/**
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/RaConfigProperty.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/RaConfigProperty.java 2010-07-18 10:48:24 UTC (rev 106803)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jbossra/jbossra20/RaConfigProperty.java 2010-07-19 08:17:14 UTC (rev 106804)
@@ -22,14 +22,14 @@
package org.jboss.jca.common.metadata.jbossra.jbossra20;
import org.jboss.jca.common.metadata.JCAMetadata;
-import org.jboss.jca.common.metadata.jbossra.JbossRaParser.Tag;
import java.util.HashMap;
import java.util.Map;
/**
* @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
- * @param <T> generic type of this property. See {@link #buildRaConfigProperty(String, String, String)}
+ * @param <T> generic type of this property.
+ * See {@link #buildRaConfigProperty(String, String, String, OverrideElementAttribute))}
* for build right implementation
*
*/
@@ -46,29 +46,39 @@
private final String typeName;
+ private final OverrideElementAttribute overrideElementAttribute;
+
/**
* @param name the name of the property
* @param value the value of the property
+ * @param overrideElementAttribute the override-element attribute
*/
- private RaConfigProperty(String name, T value)
+ private RaConfigProperty(String name, T value, OverrideElementAttribute overrideElementAttribute)
{
super();
this.name = name;
this.value = value;
this.typeName = value.getClass().getName();
+ this.overrideElementAttribute = overrideElementAttribute == null
+ ? OverrideElementAttribute.RESOURCE_ADAPTER
+ : overrideElementAttribute;
}
/**
* @param name the name of the property
* @param value the value of the property
* @param typeName full qualified name of value's type
+ * @param overrideElementAttribute the override-element attribute
*/
- private RaConfigProperty(String name, T value, String type)
+ private RaConfigProperty(String name, T value, String typeName, OverrideElementAttribute overrideElementAttribute)
{
super();
this.name = name;
this.value = value;
- this.typeName = value.getClass().getName();
+ this.typeName = typeName;
+ this.overrideElementAttribute = overrideElementAttribute == null
+ ? OverrideElementAttribute.RESOURCE_ADAPTER
+ : overrideElementAttribute;
}
/**
@@ -92,54 +102,58 @@
* is returned and typeName will be set as passed parameter type.
*
*
+ *
+ *
* @param name name of the property
* @param value value of the property.
* @param type the full qualified name of the class to be actualised
* @return the actualised instance
+ * @param overrideElementAttribute the override-element attribute. Possible value are defined in the enumeration;
+ * if it is null the default RESOURCEADAPTER is used
* @throws NumberFormatException in case passed value isn't assignable to type class
*/
- public static RaConfigProperty<?> buildRaConfigProperty(String name, String value, String type)
- throws NumberFormatException
+ public static RaConfigProperty<?> buildRaConfigProperty(String name, String value, String type,
+ OverrideElementAttribute overrideElementAttribute) throws NumberFormatException
{
if (type == null || type.trim().length() == 0)
{
- return new RaConfigProperty<String>(name, value);
+ return new RaConfigProperty<String>(name, value, overrideElementAttribute);
}
if ("java.lang.Boolean".equals(type))
{
- return new RaConfigProperty<Boolean>(name, Boolean.valueOf(value));
+ return new RaConfigProperty<Boolean>(name, Boolean.valueOf(value), overrideElementAttribute);
}
else if ("java.lang.String".equals(type))
{
- return new RaConfigProperty<String>(name, value);
+ return new RaConfigProperty<String>(name, value, overrideElementAttribute);
}
else if ("java.lang.Integer".equals(type))
{
- return new RaConfigProperty<Integer>(name, Integer.valueOf(value));
+ return new RaConfigProperty<Integer>(name, Integer.valueOf(value), overrideElementAttribute);
}
else if ("java.lang.Double".equals(type))
{
- return new RaConfigProperty<Double>(name, Double.valueOf(value));
+ return new RaConfigProperty<Double>(name, Double.valueOf(value), overrideElementAttribute);
}
else if ("java.lang.Byte".equals(type))
{
- return new RaConfigProperty<Byte>(name, Byte.valueOf(value));
+ return new RaConfigProperty<Byte>(name, Byte.valueOf(value), overrideElementAttribute);
}
else if ("java.lang.Long".equals(type))
{
- return new RaConfigProperty<Long>(name, Long.valueOf(value));
+ return new RaConfigProperty<Long>(name, Long.valueOf(value), overrideElementAttribute);
}
else if ("java.lang.Float".equals(type))
{
- return new RaConfigProperty<Float>(name, Float.valueOf(value));
+ return new RaConfigProperty<Float>(name, Float.valueOf(value), overrideElementAttribute);
}
else if ("java.lang.Character".equals(type))
{
- return new RaConfigProperty<Character>(name, Character.valueOf(value.charAt(0)));
+ return new RaConfigProperty<Character>(name, Character.valueOf(value.charAt(0)), overrideElementAttribute);
}
else
{
- return new RaConfigProperty<Object>(name, value, type);
+ return new RaConfigProperty<Object>(name, value, type, overrideElementAttribute);
}
}
@@ -234,6 +248,28 @@
/**
*
+ * typeName getter
+ *
+ * @return the typeName
+ */
+ public String getTypeName()
+ {
+ return typeName;
+ }
+
+ /**
+ *
+ * override-element-attribute metadata getter
+ *
+ * @return the enum instance {@link OverrideElementAttribute}
+ */
+ public OverrideElementAttribute getOverrideElementAttribute()
+ {
+ return overrideElementAttribute;
+ }
+
+ /**
+ *
* A Tag.
*
* @author <a href="stefano.maestri at jboss.com">Stefano Maestri</a>
Modified: projects/jboss-jca/trunk/common/src/main/resources/schema/jboss-ra_2_0.xsd
===================================================================
--- projects/jboss-jca/trunk/common/src/main/resources/schema/jboss-ra_2_0.xsd 2010-07-18 10:48:24 UTC (rev 106803)
+++ projects/jboss-jca/trunk/common/src/main/resources/schema/jboss-ra_2_0.xsd 2010-07-19 08:17:14 UTC (rev 106804)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://www.jboss.org/schema/ra"
- xmlns:ra="http://www.jboss.org/schema/ra" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.jboss.org/schema/ra/2.0"
+ xmlns:ra="http://www.jboss.org/schema/ra/2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:javaee="http://java.sun.com/xml/ns/javaee"
elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.0">
More information about the jboss-cvs-commits
mailing list