[jboss-cvs] JBossAS SVN: r79273 - projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 8 10:07:34 EDT 2008
Author: jeff.zhang
Date: 2008-10-08 10:07:34 -0400 (Wed, 08 Oct 2008)
New Revision: 79273
Added:
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ActivationspecMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/InboundRaMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageAdapterMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/OutboundRaMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ResourceAdapterMetaData.java
Modified:
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AdminObjectMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AuthenticationMechanismMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectionDefinitionMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectorMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/LicenseMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageListenerMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/RequiredConfigPropertyMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/SecurityPermissionMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/TransactionSupportMetaData.java
Log:
[JBMETA-112] connector_1.5.xsd refactor
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ActivationspecMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ActivationspecMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ActivationspecMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss;
+
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
+/**
+ * Activationspec meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class ActivationspecMetaData extends IdMetaDataImpl
+{
+ private static final long serialVersionUID = -1583292998359427984L;
+
+ private String asClass;
+ private List<RequiredConfigPropertyMetaData> requiredConfigProps;
+
+ @XmlElement(name="activationspec-class")
+ public void setAsClass(String asClass) {
+ this.asClass = asClass;
+ }
+
+ public String getAsClass() {
+ return asClass;
+ }
+
+ @XmlElement(name="required-config-property")
+ public void setRequiredConfigProps(List<RequiredConfigPropertyMetaData> requiredConfigProps) {
+ this.requiredConfigProps = requiredConfigProps;
+ }
+
+ public List<RequiredConfigPropertyMetaData> getRequiredConfigProps() {
+ return requiredConfigProps;
+ }
+
+}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AdminObjectMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AdminObjectMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AdminObjectMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,13 +21,20 @@
*/
package org.jboss.metadata.rar.jboss;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
/**
* Admin object meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class AdminObjectMetaData extends ConfigPropertyMetaDataContainer
+public class AdminObjectMetaData extends IdMetaDataImpl
{
private static final long serialVersionUID = 5647786972921112792L;
@@ -37,6 +44,7 @@
/** The admin object implementation class */
private String adminObjectImplementationClass;
+ private List<ConfigPropertyMetaData> configProps;
/**
* Get the admin object interface class
*
@@ -52,6 +60,7 @@
*
* @param adminObjectInterfaceClass the class name
*/
+ @XmlElement(name="adminobject-interface")
public void setAdminObjectInterfaceClass(String adminObjectInterfaceClass)
{
this.adminObjectInterfaceClass = adminObjectInterfaceClass;
@@ -72,10 +81,20 @@
*
* @param adminObjectImplementationClass the class name
*/
+ @XmlElement(name="adminobject-class")
public void setAdminObjectImplementationClass(String adminObjectImplementationClass)
{
this.adminObjectImplementationClass = adminObjectImplementationClass;
}
+
+ @XmlElement(name="config-property")
+ public void setConfigProps(List<ConfigPropertyMetaData> configProps) {
+ this.configProps = configProps;
+ }
+
+ public List<ConfigPropertyMetaData> getConfigProps() {
+ return configProps;
+ }
public String toString()
{
@@ -84,8 +103,9 @@
buffer.append(Integer.toHexString(System.identityHashCode(this)));
buffer.append("[adminObjectInterfaceClass=").append(adminObjectInterfaceClass);
buffer.append(" adminObjectImplementationClass=").append(adminObjectImplementationClass);
- buffer.append(" properties=").append(getProperties());
+ //buffer.append(" properties=").append(getProperties());
buffer.append(']');
return buffer.toString();
}
+
}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AuthenticationMechanismMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AuthenticationMechanismMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AuthenticationMechanismMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,13 +21,18 @@
*/
package org.jboss.metadata.rar.jboss;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
/**
* Authentication mechanism meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class AuthenticationMechanismMetaData extends DescriptionMetaDataContainer
+public class AuthenticationMechanismMetaData extends IdMetaDataImplWithDescriptionGroup
{
static final long serialVersionUID = 1562443409483033688L;
@@ -52,6 +57,7 @@
*
* @param authenticationMechanismType the type
*/
+ @XmlElement(name="authentication-mechanism-type")
public void setAuthenticationMechansimType(String authenticationMechanismType)
{
this.authenticationMechanismType = authenticationMechanismType;
@@ -72,6 +78,7 @@
*
* @param credentialInterfaceClass the class
*/
+ @XmlElement(name="credential-interface")
public void setCredentialInterfaceClass(String credentialInterfaceClass)
{
this.credentialInterfaceClass = credentialInterfaceClass;
@@ -84,7 +91,7 @@
buffer.append(Integer.toHexString(System.identityHashCode(this)));
buffer.append("[authenticationMechanismType=").append(authenticationMechanismType);
buffer.append(" credentialInterfaceClass=").append(credentialInterfaceClass);
- buffer.append(" descriptions=").append(getDescriptions());
+ //buffer.append(" descriptions=").append(getDescriptions());
buffer.append(']');
return buffer.toString();
}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,13 +21,18 @@
*/
package org.jboss.metadata.rar.jboss;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
/**
* Config property meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class ConfigPropertyMetaData extends DescriptionMetaDataContainer
+public class ConfigPropertyMetaData extends IdMetaDataImplWithDescriptionGroup
{
private static final long serialVersionUID = -3247621229521854849L;
@@ -55,6 +60,7 @@
*
* @param name the name
*/
+ @XmlElement(name="config-property-name")
public void setName(String name)
{
this.name = name;
@@ -75,6 +81,7 @@
*
* @param type the type
*/
+ @XmlElement(name="config-property-type")
public void setType(String type)
{
this.type = type;
@@ -95,6 +102,7 @@
*
* @param value the value
*/
+ @XmlElement(name="config-property-value")
public void setValue(String value)
{
this.value = value;
@@ -110,7 +118,7 @@
buffer.append(" type=").append(type);
if (value != null)
buffer.append(" value=").append(value);
- buffer.append(" descriptions=").append(getDescriptions());
+ //buffer.append(" descriptions=").append(getDescriptions());
buffer.append(']');
return buffer.toString();
}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectionDefinitionMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectionDefinitionMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectionDefinitionMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,22 +21,27 @@
*/
package org.jboss.metadata.rar.jboss;
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
/**
* Connection Definition meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class ConnectionDefinitionMetaData extends ConfigPropertyMetaDataContainer
+public class ConnectionDefinitionMetaData extends IdMetaDataImpl
{
private static final long serialVersionUID = -138227135002730221L;
-
- /** The connector metadata */
- private ConnectorMetaData cmd;
/** The managed connection factory class */
private String managedConnectionFactoryClass;
+ /** The connector metadata */
+ private List<ConfigPropertyMetaData> configProps;
+
/** The connection factory interface class */
private String connectionFactoryInterfaceClass;
@@ -49,22 +54,9 @@
/** The connection implementation class */
private String connectionImplementationClass;
- public ConnectionDefinitionMetaData(ConnectorMetaData cmd)
- {
- this.cmd = cmd;
- }
+
/**
- * Get the connector
- *
- * @return the connector
- */
- public ConnectorMetaData getConnector()
- {
- return cmd;
- }
-
- /**
* Get the managed connection factory class
*
* @return the managed connection factory class
@@ -83,7 +75,15 @@
{
this.managedConnectionFactoryClass = managedConnectionFactoryClass;
}
+
+ @XmlElement(name="config-property")
+ public void setConfigProps(List<ConfigPropertyMetaData> configProps) {
+ this.configProps = configProps;
+ }
+ public List<ConfigPropertyMetaData> getConfigProps() {
+ return configProps;
+ }
/**
* Get the connection factory interface class
*
@@ -99,6 +99,7 @@
*
* @param connectionFactoryInterfaceClass the class name
*/
+ @XmlElement(name="connectionfactory-interface")
public void setConnectionFactoryInterfaceClass(String connectionFactoryInterfaceClass)
{
this.connectionFactoryInterfaceClass = connectionFactoryInterfaceClass;
@@ -119,6 +120,7 @@
*
* @param connectionFactoryImplementationClass the class name
*/
+ @XmlElement(name="connectionfactory-impl-class")
public void setConnectionFactoryImplementationClass(String connectionFactoryImplementationClass)
{
this.connectionFactoryImplementationClass = connectionFactoryImplementationClass;
@@ -139,6 +141,7 @@
*
* @param connectionInterfaceClass the class name
*/
+ @XmlElement(name="connection-interface")
public void setConnectionInterfaceClass(String connectionInterfaceClass)
{
this.connectionInterfaceClass = connectionInterfaceClass;
@@ -159,6 +162,7 @@
*
* @param connectionImplementationClass the class name
*/
+ @XmlElement(name="connection-impl-class")
public void setConnectionImplementationClass(String connectionImplementationClass)
{
this.connectionImplementationClass = connectionImplementationClass;
@@ -174,7 +178,7 @@
buffer.append(" connectionFactoryImplementationClass=").append(connectionFactoryImplementationClass);
buffer.append(" connectionInterfaceClass=").append(connectionInterfaceClass);
buffer.append(" connectionImplementationClass=").append(connectionImplementationClass);
- buffer.append(" properties=").append(getProperties());
+ //buffer.append(" properties=").append(getProperties());
buffer.append(']');
return buffer.toString();
}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectorMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectorMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectorMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,28 +21,28 @@
*/
package org.jboss.metadata.rar.jboss;
-import java.net.URL;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.concurrent.ConcurrentHashMap;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlTransient;
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
+
/**
* Connector meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 76091 $
*/
-public class ConnectorMetaData extends ConfigPropertyMetaDataContainer
+public class ConnectorMetaData extends IdMetaDataImplWithDescriptionGroup
{
private static final long serialVersionUID = 7047130842894140222L;
- /** The url TODO move to RARDeploymentMetaData */
- private URL url;
-
+ private String dtdPublicId;
+ private String dtdSystemId;
/** The version */
- private String version = "1.0";
+ private String version;
/** The vendor name */
private String vendorName;
@@ -56,59 +56,41 @@
/** The resource adapter class */
private String raClass;
- /** Reauthentication support */
- private boolean reauthenticationSupport;
-
/** The license */
- private LicenseMetaData lmd = new LicenseMetaData();
+ private LicenseMetaData lmd;
+
+ private ResourceAdapterMetaData ra;
- /** The descriptions */
- private ConcurrentHashMap<String, DescriptionGroupMetaData> descriptions = new ConcurrentHashMap<String, DescriptionGroupMetaData>();
-
- /** The connection definitions */
- private HashSet<ConnectionDefinitionMetaData> connectionDefinitions = new HashSet<ConnectionDefinitionMetaData>();
-
- /** The transaction support meta data */
- private TransactionSupportMetaData tsmd = new TransactionSupportMetaData();
-
- /** The authentication mechanism meta data */
- private AuthenticationMechanismMetaData ammd = new AuthenticationMechanismMetaData();
-
- /** The message listeners */
- private HashSet<MessageListenerMetaData> listeners = new HashSet<MessageListenerMetaData>();
-
- /** The admin objects */
- private HashSet<AdminObjectMetaData> adminObjects = new HashSet<AdminObjectMetaData>();
-
- /** The security permissions */
- private HashSet<SecurityPermissionMetaData> securityPermissions = new HashSet<SecurityPermissionMetaData>();
-
- public ConnectorMetaData()
+ /**
+ * Callback for the DTD information
+ * @param root
+ * @param publicId
+ * @param systemId
+ */
+ @XmlTransient
+ public void setDTD(String root, String publicId, String systemId)
{
- DescriptionGroupMetaData dmd = new DescriptionGroupMetaData();
- descriptions.put(dmd.getLanguage(), dmd);
+ this.dtdPublicId = publicId;
+ this.dtdSystemId = systemId;
}
-
/**
- * Get the url.
- *
- * @return the url.
+ * Get the DTD public id if one was seen
+ * @return the value of the web.xml dtd public id
*/
- public URL getURL()
+ @XmlTransient
+ public String getDtdPublicId()
{
- return url;
+ return dtdPublicId;
}
-
/**
- * Set the url.
- *
- * @param url the url.
+ * Get the DTD system id if one was seen
+ * @return the value of the web.xml dtd system id
*/
- public void setURL(URL url)
+ @XmlTransient
+ public String getDtdSystemId()
{
- this.url = url;
+ return dtdSystemId;
}
-
/**
* Get the connector version
*
@@ -118,18 +100,38 @@
{
return version;
}
-
/**
* Set the connector version
*
* @param version the connector version
*/
+ @XmlAttribute
public void setVersion(String version)
{
this.version = version;
}
/**
+ * Is this a servlet 2.3 version application
+ * @return true if this is a javaee 2.3 version application
+ */
+ @XmlTransient
+ public boolean is10()
+ {
+ return dtdPublicId != null && dtdPublicId.equals("-//Sun Microsystems, Inc.//DTD Connector 1.0//EN");
+ }
+ @XmlTransient
+ public boolean is15()
+ {
+ return version != null && version.equals("1.5");
+ }
+ @XmlTransient
+ public boolean is16()
+ {
+ return version != null && version.equals("1.6");
+ }
+
+ /**
* Get the vendor name
*
* @return the vendor name
@@ -144,6 +146,7 @@
*
* @param vendorName the vendor name
*/
+ @XmlElement(name="vendor-name")
public void setVendorName(String vendorName)
{
this.vendorName = vendorName;
@@ -164,6 +167,7 @@
*
* @param eisType the eis type
*/
+ @XmlElement(name="eis-type")
public void setEISType(String eisType)
{
this.eisType = eisType;
@@ -184,6 +188,7 @@
*
* @param version the resource adapter version
*/
+ @XmlElement(name="resourceadapter-version")
public void setRAVersion(String version)
{
this.raVersion = version;
@@ -210,26 +215,6 @@
}
/**
- * Get the reauthentication support
- *
- * @return the reauthentication support
- */
- public boolean getReauthenticationSupport()
- {
- return reauthenticationSupport;
- }
-
- /**
- * Set the reauthentication support
- *
- * @param reauthenticationSupport true for support, false otherwise
- */
- public void setReauthenticationSupport(boolean reauthenticationSupport)
- {
- this.reauthenticationSupport = reauthenticationSupport;
- }
-
- /**
* Get the license
*
* @return the license
@@ -238,183 +223,25 @@
{
return lmd;
}
-
/**
- * Get the description for the default language
+ * Get the license
*
- * @return the description for the default langugage
+ * @return the license
*/
- public DescriptionGroupMetaData getDescription()
+ @XmlElement(name="license")
+ public void setLicense(LicenseMetaData lmd)
{
- DescriptionGroupMetaData dgmd = descriptions.get(Locale.getDefault().getLanguage());
- // No description using the default locale, just use the first
- if (dgmd == null)
- {
- for (Iterator<DescriptionGroupMetaData> i = descriptions.values().iterator(); i.hasNext();)
- {
- dgmd = i.next();
- break;
- }
- }
- return dgmd;
+ this.lmd = lmd;
}
- /**
- * Get the description for the give language
- *
- * @param lang the language
- * @return the description
- */
- public DescriptionGroupMetaData getDescription(String lang)
- {
- return descriptions.get(lang);
+ @XmlElement(name="resourceadapter")
+ public void setRa(ResourceAdapterMetaData ra) {
+ this.ra = ra;
}
-
- /**
- * Add a description
- *
- * @param dmd the description
- */
- public void addDescription(DescriptionGroupMetaData dmd)
- {
- descriptions.put(dmd.getLanguage(), dmd);
+ public ResourceAdapterMetaData getRa() {
+ return ra;
}
-
- /**
- * Get the transaction support
- *
- * @return the transaction support
- */
- public TransactionSupportMetaData getTransactionSupport()
- {
- return tsmd;
- }
-
- /**
- * Set the transaction support
- *
- * @param tsmd the transaction support
- */
- public void setTransactionSupport(TransactionSupportMetaData tsmd)
- {
- this.tsmd = tsmd;
- }
- /**
- * Get the authentication mechanism
- *
- * @return the authentication mechanism
- */
- public AuthenticationMechanismMetaData getAuthenticationMechanism()
- {
- return ammd;
- }
-
- /**
- * Set the authentication mechansim
- *
- * @param ammd the authentication mechansim
- */
- public void setAuthenticationMechansim(AuthenticationMechanismMetaData ammd)
- {
- this.ammd = ammd;
- }
-
- /**
- * Add a connection definition
- *
- * @param cdmd the connection definition
- */
- public void addConnectionDefinition(ConnectionDefinitionMetaData cdmd)
- {
- connectionDefinitions.add(cdmd);
- }
-
- /**
- * Get the connection definition
- *
- * @param connectionDefinition the idenitifying factory
- * @return the metadata or null if there isn't one
- */
- public ConnectionDefinitionMetaData getConnectionDefinition(String connectionDefinition)
- {
- for (Iterator<ConnectionDefinitionMetaData> i = connectionDefinitions.iterator(); i.hasNext();)
- {
- ConnectionDefinitionMetaData cdmd = i.next();
- if (cdmd.getConnectionFactoryInterfaceClass().equals(connectionDefinition))
- return cdmd;
- }
- return null;
- }
-
- /**
- * Add a message listener
- *
- * @param mlmd the message listener
- */
- public void addMessageListener(MessageListenerMetaData mlmd)
- {
- listeners.add(mlmd);
- }
-
- /**
- * Get the message listener
- *
- * @param messagingType the identifying listener interface
- * @return the metadata or null if there isn't one
- */
- public MessageListenerMetaData getMessageListener(String messagingType)
- {
- for (Iterator<MessageListenerMetaData> i = listeners.iterator(); i.hasNext();)
- {
- MessageListenerMetaData mlmd = i.next();
- if (mlmd.getType().equals(messagingType))
- return mlmd;
- }
- return null;
- }
-
- /**
- * Add an administered object
- *
- * @param aomd the administered object
- */
- public void addAdminObject(AdminObjectMetaData aomd)
- {
- adminObjects.add(aomd);
- }
-
- /**
- * Get the admin object
- *
- * @param interfaceName the identifying admin object interface
- * @return the metadata or null if there isn't one
- */
- public AdminObjectMetaData getAdminObject(String interfaceName)
- {
- for (Iterator<AdminObjectMetaData> i = adminObjects.iterator(); i.hasNext();)
- {
- AdminObjectMetaData aomd = i.next();
- if (aomd.getAdminObjectInterfaceClass().equals(interfaceName))
- return aomd;
- }
- return null;
- }
-
- public Collection<AdminObjectMetaData> getAdminObjects()
- {
- return adminObjects;
- }
-
- /**
- * Add a security permission
- *
- * @param spmd the security permission
- */
- public void addSecurityPermission(SecurityPermissionMetaData spmd)
- {
- securityPermissions.add(spmd);
- }
-
+
public String toString()
{
StringBuffer buffer = new StringBuffer();
@@ -426,16 +253,10 @@
buffer.append(" resourceAdapterVersion=").append(raVersion);
buffer.append(" resourceAdapterClass=").append(raClass);
buffer.append(" license=").append(lmd);
- buffer.append(" properties=").append(getProperties());
- buffer.append(" descriptions=").append(descriptions.values());
- buffer.append(" connectionDefinitions=").append(connectionDefinitions);
- buffer.append(" transactionSupport=").append(tsmd);
- buffer.append(" authenticationMechanism=").append(ammd);
- buffer.append(" reauthenticationSupport=").append(reauthenticationSupport);
- buffer.append(" messageListeners=").append(listeners);
- buffer.append(" adminobjects=").append(adminObjects);
- buffer.append(" securityPermissions=").append(securityPermissions);
+ //buffer.append(" properties=").append(getProperties());
+ //buffer.append(" descriptions=").append(descriptions.values());
buffer.append(']');
return buffer.toString();
}
+
}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/InboundRaMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/InboundRaMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/InboundRaMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss;
+
+
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
+/**
+ * inbound ResourceAdapter meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class InboundRaMetaData extends IdMetaDataImpl
+{
+ private static final long serialVersionUID = -1583292998359497984L;
+
+ private MessageAdapterMetaData messageAdapter;
+
+ @XmlElement(name="messageadapter")
+ public void setMessageAdapter(MessageAdapterMetaData messageAdapter) {
+ this.messageAdapter = messageAdapter;
+ }
+
+ public MessageAdapterMetaData getMessageAdapter() {
+ return messageAdapter;
+ }
+
+}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/LicenseMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/LicenseMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/LicenseMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,13 +21,17 @@
*/
package org.jboss.metadata.rar.jboss;
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptions;
+
/**
* License meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class LicenseMetaData extends DescriptionMetaDataContainer
+public class LicenseMetaData extends IdMetaDataImplWithDescriptions
{
private static final long serialVersionUID = -1583292998139497934L;
@@ -49,6 +53,7 @@
*
* @param required the required flag
*/
+ @XmlElement(name="license-required")
public void setRequired(boolean required)
{
this.required = required;
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageAdapterMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageAdapterMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageAdapterMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss;
+
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
+/**
+ * Message Adapter meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class MessageAdapterMetaData extends IdMetaDataImpl
+{
+ private static final long serialVersionUID = -1583492998359497984L;
+
+ private List<MessageListenerMetaData> messageListeners;
+
+ @XmlElement(name="messagelistener")
+ public void setMessageListeners(List<MessageListenerMetaData> messageListeners) {
+ this.messageListeners = messageListeners;
+ }
+
+ public List<MessageListenerMetaData> getMessageListeners() {
+ return messageListeners;
+ }
+}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageListenerMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageListenerMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageListenerMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,18 +21,18 @@
*/
package org.jboss.metadata.rar.jboss;
-import java.io.Serializable;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Set;
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
/**
* Message listener meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 75672 $
*/
-public class MessageListenerMetaData implements Serializable
+public class MessageListenerMetaData extends IdMetaDataImpl
{
private static final long serialVersionUID = -3196418073906964586L;
@@ -40,10 +40,7 @@
private String type;
/** The activation spec type */
- private String asType;
-
- /** The required properties */
- private Set<RequiredConfigPropertyMetaData> requiredProperties = new HashSet<RequiredConfigPropertyMetaData>();
+ private ActivationspecMetaData asType;
/**
* Get the message listener type
@@ -60,6 +57,7 @@
*
* @param type the message listener type
*/
+ @XmlElement(name="messagelistener-type")
public void setType(String type)
{
this.type = type;
@@ -70,7 +68,7 @@
*
* @return the activation spec type
*/
- public String getActivationSpecType()
+ public ActivationspecMetaData getActivationSpecType()
{
return asType;
}
@@ -80,31 +78,13 @@
*
* @param type the activation spec type
*/
- public void setActivationSpecType(String type)
+ @XmlElement(name="activationspec")
+ public void setActivationSpecType(ActivationspecMetaData type)
{
this.asType = type;
}
- /**
- * Add a required config property
- *
- * @param rcpmd the required config property
- */
- public void addRequiredConfigProperty(RequiredConfigPropertyMetaData rcpmd)
- {
- requiredProperties.add(rcpmd);
- }
- /**
- * Get the required properties
- *
- * @return the required config properties
- */
- public Collection<RequiredConfigPropertyMetaData> getRequiredConfigProperties()
- {
- return requiredProperties;
- }
-
public String toString()
{
StringBuffer buffer = new StringBuffer();
@@ -112,7 +92,7 @@
buffer.append(Integer.toHexString(System.identityHashCode(this)));
buffer.append("[type=").append(type);
buffer.append(" activationSpecType=").append(asType);
- buffer.append(" requiredProperties=").append(requiredProperties);
+ //buffer.append(" requiredProperties=").append(requiredProperties);
buffer.append(']');
return buffer.toString();
}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/OutboundRaMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/OutboundRaMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/OutboundRaMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss;
+
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
+/**
+ * outbound ResourceAdapter meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class OutboundRaMetaData extends IdMetaDataImpl
+{
+ private static final long serialVersionUID = -1583292998339497984L;
+
+ private List<ConnectionDefinitionMetaData> conDefs;
+ private TransactionSupportMetaData transSupport;
+ private List<AuthenticationMechanismMetaData> authMechanisms;
+ private boolean reAuthSupport;
+
+ @XmlElement(name="connection-definition")
+ public void setConDefs(List<ConnectionDefinitionMetaData> conDefs) {
+ this.conDefs = conDefs;
+ }
+
+ public List<ConnectionDefinitionMetaData> getConDefs() {
+ return conDefs;
+ }
+
+ @XmlElement(name="transaction-support")
+ public void setTransSupport(TransactionSupportMetaData transSupport) {
+ this.transSupport = transSupport;
+ }
+
+ public TransactionSupportMetaData getTransSupport() {
+ return transSupport;
+ }
+
+ @XmlElement(name="authentication-mechanism")
+ public void setAuthMechanisms(List<AuthenticationMechanismMetaData> authMechanisms) {
+ this.authMechanisms = authMechanisms;
+ }
+
+ public List<AuthenticationMechanismMetaData> getAuthMechanisms() {
+ return authMechanisms;
+ }
+
+ @XmlElement(name="reauthentication-support")
+ public void setReAuthSupport(boolean reAuthSupport) {
+ this.reAuthSupport = reAuthSupport;
+ }
+
+ public boolean isReAuthSupport() {
+ return reAuthSupport;
+ }
+}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/RequiredConfigPropertyMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/RequiredConfigPropertyMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/RequiredConfigPropertyMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,13 +21,18 @@
*/
package org.jboss.metadata.rar.jboss;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
/**
* Required Config property meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class RequiredConfigPropertyMetaData extends DescriptionMetaDataContainer
+public class RequiredConfigPropertyMetaData extends IdMetaDataImplWithDescriptionGroup
{
static final long serialVersionUID = 7276282462933038174L;
@@ -49,6 +54,7 @@
*
* @param name the name
*/
+ @XmlElement(name="config-property-name")
public void setName(String name)
{
this.name = name;
@@ -60,7 +66,7 @@
buffer.append("RequiredConfigPropertyMetaData").append('@');
buffer.append(Integer.toHexString(System.identityHashCode(this)));
buffer.append("[name=").append(name);
- buffer.append(" descriptions=").append(getDescriptions());
+ //buffer.append(" descriptions=").append(getDescriptions());
buffer.append(']');
return buffer.toString();
}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ResourceAdapterMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ResourceAdapterMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ResourceAdapterMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.metadata.rar.jboss;
+
+import java.util.List;
+import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptions;
+
+/**
+ * ResourceAdapter meta data
+ *
+ * @author Jeff Zhang
+ * @version $Revision: $
+ */
+public class ResourceAdapterMetaData extends IdMetaDataImplWithDescriptions
+{
+ private static final long serialVersionUID = -1583292998139497984L;
+
+ private String raClass;
+ private List<ConfigPropertyMetaData> configProperty;
+ private OutboundRaMetaData outboundRa;
+ private InboundRaMetaData inboundRa;
+ private List<AdminObjectMetaData> adminObjects;
+ private List<SecurityPermissionMetaData> securityPermissions;
+
+ @XmlElement(name="resourceadapter-class")
+ public void setRaClass(String raClass) {
+ this.raClass = raClass;
+ }
+
+ public String getRaClass() {
+ return raClass;
+ }
+
+ @XmlElement(name="config-property")
+ public void setConfigProperty(List<ConfigPropertyMetaData> configProperty) {
+ this.configProperty = configProperty;
+ }
+
+ public List<ConfigPropertyMetaData> getConfigProperty() {
+ return configProperty;
+ }
+
+ @XmlElement(name="outbound-resourceadapter")
+ public void setOutboundRa(OutboundRaMetaData outboundRa) {
+ this.outboundRa = outboundRa;
+ }
+
+ public OutboundRaMetaData getOutboundRa() {
+ return outboundRa;
+ }
+
+ @XmlElement(name="inbound-resourceadapter")
+ public void setInboundRa(InboundRaMetaData inboundRa) {
+ this.inboundRa = inboundRa;
+ }
+
+ public InboundRaMetaData getInboundRa() {
+ return inboundRa;
+ }
+
+ @XmlElement(name="adminobject")
+ public void setAdminObjects(List<AdminObjectMetaData> adminObjects) {
+ this.adminObjects = adminObjects;
+ }
+
+ public List<AdminObjectMetaData> getAdminObjects() {
+ return adminObjects;
+ }
+
+ @XmlElement(name="security-permission")
+ public void setSecurityPermissions(List<SecurityPermissionMetaData> securityPermissions) {
+ this.securityPermissions = securityPermissions;
+ }
+
+ public List<SecurityPermissionMetaData> getSecurityPermissions() {
+ return securityPermissions;
+ }
+}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/SecurityPermissionMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/SecurityPermissionMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/SecurityPermissionMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,13 +21,18 @@
*/
package org.jboss.metadata.rar.jboss;
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
+
/**
* Security Permission meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class SecurityPermissionMetaData extends DescriptionMetaDataContainer
+public class SecurityPermissionMetaData extends IdMetaDataImplWithDescriptionGroup
{
private static final long serialVersionUID = -2819460637074430187L;
@@ -49,6 +54,7 @@
*
* @param securityPermissionSpec the spec
*/
+ @XmlElement(name="security-permission-spec")
public void setSecurityPermissionSpec(String securityPermissionSpec)
{
this.securityPermissionSpec = securityPermissionSpec;
@@ -60,7 +66,7 @@
buffer.append("SecurityPermissionMetaData").append('@');
buffer.append(Integer.toHexString(System.identityHashCode(this)));
buffer.append("[spec=").append(securityPermissionSpec);
- buffer.append(" descriptions=").append(getDescriptions());
+ //buffer.append(" descriptions=").append(getDescriptions());
buffer.append(']');
return buffer.toString();
}
Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/TransactionSupportMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/TransactionSupportMetaData.java 2008-10-08 13:59:11 UTC (rev 79272)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/TransactionSupportMetaData.java 2008-10-08 14:07:34 UTC (rev 79273)
@@ -21,63 +21,21 @@
*/
package org.jboss.metadata.rar.jboss;
-import java.io.Serializable;
+import javax.xml.bind.annotation.XmlEnum;
+import javax.xml.bind.annotation.XmlType;
/**
* Transaction Support meta data
*
* @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @author Jeff Zhang
* @version $Revision: 71554 $
*/
-public class TransactionSupportMetaData implements Serializable
+ at XmlType(name="TransactionSupportMetaData")
+ at XmlEnum(String.class)
+public enum TransactionSupportMetaData
{
- static final long serialVersionUID = 691622093079125748L;
+ NoTransaction, LocalTransaction, XATransaction
- /** No transaction */
- public static final int NoTransaction = 0;
-
- /** Local transaction */
- public static final int LocalTransaction = 1;
-
- /** XA transaction */
- public static final int XATransaction = 2;
-
- /** The transaction support */
- private int transactionSupport;
-
- /**
- * Get the transaction support
- *
- * @return the transaction support
- */
- public int getTransactionSupport()
- {
- return transactionSupport;
- }
-
- /**
- * Set the transaction support
- *
- * @param transactionSupport the transaction support
- */
- public void setTransactionSupport(int transactionSupport)
- {
- this.transactionSupport = transactionSupport;
- }
-
- public String toString()
- {
- StringBuffer buffer = new StringBuffer();
- buffer.append("TransactionSupportMetaData").append('@');
- buffer.append(Integer.toHexString(System.identityHashCode(this)));
- if (transactionSupport == NoTransaction)
- buffer.append("[transactionSupport=NoTransaction]");
- else if (transactionSupport == LocalTransaction)
- buffer.append("[transactionSupport=LocalTransaction]");
- else if (transactionSupport == XATransaction)
- buffer.append("[transactionSupport=XATransaction]");
- else
- buffer.append("[transactionSupport=Unknown/Error]");
- return buffer.toString();
- }
}
+
More information about the jboss-cvs-commits
mailing list