[jboss-cvs] jboss/src/main/org/jboss/metamodel/descriptor ...

Bill Burke bill at jboss.com
Tue Jul 25 22:08:33 EDT 2006


  User: bill    
  Date: 06/07/25 22:08:33

  Modified:    src/main/org/jboss/metamodel/descriptor     
                        EjbLocalRef.java EjbRef.java
                        EnvironmentRefGroup.java
  Added:       src/main/org/jboss/metamodel/descriptor      BaseEjbRef.java
                        PersistenceContextRef.java
  Log:
  refactor metamodel for sharing with Tomcat
  
  Revision  Changes    Path
  1.3       +2 -51     jboss/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EjbLocalRef.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metamodel/descriptor/EjbLocalRef.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- EjbLocalRef.java	23 Jun 2006 21:33:48 -0000	1.2
  +++ EjbLocalRef.java	26 Jul 2006 02:08:33 -0000	1.3
  @@ -26,53 +26,14 @@
    * for the 1.4 schema
    *
    * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  - * @version <tt>$Revision: 1.2 $</tt>
  + * @version <tt>$Revision: 1.3 $</tt>
    */
  -public class EjbLocalRef extends Ref
  +public class EjbLocalRef extends BaseEjbRef
   {
  -
  -   private String ejbRefName;
  -
  -   private String ejbRefType;
  -
      private String localHome;
   
      private String local;
   
  -   private String ejbLink;
  -
  -   private String mappedName;
  -
  -   public String getMappedName()
  -   {
  -      return mappedName;
  -   }
  -
  -   public void setMappedName(String mappedName)
  -   {
  -      this.mappedName = mappedName;
  -   }
  -
  -   public String getEjbRefName()
  -   {
  -      return ejbRefName;
  -   }
  -
  -   public void setEjbRefName(String ejbRefName)
  -   {
  -      this.ejbRefName = ejbRefName;
  -   }
  -
  -   public String getEjbRefType()
  -   {
  -      return ejbRefType;
  -   }
  -
  -   public void setEjbRefType(String ejbRefType)
  -   {
  -      this.ejbRefType = ejbRefType;
  -   }
  -
      public String getLocalHome()
      {
         return localHome;
  @@ -93,16 +54,6 @@
         this.local = local;
      }
   
  -   public String getEjbLink()
  -   {
  -      return ejbLink;
  -   }
  -
  -   public void setEjbLink(String ejbLink)
  -   {
  -      this.ejbLink = ejbLink;
  -   }
  -
      public String toString()
      {
         StringBuffer sb = new StringBuffer(100);
  
  
  
  1.3       +2 -49     jboss/src/main/org/jboss/metamodel/descriptor/EjbRef.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EjbRef.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metamodel/descriptor/EjbRef.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- EjbRef.java	23 Jun 2006 21:33:48 -0000	1.2
  +++ EjbRef.java	26 Jul 2006 02:08:33 -0000	1.3
  @@ -26,52 +26,15 @@
    * the 1.4 schema
    *
    * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  - * @version <tt>$Revision: 1.2 $</tt>
  + * @version <tt>$Revision: 1.3 $</tt>
    */
  -public class EjbRef extends Ref
  +public class EjbRef extends BaseEjbRef
   {
  -   private String ejbRefName;
  -
  -   private String ejbRefType;
   
      private String home;
      
      private String remote;
   
  -   private String ejbLink;
  -
  -   private String mappedName;
  -
  -   public String getMappedName()
  -   {
  -      return mappedName;
  -   }
  -
  -   public void setMappedName(String mappedName)
  -   {
  -      this.mappedName = mappedName;
  -   }
  -
  -   public String getEjbRefName()
  -   {
  -      return ejbRefName;
  -   }
  -
  -   public void setEjbRefName(String ejbRefName)
  -   {
  -      this.ejbRefName = ejbRefName;
  -   }
  -
  -   public String getEjbRefType()
  -   {
  -      return ejbRefType;
  -   }
  -
  -   public void setEjbRefType(String ejbRefType)
  -   {
  -      this.ejbRefType = ejbRefType;
  -   }
  -
      public String getHome()
      {
         return home;
  @@ -92,16 +55,6 @@
         this.remote = remote;
      }
   
  -   public String getEjbLink()
  -   {
  -      return ejbLink;
  -   }
  -
  -   public void setEjbLink(String ejbLink)
  -   {
  -      this.ejbLink = ejbLink;
  -   }
  -
      public String toString()
      {
         StringBuffer sb = new StringBuffer(100);
  
  
  
  1.3       +43 -19    jboss/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: EnvironmentRefGroup.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/metamodel/descriptor/EnvironmentRefGroup.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -b -r1.2 -r1.3
  --- EnvironmentRefGroup.java	25 May 2006 21:01:54 -0000	1.2
  +++ EnvironmentRefGroup.java	26 Jul 2006 02:08:33 -0000	1.3
  @@ -23,6 +23,9 @@
   
   import java.util.HashMap;
   import java.util.Collection;
  +import java.util.List;
  +import java.util.ArrayList;
  +
   import org.jboss.logging.Logger;
   
   import org.jboss.metamodel.descriptor.EjbLocalRef;
  @@ -36,22 +39,24 @@
   
   /**
    * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
  - * @version <tt>$Revision: 1.2 $</tt>
  + * @version <tt>$Revision: 1.3 $</tt>
    */
   public abstract class EnvironmentRefGroup
   {
      private static final Logger log = Logger.getLogger(EnvironmentRefGroup.class);
   
  -   protected HashMap ejbLocalRefs = new HashMap();
  -   protected HashMap ejbRefs = new HashMap();
  -   protected HashMap envEntries = new HashMap();
  -   protected HashMap resourceEnvRefs = new HashMap();
  -   protected HashMap resourceRefs = new HashMap();
  -   protected HashMap messageDestinationRefs = new HashMap();
  -   protected HashMap webServiceRefs = new HashMap();
  -   protected HashMap jndiRefs = new HashMap();
  +   protected HashMap<String, EjbLocalRef> ejbLocalRefs = new HashMap<String, EjbLocalRef>();
  +   protected HashMap<String, EjbRef> ejbRefs = new HashMap<String, EjbRef>();
  +   protected HashMap<String, EnvEntry> envEntries = new HashMap<String, EnvEntry>();
  +   protected HashMap<String, ResourceEnvRef> resourceEnvRefs = new HashMap<String, ResourceEnvRef>();
  +   protected HashMap<String, ResourceRef> resourceRefs = new HashMap<String, ResourceRef>();
  +   protected HashMap<String, MessageDestinationRef> messageDestinationRefs = new HashMap<String, MessageDestinationRef>();
  +   protected HashMap<String, WebServiceRef> webServiceRefs = new HashMap<String, WebServiceRef>();
  +   protected HashMap<String, JndiRef> jndiRefs = new HashMap<String, JndiRef>();
  +   protected List<PersistenceContextRef> persistenceContextRefs = new ArrayList<PersistenceContextRef>();
  +   protected List<PersistenceUnitRef> persistenceUnitRefs = new ArrayList<PersistenceUnitRef>();
      
  -   public Collection getMessageDestinationRefs()
  +   public Collection<MessageDestinationRef> getMessageDestinationRefs()
      {
         return messageDestinationRefs.values();
      }
  @@ -61,7 +66,7 @@
         messageDestinationRefs.put(messageDestinationRef.getMessageDestinationRefName(), messageDestinationRef);
      }
   
  -   public Collection getEjbLocalRefs()
  +   public Collection<EjbLocalRef> getEjbLocalRefs()
      {
         return ejbLocalRefs.values();
      }
  @@ -71,7 +76,7 @@
         ejbLocalRefs.put(ref.getEjbRefName(), ref);
      }
   
  -   public Collection getEjbRefs()
  +   public Collection<EjbRef> getEjbRefs()
      {
         return ejbRefs.values();
      }
  @@ -81,7 +86,7 @@
         ejbRefs.put(ref.getEjbRefName(), ref);
      }
     
  -   public Collection getEnvEntries()
  +   public Collection<EnvEntry> getEnvEntries()
      {
         return envEntries.values();
      }
  @@ -91,7 +96,7 @@
         envEntries.put(entry.getEnvEntryName(), entry);
      }
   
  -   public Collection getResourceEnvRefs()
  +   public Collection<ResourceEnvRef> getResourceEnvRefs()
      {
         return resourceEnvRefs.values();
      }
  @@ -101,7 +106,7 @@
         resourceEnvRefs.put(envRef.getResRefName(), envRef);
      }
      
  -   public Collection getResourceRefs()
  +   public Collection<ResourceRef> getResourceRefs()
      {
         return resourceRefs.values();
      }
  @@ -111,7 +116,7 @@
         resourceRefs.put(ref.getResRefName(), ref);
      }
      
  -   public Collection getJndiRefs()
  +   public Collection<JndiRef> getJndiRefs()
      {
         return jndiRefs.values();
      }
  @@ -121,7 +126,7 @@
         jndiRefs.put(ref.getJndiRefName(), ref);
      }
      
  -   public Collection getWebServiceRefs()
  +   public Collection<WebServiceRef> getWebServiceRefs()
      {
         return webServiceRefs.values();
      }
  @@ -206,4 +211,23 @@
         return sb.toString();
      }
      
  +   public List<PersistenceContextRef> getPersistenceContextRefs()
  +   {
  +      return persistenceContextRefs;
  +   }
  +
  +   public List<PersistenceUnitRef> getPersistenceUnitRefs()
  +   {
  +      return persistenceUnitRefs;
  +   }
  +
  +   public void addPersistenceContextRef(PersistenceContextRef ref)
  +   {
  +      persistenceContextRefs.add(ref);
  +   }
  +
  +   public void addPersistenceUnitRef(PersistenceUnitRef ref)
  +   {
  +      persistenceUnitRefs.add(ref);
  +   }
   }
  
  
  
  1.1      date: 2006/07/26 02:08:33;  author: bill;  state: Exp;jboss/src/main/org/jboss/metamodel/descriptor/BaseEjbRef.java
  
  Index: BaseEjbRef.java
  ===================================================================
  /*
  * 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.metamodel.descriptor;
  
  /**
   * Comment
   *
   * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
   * @version $Revision: 1.1 $
   */
  public class BaseEjbRef extends Ref
  {
     protected String ejbRefName;
     protected String ejbRefType;
     private String ejbLink;
     protected String mappedName;
  
     public String getMappedName()
     {
        return mappedName;
     }
  
     public void setMappedName(String mappedName)
     {
        this.mappedName = mappedName;
     }
  
     public String getEjbRefName()
     {
        return ejbRefName;
     }
  
     public void setEjbRefName(String ejbRefName)
     {
        this.ejbRefName = ejbRefName;
     }
  
     public String getEjbRefType()
     {
        return ejbRefType;
     }
  
     public void setEjbRefType(String ejbRefType)
     {
        this.ejbRefType = ejbRefType;
     }
  
     public String getEjbLink()
     {
        return ejbLink;
     }
  
     public void setEjbLink(String ejbLink)
     {
        this.ejbLink = ejbLink;
     }
  }
  
  
  
  1.1      date: 2006/07/26 02:08:33;  author: bill;  state: Exp;jboss/src/main/org/jboss/metamodel/descriptor/PersistenceContextRef.java
  
  Index: PersistenceContextRef.java
  ===================================================================
  /*
  * 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.metamodel.descriptor;
  
  import javax.persistence.PersistenceContextType;
  
  import org.jboss.metamodel.descriptor.Ref;
  
  /**
   * Comment
   *
   * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
   * @version $Revision: 1.1 $
   */
  public class PersistenceContextRef extends Ref
  {
     private String refName;
     private String unitName;
     private PersistenceContextType persistenceContextType;
  
     public String getRefName()
     {
        return refName;
     }
  
     public void setRefName(String refName)
     {
        this.refName = refName;
     }
  
     public String getUnitName()
     {
        return unitName;
     }
  
     public void setUnitName(String unitName)
     {
        this.unitName = unitName;
     }
  
     public PersistenceContextType getPersistenceContextType()
     {
        return persistenceContextType;
     }
  
     public void setPersistenceContextType(PersistenceContextType persistenceContextType)
     {
        this.persistenceContextType = persistenceContextType;
     }
  }
  
  
  



More information about the jboss-cvs-commits mailing list