[jboss-cvs] JBossAS SVN: r106753 - in projects/jboss-jca/trunk: common/src/main/java/org/jboss/jca/common/metadata and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jul 15 10:41:43 EDT 2010
Author: maeste
Date: 2010-07-15 10:41:42 -0400 (Thu, 15 Jul 2010)
New Revision: 106753
Added:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/JCAMetadata.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/BeanValidationGroups.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/JbossRa.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/RaConfigProperty.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/package.html
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Activationspec.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Adminobject.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/AuthenticationMechanism.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConfigProperty.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConnectionDefinition.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Connector16.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/CredentialInterfaceEnum.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Icon.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/IdDecoratedMetadata.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/InboundResourceAdapter.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LicenseType.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedMetadata.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedXsdString.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageAdapter.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageListener.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/OutboundResourceAdapter.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Path.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/RequiredConfigProperty.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ResourceAdapter.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/SecurityPermission.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/TransactionSupportEnum.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/XsdString.java
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/package.html
projects/jboss-jca/trunk/transaction.log
Modified:
projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/Metadata.java
Log:
first implementation of metadata
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/JCAMetadata.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/JCAMetadata.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/JCAMetadata.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,33 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata;
+
+import java.io.Serializable;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public interface JCAMetadata extends Serializable
+{
+
+}
Modified: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/Metadata.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/Metadata.java 2010-07-15 14:39:22 UTC (rev 106752)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/Metadata.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -62,6 +62,7 @@
public class Metadata
{
private static Logger log = Logger.getLogger(Metadata.class);
+
private static boolean trace = log.isTraceEnabled();
/**
@@ -101,15 +102,15 @@
{
long start = System.currentTimeMillis();
- result = (ConnectorMetaData)unmarshaller.unmarshal(url, resolver);
-
+ result = (ConnectorMetaData) unmarshaller.unmarshal(url, resolver);
+
log.debug("Total parse for " + url + " took " + (System.currentTimeMillis() - start) + "ms");
if (trace)
{
log.trace("successful parse " + result.getVersion() + " rar package " + result);
}
-
+
}
catch (Exception e)
{
@@ -117,7 +118,7 @@
throw e;
}
}
-
+
return result;
}
@@ -148,8 +149,8 @@
{
long start = System.currentTimeMillis();
- result = (JBossRAMetaData)unmarshaller.unmarshal(url, resolver);
-
+ result = (JBossRAMetaData) unmarshaller.unmarshal(url, resolver);
+
log.debug("Total parse for " + url + " took " + (System.currentTimeMillis() - start) + "ms");
if (trace)
@@ -161,7 +162,7 @@
throw e;
}
}
-
+
return result;
}
@@ -184,7 +185,7 @@
<xs:enumeration value="adminobject"/>
</xs:restriction>
*/
-
+
List<RaConfigPropertyMetaData> props = jmd.getRaConfigProps();
List<ConfigPropertyMetaData> append = null;
@@ -204,52 +205,48 @@
}
else if (override.equals("connection-definition"))
{
- if (cmd.getRa() != null &&
- cmd.getRa().getOutboundRa() != null &&
- cmd.getRa().getOutboundRa().getConDefs() != null &&
- cmd.getRa().getOutboundRa().getConDefs().size() > 0 &&
- cmd.getRa().getOutboundRa().getConDefs().get(0) != null)
+ if (cmd.getRa() != null && cmd.getRa().getOutboundRa() != null
+ && cmd.getRa().getOutboundRa().getConDefs() != null
+ && cmd.getRa().getOutboundRa().getConDefs().size() > 0
+ && cmd.getRa().getOutboundRa().getConDefs().get(0) != null)
{
listConfigProp = cmd.getRa().getOutboundRa().getConDefs().get(0).getConfigProps();
}
- }
+ }
else if (override.equals("activationspec"))
{
- if (cmd.getRa() != null &&
- cmd.getRa().getInboundRa() != null &&
- cmd.getRa().getInboundRa().getMessageAdapter() != null &&
- cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners() != null &&
- cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().size() > 0 &&
- cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().get(0) != null &&
- cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().get(0).
- getActivationSpecType() != null)
+ if (cmd.getRa() != null
+ && cmd.getRa().getInboundRa() != null
+ && cmd.getRa().getInboundRa().getMessageAdapter() != null
+ && cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners() != null
+ && cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().size() > 0
+ && cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().get(0) != null
+ && cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().get(0)
+ .getActivationSpecType() != null)
{
- listConfigProp = cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().
- get(0).getActivationSpecType().getConfigProps();
+ listConfigProp = cmd.getRa().getInboundRa().getMessageAdapter().getMessageListeners().get(0)
+ .getActivationSpecType().getConfigProps();
}
}
else if (override.equals("adminobject"))
{
- if (cmd.getRa() != null &&
- cmd.getRa().getAdminObjects() != null &&
- cmd.getRa().getAdminObjects().size() > 0 &&
- cmd.getRa().getAdminObjects().get(0) != null)
+ if (cmd.getRa() != null && cmd.getRa().getAdminObjects() != null
+ && cmd.getRa().getAdminObjects().size() > 0 && cmd.getRa().getAdminObjects().get(0) != null)
{
listConfigProp = cmd.getRa().getAdminObjects().get(0).getConfigProps();
}
}
-
+
boolean found = false;
if (listConfigProp != null)
{
Iterator<ConfigPropertyMetaData> it = listConfigProp.iterator();
-
+
while (!found && it.hasNext())
{
ConfigPropertyMetaData cpmd = it.next();
- if (cpmd.getName().equals(rcmd.getName()) &&
- cpmd.getType().equals(rcmd.getType()))
+ if (cpmd.getName().equals(rcmd.getName()) && cpmd.getType().equals(rcmd.getType()))
{
cpmd.setValue(rcmd.getValue());
found = true;
@@ -266,7 +263,7 @@
cpmd.setName(rcmd.getName());
cpmd.setType(rcmd.getType());
cpmd.setValue(rcmd.getValue());
-
+
append.add(cpmd);
}
}
@@ -286,7 +283,7 @@
return cmd;
}
-
+
/**
* Validate specification metadata
* @param cmd The specification metadata
@@ -297,10 +294,9 @@
{
if (cmd.is10() && (cmd instanceof JCA10DTDMetaData))
{
- RA10MetaData ra10 = ((JCA10DTDMetaData)cmd).getRa10();
- if (ra10 == null
- || ra10.getManagedConnectionFactoryClass() == null
- || ra10.getManagedConnectionFactoryClass().equals(""))
+ RA10MetaData ra10 = ((JCA10DTDMetaData) cmd).getRa10();
+ if (ra10 == null || ra10.getManagedConnectionFactoryClass() == null
+ || ra10.getManagedConnectionFactoryClass().equals(""))
{
throw new ValidateException("ManagedConnectionFactoryClass should be defined");
}
@@ -309,7 +305,7 @@
//make sure all need metadata parsered and processed after annotation handle
if (cmd.getRa() == null)
throw new ValidateException("ResourceAdapter metadata should be defined");
-
+
//make sure ra metadata contains inbound or outbound at least
boolean inboundOrOutbound = false;
if (validateOutbound(cmd.getRa().getOutboundRa()))
@@ -320,7 +316,7 @@
throw new ValidateException("ResourceAdapter metadata should contains inbound or outbound at least");
return cmd;
}
-
+
/**
* Validate outbound metadata
* @param omd The specification metadata
@@ -334,16 +330,14 @@
if (omd.getConDefs() == null || omd.getConDefs().size() == 0)
return false;
ConnectionDefinitionMetaData cdm = omd.getConDefs().get(0);
- if (cdm.getManagedConnectionFactoryClass() == null ||
- cdm.getConnectionFactoryInterfaceClass() == null ||
- cdm.getConnectionFactoryImplementationClass() == null ||
- cdm.getConnectionInterfaceClass() == null ||
- cdm.getConnectionImplementationClass() == null)
+ if (cdm.getManagedConnectionFactoryClass() == null || cdm.getConnectionFactoryInterfaceClass() == null
+ || cdm.getConnectionFactoryImplementationClass() == null || cdm.getConnectionInterfaceClass() == null
+ || cdm.getConnectionImplementationClass() == null)
return false;
-
+
return true;
}
-
+
/**
* Validate inbound metadata
* @param cmd The specification metadata
@@ -354,14 +348,12 @@
{
if (imd == null)
return false;
- if (imd.getMessageAdapter() == null ||
- imd.getMessageAdapter().getMessageListeners() == null ||
- imd.getMessageAdapter().getMessageListeners().size() == 0)
+ if (imd.getMessageAdapter() == null || imd.getMessageAdapter().getMessageListeners() == null
+ || imd.getMessageAdapter().getMessageListeners().size() == 0)
return false;
MessageListenerMetaData mlmd = imd.getMessageAdapter().getMessageListeners().get(0);
- if (mlmd.getType() == null ||
- mlmd.getActivationSpecType() == null ||
- mlmd.getActivationSpecType().getAsClass() == null)
+ if (mlmd.getType() == null || mlmd.getActivationSpecType() == null
+ || mlmd.getActivationSpecType().getAsClass() == null)
return false;
return true;
}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/BeanValidationGroups.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/BeanValidationGroups.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/BeanValidationGroups.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,110 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.jboss.ra;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class BeanValidationGroups implements JCAMetadata
+{
+
+ /**
+ */
+ private static final long serialVersionUID = 6856138720550993874L;
+
+ private final List<String> beanValidationGroup;
+
+ /**
+ * @param beanValidationGroup List of bean validation group
+ */
+ public BeanValidationGroups(List<String> beanValidationGroup)
+ {
+ super();
+ this.beanValidationGroup = beanValidationGroup;
+ }
+
+ /**
+ * @return beanValidationGroup the list of bena validation group
+ */
+ public List<String> getBeanValidationGroup()
+ {
+ return Collections.unmodifiableList(beanValidationGroup);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((beanValidationGroup == null) ? 0 : beanValidationGroup.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof BeanValidationGroups))
+ return false;
+ BeanValidationGroups other = (BeanValidationGroups) obj;
+ if (beanValidationGroup == null)
+ {
+ if (other.beanValidationGroup != null)
+ return false;
+ }
+ else if (!beanValidationGroup.equals(other.beanValidationGroup))
+ return false;
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "BeanValidationGroups [beanValidationGroup=" + beanValidationGroup + ", getBeanValidationGroup()="
+ + getBeanValidationGroup() + ", hashCode()=" + hashCode() + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/JbossRa.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/JbossRa.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/JbossRa.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,138 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.jboss.ra;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ */
+public class JbossRa implements JCAMetadata
+{
+
+ /**
+ */
+ private static final long serialVersionUID = -1494921311038998843L;
+
+ private final List<RaConfigProperty<?>> raConfigProperties;
+
+ private final String bootstrapContext;
+
+ private final List<BeanValidationGroups> beanValidationGroups;
+
+ /**
+ * @param raConfigProperties List of properties for configuration
+ * @param bootstrapContext String representing the bootstrap context name
+ * @param beanValidationGroups for validations
+ */
+ public JbossRa(List<RaConfigProperty<?>> raConfigProperties, String bootstrapContext,
+ List<BeanValidationGroups> beanValidationGroups)
+ {
+ super();
+ this.raConfigProperties = raConfigProperties;
+ this.bootstrapContext = bootstrapContext;
+ this.beanValidationGroups = beanValidationGroups;
+ }
+
+ /**
+ * @return raConfigProperties
+ */
+ public List<RaConfigProperty<?>> getRaConfigProperties()
+ {
+ return Collections.unmodifiableList(raConfigProperties);
+ }
+
+ /**
+ * @return bootstrapContext
+ */
+ public String getBootstrapContext()
+ {
+ return bootstrapContext;
+ }
+
+ /**
+ * @return beanValidationGroups
+ */
+ public List<BeanValidationGroups> getBeanValidationGroups()
+ {
+ return Collections.unmodifiableList(beanValidationGroups);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((beanValidationGroups == null) ? 0 : beanValidationGroups.hashCode());
+ result = prime * result + ((bootstrapContext == null) ? 0 : bootstrapContext.hashCode());
+ result = prime * result + ((raConfigProperties == null) ? 0 : raConfigProperties.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (!(obj instanceof JbossRa))
+ return false;
+ JbossRa other = (JbossRa) obj;
+ if (beanValidationGroups == null)
+ {
+ if (other.beanValidationGroups != null)
+ return false;
+ }
+ else if (!beanValidationGroups.equals(other.beanValidationGroups))
+ return false;
+ if (bootstrapContext == null)
+ {
+ if (other.bootstrapContext != null)
+ return false;
+ }
+ else if (!bootstrapContext.equals(other.bootstrapContext))
+ return false;
+ if (raConfigProperties == null)
+ {
+ if (other.raConfigProperties != null)
+ return false;
+ }
+ else if (!raConfigProperties.equals(other.raConfigProperties))
+ return false;
+ return true;
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/RaConfigProperty.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/RaConfigProperty.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/RaConfigProperty.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,209 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.jboss.ra;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ * @param <T> generic type of this property. See {@link #buildRaConfigProperty(String, String, String)}
+ * for build right implementation
+ *
+ */
+public class RaConfigProperty<T> implements JCAMetadata
+{
+
+ /**
+ */
+ private static final long serialVersionUID = 7845799671062777306L;
+
+ private final String name;
+
+ private final T value;
+
+ /**
+ * @param name the name of the property
+ * @param value the value of the property
+ */
+ public RaConfigProperty(String name, T value)
+ {
+ super();
+ this.name = name;
+ this.value = value;
+ }
+
+ /**
+ *
+ * Static method to build actualised implementation of this generic class.
+ * According to jboss-ra_2_0.xsd value values are:
+ * java.lang.Boolean
+ * java.lang.String
+ * java.lang.Integer
+ * java.lang.Double
+ * java.lang.Byte
+ * java.lang.Short
+ * java.lang.Long
+ * java.lang.Float
+ * java.lang.Character
+ *
+ *
+ * @param name name of the property
+ * @param value value of the property.
+ * @param type the full qualified name of the class to be actualised
+ * @return the actualised instance
+ * @throws NumberFormatException in case passed value isn't assignable to type class
+ */
+ public static RaConfigProperty<?> buildRaConfigProperty(String name, String value, String type)
+ throws NumberFormatException
+ {
+ if (type == null || type.trim().length() == 0)
+ {
+ return new RaConfigProperty<String>(name, value);
+ }
+ if ("java.lang.Boolean".equals(type))
+ {
+ return new RaConfigProperty<Boolean>(name, Boolean.valueOf(value));
+ }
+ else if ("java.lang.String".equals(type))
+ {
+ return new RaConfigProperty<String>(name, value);
+ }
+ else if ("java.lang.Integer".equals(type))
+ {
+ return new RaConfigProperty<Integer>(name, Integer.valueOf(value));
+ }
+ else if ("java.lang.Double".equals(type))
+ {
+ return new RaConfigProperty<Double>(name, Double.valueOf(value));
+ }
+ else if ("java.lang.Byte".equals(type))
+ {
+ return new RaConfigProperty<Byte>(name, Byte.valueOf(value));
+ }
+ else if ("java.lang.Long".equals(type))
+ {
+ return new RaConfigProperty<Long>(name, Long.valueOf(value));
+ }
+ else if ("java.lang.Float".equals(type))
+ {
+ return new RaConfigProperty<Float>(name, Float.valueOf(value));
+ }
+ else if ("java.lang.Character".equals(type))
+ {
+ return new RaConfigProperty<Character>(name, Character.valueOf(value.charAt(0)));
+ }
+ else
+ {
+ return new RaConfigProperty<String>(name, value);
+ }
+
+ }
+
+ /**
+ * @return name
+ */
+ public synchronized String getName()
+ {
+ return name;
+ }
+
+ /**
+ * @return value
+ */
+ public synchronized T getValue()
+ {
+ return value;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((name == null) ? 0 : name.hashCode());
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof RaConfigProperty))
+ {
+ return false;
+ }
+ RaConfigProperty other = (RaConfigProperty) obj;
+ if (name == null)
+ {
+ if (other.name != null)
+ {
+ return false;
+ }
+ }
+ else if (!name.equals(other.name))
+ {
+ return false;
+ }
+ if (value == null)
+ {
+ if (other.value != null)
+ {
+ return false;
+ }
+ }
+ else if (!value.equals(other.value))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "RaConfigProperty [name=" + name + ", value=" + value + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/package.html (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/jboss/ra/package.html 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,3 @@
+<body>
+This package contains metadatas for jboss-ra.xsd
+</body>
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Activationspec.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Activationspec.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Activationspec.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class Activationspec implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -6951903183562100136L;
+
+ private final String activationspecClass;
+
+ private final List<RequiredConfigProperty> requiredConfigProperty;
+
+ private final List<ConfigProperty> configProperty;
+
+ private final String id;
+
+ /**
+ * @param activationspecClass full qualified name of the class
+ * @param requiredConfigProperty a List of required config properties
+ * @param configProperty a list of (optional) config property
+ * @param id xmlID
+ */
+ public Activationspec(String activationspecClass, List<RequiredConfigProperty> requiredConfigProperty,
+ List<ConfigProperty> configProperty, String id)
+ {
+ super();
+ this.activationspecClass = activationspecClass;
+ this.requiredConfigProperty = requiredConfigProperty;
+ this.configProperty = configProperty;
+ this.id = id;
+ }
+
+ /**
+ * @return activationspecClass
+ */
+ public String getActivationspecClass()
+ {
+ return activationspecClass;
+ }
+
+ /**
+ * @return requiredConfigProperty
+ */
+ public List<RequiredConfigProperty> getRequiredConfigProperty()
+ {
+ return Collections.unmodifiableList(requiredConfigProperty);
+ }
+
+ /**
+ * @return configProperty
+ */
+ public List<ConfigProperty> getConfigProperty()
+ {
+ return Collections.unmodifiableList(configProperty);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((activationspecClass == null) ? 0 : activationspecClass.hashCode());
+ result = prime * result + ((configProperty == null) ? 0 : configProperty.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((requiredConfigProperty == null) ? 0 : requiredConfigProperty.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof Activationspec))
+ {
+ return false;
+ }
+ Activationspec other = (Activationspec) obj;
+ if (activationspecClass == null)
+ {
+ if (other.activationspecClass != null)
+ {
+ return false;
+ }
+ }
+ else if (!activationspecClass.equals(other.activationspecClass))
+ {
+ return false;
+ }
+ if (configProperty == null)
+ {
+ if (other.configProperty != null)
+ {
+ return false;
+ }
+ }
+ else if (!configProperty.equals(other.configProperty))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (requiredConfigProperty == null)
+ {
+ if (other.requiredConfigProperty != null)
+ {
+ return false;
+ }
+ }
+ else if (!requiredConfigProperty.equals(other.requiredConfigProperty))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "Activationspec [activationspecClass=" + activationspecClass + ", requiredConfigProperty="
+ + requiredConfigProperty + ", configProperty=" + configProperty + ", id=" + id + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Adminobject.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Adminobject.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Adminobject.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class Adminobject implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -7653991400977178783L;
+
+ private final String adminobjectInterface;
+
+ private final String adminobjectClass;
+
+ private final List<ConfigProperty> configProperty;
+
+ private final String id;
+
+ /**
+ * @param adminobjectInterface full qualified name of the interface
+ * @param adminobjectClass full qualified name of the implementation class
+ * @param configProperty List of config propeties
+ * @param id xmlid
+ */
+ public Adminobject(final String adminobjectInterface, final String adminobjectClass,
+ final List<ConfigProperty> configProperty, final String id)
+ {
+ super();
+ this.adminobjectInterface = adminobjectInterface;
+ this.adminobjectClass = adminobjectClass;
+ this.configProperty = configProperty;
+ this.id = id;
+ }
+
+ /**
+ * @return adminobjectInterface
+ */
+ public String getAdminobjectInterface()
+ {
+ return adminobjectInterface;
+ }
+
+ /**
+ * @return adminobjectClass
+ */
+ public String getAdminobjectClass()
+ {
+ return adminobjectClass;
+ }
+
+ /**
+ * @return configProperty
+ */
+ public List<ConfigProperty> getConfigProperty()
+ {
+ return Collections.unmodifiableList(configProperty);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((adminobjectClass == null) ? 0 : adminobjectClass.hashCode());
+ result = prime * result + ((adminobjectInterface == null) ? 0 : adminobjectInterface.hashCode());
+ result = prime * result + ((configProperty == null) ? 0 : configProperty.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(final Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof Adminobject))
+ {
+ return false;
+ }
+ final Adminobject other = (Adminobject) obj;
+ if (adminobjectClass == null)
+ {
+ if (other.adminobjectClass != null)
+ {
+ return false;
+ }
+ }
+ else if (!adminobjectClass.equals(other.adminobjectClass))
+ {
+ return false;
+ }
+ if (adminobjectInterface == null)
+ {
+ if (other.adminobjectInterface != null)
+ {
+ return false;
+ }
+ }
+ else if (!adminobjectInterface.equals(other.adminobjectInterface))
+ {
+ return false;
+ }
+ if (configProperty == null)
+ {
+ if (other.configProperty != null)
+ {
+ return false;
+ }
+ }
+ else if (!configProperty.equals(other.configProperty))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "Adminobject [adminobjectInterface=" + adminobjectInterface + ", adminobjectClass=" + adminobjectClass
+ + ", configProperty=" + configProperty + ", id=" + id + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/AuthenticationMechanism.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/AuthenticationMechanism.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/AuthenticationMechanism.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,195 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class AuthenticationMechanism implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -1448136517857827148L;
+
+ private final List<LocalizedXsdString> description;
+
+ private final XsdString authenticationMechanismType;
+
+ private final CredentialInterfaceEnum credentialInterface;
+
+ private final String id;
+
+ /**
+ * @param description description attribute in xml
+ * @param authenticationMechanismType specifies type of an authentication mechanism.
+ The example values are:
+
+ <authentication-mechanism-type>BasicPassword
+ </authentication-mechanism-type>
+
+ <authentication-mechanism-type>Kerbv5
+ </authentication-mechanism-type>
+
+ Any additional security mechanisms are outside the
+ scope of the Connector architecture specification.
+ * @param credentialInterface enumeration representing credentialInterface.
+ * @param id xml ID
+ */
+ public AuthenticationMechanism(List<LocalizedXsdString> description, XsdString authenticationMechanismType,
+ CredentialInterfaceEnum credentialInterface, String id)
+ {
+ super();
+ this.description = description;
+ this.authenticationMechanismType = authenticationMechanismType;
+ this.credentialInterface = credentialInterface;
+ this.id = id;
+ }
+
+ /**
+ * @return description
+ */
+ public List<LocalizedXsdString> getDescription()
+ {
+ return Collections.unmodifiableList(description);
+ }
+
+ /**
+ * @return authenticationMechanismType
+ */
+ public XsdString getAuthenticationMechanismType()
+ {
+ return authenticationMechanismType;
+ }
+
+ /**
+ * @return credentialInterface
+ */
+ public CredentialInterfaceEnum getCredentialInterface()
+ {
+ return credentialInterface;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((authenticationMechanismType == null) ? 0 : authenticationMechanismType.hashCode());
+ result = prime * result + ((credentialInterface == null) ? 0 : credentialInterface.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof AuthenticationMechanism))
+ {
+ return false;
+ }
+ AuthenticationMechanism other = (AuthenticationMechanism) obj;
+ if (authenticationMechanismType == null)
+ {
+ if (other.authenticationMechanismType != null)
+ {
+ return false;
+ }
+ }
+ else if (!authenticationMechanismType.equals(other.authenticationMechanismType))
+ {
+ return false;
+ }
+ if (credentialInterface != other.credentialInterface)
+ {
+ return false;
+ }
+ if (description == null)
+ {
+ if (other.description != null)
+ {
+ return false;
+ }
+ }
+ else if (!description.equals(other.description))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "AuthenticationMechanism [description=" + description + ", authenticationMechanismType="
+ + authenticationMechanismType + ", credentialInterface=" + credentialInterface + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConfigProperty.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConfigProperty.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConfigProperty.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,309 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class ConfigProperty implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -2025203811838727421L;
+
+ private final List<LocalizedXsdString> description;
+
+ private final XsdString configPropertyName;
+
+ private final XsdString configPropertyType;
+
+ private final XsdString configPropertyValue;
+
+ private final Boolean configPropertyIgnore;
+
+ private final Boolean configPropertySupportsDynamicUpdates;
+
+ private final Boolean configPropertyConfidential;
+
+ private final String id;
+
+ /**
+ * @param description list of descriptions
+ * @param configPropertyName name of the property
+ * @param configPropertyType full qualified name of the type of the property
+ * @param configPropertyValue value
+ * @param configPropertyIgnore not mandatory boolean value The element config-property-ignore is used to specify
+ * whether the configuration tools must ignore considering the
+ * configuration property during auto-discovery of
+ * Configuration properties. See the Connector specification for
+ * more details. If unspecified, the container must not ignore
+ * the configuration property during auto-discovery.
+ * @param configPropertySupportsDynamicUpdates not mandatory The element
+ * config-property-supports-dynamic-updates is used to specify
+ * whether the configuration property allows its value to be updated, by
+ * application server's configuration tools, during the lifetime of
+ * the JavaBean instance. See the Connector specification for
+ * more details. If unspecified, the container must not dynamically
+ * reconfigure the property.
+ * @param configPropertyConfidential The element config-property-confidential is used to specify
+ * whether the configuration property is confidential and
+ * recommends application server's configuration tools to use special
+ * visual aids for editing them. See the Connector specification for
+ * more details. If unspecified, the container must not treat the
+ * property as confidential.
+ * @param id XML ID
+ */
+ public ConfigProperty(List<LocalizedXsdString> description, XsdString configPropertyName,
+ XsdString configPropertyType, XsdString configPropertyValue, Boolean configPropertyIgnore,
+ Boolean configPropertySupportsDynamicUpdates, Boolean configPropertyConfidential, String id)
+ {
+ super();
+ this.description = description;
+ this.configPropertyName = configPropertyName;
+ this.configPropertyType = configPropertyType;
+ this.configPropertyValue = configPropertyValue;
+ this.configPropertyIgnore = configPropertyIgnore;
+ this.configPropertySupportsDynamicUpdates = configPropertySupportsDynamicUpdates;
+ this.configPropertyConfidential = configPropertyConfidential;
+ this.id = id;
+ }
+
+ /**
+ * @return description
+ */
+ public List<LocalizedXsdString> getDescription()
+ {
+ return Collections.unmodifiableList(description);
+ }
+
+ /**
+ * @return configPropertyName
+ */
+ public XsdString getConfigPropertyName()
+ {
+ return configPropertyName;
+ }
+
+ /**
+ * @return configPropertyType
+ */
+ public XsdString getConfigPropertyType()
+ {
+ return configPropertyType;
+ }
+
+ /**
+ * @return configPropertyValue
+ */
+ public XsdString getConfigPropertyValue()
+ {
+ return configPropertyValue;
+ }
+
+ /**
+ * @return configPropertyIgnore
+ */
+ public Boolean getConfigPropertyIgnore()
+ {
+ return configPropertyIgnore;
+ }
+
+ /**
+ * @return configPropertySupportsDynamicUpdates
+ */
+ public Boolean getConfigPropertySupportsDynamicUpdates()
+ {
+ return configPropertySupportsDynamicUpdates;
+ }
+
+ /**
+ * @return configPropertyConfidential
+ */
+ public Boolean getConfigPropertyConfidential()
+ {
+ return configPropertyConfidential;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((configPropertyConfidential == null) ? 0 : configPropertyConfidential.hashCode());
+ result = prime * result + ((configPropertyIgnore == null) ? 0 : configPropertyIgnore.hashCode());
+ result = prime * result + ((configPropertyName == null) ? 0 : configPropertyName.hashCode());
+ result = prime * result
+ + ((configPropertySupportsDynamicUpdates == null) ? 0 : configPropertySupportsDynamicUpdates.hashCode());
+ result = prime * result + ((configPropertyType == null) ? 0 : configPropertyType.hashCode());
+ result = prime * result + ((configPropertyValue == null) ? 0 : configPropertyValue.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof ConfigProperty))
+ {
+ return false;
+ }
+ ConfigProperty other = (ConfigProperty) obj;
+ if (configPropertyConfidential == null)
+ {
+ if (other.configPropertyConfidential != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertyConfidential.equals(other.configPropertyConfidential))
+ {
+ return false;
+ }
+ if (configPropertyIgnore == null)
+ {
+ if (other.configPropertyIgnore != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertyIgnore.equals(other.configPropertyIgnore))
+ {
+ return false;
+ }
+ if (configPropertyName == null)
+ {
+ if (other.configPropertyName != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertyName.equals(other.configPropertyName))
+ {
+ return false;
+ }
+ if (configPropertySupportsDynamicUpdates == null)
+ {
+ if (other.configPropertySupportsDynamicUpdates != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertySupportsDynamicUpdates.equals(other.configPropertySupportsDynamicUpdates))
+ {
+ return false;
+ }
+ if (configPropertyType == null)
+ {
+ if (other.configPropertyType != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertyType.equals(other.configPropertyType))
+ {
+ return false;
+ }
+ if (configPropertyValue == null)
+ {
+ if (other.configPropertyValue != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertyValue.equals(other.configPropertyValue))
+ {
+ return false;
+ }
+ if (description == null)
+ {
+ if (other.description != null)
+ {
+ return false;
+ }
+ }
+ else if (!description.equals(other.description))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "ConfigProperty [description=" + description + ", configPropertyName=" + configPropertyName
+ + ", configPropertyType=" + configPropertyType + ", configPropertyValue=" + configPropertyValue
+ + ", configPropertyIgnore=" + configPropertyIgnore + ", configPropertySupportsDynamicUpdates="
+ + configPropertySupportsDynamicUpdates + ", configPropertyConfidential=" + configPropertyConfidential
+ + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConnectionDefinition.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConnectionDefinition.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ConnectionDefinition.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,268 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class ConnectionDefinition implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 197264648585424765L;
+
+ private final String managedconnectionfactoryClass;
+
+ private final List<ConfigProperty> configProperty;
+
+ private final String connectionfactoryInterface;
+
+ private final String connectionfactoryImplClass;
+
+ private final String connectionInterface;
+
+ private final String connectionImplClass;
+
+ private final String id;
+
+ /**
+ * @param managedconnectionfactoryClass full qualified name of the class
+ * @param configProperty List of configproperties
+ * @param connectionfactoryInterface full qualified name of the factory interface
+ * @param connectionfactoryImplClass full qualified name of the factory implementation class
+ * @param connectionInterface full qualified name of the connection interface
+ * @param connectionImplClass full qualified name of the connection implementation class
+ * @param id XML ID
+ */
+ public ConnectionDefinition(String managedconnectionfactoryClass, List<ConfigProperty> configProperty,
+ String connectionfactoryInterface, String connectionfactoryImplClass, String connectionInterface,
+ String connectionImplClass, String id)
+ {
+ super();
+ this.managedconnectionfactoryClass = managedconnectionfactoryClass;
+ this.configProperty = configProperty;
+ this.connectionfactoryInterface = connectionfactoryInterface;
+ this.connectionfactoryImplClass = connectionfactoryImplClass;
+ this.connectionInterface = connectionInterface;
+ this.connectionImplClass = connectionImplClass;
+ this.id = id;
+ }
+
+ /**
+ * @return managedconnectionfactoryClass
+ */
+ public String getManagedconnectionfactoryClass()
+ {
+ return managedconnectionfactoryClass;
+ }
+
+ /**
+ * @return configProperty
+ */
+ public List<ConfigProperty> getConfigProperty()
+ {
+ return Collections.unmodifiableList(configProperty);
+ }
+
+ /**
+ * @return connectionfactoryInterface
+ */
+ public String getConnectionfactoryInterface()
+ {
+ return connectionfactoryInterface;
+ }
+
+ /**
+ * @return connectionfactoryImplClass
+ */
+ public String getConnectionfactoryImplClass()
+ {
+ return connectionfactoryImplClass;
+ }
+
+ /**
+ * @return connectionInterface
+ */
+ public String getConnectionInterface()
+ {
+ return connectionInterface;
+ }
+
+ /**
+ * @return connectionImplClass
+ */
+ public String getConnectionImplClass()
+ {
+ return connectionImplClass;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((configProperty == null) ? 0 : configProperty.hashCode());
+ result = prime * result + ((connectionImplClass == null) ? 0 : connectionImplClass.hashCode());
+ result = prime * result + ((connectionInterface == null) ? 0 : connectionInterface.hashCode());
+ result = prime * result + ((connectionfactoryImplClass == null) ? 0 : connectionfactoryImplClass.hashCode());
+ result = prime * result + ((connectionfactoryInterface == null) ? 0 : connectionfactoryInterface.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result
+ + ((managedconnectionfactoryClass == null) ? 0 : managedconnectionfactoryClass.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof ConnectionDefinition))
+ {
+ return false;
+ }
+ ConnectionDefinition other = (ConnectionDefinition) obj;
+ if (configProperty == null)
+ {
+ if (other.configProperty != null)
+ {
+ return false;
+ }
+ }
+ else if (!configProperty.equals(other.configProperty))
+ {
+ return false;
+ }
+ if (connectionImplClass == null)
+ {
+ if (other.connectionImplClass != null)
+ {
+ return false;
+ }
+ }
+ else if (!connectionImplClass.equals(other.connectionImplClass))
+ {
+ return false;
+ }
+ if (connectionInterface == null)
+ {
+ if (other.connectionInterface != null)
+ {
+ return false;
+ }
+ }
+ else if (!connectionInterface.equals(other.connectionInterface))
+ {
+ return false;
+ }
+ if (connectionfactoryImplClass == null)
+ {
+ if (other.connectionfactoryImplClass != null)
+ {
+ return false;
+ }
+ }
+ else if (!connectionfactoryImplClass.equals(other.connectionfactoryImplClass))
+ {
+ return false;
+ }
+ if (connectionfactoryInterface == null)
+ {
+ if (other.connectionfactoryInterface != null)
+ {
+ return false;
+ }
+ }
+ else if (!connectionfactoryInterface.equals(other.connectionfactoryInterface))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (managedconnectionfactoryClass == null)
+ {
+ if (other.managedconnectionfactoryClass != null)
+ {
+ return false;
+ }
+ }
+ else if (!managedconnectionfactoryClass.equals(other.managedconnectionfactoryClass))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "ConnectionDefinition [managedconnectionfactoryClass=" + managedconnectionfactoryClass
+ + ", configProperty=" + configProperty + ", connectionfactoryInterface=" + connectionfactoryInterface
+ + ", connectionfactoryImplClass=" + connectionfactoryImplClass + ", connectionInterface="
+ + connectionInterface + ", connectionImplClass=" + connectionImplClass + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Connector16.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Connector16.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Connector16.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,412 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public final class Connector16 implements IdDecoratedMetadata
+{
+
+ /**
+ */
+ private static final long serialVersionUID = -6095735191032372517L;
+
+ private final String moduleName;
+
+ private final List<LocalizedXsdString> description;
+
+ private final List<LocalizedXsdString> displayName;
+
+ private final List<Icon> icon;
+
+ private final XsdString vendorName;
+
+ private final XsdString eisType;
+
+ private final XsdString resourceadapterVersion;
+
+ private final LicenseType license;
+
+ private final ResourceAdapter resourceadapter;
+
+ private final List<String> requiredWorkContext;
+
+ private final String version = "1.6";
+
+ private final Boolean metadataComplete;
+
+ private final String id;
+
+ /**
+ * @param moduleName name of the module
+ * @param description descriptions of this connector
+ * @param displayName name to display for this connecotro
+ * @param icon icon representing this connectore
+ * @param vendorName vendor name
+ * @param eisType eis type
+ * @param resourceadapterVersion version number for the RA
+ * @param license license information
+ * @param resourceadapter full qualified name of the resource adapter
+ * @param requiredWorkContext list od work context required
+ * @param metadataComplete not mandatory boolean value
+ * @param id XML ID
+ */
+ public Connector16(String moduleName, List<LocalizedXsdString> description, List<LocalizedXsdString> displayName,
+ List<Icon> icon, XsdString vendorName, XsdString eisType, XsdString resourceadapterVersion,
+ LicenseType license, ResourceAdapter resourceadapter, List<String> requiredWorkContext,
+ Boolean metadataComplete, String id)
+ {
+ super();
+ this.moduleName = moduleName;
+ this.description = description;
+ this.displayName = displayName;
+ this.icon = icon;
+ this.vendorName = vendorName;
+ this.eisType = eisType;
+ this.resourceadapterVersion = resourceadapterVersion;
+ this.license = license;
+ this.resourceadapter = resourceadapter;
+ this.requiredWorkContext = requiredWorkContext;
+ this.metadataComplete = metadataComplete;
+ this.id = id;
+ }
+
+ /**
+ * @return resourceadapterVersion
+ */
+ public XsdString getResourceadapterVersion()
+ {
+ return resourceadapterVersion;
+ }
+
+ /**
+ * @return license
+ */
+ public LicenseType getLicense()
+ {
+ return license;
+ }
+
+ /**
+ * @return resourceadapter
+ */
+ public ResourceAdapter getResourceadapter()
+ {
+ return resourceadapter;
+ }
+
+ /**
+ * @return requiredWorkContext
+ */
+ public List<String> getRequiredWorkContext()
+ {
+ return Collections.unmodifiableList(requiredWorkContext);
+ }
+
+ /**
+ * @return moduleName
+ */
+ public String getModuleName()
+ {
+ return moduleName;
+ }
+
+ /**
+ * @return description
+ */
+ public List<LocalizedXsdString> getDescription()
+ {
+ return Collections.unmodifiableList(description);
+ }
+
+ /**
+ * @return displayName
+ */
+ public List<LocalizedXsdString> getDisplayName()
+ {
+ return Collections.unmodifiableList(displayName);
+ }
+
+ /**
+ * @return icon
+ */
+ public List<Icon> getIcon()
+ {
+ return Collections.unmodifiableList(icon);
+ }
+
+ /**
+ * @return vendorName
+ */
+ public XsdString getVendorName()
+ {
+ return vendorName;
+ }
+
+ /**
+ * @return eisType
+ */
+ public XsdString getEisType()
+ {
+ return eisType;
+ }
+
+ /**
+ * @return version
+ */
+ public String getVersion()
+ {
+ return version;
+ }
+
+ /**
+ * @return metadataComplete
+ */
+ public Boolean getMetadataComplete()
+ {
+ return metadataComplete;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((displayName == null) ? 0 : displayName.hashCode());
+ result = prime * result + ((eisType == null) ? 0 : eisType.hashCode());
+ result = prime * result + ((icon == null) ? 0 : icon.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((license == null) ? 0 : license.hashCode());
+ result = prime * result + ((metadataComplete == null) ? 0 : metadataComplete.hashCode());
+ result = prime * result + ((moduleName == null) ? 0 : moduleName.hashCode());
+ result = prime * result + ((requiredWorkContext == null) ? 0 : requiredWorkContext.hashCode());
+ result = prime * result + ((resourceadapter == null) ? 0 : resourceadapter.hashCode());
+ result = prime * result + ((resourceadapterVersion == null) ? 0 : resourceadapterVersion.hashCode());
+ result = prime * result + ((vendorName == null) ? 0 : vendorName.hashCode());
+ result = prime * result + ((version == null) ? 0 : version.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof Connector16))
+ {
+ return false;
+ }
+ Connector16 other = (Connector16) obj;
+ if (description == null)
+ {
+ if (other.description != null)
+ {
+ return false;
+ }
+ }
+ else if (!description.equals(other.description))
+ {
+ return false;
+ }
+ if (displayName == null)
+ {
+ if (other.displayName != null)
+ {
+ return false;
+ }
+ }
+ else if (!displayName.equals(other.displayName))
+ {
+ return false;
+ }
+ if (eisType == null)
+ {
+ if (other.eisType != null)
+ {
+ return false;
+ }
+ }
+ else if (!eisType.equals(other.eisType))
+ {
+ return false;
+ }
+ if (icon == null)
+ {
+ if (other.icon != null)
+ {
+ return false;
+ }
+ }
+ else if (!icon.equals(other.icon))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (license == null)
+ {
+ if (other.license != null)
+ {
+ return false;
+ }
+ }
+ else if (!license.equals(other.license))
+ {
+ return false;
+ }
+ if (metadataComplete == null)
+ {
+ if (other.metadataComplete != null)
+ {
+ return false;
+ }
+ }
+ else if (!metadataComplete.equals(other.metadataComplete))
+ {
+ return false;
+ }
+ if (moduleName == null)
+ {
+ if (other.moduleName != null)
+ {
+ return false;
+ }
+ }
+ else if (!moduleName.equals(other.moduleName))
+ {
+ return false;
+ }
+ if (requiredWorkContext == null)
+ {
+ if (other.requiredWorkContext != null)
+ {
+ return false;
+ }
+ }
+ else if (!requiredWorkContext.equals(other.requiredWorkContext))
+ {
+ return false;
+ }
+ if (resourceadapter == null)
+ {
+ if (other.resourceadapter != null)
+ {
+ return false;
+ }
+ }
+ else if (!resourceadapter.equals(other.resourceadapter))
+ {
+ return false;
+ }
+ if (resourceadapterVersion == null)
+ {
+ if (other.resourceadapterVersion != null)
+ {
+ return false;
+ }
+ }
+ else if (!resourceadapterVersion.equals(other.resourceadapterVersion))
+ {
+ return false;
+ }
+ if (vendorName == null)
+ {
+ if (other.vendorName != null)
+ {
+ return false;
+ }
+ }
+ else if (!vendorName.equals(other.vendorName))
+ {
+ return false;
+ }
+ if (version == null)
+ {
+ if (other.version != null)
+ {
+ return false;
+ }
+ }
+ else if (!version.equals(other.version))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "Connector16 [moduleName=" + moduleName + ", description=" + description + ", displayName=" + displayName
+ + ", icon=" + icon + ", vendorName=" + vendorName + ", eisType=" + eisType + ", resourceadapterVersion="
+ + resourceadapterVersion + ", license=" + license + ", resourceadapter=" + resourceadapter
+ + ", requiredWorkContext=" + requiredWorkContext + ", version=" + version + ", metadataComplete="
+ + metadataComplete + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/CredentialInterfaceEnum.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/CredentialInterfaceEnum.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/CredentialInterfaceEnum.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *The credential-interfaceType specifies the
+ * interface that the resource adapter implementation
+ * supports for the representation of the
+ * credentials. This element(s) that use this type,
+ * i.e. credential-interface, should be used by
+ * application server to find out the Credential
+ * interface it should use as part of the security
+ * contract.
+ * The possible values are:
+ *
+ * javax.resource.spi.security.PasswordCredential
+ * org.ietf.jgss.GSSCredential
+ * javax.resource.spi.security.GenericCredential
+ */
+public enum CredentialInterfaceEnum
+{
+ /**
+ * enum instance representing javax.resource.spi.security.PasswordCredential
+ */
+ PASSWORD("javax.resource.spi.security.PasswordCredential"),
+ /**
+ * enum instance representing org.ietf.jgss.GSSCredentia
+ */
+ GSS("org.ietf.jgss.GSSCredential"),
+ /**
+ * enum instance representing javax.resource.spi.security.GenericCredential
+ */
+ GENERIC("javax.resource.spi.security.GenericCredential");
+
+ private final String fullQualifiedName;
+
+ private CredentialInterfaceEnum(String name)
+ {
+ this.fullQualifiedName = name;
+ }
+
+ /**
+ *
+ * Conveninet method to get enum instance giving full qualified name
+ *
+ * @param fullQualifiedName the full qualified name of supported Credential interface
+ * @return the corresponding enum instance
+ * @throws IllegalArgumentException in case the fullQualifiedName isn't one of the supported interfaces:
+ * javax.resource.spi.security.PasswordCredential
+ * org.ietf.jgss.GSSCredential
+ * javax.resource.spi.security.GenericCredential
+ */
+ public static CredentialInterfaceEnum build(String fullQualifiedName) throws IllegalArgumentException
+ {
+ if ("javax.resource.spi.security.PasswordCredential".equals(fullQualifiedName))
+ {
+ return PASSWORD;
+ }
+ else if ("org.ietf.jgss.GSSCredential".equals(fullQualifiedName))
+ {
+ return GSS;
+ }
+ else if ("javax.resource.spi.security.GenericCredential".equals(fullQualifiedName))
+ {
+ return GENERIC;
+ }
+ else
+ {
+ throw new IllegalArgumentException("fullQualifiedName should be one of "
+ + "javax.resource.spi.security.PasswordCredential;" + " org.ietf.jgss.GSSCredential;"
+ + "javax.resource.spi.security.GenericCredential");
+ }
+ }
+
+ /**
+ * @return fullQualifiedName
+ */
+ public String getFullQualifiedName()
+ {
+ return fullQualifiedName;
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Icon.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Icon.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Icon.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,196 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class Icon implements IdDecoratedMetadata, LocalizedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 7809751095477978996L;
+
+ private Path smallIcon;
+
+ private final Path largeIcon;
+
+ private final String lang;
+
+ private final String id;
+
+ /**
+ * @param smallIcon .
+ * @param largeIcon .
+ * @param lang .
+ * @param id .
+ */
+ public Icon(Path smallIcon, Path largeIcon, String lang, String id)
+ {
+ super();
+ this.smallIcon = smallIcon;
+ this.largeIcon = largeIcon;
+ this.lang = lang;
+ this.id = id;
+ }
+
+ /**
+ * @return smallIcon
+ */
+ public Path getSmallIcon()
+ {
+ return smallIcon;
+ }
+
+ /**
+ * @param smallIcon Sets smallIcon to the specified value.
+ */
+ public void setSmallIcon(Path smallIcon)
+ {
+ this.smallIcon = smallIcon;
+ }
+
+ /**
+ * @return largeIcon
+ */
+ public Path getLargeIcon()
+ {
+ return largeIcon;
+ }
+
+ /**
+ * @return lang
+ */
+ @Override
+ public String getLang()
+ {
+ return lang;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((lang == null) ? 0 : lang.hashCode());
+ result = prime * result + ((largeIcon == null) ? 0 : largeIcon.hashCode());
+ result = prime * result + ((smallIcon == null) ? 0 : smallIcon.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof Icon))
+ {
+ return false;
+ }
+ Icon other = (Icon) obj;
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (lang == null)
+ {
+ if (other.lang != null)
+ {
+ return false;
+ }
+ }
+ else if (!lang.equals(other.lang))
+ {
+ return false;
+ }
+ if (largeIcon == null)
+ {
+ if (other.largeIcon != null)
+ {
+ return false;
+ }
+ }
+ else if (!largeIcon.equals(other.largeIcon))
+ {
+ return false;
+ }
+ if (smallIcon == null)
+ {
+ if (other.smallIcon != null)
+ {
+ return false;
+ }
+ }
+ else if (!smallIcon.equals(other.smallIcon))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "Icon [smallIcon=" + smallIcon + ", largeIcon=" + largeIcon + ", lang=" + lang + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/IdDecoratedMetadata.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/IdDecoratedMetadata.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/IdDecoratedMetadata.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public interface IdDecoratedMetadata extends JCAMetadata
+{
+
+ /**
+ *
+ * Return the String representing xml ID
+ *
+ * @return the XML ID
+ */
+ public String getId();
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/InboundResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/InboundResourceAdapter.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/InboundResourceAdapter.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class InboundResourceAdapter implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -2854927981408307535L;
+
+ private final MessageAdapter messageadapter;
+
+ private final String id;
+
+ /**
+ * @param messageadapter The messageadapterType specifies information about the
+ * messaging capabilities of the resource adapter. This
+ * contains information specific to the implementation of the
+ * resource adapter library as specified through the
+ * messagelistener element.
+ * @param id XML ID
+ */
+ public InboundResourceAdapter(MessageAdapter messageadapter, String id)
+ {
+ super();
+ this.messageadapter = messageadapter;
+ this.id = id;
+ }
+
+ /**
+ * @return messageadapter
+ */
+ public MessageAdapter getMessageadapter()
+ {
+ return messageadapter;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((messageadapter == null) ? 0 : messageadapter.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof InboundResourceAdapter))
+ {
+ return false;
+ }
+ InboundResourceAdapter other = (InboundResourceAdapter) obj;
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (messageadapter == null)
+ {
+ if (other.messageadapter != null)
+ {
+ return false;
+ }
+ }
+ else if (!messageadapter.equals(other.messageadapter))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "InboundResourceAdapter [messageadapter=" + messageadapter + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LicenseType.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LicenseType.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LicenseType.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,161 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class LicenseType implements IdDecoratedMetadata
+{
+
+ /**
+ */
+ private static final long serialVersionUID = 1590514246054447090L;
+
+ private final List<LocalizedXsdString> description;
+
+ private final boolean licenseRequired;
+
+ private final String id;
+
+ /**
+ * @param description description of the license
+ * @param licenseRequired mandatory boolena value
+ * @param id XML ID
+ */
+ public LicenseType(List<LocalizedXsdString> description, boolean licenseRequired, String id)
+ {
+ super();
+ this.description = description;
+ this.licenseRequired = licenseRequired;
+ this.id = id;
+ }
+
+ /**
+ * @return description
+ */
+ public List<LocalizedXsdString> getDescription()
+ {
+ return Collections.unmodifiableList(description);
+ }
+
+ /**
+ * @return licenseRequired
+ */
+ public boolean isLicenseRequired()
+ {
+ return licenseRequired;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + (licenseRequired ? 1231 : 1237);
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof LicenseType))
+ {
+ return false;
+ }
+ LicenseType other = (LicenseType) obj;
+ if (description == null)
+ {
+ if (other.description != null)
+ {
+ return false;
+ }
+ }
+ else if (!description.equals(other.description))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (licenseRequired != other.licenseRequired)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "LicenseType [description=" + description + ", licenseRequired=" + licenseRequired + ", id=" + id + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedMetadata.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedMetadata.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedMetadata.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public interface LocalizedMetadata extends JCAMetadata
+{
+
+ /**
+ *
+ * Language used for this string at xml level. Value are like "en", "it", "fr" and so on
+ *
+ * @return the lang used for this string
+ */
+ public String getLang();
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedXsdString.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedXsdString.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/LocalizedXsdString.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class LocalizedXsdString extends XsdString implements LocalizedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -7778684576336929347L;
+
+ private final String lang;
+
+ /**
+ * @param value value of the String
+ * @param id XML ID
+ * @param lang language
+ */
+ public LocalizedXsdString(String value, String id, String lang)
+ {
+ super(value, id);
+ this.lang = lang;
+ }
+
+ /**
+ * Constructor for default language "en"
+ *
+ * @param value value of the String
+ * @param id XML ID
+ */
+ public LocalizedXsdString(String value, String id)
+ {
+ super(value, id);
+ this.lang = "en";
+ }
+
+ /**
+ * @return lang
+ */
+ @Override
+ public String getLang()
+ {
+ return lang;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = super.hashCode();
+ result = prime * result + ((lang == null) ? 0 : lang.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (!super.equals(obj))
+ {
+ return false;
+ }
+ if (!(obj instanceof LocalizedXsdString))
+ {
+ return false;
+ }
+ LocalizedXsdString other = (LocalizedXsdString) obj;
+ if (lang == null)
+ {
+ if (other.lang != null)
+ {
+ return false;
+ }
+ }
+ else if (!lang.equals(other.lang))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "LocalizedXsdString [lang=" + lang + ", value=" + value + ", id=" + id + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageAdapter.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageAdapter.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageAdapter.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class MessageAdapter implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 1731250340667920811L;
+
+ private final List<MessageListener> messagelistener;
+
+ private final String id;
+
+ /**
+ * @param messagelistener The messagelistener specifies information about a
+ * specific message listener supported by the messaging
+ * resource adapter. It contains information on the Java type
+ * of the message listener interface and an activation
+ * specification.
+ * @param id XML ID
+ */
+ public MessageAdapter(List<MessageListener> messagelistener, String id)
+ {
+ super();
+ this.messagelistener = messagelistener;
+ this.id = id;
+ }
+
+ /**
+ * @return messagelistener
+ */
+ public List<MessageListener> getMessagelistener()
+ {
+ return Collections.unmodifiableList(messagelistener);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((messagelistener == null) ? 0 : messagelistener.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof MessageAdapter))
+ {
+ return false;
+ }
+ MessageAdapter other = (MessageAdapter) obj;
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (messagelistener == null)
+ {
+ if (other.messagelistener != null)
+ {
+ return false;
+ }
+ }
+ else if (!messagelistener.equals(other.messagelistener))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "MessageAdapter [messagelistener=" + messagelistener + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageListener.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageListener.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/MessageListener.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class MessageListener implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 6417807206318228618L;
+
+ private final String messagelistenerType;
+
+ private final Activationspec activationspec;
+
+ private final String id;
+
+ /**
+ * @param messagelistenerType full qualified name of the java type
+ * @param activationspec The activationspecType specifies an activation
+ * specification. The information includes fully qualified
+ * Java class name of an activation specification and a set of
+ * required configuration property names.
+ * @param id XML ID
+ */
+ public MessageListener(String messagelistenerType, Activationspec activationspec, String id)
+ {
+ super();
+ this.messagelistenerType = messagelistenerType;
+ this.activationspec = activationspec;
+ this.id = id;
+ }
+
+ /**
+ * @return messagelistenerType
+ */
+ public String getMessagelistenerType()
+ {
+ return messagelistenerType;
+ }
+
+ /**
+ * @return activationspec
+ */
+ public Activationspec getActivationspec()
+ {
+ return activationspec;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((activationspec == null) ? 0 : activationspec.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((messagelistenerType == null) ? 0 : messagelistenerType.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof MessageListener))
+ {
+ return false;
+ }
+ MessageListener other = (MessageListener) obj;
+ if (activationspec == null)
+ {
+ if (other.activationspec != null)
+ {
+ return false;
+ }
+ }
+ else if (!activationspec.equals(other.activationspec))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (messagelistenerType == null)
+ {
+ if (other.messagelistenerType != null)
+ {
+ return false;
+ }
+ }
+ else if (!messagelistenerType.equals(other.messagelistenerType))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "MessageListener [messagelistenerType=" + messagelistenerType + ", activationspec=" + activationspec
+ + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/OutboundResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/OutboundResourceAdapter.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/OutboundResourceAdapter.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,211 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class OutboundResourceAdapter implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 421345307326415666L;
+
+ private final List<ConnectionDefinition> connectionDefinition;
+
+ private final TransactionSupportEnum transactionSupport;
+
+ private final List<AuthenticationMechanism> authenticationMechanism;
+
+ private final Boolean reauthenticationSupport;
+
+ private final String id;
+
+ /**
+ * @param connectionDefinition list of connection definitions
+ * @param transactionSupport transaction supported form this RA. Valid ones are defined by an enum
+ * @param authenticationMechanism list of authentication mechanism supported
+ * @param reauthenticationSupport not mandatary boolean value
+ * @param id XML ID
+ */
+ public OutboundResourceAdapter(List<ConnectionDefinition> connectionDefinition,
+ TransactionSupportEnum transactionSupport, List<AuthenticationMechanism> authenticationMechanism,
+ Boolean reauthenticationSupport, String id)
+ {
+ super();
+ this.connectionDefinition = connectionDefinition;
+ this.transactionSupport = transactionSupport;
+ this.authenticationMechanism = authenticationMechanism;
+ this.reauthenticationSupport = reauthenticationSupport;
+ this.id = id;
+ }
+
+ /**
+ * @return connectionDefinition
+ */
+ public List<ConnectionDefinition> getConnectionDefinition()
+ {
+ return Collections.unmodifiableList(connectionDefinition);
+ }
+
+ /**
+ * @return transactionSupport
+ */
+ public TransactionSupportEnum getTransactionSupport()
+ {
+ return transactionSupport;
+ }
+
+ /**
+ * @return authenticationMechanism
+ */
+ public List<AuthenticationMechanism> getAuthenticationMechanism()
+ {
+ return Collections.unmodifiableList(authenticationMechanism);
+ }
+
+ /**
+ * @return reauthenticationSupport
+ */
+ public Boolean getReauthenticationSupport()
+ {
+ return reauthenticationSupport;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((authenticationMechanism == null) ? 0 : authenticationMechanism.hashCode());
+ result = prime * result + ((connectionDefinition == null) ? 0 : connectionDefinition.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((reauthenticationSupport == null) ? 0 : reauthenticationSupport.hashCode());
+ result = prime * result + ((transactionSupport == null) ? 0 : transactionSupport.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof OutboundResourceAdapter))
+ {
+ return false;
+ }
+ OutboundResourceAdapter other = (OutboundResourceAdapter) obj;
+ if (authenticationMechanism == null)
+ {
+ if (other.authenticationMechanism != null)
+ {
+ return false;
+ }
+ }
+ else if (!authenticationMechanism.equals(other.authenticationMechanism))
+ {
+ return false;
+ }
+ if (connectionDefinition == null)
+ {
+ if (other.connectionDefinition != null)
+ {
+ return false;
+ }
+ }
+ else if (!connectionDefinition.equals(other.connectionDefinition))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (reauthenticationSupport == null)
+ {
+ if (other.reauthenticationSupport != null)
+ {
+ return false;
+ }
+ }
+ else if (!reauthenticationSupport.equals(other.reauthenticationSupport))
+ {
+ return false;
+ }
+ if (transactionSupport != other.transactionSupport)
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "OutboundResourceAdapter [connectionDefinition=" + connectionDefinition + ", transactionSupport="
+ + transactionSupport + ", authenticationMechanism=" + authenticationMechanism
+ + ", reauthenticationSupport=" + reauthenticationSupport + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Path.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Path.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/Path.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,135 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import org.jboss.jca.common.metadata.JCAMetadata;
+
+import java.security.InvalidParameterException;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class Path implements JCAMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 3452844893341380928L;
+
+ private final String value;
+
+ /**
+ * @param value Path String
+ */
+ private Path(String value)
+ {
+ super();
+ this.value = value;
+ }
+
+ /**
+ *
+ * convenient method to cfreate a path object validating it according JCA specs
+ *
+ * @param path the Path String
+ * @return the Path object
+ * @throws InvalidParameterException in case path could not be validated according JCA specs
+ */
+ public static Path valueOf(String path) throws InvalidParameterException
+ {
+ if (isValid(path))
+ {
+ return new Path(path);
+ }
+ else
+ {
+ throw new InvalidParameterException();
+ }
+ }
+
+ // implement me
+
+ private static boolean isValid(String path)
+ {
+ return false;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof Path))
+ {
+ return false;
+ }
+ Path other = (Path) obj;
+ if (value == null)
+ {
+ if (other.value != null)
+ {
+ return false;
+ }
+ }
+ else if (!value.equals(other.value))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "Path [value=" + value + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/RequiredConfigProperty.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/RequiredConfigProperty.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/RequiredConfigProperty.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class RequiredConfigProperty implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 4299927051352998447L;
+
+ private final List<LocalizedXsdString> description;
+
+ private final String configPropertyName;
+
+ private final String id;
+
+ /**
+ * @param description descriptions of this property
+ * @param configPropertyName name of the property
+ * @param id XML ID
+ */
+ public RequiredConfigProperty(List<LocalizedXsdString> description, String configPropertyName, String id)
+ {
+ super();
+ this.description = description;
+ this.configPropertyName = configPropertyName;
+ this.id = id;
+ }
+
+ /**
+ * @return description
+ */
+ public List<LocalizedXsdString> getDescription()
+ {
+ return Collections.unmodifiableList(description);
+ }
+
+ /**
+ * @return configPropertyName
+ */
+ public String getConfigPropertyName()
+ {
+ return configPropertyName;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((configPropertyName == null) ? 0 : configPropertyName.hashCode());
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof RequiredConfigProperty))
+ {
+ return false;
+ }
+ RequiredConfigProperty other = (RequiredConfigProperty) obj;
+ if (configPropertyName == null)
+ {
+ if (other.configPropertyName != null)
+ {
+ return false;
+ }
+ }
+ else if (!configPropertyName.equals(other.configPropertyName))
+ {
+ return false;
+ }
+ if (description == null)
+ {
+ if (other.description != null)
+ {
+ return false;
+ }
+ }
+ else if (!description.equals(other.description))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "RequiredConfigProperty [description=" + description + ", configPropertyName=" + configPropertyName
+ + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ResourceAdapter.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ResourceAdapter.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/ResourceAdapter.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,267 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class ResourceAdapter implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = 4841095296099713549L;
+
+ private final String resourceadapterClass;
+
+ private final List<ConfigProperty> configProperty;
+
+ private final OutboundResourceAdapter outboundResourceadapter;
+
+ private final InboundResourceAdapter inboundResourceadapter;
+
+ private final List<Adminobject> adminobject;
+
+ private final List<SecurityPermission> securityPermission;
+
+ private final String id;
+
+ /**
+ * @param resourceadapterClass full qualified name of the class
+ * @param configProperty confi properties for this RA
+ * @param outboundResourceadapter outbound RA
+ * @param inboundResourceadapter inbound RA
+ * @param adminobject list of admin objects of this RA
+ * @param securityPermission supported security permissions
+ * @param id XML ID
+ */
+ public ResourceAdapter(String resourceadapterClass, List<ConfigProperty> configProperty,
+ OutboundResourceAdapter outboundResourceadapter, InboundResourceAdapter inboundResourceadapter,
+ List<Adminobject> adminobject, List<SecurityPermission> securityPermission, String id)
+ {
+ super();
+ this.resourceadapterClass = resourceadapterClass;
+ this.configProperty = configProperty;
+ this.outboundResourceadapter = outboundResourceadapter;
+ this.inboundResourceadapter = inboundResourceadapter;
+ this.adminobject = adminobject;
+ this.securityPermission = securityPermission;
+ this.id = id;
+ }
+
+ /**
+ * @return resourceadapterClass
+ */
+ public String getResourceadapterClass()
+ {
+ return resourceadapterClass;
+ }
+
+ /**
+ * @return configProperty
+ */
+ public List<ConfigProperty> getConfigProperty()
+ {
+ return Collections.unmodifiableList(configProperty);
+ }
+
+ /**
+ * @return outboundResourceadapter
+ */
+ public OutboundResourceAdapter getOutboundResourceadapter()
+ {
+ return outboundResourceadapter;
+ }
+
+ /**
+ * @return inboundResourceadapter
+ */
+ public InboundResourceAdapter getInboundResourceadapter()
+ {
+ return inboundResourceadapter;
+ }
+
+ /**
+ * @return adminobject
+ */
+ public List<Adminobject> getAdminobject()
+ {
+ return Collections.unmodifiableList(adminobject);
+ }
+
+ /**
+ * @return securityPermission
+ */
+ public List<SecurityPermission> getSecurityPermission()
+ {
+ return Collections.unmodifiableList(securityPermission);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((adminobject == null) ? 0 : adminobject.hashCode());
+ result = prime * result + ((configProperty == null) ? 0 : configProperty.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((inboundResourceadapter == null) ? 0 : inboundResourceadapter.hashCode());
+ result = prime * result + ((outboundResourceadapter == null) ? 0 : outboundResourceadapter.hashCode());
+ result = prime * result + ((resourceadapterClass == null) ? 0 : resourceadapterClass.hashCode());
+ result = prime * result + ((securityPermission == null) ? 0 : securityPermission.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof ResourceAdapter))
+ {
+ return false;
+ }
+ ResourceAdapter other = (ResourceAdapter) obj;
+ if (adminobject == null)
+ {
+ if (other.adminobject != null)
+ {
+ return false;
+ }
+ }
+ else if (!adminobject.equals(other.adminobject))
+ {
+ return false;
+ }
+ if (configProperty == null)
+ {
+ if (other.configProperty != null)
+ {
+ return false;
+ }
+ }
+ else if (!configProperty.equals(other.configProperty))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (inboundResourceadapter == null)
+ {
+ if (other.inboundResourceadapter != null)
+ {
+ return false;
+ }
+ }
+ else if (!inboundResourceadapter.equals(other.inboundResourceadapter))
+ {
+ return false;
+ }
+ if (outboundResourceadapter == null)
+ {
+ if (other.outboundResourceadapter != null)
+ {
+ return false;
+ }
+ }
+ else if (!outboundResourceadapter.equals(other.outboundResourceadapter))
+ {
+ return false;
+ }
+ if (resourceadapterClass == null)
+ {
+ if (other.resourceadapterClass != null)
+ {
+ return false;
+ }
+ }
+ else if (!resourceadapterClass.equals(other.resourceadapterClass))
+ {
+ return false;
+ }
+ if (securityPermission == null)
+ {
+ if (other.securityPermission != null)
+ {
+ return false;
+ }
+ }
+ else if (!securityPermission.equals(other.securityPermission))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "ResourceAdapter [resourceadapterClass=" + resourceadapterClass + ", configProperty=" + configProperty
+ + ", outboundResourceadapter=" + outboundResourceadapter + ", inboundResourceadapter="
+ + inboundResourceadapter + ", adminobject=" + adminobject + ", securityPermission=" + securityPermission
+ + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/SecurityPermission.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/SecurityPermission.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/SecurityPermission.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,167 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class SecurityPermission implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -7931009018498254330L;
+
+ private final List<LocalizedXsdString> description;
+
+ private final XsdString securityPermissionSpec;
+
+ private final String id;
+
+ /**
+ * @param description descriptions
+ * @param securityPermissionSpec the security permission spec as defined in the xml
+ * @param id XML ID
+ */
+ public SecurityPermission(List<LocalizedXsdString> description, XsdString securityPermissionSpec, String id)
+ {
+ super();
+ this.description = description;
+ this.securityPermissionSpec = securityPermissionSpec;
+ this.id = id;
+ }
+
+ /**
+ * @return description
+ */
+ public List<LocalizedXsdString> getDescription()
+ {
+ return Collections.unmodifiableList(description);
+ }
+
+ /**
+ * @return securityPermissionSpec
+ */
+ public XsdString getSecurityPermissionSpec()
+ {
+ return securityPermissionSpec;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((description == null) ? 0 : description.hashCode());
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((securityPermissionSpec == null) ? 0 : securityPermissionSpec.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof SecurityPermission))
+ {
+ return false;
+ }
+ SecurityPermission other = (SecurityPermission) obj;
+ if (description == null)
+ {
+ if (other.description != null)
+ {
+ return false;
+ }
+ }
+ else if (!description.equals(other.description))
+ {
+ return false;
+ }
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (securityPermissionSpec == null)
+ {
+ if (other.securityPermissionSpec != null)
+ {
+ return false;
+ }
+ }
+ else if (!securityPermissionSpec.equals(other.securityPermissionSpec))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "SecurityPermission [description=" + description + ", securityPermissionSpec=" + securityPermissionSpec
+ + ", id=" + id + "]";
+ }
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/TransactionSupportEnum.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/TransactionSupportEnum.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/TransactionSupportEnum.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public enum TransactionSupportEnum
+{
+ /**
+ * NoTransaction
+ */
+ NoTransaction,
+ /**
+ * LocalTransaction
+ */
+ LocalTransaction,
+ /**
+ * XATransaction
+ */
+ XATransaction;
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/XsdString.java
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/XsdString.java (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/XsdString.java 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,146 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.jca.common.metadata.specs;
+
+/**
+ * @author <a href="mailto:stefano.maestri at jboss.org">Stefano Maestri</a>
+ *
+ */
+public class XsdString implements IdDecoratedMetadata
+{
+ /**
+ */
+ private static final long serialVersionUID = -3045754045828271173L;
+
+ /**
+ * the actual String value
+ */
+ protected final String value;
+
+ /**
+ * XML ID
+ */
+ protected final String id;
+
+ /**
+ * @param value the actual String value
+ * @param id XML ID
+ */
+ public XsdString(String value, String id)
+ {
+ super();
+ this.value = value;
+ this.id = id;
+ }
+
+ /**
+ * @return value
+ */
+ public String getValue()
+ {
+ return value;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see IdDecoratedMetadata#getId()
+ */
+ @Override
+ public String getId()
+ {
+ return id;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode()
+ {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((id == null) ? 0 : id.hashCode());
+ result = prime * result + ((value == null) ? 0 : value.hashCode());
+ return result;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj == null)
+ {
+ return false;
+ }
+ if (!(obj instanceof XsdString))
+ {
+ return false;
+ }
+ XsdString other = (XsdString) obj;
+ if (id == null)
+ {
+ if (other.id != null)
+ {
+ return false;
+ }
+ }
+ else if (!id.equals(other.id))
+ {
+ return false;
+ }
+ if (value == null)
+ {
+ if (other.value != null)
+ {
+ return false;
+ }
+ }
+ else if (!value.equals(other.value))
+ {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString()
+ {
+ return "XsdString [value=" + value + ", id=" + id + "]";
+ }
+
+}
Added: projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/package.html
===================================================================
--- projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/package.html (rev 0)
+++ projects/jboss-jca/trunk/common/src/main/java/org/jboss/jca/common/metadata/specs/package.html 2010-07-15 14:41:42 UTC (rev 106753)
@@ -0,0 +1,3 @@
+<body>
+This package contains metadatas for connector-*.xsd
+</body>
Added: projects/jboss-jca/trunk/transaction.log
===================================================================
More information about the jboss-cvs-commits
mailing list