[jboss-cvs] JBossAS SVN: r79177 - in projects/metadata/trunk/src/main/java/org/jboss/metadata: rar and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Oct 7 04:01:52 EDT 2008
Author: jeff.zhang
Date: 2008-10-07 04:01:52 -0400 (Tue, 07 Oct 2008)
New Revision: 79177
Added:
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/
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/ConfigPropertyMetaDataContainer.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/DescriptionGroupMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaDataContainer.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
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/DependsMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/JBossRAMetaData.java
projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/RARDeploymentMetaData.java
Log:
[JBMETA-112] move JCA metadata code. just move it, only change Java5 generics code, and seperate ra.xml and jboss-ra.xml codes to diff packages
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AdminObjectMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,91 @@
+/*
+ * 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;
+
+/**
+ * Admin object meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class AdminObjectMetaData extends ConfigPropertyMetaDataContainer
+{
+ private static final long serialVersionUID = 5647786972921112792L;
+
+ /** The admin object interface class */
+ private String adminObjectInterfaceClass;
+
+ /** The admin object implementation class */
+ private String adminObjectImplementationClass;
+
+ /**
+ * Get the admin object interface class
+ *
+ * @return the admin object interface class
+ */
+ public String getAdminObjectInterfaceClass()
+ {
+ return adminObjectInterfaceClass;
+ }
+
+ /**
+ * Set the admin object interface class
+ *
+ * @param adminObjectInterfaceClass the class name
+ */
+ public void setAdminObjectInterfaceClass(String adminObjectInterfaceClass)
+ {
+ this.adminObjectInterfaceClass = adminObjectInterfaceClass;
+ }
+
+ /**
+ * Get the admin object implementation class
+ *
+ * @return the admin object implementation class
+ */
+ public String getAdminObjectImplementationClass()
+ {
+ return adminObjectImplementationClass;
+ }
+
+ /**
+ * Set the admin object implementation class
+ *
+ * @param adminObjectImplementationClass the class name
+ */
+ public void setAdminObjectImplementationClass(String adminObjectImplementationClass)
+ {
+ this.adminObjectImplementationClass = adminObjectImplementationClass;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("AdminObjectMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[adminObjectInterfaceClass=").append(adminObjectInterfaceClass);
+ buffer.append(" adminObjectImplementationClass=").append(adminObjectImplementationClass);
+ buffer.append(" properties=").append(getProperties());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/AuthenticationMechanismMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,91 @@
+/*
+ * 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;
+
+/**
+ * Authentication mechanism meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class AuthenticationMechanismMetaData extends DescriptionMetaDataContainer
+{
+ static final long serialVersionUID = 1562443409483033688L;
+
+ /** The authentication mechanism type */
+ private String authenticationMechanismType;
+
+ /** The credential interface class */
+ private String credentialInterfaceClass;
+
+ /**
+ * Get the authentication mechanism type
+ *
+ * @return the authentication mechanism type
+ */
+ public String getAuthenticationMechansimType()
+ {
+ return authenticationMechanismType;
+ }
+
+ /**
+ * Set the authentication mechanism type
+ *
+ * @param authenticationMechanismType the type
+ */
+ public void setAuthenticationMechansimType(String authenticationMechanismType)
+ {
+ this.authenticationMechanismType = authenticationMechanismType;
+ }
+
+ /**
+ * Get the credential interface class
+ *
+ * @return the credential interface class
+ */
+ public String getCredentialInterfaceClass()
+ {
+ return credentialInterfaceClass;
+ }
+
+ /**
+ * Set the credential interface class
+ *
+ * @param credentialInterfaceClass the class
+ */
+ public void setCredentialInterfaceClass(String credentialInterfaceClass)
+ {
+ this.credentialInterfaceClass = credentialInterfaceClass;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("AuthenticationMechanismMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[authenticationMechanismType=").append(authenticationMechanismType);
+ buffer.append(" credentialInterfaceClass=").append(credentialInterfaceClass);
+ buffer.append(" descriptions=").append(getDescriptions());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,117 @@
+/*
+ * 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;
+
+/**
+ * Config property meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class ConfigPropertyMetaData extends DescriptionMetaDataContainer
+{
+ private static final long serialVersionUID = -3247621229521854849L;
+
+ /** The name */
+ private String name;
+
+ /** The type */
+ private String type = "java.lang.String";
+
+ /** The value */
+ private String value = "";
+
+ /**
+ * Get the name
+ *
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Set the name
+ *
+ * @param name the name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the type
+ *
+ * @return the type
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * Set the type
+ *
+ * @param type the type
+ */
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ /**
+ * Get the value
+ *
+ * @return the value
+ */
+ public String getValue()
+ {
+ return value;
+ }
+
+ /**
+ * Set the value
+ *
+ * @param value the value
+ */
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("ConfigPropertyMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[name=").append(name);
+ if (type != null)
+ buffer.append(" type=").append(type);
+ if (value != null)
+ buffer.append(" value=").append(value);
+ buffer.append(" descriptions=").append(getDescriptions());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaDataContainer.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaDataContainer.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConfigPropertyMetaDataContainer.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,77 @@
+/*
+ * 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.io.Serializable;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * An abstract class for meta data that have config properties
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 75675 $
+ */
+public class ConfigPropertyMetaDataContainer implements Serializable
+{
+ static final long serialVersionUID = 2891949219806920844L;
+
+ /** The properties by name */
+ private Set<ConfigPropertyMetaData> properties = new HashSet<ConfigPropertyMetaData>();
+
+ /**
+ * Add a property
+ *
+ * @param cpmd the property
+ */
+ public void addProperty(ConfigPropertyMetaData cpmd)
+ {
+ properties.add(cpmd);
+ }
+
+ /**
+ * Get the properties
+ *
+ * @return the properties
+ */
+ public Collection<ConfigPropertyMetaData> getProperties()
+ {
+ return properties;
+ }
+
+ /**
+ * Get the property for a name
+ *
+ * @param name the name
+ * @return the property or null if there is no property with that name
+ */
+ public ConfigPropertyMetaData getProperty(String name)
+ {
+ for (ConfigPropertyMetaData cpmd : properties)
+ {
+ if (cpmd.getName().equals(name))
+ return cpmd;
+ }
+ return null;
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectionDefinitionMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,181 @@
+/*
+ * 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;
+
+/**
+ * Connection Definition meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class ConnectionDefinitionMetaData extends ConfigPropertyMetaDataContainer
+{
+ private static final long serialVersionUID = -138227135002730221L;
+
+ /** The connector metadata */
+ private ConnectorMetaData cmd;
+
+ /** The managed connection factory class */
+ private String managedConnectionFactoryClass;
+
+ /** The connection factory interface class */
+ private String connectionFactoryInterfaceClass;
+
+ /** The connection factory implementation class */
+ private String connectionFactoryImplementationClass;
+
+ /** The connection interface class */
+ private String connectionInterfaceClass;
+
+ /** 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
+ */
+ public String getManagedConnectionFactoryClass()
+ {
+ return managedConnectionFactoryClass;
+ }
+
+ /**
+ * Set the managed connection factory class
+ *
+ * @param managedConnectionFactoryClass the class name
+ */
+ public void setManagedConnectionFactoryClass(String managedConnectionFactoryClass)
+ {
+ this.managedConnectionFactoryClass = managedConnectionFactoryClass;
+ }
+
+ /**
+ * Get the connection factory interface class
+ *
+ * @return the connection factory interface class
+ */
+ public String getConnectionFactoryInterfaceClass()
+ {
+ return connectionFactoryInterfaceClass;
+ }
+
+ /**
+ * Set the connection factory interface class
+ *
+ * @param connectionFactoryInterfaceClass the class name
+ */
+ public void setConnectionFactoryInterfaceClass(String connectionFactoryInterfaceClass)
+ {
+ this.connectionFactoryInterfaceClass = connectionFactoryInterfaceClass;
+ }
+
+ /**
+ * Get the connection factory implementation class
+ *
+ * @return the connection factory implementation class
+ */
+ public String getConnectionFactoryImplementationClass()
+ {
+ return connectionFactoryImplementationClass;
+ }
+
+ /**
+ * Set the connection factory implementation class
+ *
+ * @param connectionFactoryImplementationClass the class name
+ */
+ public void setConnectionFactoryImplementationClass(String connectionFactoryImplementationClass)
+ {
+ this.connectionFactoryImplementationClass = connectionFactoryImplementationClass;
+ }
+
+ /**
+ * Get the connection interface class
+ *
+ * @return the connection interface class
+ */
+ public String getConnectionInterfaceClass()
+ {
+ return connectionInterfaceClass;
+ }
+
+ /**
+ * Set the connection interface class
+ *
+ * @param connectionInterfaceClass the class name
+ */
+ public void setConnectionInterfaceClass(String connectionInterfaceClass)
+ {
+ this.connectionInterfaceClass = connectionInterfaceClass;
+ }
+
+ /**
+ * Get the connection implementation class
+ *
+ * @return the connection implementation class
+ */
+ public String getConnectionImplementationClass()
+ {
+ return connectionImplementationClass;
+ }
+
+ /**
+ * Set the connection implementation class
+ *
+ * @param connectionImplementationClass the class name
+ */
+ public void setConnectionImplementationClass(String connectionImplementationClass)
+ {
+ this.connectionImplementationClass = connectionImplementationClass;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("ConnectionDefinitionMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[managedConnectionFactoryClass=").append(managedConnectionFactoryClass);
+ buffer.append(" connectionFactoryInterfaceClass=").append(connectionFactoryInterfaceClass);
+ buffer.append(" connectionFactoryImplementationClass=").append(connectionFactoryImplementationClass);
+ buffer.append(" connectionInterfaceClass=").append(connectionInterfaceClass);
+ buffer.append(" connectionImplementationClass=").append(connectionImplementationClass);
+ buffer.append(" properties=").append(getProperties());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/ConnectorMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,441 @@
+/*
+ * 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.net.URL;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Connector meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 76091 $
+ */
+public class ConnectorMetaData extends ConfigPropertyMetaDataContainer
+{
+ private static final long serialVersionUID = 7047130842894140222L;
+
+ /** The url TODO move to RARDeploymentMetaData */
+ private URL url;
+
+ /** The version */
+ private String version = "1.0";
+
+ /** The vendor name */
+ private String vendorName;
+
+ /** The eis type */
+ private String eisType;
+
+ /** The resource adapter version */
+ private String raVersion;
+
+ /** The resource adapter class */
+ private String raClass;
+
+ /** Reauthentication support */
+ private boolean reauthenticationSupport;
+
+ /** The license */
+ private LicenseMetaData lmd = new LicenseMetaData();
+
+ /** 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()
+ {
+ DescriptionGroupMetaData dmd = new DescriptionGroupMetaData();
+ descriptions.put(dmd.getLanguage(), dmd);
+ }
+
+ /**
+ * Get the url.
+ *
+ * @return the url.
+ */
+ public URL getURL()
+ {
+ return url;
+ }
+
+ /**
+ * Set the url.
+ *
+ * @param url the url.
+ */
+ public void setURL(URL url)
+ {
+ this.url = url;
+ }
+
+ /**
+ * Get the connector version
+ *
+ * @return the connector version
+ */
+ public String getVersion()
+ {
+ return version;
+ }
+
+ /**
+ * Set the connector version
+ *
+ * @param version the connector version
+ */
+ public void setVersion(String version)
+ {
+ this.version = version;
+ }
+
+ /**
+ * Get the vendor name
+ *
+ * @return the vendor name
+ */
+ public String getVendorName()
+ {
+ return vendorName;
+ }
+
+ /**
+ * Set the vendor name
+ *
+ * @param vendorName the vendor name
+ */
+ public void setVendorName(String vendorName)
+ {
+ this.vendorName = vendorName;
+ }
+
+ /**
+ * Get the eis type
+ *
+ * @return the eis type
+ */
+ public String getEISType()
+ {
+ return eisType;
+ }
+
+ /**
+ * Set the eis Type
+ *
+ * @param eisType the eis type
+ */
+ public void setEISType(String eisType)
+ {
+ this.eisType = eisType;
+ }
+
+ /**
+ * Get the resource adapter version
+ *
+ * @return the resource adapter version
+ */
+ public String getRAVersion()
+ {
+ return raVersion;
+ }
+
+ /**
+ * Set the resource adapter version
+ *
+ * @param version the resource adapter version
+ */
+ public void setRAVersion(String version)
+ {
+ this.raVersion = version;
+ }
+
+ /**
+ * Get the resource adapter class
+ *
+ * @return the resource adapter class
+ */
+ public String getRAClass()
+ {
+ return raClass;
+ }
+
+ /**
+ * Set the resource adapter class
+ *
+ * @param raClass the resource adapter class
+ */
+ public void setRAClass(String raClass)
+ {
+ this.raClass = raClass;
+ }
+
+ /**
+ * 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
+ */
+ public LicenseMetaData getLicense()
+ {
+ return lmd;
+ }
+
+ /**
+ * Get the description for the default language
+ *
+ * @return the description for the default langugage
+ */
+ public DescriptionGroupMetaData getDescription()
+ {
+ 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;
+ }
+
+ /**
+ * Get the description for the give language
+ *
+ * @param lang the language
+ * @return the description
+ */
+ public DescriptionGroupMetaData getDescription(String lang)
+ {
+ return descriptions.get(lang);
+ }
+
+ /**
+ * Add a description
+ *
+ * @param dmd the description
+ */
+ public void addDescription(DescriptionGroupMetaData dmd)
+ {
+ descriptions.put(dmd.getLanguage(), dmd);
+ }
+
+ /**
+ * 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();
+ buffer.append("ConnectorMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[version=").append(version);
+ buffer.append(" vendorName=").append(vendorName);
+ buffer.append(" eisType=").append(eisType);
+ 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(']');
+ return buffer.toString();
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionGroupMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionGroupMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionGroupMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,180 @@
+/*
+ * 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.io.Serializable;
+import java.util.Locale;
+
+/**
+ * Description group meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class DescriptionGroupMetaData implements Serializable
+{
+ static final long serialVersionUID = 1324619949051028127L;
+
+ /** The language */
+ private String lang;
+
+ /** The description */
+ private String description;
+
+ /** The display name */
+ private String displayName;
+
+ /** The small icon */
+ private String smallIcon;
+
+ /** The large icon */
+ private String largeIcon;
+
+ /**
+ * Create a new description group meta data using the default langugage
+ */
+ public DescriptionGroupMetaData()
+ {
+ this(null);
+ }
+
+ /**
+ * Create a new description group meta data
+ *
+ * @param lang the language
+ */
+ public DescriptionGroupMetaData(String lang)
+ {
+ if (lang == null)
+ this.lang = Locale.getDefault().getLanguage();
+ else
+ this.lang = lang;
+ }
+
+ /**
+ * Get the language
+ *
+ * @return the language
+ */
+ public String getLanguage()
+ {
+ return lang;
+ }
+
+ /**
+ * Get the description
+ *
+ * @return the description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Set the description
+ *
+ * @param description the description
+ */
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ /**
+ * Get the display name
+ *
+ * @return the display name
+ */
+ public String getDisplayName()
+ {
+ return displayName;
+ }
+
+ /**
+ * Set the display name
+ *
+ * @param displayName the display name
+ */
+ public void setDisplayName(String displayName)
+ {
+ this.displayName = displayName;
+ }
+
+ /**
+ * Get the small icon
+ *
+ * @return the small icon
+ */
+ public String getSmallIcon()
+ {
+ return smallIcon;
+ }
+
+ /**
+ * Set the small icon
+ *
+ * @param icon the icon
+ */
+ public void setSmallIcon(String icon)
+ {
+ this.smallIcon = icon;
+ }
+
+ /**
+ * Get the large icon
+ *
+ * @return the large icon
+ */
+ public String getLargeIcon()
+ {
+ return largeIcon;
+ }
+
+ /**
+ * Set the large icon
+ *
+ * @param icon the icon
+ */
+ public void setLargeIcon(String icon)
+ {
+ this.largeIcon = icon;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("DescriptionGroupMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[language=").append(lang);
+ if (description != null)
+ buffer.append(" description=").append(description);
+ if (displayName != null)
+ buffer.append(" displayName=").append(displayName);
+ if (smallIcon != null)
+ buffer.append(" smallIcon=").append(smallIcon);
+ if (largeIcon != null)
+ buffer.append(" largeIcon=").append(largeIcon);
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,105 @@
+/*
+ * 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.io.Serializable;
+import java.util.Locale;
+
+/**
+ * Description meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class DescriptionMetaData implements Serializable
+{
+ static final long serialVersionUID = -3100028904830435509L;
+
+ /** The language */
+ private String lang;
+
+ /** The description */
+ private String description;
+
+ /**
+ * Create a new description meta data using the default langugage
+ */
+ public DescriptionMetaData()
+ {
+ this(null);
+ }
+
+ /**
+ * Create a new description meta data
+ *
+ * @param lang the language
+ */
+ public DescriptionMetaData(String lang)
+ {
+ if (lang == null)
+ this.lang = Locale.getDefault().getLanguage();
+ else
+ this.lang = lang;
+ }
+
+ /**
+ * Get the language
+ *
+ * @return the language
+ */
+ public String getLanguage()
+ {
+ return lang;
+ }
+
+ /**
+ * Get the description
+ *
+ * @return the description
+ */
+ public String getDescription()
+ {
+ return description;
+ }
+
+ /**
+ * Set the description
+ *
+ * @param description the description
+ */
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("DescriptionMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[language=").append(lang);
+ if (description != null)
+ buffer.append(" description=").append(description);
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaDataContainer.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaDataContainer.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/DescriptionMetaDataContainer.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,111 @@
+/*
+ * 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.io.Serializable;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * An abstract class for meta data that has descriptions
+ *
+ * @author <a href="mailto:adrian at jboss.org">Adrian Brock</a>
+ * @version $Revision: 76091 $
+ */
+public class DescriptionMetaDataContainer implements Serializable
+{
+ private static final long serialVersionUID = -8988666040600469357L;
+
+ /** The descriptions */
+ private ConcurrentHashMap<String, DescriptionMetaData> descriptions = new ConcurrentHashMap<String, DescriptionMetaData>();
+
+ public DescriptionMetaDataContainer()
+ {
+ DescriptionMetaData dmd = new DescriptionMetaData();
+ descriptions.put(dmd.getLanguage(), dmd);
+ }
+
+ /**
+ * Get the desription for the default language
+ * or the first description if there is no default
+ *
+ * @return the description for the default language
+ */
+ public DescriptionMetaData getDescription()
+ {
+ // Try the default locale
+ DescriptionMetaData dmd = descriptions.get(Locale.getDefault().getLanguage());
+ // No description using the default locale, just use the first
+ if (dmd == null)
+ {
+ for (Iterator<DescriptionMetaData> i = descriptions.values().iterator(); i.hasNext();)
+ {
+ dmd = i.next();
+ break;
+ }
+ }
+ return dmd;
+ }
+
+ /**
+ * Get the description for the give language
+ *
+ * @param lang the language
+ * @return the description
+ */
+ public DescriptionMetaData getDescription(String lang)
+ {
+ return descriptions.get(lang);
+ }
+
+ /**
+ * Add a description
+ *
+ * @param dmd the description
+ */
+ public void addDescription(DescriptionMetaData dmd)
+ {
+ descriptions.put(dmd.getLanguage(), dmd);
+ }
+
+ /**
+ * Get the descriptions
+ *
+ * @return the descriptions
+ */
+ public Collection<DescriptionMetaData> getDescriptions()
+ {
+ return descriptions.values();
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("DescriptionMetaDataContainer").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[descriptions=").append(descriptions.values());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/LicenseMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,67 @@
+/*
+ * 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;
+
+/**
+ * License meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class LicenseMetaData extends DescriptionMetaDataContainer
+{
+ private static final long serialVersionUID = -1583292998139497934L;
+
+ /** license required */
+ private boolean required = false;
+
+ /**
+ * Get the license required flag
+ *
+ * @return the license required flag
+ */
+ public boolean getRequired()
+ {
+ return required;
+ }
+
+ /**
+ * Set the license required flag
+ *
+ * @param required the required flag
+ */
+ public void setRequired(boolean required)
+ {
+ this.required = required;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("LicenseMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[required=").append(required);
+ buffer.append(" descriptions=").append(getDescriptions());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/MessageListenerMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,119 @@
+/*
+ * 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.io.Serializable;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * Message listener meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 75672 $
+ */
+public class MessageListenerMetaData implements Serializable
+{
+ private static final long serialVersionUID = -3196418073906964586L;
+
+ /** The message listener type */
+ private String type;
+
+ /** The activation spec type */
+ private String asType;
+
+ /** The required properties */
+ private Set<RequiredConfigPropertyMetaData> requiredProperties = new HashSet<RequiredConfigPropertyMetaData>();
+
+ /**
+ * Get the message listener type
+ *
+ * @return the message listener type
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * Set the message listener type
+ *
+ * @param type the message listener type
+ */
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ /**
+ * Get the activation spec type
+ *
+ * @return the activation spec type
+ */
+ public String getActivationSpecType()
+ {
+ return asType;
+ }
+
+ /**
+ * Set the activation spec type
+ *
+ * @param type the activation spec type
+ */
+ public void setActivationSpecType(String 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();
+ buffer.append("MessageListenerMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[type=").append(type);
+ buffer.append(" activationSpecType=").append(asType);
+ buffer.append(" requiredProperties=").append(requiredProperties);
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/RequiredConfigPropertyMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,67 @@
+/*
+ * 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;
+
+/**
+ * Required Config property meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class RequiredConfigPropertyMetaData extends DescriptionMetaDataContainer
+{
+ static final long serialVersionUID = 7276282462933038174L;
+
+ /** The name */
+ private String name;
+
+ /**
+ * Get the name
+ *
+ * @return the name
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Set the name
+ *
+ * @param name the name
+ */
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("RequiredConfigPropertyMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[name=").append(name);
+ buffer.append(" descriptions=").append(getDescriptions());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/SecurityPermissionMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,67 @@
+/*
+ * 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;
+
+/**
+ * Security Permission meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class SecurityPermissionMetaData extends DescriptionMetaDataContainer
+{
+ private static final long serialVersionUID = -2819460637074430187L;
+
+ /** The security permission spec */
+ private String securityPermissionSpec;
+
+ /**
+ * Get the security permission spec
+ *
+ * @return the security permission spec
+ */
+ public String getSecurityPermissionSpec()
+ {
+ return securityPermissionSpec;
+ }
+
+ /**
+ * Set the security permission spec
+ *
+ * @param securityPermissionSpec the spec
+ */
+ public void setSecurityPermissionSpec(String securityPermissionSpec)
+ {
+ this.securityPermissionSpec = securityPermissionSpec;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("SecurityPermissionMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[spec=").append(securityPermissionSpec);
+ buffer.append(" descriptions=").append(getDescriptions());
+ buffer.append(']');
+ return buffer.toString();
+ }
+}
Added: 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 (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/jboss/TransactionSupportMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,83 @@
+/*
+ * 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.io.Serializable;
+
+/**
+ * Transaction Support meta data
+ *
+ * @author <a href="mailto:adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 71554 $
+ */
+public class TransactionSupportMetaData implements Serializable
+{
+ static final long serialVersionUID = 691622093079125748L;
+
+ /** 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();
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/DependsMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/DependsMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/DependsMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,66 @@
+/*
+ * 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.spec;
+
+import java.io.Serializable;
+
+/**
+ * Depends meta data
+ *
+ * @author <a href="mailto:vicky.kak at jboss.com">Vicky Kak</a>
+ */
+public class DependsMetaData implements Serializable
+{
+ private static final long serialVersionUID = -4864068414581654366L;
+
+ /** The dependsName */
+ private String dependsName;
+
+ /**
+ * Get the dependsName
+ *
+ * @return the dependsName
+ */
+ public String getDependsName()
+ {
+ return dependsName;
+ }
+
+ /**
+ * Set the dependsName
+ *
+ * @param dependsName the dependsName
+ */
+ public void setDependsName(String dependsName)
+ {
+ this.dependsName = dependsName;
+ }
+
+ public String toString()
+ {
+ StringBuffer buffer = new StringBuffer();
+ buffer.append("DependsMetaData").append('@');
+ buffer.append(Integer.toHexString(System.identityHashCode(this)));
+ buffer.append("[dependsName=").append(dependsName).append(']');
+ return buffer.toString();
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/JBossRAMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/JBossRAMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/JBossRAMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,51 @@
+/*
+ * 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.spec;
+
+import java.util.List;
+import org.jboss.metadata.rar.jboss.ConfigPropertyMetaDataContainer;
+import org.jboss.util.collection.CollectionsFactory;
+
+/**
+ * A JBossRAMetaData.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @author <a href="vicky.kak at jboss.com">Vicky Kak</a>
+ * @version $Revision: 75672 $
+ */
+public class JBossRAMetaData extends ConfigPropertyMetaDataContainer
+{
+ /** The serialVersionUID */
+ private static final long serialVersionUID = -8041048198795930659L;
+
+ private List<DependsMetaData> dependsNameList = CollectionsFactory.createLazyList();
+
+ public void addDependsMetaData(DependsMetaData dmd)
+ {
+ dependsNameList.add(dmd);
+ }
+
+ public List<DependsMetaData> getDependsMetaData()
+ {
+ return dependsNameList;
+ }
+}
Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/RARDeploymentMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/RARDeploymentMetaData.java (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/rar/spec/RARDeploymentMetaData.java 2008-10-07 08:01:52 UTC (rev 79177)
@@ -0,0 +1,59 @@
+/*
+ * 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.spec;
+
+import java.io.Serializable;
+import org.jboss.metadata.rar.jboss.ConnectorMetaData;
+
+/**
+ * A RARDeploymentMetaData.
+ *
+ * @author <a href="weston.price at jboss.com">Weston Price</a>
+ * @version $Revision: 75672 $
+ */
+public class RARDeploymentMetaData implements Serializable
+{
+ private static final long serialVersionUID = 5812689890896027289L;
+
+ private ConnectorMetaData connectorMetaData = new ConnectorMetaData();
+ private JBossRAMetaData raXmlMetaData = new JBossRAMetaData();
+
+ public ConnectorMetaData getConnectorMetaData()
+ {
+ return connectorMetaData;
+ }
+
+ public void setConnectorMetaData(ConnectorMetaData connectorMetaData)
+ {
+ this.connectorMetaData = connectorMetaData;
+ }
+
+ public JBossRAMetaData getRaXmlMetaData()
+ {
+ return raXmlMetaData;
+ }
+
+ public void setRaXmlMetaData(JBossRAMetaData raXmlMetaData)
+ {
+ this.raXmlMetaData = raXmlMetaData;
+ }
+}
More information about the jboss-cvs-commits
mailing list