[jboss-cvs] JBossAS SVN: r61507 - in trunk/connector/src/main/org/jboss/resource/metadata: repository and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 21 00:28:15 EDT 2007


Author: weston.price at jboss.com
Date: 2007-03-21 00:28:15 -0400 (Wed, 21 Mar 2007)
New Revision: 61507

Added:
   trunk/connector/src/main/org/jboss/resource/metadata/repository/
   trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java
   trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java
   trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java
Log:
[JBAS-1437][JBAS-1425] First draft of JCAMetaDataRepository for programmatic
deployment.

Added: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataEntry.java	2007-03-21 04:28:15 UTC (rev 61507)
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.repository;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.jboss.resource.metadata.ConnectorMetaData;
+
+/**
+ * A JCAConnectorMetaDataEntry.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class JCAConnectorMetaDataEntry
+{
+   private ConnectorMetaData md;
+   private List<Object> deployments = new CopyOnWriteArrayList<Object>();
+   
+   public ConnectorMetaData getConnectorMetaData()
+   {
+      return this.md;      
+   }
+   
+   public void setConnectorMetaData(ConnectorMetaData md)
+   {
+      this.md = md;      
+   }
+
+   public List<Object> getDeployments()
+   {
+      return Collections.unmodifiableList(deployments);
+      
+   }
+   
+   public void addDeployment(Object deployment)
+   {
+      deployments.add(deployment);
+      
+   }
+
+}

Added: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCAConnectorMetaDataKey.java	2007-03-21 04:28:15 UTC (rev 61507)
@@ -0,0 +1,77 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.repository;
+
+/**
+ * A JCAConnectorMetaDataKey.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class JCAConnectorMetaDataKey
+{
+   private String name;
+      
+   public JCAConnectorMetaDataKey(String name)
+   {
+      this.name = name;      
+   }
+   
+   public String getName()
+   {
+      return name;
+   }
+
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+   @Override
+   public boolean equals(Object obj)
+   {
+      if(obj == this)
+         return true;
+      
+      if(!(obj instanceof JCAConnectorMetaDataKey))
+      {
+         return false;
+      }
+      
+      JCAConnectorMetaDataKey other = (JCAConnectorMetaDataKey)obj;
+      return other.getName().equals(this.getName());
+      
+   }
+
+   @Override
+   public int hashCode()
+   {
+      return name.hashCode();
+      
+   }
+   
+   @Override
+   public String toString()
+   {
+      return "[JCAConnectorMetaDataKey: " + this.getName();
+   }
+}

Added: trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java	                        (rev 0)
+++ trunk/connector/src/main/org/jboss/resource/metadata/repository/JCADeploymentMetaDataEntry.java	2007-03-21 04:28:15 UTC (rev 61507)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt 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.resource.metadata.repository;
+
+/**
+ * A JCADeploymentMetaDataEntry.
+ * 
+ * @author <a href="weston.price at jboss.org">Weston Price</a>
+ * @version $Revision: 1.1 $
+ */
+public class JCADeploymentMetaDataEntry
+{
+   private JCADeployment deploymentType;
+   private String name;
+   
+   public JCADeployment getDeploymentType()
+   {
+      return deploymentType;
+   }
+   public void setDeploymentType(JCADeployment deploymentType)
+   {
+      this.deploymentType = deploymentType;
+   }
+   public String getName()
+   {
+      return name;
+   }
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+   
+}




More information about the jboss-cvs-commits mailing list