[jboss-cvs] JBossAS SVN: r65980 - in projects/metadata/trunk/src: main/java/org/jboss/metadata/common and 6 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 9 13:29:41 EDT 2007


Author: scott.stark at jboss.org
Date: 2007-10-09 13:29:41 -0400 (Tue, 09 Oct 2007)
New Revision: 65980

Added:
   projects/metadata/trunk/src/main/java/org/jboss/metadata/common/
   projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/
   projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionsMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/PassivationConfig.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/ReplicationConfig.java
Removed:
   projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionsMetaData.java
Modified:
   projects/metadata/trunk/src/main/java/org/jboss/metadata/ApplicationMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/WebserviceDescription.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/Webservices.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebservicesMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/SecurityRoleMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/SecurityConstraintMetaData.java
   projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/WebMetaData.java
   projects/metadata/trunk/src/test/java/org/jboss/test/metadata/ejb/JBoss5xEverythingUnitTestCase.java
Log:
Add missing jboss-web fields and move WebserviceDescriptions to a org.jboss.metadata.common.jboss package

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/ApplicationMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/ApplicationMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/ApplicationMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -29,6 +29,8 @@
 import java.util.LinkedHashMap;
 import java.util.Map;
 
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
 import org.jboss.metadata.ejb.jboss.ContainerConfigurationMetaData;
 import org.jboss.metadata.ejb.jboss.ContainerConfigurationsMetaData;
 import org.jboss.metadata.ejb.jboss.InvokerProxyBindingsMetaData;
@@ -37,8 +39,6 @@
 import org.jboss.metadata.ejb.jboss.JBossEnterpriseBeansMetaData;
 import org.jboss.metadata.ejb.jboss.JBossMetaData;
 import org.jboss.metadata.ejb.jboss.ResourceManagerMetaData;
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionsMetaData;
 import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
 import org.jboss.metadata.ejb.spec.EjbJarMetaData;
 import org.jboss.metadata.ejb.spec.RelationsMetaData;

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/WebserviceDescription.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/WebserviceDescription.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/WebserviceDescription.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -21,7 +21,7 @@
  */
 package org.jboss.metadata;
 
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
 
 //$Id: $
 

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/Webservices.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/Webservices.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/Webservices.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -27,9 +27,9 @@
 import java.util.Iterator;
 import java.util.List;
 
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
 import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionsMetaData;
 
 /**
 * Represents the <webservices> element in jboss.xml and jboss-web.xml

Copied: projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionMetaData.java (from rev 65904, projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionMetaData.java)
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -0,0 +1,137 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.metadata.common.jboss;
+
+import org.jboss.metadata.javaee.support.NamedMetaData;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * WebservicesDescriptionMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(name="webservice-descriptionType")
+public class WebserviceDescriptionMetaData extends NamedMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -3783036458417091083L;
+
+   /** The context name */
+   private String configName;
+
+   /** The context file */
+   private String configFile;
+
+   /** The wsdl publish location */
+   private String wsdlPublishLocation;
+   
+   /**
+    * Get the webservicesDescriptionName.
+    * 
+    * @return the webservicesDescriptionName.
+    */
+   public String getWebserviceDescriptionName()
+   {
+      return getName();
+   }
+
+   /**
+    * Set the webservicesDescriptionName.
+    * 
+    * @param webservicesDescriptionName the webservicesDescriptionName.
+    * @throws IllegalArgumentException for a null webservicesDescriptionName
+    */
+   public void setWebserviceDescriptionName(String webservicesDescriptionName)
+   {
+      setName(webservicesDescriptionName);
+   }
+
+   /**
+    * Get the configName.
+    * 
+    * @return the configName.
+    */
+   public String getConfigName()
+   {
+      return configName;
+   }
+
+   /**
+    * Set the configName.
+    * 
+    * @param configName the configName.
+    * @throws IllegalArgumentException for a null configName
+    */
+   public void setConfigName(String configName)
+   {
+      if (configName == null)
+         throw new IllegalArgumentException("Null configName");
+      this.configName = configName;
+   }
+
+   /**
+    * Get the configFile.
+    * 
+    * @return the configFile.
+    */
+   public String getConfigFile()
+   {
+      return configFile;
+   }
+
+   /**
+    * Set the configFile.
+    * 
+    * @param configFile the configFile.
+    * @throws IllegalArgumentException for a null configFile
+    */
+   public void setConfigFile(String configFile)
+   {
+      if (configFile == null)
+         throw new IllegalArgumentException("Null configFile");
+      this.configFile = configFile;
+   }
+
+   /**
+    * Get the wsdlPublishLocation.
+    * 
+    * @return the wsdlPublishLocation.
+    */
+   public String getWsdlPublishLocation()
+   {
+      return wsdlPublishLocation;
+   }
+
+   /**
+    * Set the wsdlPublishLocation.
+    * 
+    * @param wsdlPublishLocation the wsdlPublishLocation.
+    * @throws IllegalArgumentException for a null wsdlPublishLocation
+    */
+   public void setWsdlPublishLocation(String wsdlPublishLocation)
+   {
+      if (wsdlPublishLocation == null)
+         throw new IllegalArgumentException("Null wsdlPublishLocation");
+      this.wsdlPublishLocation = wsdlPublishLocation;
+   }
+}

Copied: projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionsMetaData.java (from rev 65904, projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionsMetaData.java)
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionsMetaData.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/common/jboss/WebserviceDescriptionsMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -0,0 +1,44 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, 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.metadata.common.jboss;
+
+import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+
+/**
+ * WebservicesDescriptionsMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class WebserviceDescriptionsMetaData extends AbstractMappedMetaData<WebserviceDescriptionMetaData>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -1286417060419536332L;
+
+   /**
+    * Create a new WebservicesDescriptionsMetaData.
+    */
+   public WebserviceDescriptionsMetaData()
+   {
+      super("webservice-description-name for webservice description");
+   }
+}

Deleted: projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -1,137 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.metadata.ejb.jboss;
-
-import org.jboss.metadata.javaee.support.NamedMetaData;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * WebservicesDescriptionMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
- at XmlType(name="webservice-descriptionType")
-public class WebserviceDescriptionMetaData extends NamedMetaData
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -3783036458417091083L;
-
-   /** The context name */
-   private String configName;
-
-   /** The context file */
-   private String configFile;
-
-   /** The wsdl publish location */
-   private String wsdlPublishLocation;
-   
-   /**
-    * Get the webservicesDescriptionName.
-    * 
-    * @return the webservicesDescriptionName.
-    */
-   public String getWebserviceDescriptionName()
-   {
-      return getName();
-   }
-
-   /**
-    * Set the webservicesDescriptionName.
-    * 
-    * @param webservicesDescriptionName the webservicesDescriptionName.
-    * @throws IllegalArgumentException for a null webservicesDescriptionName
-    */
-   public void setWebserviceDescriptionName(String webservicesDescriptionName)
-   {
-      setName(webservicesDescriptionName);
-   }
-
-   /**
-    * Get the configName.
-    * 
-    * @return the configName.
-    */
-   public String getConfigName()
-   {
-      return configName;
-   }
-
-   /**
-    * Set the configName.
-    * 
-    * @param configName the configName.
-    * @throws IllegalArgumentException for a null configName
-    */
-   public void setConfigName(String configName)
-   {
-      if (configName == null)
-         throw new IllegalArgumentException("Null configName");
-      this.configName = configName;
-   }
-
-   /**
-    * Get the configFile.
-    * 
-    * @return the configFile.
-    */
-   public String getConfigFile()
-   {
-      return configFile;
-   }
-
-   /**
-    * Set the configFile.
-    * 
-    * @param configFile the configFile.
-    * @throws IllegalArgumentException for a null configFile
-    */
-   public void setConfigFile(String configFile)
-   {
-      if (configFile == null)
-         throw new IllegalArgumentException("Null configFile");
-      this.configFile = configFile;
-   }
-
-   /**
-    * Get the wsdlPublishLocation.
-    * 
-    * @return the wsdlPublishLocation.
-    */
-   public String getWsdlPublishLocation()
-   {
-      return wsdlPublishLocation;
-   }
-
-   /**
-    * Set the wsdlPublishLocation.
-    * 
-    * @param wsdlPublishLocation the wsdlPublishLocation.
-    * @throws IllegalArgumentException for a null wsdlPublishLocation
-    */
-   public void setWsdlPublishLocation(String wsdlPublishLocation)
-   {
-      if (wsdlPublishLocation == null)
-         throw new IllegalArgumentException("Null wsdlPublishLocation");
-      this.wsdlPublishLocation = wsdlPublishLocation;
-   }
-}

Deleted: projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionsMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionsMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebserviceDescriptionsMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -1,44 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, 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.metadata.ejb.jboss;
-
-import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
-
-/**
- * WebservicesDescriptionsMetaData.
- * 
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class WebserviceDescriptionsMetaData extends AbstractMappedMetaData<WebserviceDescriptionMetaData>
-{
-   /** The serialVersionUID */
-   private static final long serialVersionUID = -1286417060419536332L;
-
-   /**
-    * Create a new WebservicesDescriptionsMetaData.
-    */
-   public WebserviceDescriptionsMetaData()
-   {
-      super("webservice-description-name for webservice description");
-   }
-}

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebservicesMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebservicesMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/ejb/jboss/WebservicesMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -21,6 +21,7 @@
 */
 package org.jboss.metadata.ejb.jboss;
 
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
 import org.jboss.metadata.javaee.support.IdMetaDataImpl;
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlType;

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/JavaEEMetaDataConstants.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -35,8 +35,8 @@
    /** The j2ee namespace */
    String J2EE_NS = "http://java.sun.com/xml/ns/j2ee";
    
-   /** The jboss namespace*/
-   String JBOSS_NS = "http://www.jboss.com/xml/ns/javaee";
+   /** The jboss javaee namespace*/
+   String JBOSS_NS = "http://www.jboss.com/xml/ns/javaee/ejb";
 
    /** The jbosscmp-jdbc namespace*/
    String JBOSS_CMP2X_NS = "http://www.jboss.com/xml/ns/javaee/cmp2x";

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/SecurityRoleMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/SecurityRoleMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/javaee/spec/SecurityRoleMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -44,7 +44,8 @@
    
    /** The prinicpals */
    private Set<String> principals;
-   
+   private String principalName;
+
    /**
     * Create a new SecurityRoleMetaData.
     */
@@ -74,6 +75,17 @@
       setName(roleName);
    }
 
+
+   public String getPrincipalName()
+   {
+      return principalName;
+   }
+
+   public void setPrincipalName(String principalName)
+   {
+      this.principalName = principalName;
+   }
+
    /**
     * Get the principals.
     * 

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -27,8 +27,10 @@
 import java.util.Map;
 import java.util.Set;
 
+import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlTransient;
 
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
 import org.jboss.metadata.ejb.jboss.JBossEnvironmentRefsGroupMetaData;
 import org.jboss.metadata.ejb.spec.SecurityIdentityMetaData;
 import org.jboss.metadata.javaee.spec.EJBLocalReferencesMetaData;
@@ -36,8 +38,10 @@
 import org.jboss.metadata.javaee.spec.EnvironmentEntriesMetaData;
 import org.jboss.metadata.javaee.spec.EnvironmentEntryMetaData;
 import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationMetaData;
 import org.jboss.metadata.javaee.spec.MessageDestinationReferenceMetaData;
 import org.jboss.metadata.javaee.spec.MessageDestinationReferencesMetaData;
+import org.jboss.metadata.javaee.spec.MessageDestinationsMetaData;
 import org.jboss.metadata.javaee.spec.PersistenceContextReferenceMetaData;
 import org.jboss.metadata.javaee.spec.PersistenceContextReferencesMetaData;
 import org.jboss.metadata.javaee.spec.PersistenceUnitReferenceMetaData;
@@ -53,7 +57,9 @@
 import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
 import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
 import org.jboss.metadata.javaee.support.IdMetaDataImplWithOverride;
+import org.jboss.metadata.web.spec.SecurityConstraintMetaData;
 import org.jboss.metadata.web.spec.ServletMetaData;
+import org.jboss.metadata.web.spec.ServletsMetaData;
 import org.jboss.metadata.web.spec.WebMetaData;
 
 /**
@@ -69,15 +75,24 @@
    private String securityDomain;
    private String jaccContextID;
    private boolean java2ClassLoadingCompliance;
+   private ServletsMetaData servlets;
    /** A list of extra dependencies to wait on */
    private List<String> depends;
    /** */
    private Map<String, SecurityRoleMetaData> runAsIdentity = new HashMap<String, SecurityRoleMetaData>();
    private SecurityRolesMetaData securityRoles;
+   /** The message destinations */
+   private MessageDestinationsMetaData messageDestinations;
    /** The environment */
    private JBossEnvironmentRefsGroupMetaData jndiEnvironmentRefsGroup;
    /** The merged environment */
    private transient JBossEnvironmentRefsGroupMetaData mergedEnvironment;
+   private List<String> virtualHosts;
+   private boolean useSessionCookies;
+   private int maxActiveSession;
+   private ReplicationConfig replicationConfig;
+   private PassivationConfig passivationConfig;
+   private WebserviceDescriptionsMetaData webserviceDescriptions;
 
    public String getAlternativeDD()
    {
@@ -139,6 +154,81 @@
       this.securityRoles = securityRoles;
    }
 
+   public int getMaxActiveSession()
+   {
+      return maxActiveSession;
+   }
+   public void setMaxActiveSession(int maxActiveSession)
+   {
+      this.maxActiveSession = maxActiveSession;
+   }
+   public PassivationConfig getPassivationConfig()
+   {
+      return passivationConfig;
+   }
+   public void setPassivationConfig(PassivationConfig passivationConfig)
+   {
+      this.passivationConfig = passivationConfig;
+   }
+   public ReplicationConfig getReplicationConfig()
+   {
+      return replicationConfig;
+   }
+   public void setReplicationConfig(ReplicationConfig replicationConfig)
+   {
+      this.replicationConfig = replicationConfig;
+   }
+
+   public ServletsMetaData getServlets()
+   {
+      return servlets;
+   }
+   @XmlElement(name="servlet")
+   public void setServlets(ServletsMetaData servlets)
+   {
+      this.servlets = servlets;
+   }
+
+   public boolean isUseSessionCookies()
+   {
+      return useSessionCookies;
+   }
+   public void setUseSessionCookies(boolean useSessionCookies)
+   {
+      this.useSessionCookies = useSessionCookies;
+   }
+
+   public List<String> getVirtualHosts()
+   {
+      return virtualHosts;
+   }
+   @XmlElement(name="virtual-host")
+   public void setVirtualHosts(List<String> virtualHosts)
+   {
+      this.virtualHosts = virtualHosts;
+   }
+
+   public WebserviceDescriptionsMetaData getWebserviceDescriptions()
+   {
+      return webserviceDescriptions;
+   }
+   @XmlElement(name="webservice-description")
+   public void setWebserviceDescriptions(
+         WebserviceDescriptionsMetaData webserviceDescriptions)
+   {
+      this.webserviceDescriptions = webserviceDescriptions;
+   }
+
+   /**
+    * Get the security-role names from the web.xml descriptor
+    * @return Set<String> of the security-role names from the web.xml
+    */
+   @XmlTransient
+   public Set<String> getSecurityRoleNames()
+   {
+      return new HashSet<String>(securityRoles.keySet());
+   }
+
    public Map<String, Set<String>> getPrincipalVersusRolesMap()
    {
       Map<String, Set<String>> principalRolesMap = null;
@@ -208,6 +298,14 @@
       }
       return mergedEnvironment;
    }
+   /**
+    * TODO
+    * @return
+    */
+   public ServletsMetaData getMergedServlets()
+   {
+      return this.getOverridenMetaData().getServlets();
+   }
 
    public EnvironmentEntriesMetaData getEnvironmentEntries()
    {
@@ -229,6 +327,35 @@
       return getMergedEnvironment().getEjbReferences();
    }
 
+   /**
+    * Get the messageDestinations.
+    * 
+    * @return the messageDestinations.
+    */
+   public MessageDestinationsMetaData getMessageDestinations()
+   {
+      return messageDestinations;
+   }
+   @XmlTransient
+   public MessageDestinationMetaData getMessageDestination(String name)
+   {
+      return messageDestinations.get(name);
+   }
+
+   /**
+    * Set the messageDestinations.
+    * 
+    * @param messageDestinations the messageDestinations.
+    * @throws IllegalArgumentException for a null messageDestinations
+    */
+   @XmlElement(name="message-destination")
+   public void setMessageDestinations(MessageDestinationsMetaData messageDestinations)
+   {
+      if (messageDestinations == null)
+         throw new IllegalArgumentException("Null messageDestinations");
+      this.messageDestinations = messageDestinations;
+   }
+
    public MessageDestinationReferenceMetaData getMessageDestinationReferenceByName(String name)
    {
       return AbstractMappedMetaData.getByName(name, getMessageDestinationReferences());
@@ -347,6 +474,11 @@
       return srmd;
    }
 
+   public List<SecurityConstraintMetaData> getSecurityContraints()
+   {
+      return getOverridenMetaData().getSecurityContraints();
+   }
+
    /**
     *
     * @return servlet/run-as <String servlet-name, SecurityRoleMetaData>

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/PassivationConfig.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/PassivationConfig.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/PassivationConfig.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * 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.metadata.web.jboss;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
+/**
+ * Represents a <passivation-config> element of the jboss-web.xml 
+ * deployment descriptor 
+ *
+ * @author Brian Stansberry
+ * @version <tt>$Revision$</tt>
+ */
+public class PassivationConfig extends IdMetaDataImpl
+{  
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1;
+
+   private static final String IGNORE = "-1";
+   
+   /**
+    * If true then the session passivation is enabled for this web app.
+    * If false then the session passivation is disabled for this web app. 
+    */
+   protected String useSessionPassivation;
+   
+   /**
+    * Min time (seconds) the session must be idle since lastAccesstime before it's eligable for passivation
+    * This overrides maxActive_, to prevent thrashing if the there are lots of active sessions.
+    * Setting to -1 means it's ignored
+    */
+   protected String passivationMinIdleTime;
+   
+   /**
+    * Max time (seconds) the session must be idle since lastAccesstime before it's eligable for passivation
+    * This overrides maxActive_, to prevent thrashing if the there are lots of active sessions.
+    * Setting to -1 means session should not be forced out.
+    */
+   protected String passivationMaxIdleTime;
+
+   public String getPassivationMaxIdleTime()
+   {
+      return passivationMaxIdleTime == null ? IGNORE : passivationMaxIdleTime;
+   }
+
+   public void setPassivationMaxIdleTime(String passivationMaxIdleTime)
+   {
+      this.passivationMaxIdleTime = passivationMaxIdleTime;
+   }
+
+   public String getPassivationMinIdleTime()
+   {
+      return passivationMinIdleTime == null ? IGNORE : passivationMinIdleTime;
+   }
+
+   public void setPassivationMinIdleTime(String passivationMinIdleTime)
+   {
+      this.passivationMinIdleTime = passivationMinIdleTime;
+   }
+
+   public String getUseSessionPassivation()
+   {
+      return useSessionPassivation;
+   }
+
+   public void setUseSessionPassivation(String useSessionPassivation)
+   {
+      this.useSessionPassivation = useSessionPassivation;
+   }
+   
+}


Property changes on: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/PassivationConfig.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Added: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/ReplicationConfig.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/ReplicationConfig.java	                        (rev 0)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/ReplicationConfig.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -0,0 +1,186 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, and individual contributors
+ * 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.metadata.web.jboss;
+
+import org.jboss.metadata.javaee.support.IdMetaDataImpl;
+
+/**
+ * Represents a <replication-config> element of the jboss-web.xml deployment descriptor 
+ *
+ * @author <a href="mailto:bdecoste at jboss.com">William DeCoste</a>
+ * @version <tt>$Revision$</tt>
+ */
+public class ReplicationConfig extends IdMetaDataImpl
+{  
+   private static final long serialVersionUID = 1;
+   protected String trigger;
+   protected String granularity;
+   protected String fieldBatchMode;
+   protected String defaultCacheName;
+   protected String cacheName;
+   protected String useJK;
+   protected String snapshotMode;
+   protected String snapshotInterval;
+   protected String useLocalCache;
+   
+   public String getTrigger()
+   {
+      return trigger;
+   }
+   
+   public void setTrigger(String trigger)
+   {
+      this.trigger = (trigger == null ? null : trigger.toUpperCase());
+   }
+   
+   public String getGranularity()
+   {
+      return granularity;
+   }
+   
+   public void setGranularity(String granularity)
+   {
+      this.granularity = (granularity == null ? null : granularity.toUpperCase());
+   }
+   
+   public String getFieldBatchMode()
+   {
+      return fieldBatchMode;
+   }
+   
+   public void setFieldBatchMode(String fieldBatchMode)
+   {
+      this.fieldBatchMode = fieldBatchMode;
+   }
+
+   public String getCacheName()
+   {
+      return cacheName;
+   }
+
+   public void setCacheName(String cacheName)
+   {
+      this.cacheName = cacheName;
+   }
+
+   public String getDefaultCacheName()
+   {
+      return defaultCacheName;
+   }
+
+   public void setDefaultCacheName(String defaultCacheName)
+   {
+      this.defaultCacheName = defaultCacheName;
+   }
+
+   public String getSnapshotInterval()
+   {
+      return snapshotInterval;
+   }
+
+   public void setSnapshotInterval(String snapshotInterval)
+   {
+      this.snapshotInterval = snapshotInterval;
+   }
+
+   public String getSnapshotMode()
+   {
+      return snapshotMode;
+   }
+
+   public void setSnapshotMode(String snapshotMode)
+   {
+      this.snapshotMode = snapshotMode;
+   }
+
+   public String getUseJK()
+   {
+      return useJK;
+   }
+
+   public void setUseJK(String useJK)
+   {
+      this.useJK = useJK;
+   }
+
+   public String getUseLocalCache()
+   {
+      return useLocalCache;
+   }
+
+   public void setUseLocalCache(String useLocalCache)
+   {
+      this.useLocalCache = useLocalCache;
+   }
+   
+   public void setDefaultSnapshotMode(String mode)
+   {
+      if (isEmpty(snapshotMode))
+      {
+         snapshotMode = mode;
+      }
+   }
+   
+   public void setDefaultSnapshotInterval(int interval)
+   {
+      if (isEmpty(snapshotInterval))
+      {
+         snapshotInterval = String.valueOf(interval);
+      }
+   }
+   
+   public void setDefaultUseJK(boolean useJK)
+   {
+      if (isEmpty(this.useJK))
+      {
+         this.useJK = String.valueOf(useJK);
+      }
+   }
+   
+   public void setDefaultUseLocalCache(boolean useLocal)
+   {
+      if (isEmpty(this.useLocalCache))
+      {
+         this.useLocalCache = String.valueOf(useLocal);
+      }
+   }
+
+   public String toString()
+   {
+      StringBuffer sb = new StringBuffer(100);
+      sb.append("cacheName=").append(cacheName)
+        .append(";defaultCacheName=").append(defaultCacheName)
+        .append(";granularity=").append(granularity)
+        .append(";trigger=").append(trigger)
+        .append(";fieldBatchMode=").append(fieldBatchMode)
+        .append(";useJK=").append(useJK)
+        .append(";snapshotMode=").append(snapshotMode)
+        .append(";snapshotInterval=").append(snapshotInterval)
+        .append(";useLocalCache=").append(useLocalCache);
+      return sb.toString();
+   }
+   
+   private static boolean isEmpty(String str)
+   {
+      return str == null || str.trim().length() == 0;
+   }
+}


Property changes on: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/jboss/ReplicationConfig.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + native

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/SecurityConstraintMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/SecurityConstraintMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/SecurityConstraintMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -21,6 +21,9 @@
  */
 package org.jboss.metadata.web.spec;
 
+import java.util.Collections;
+import java.util.List;
+
 import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlTransient;
 
@@ -80,6 +83,7 @@
    }
 
    /** The unchecked flag is set when there is no security-constraint/auth-constraint
+   @return true if there is no auth-constraint
     */
    @XmlTransient
    public boolean isUnchecked()
@@ -89,6 +93,7 @@
 
    /** The excluded flag is set when there is an empty
    security-constraint/auth-constraint element
+   @return true if there is an empty auth-constraint
    */
    @XmlTransient
    public boolean isExcluded()
@@ -96,6 +101,19 @@
       return authConstraint != null && authConstraint.getRoleNames().size() == 0;
    }
 
+   /** Accessor for the security-constraint/auth-constraint/role-name(s)
+    * @return A possibly empty set of constraint role names. Use isUnchecked
+    * and isExcluded to check for no or an emtpy auth-constraint
+   */
+   @XmlTransient
+   public List<String> getRoleNames()
+   {
+      List<String> roleNames = Collections.emptyList();
+      if (authConstraint != null && authConstraint.getRoleNames() != null)
+         roleNames = authConstraint.getRoleNames();
+      return roleNames;
+   }
+
    /**
     * Accessor for the UserDataConstraint.TransportGuarantee
     * @return UserDataConstraint.TransportGuarantee

Modified: projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/WebMetaData.java
===================================================================
--- projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/WebMetaData.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/main/java/org/jboss/metadata/web/spec/WebMetaData.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -21,12 +21,10 @@
  */
 package org.jboss.metadata.web.spec;
 
-import java.util.Collections;
 import java.util.List;
 
 import javax.xml.bind.annotation.XmlElement;
 
-import org.jboss.metadata.ejb.spec.SecurityIdentityMetaData;
 import org.jboss.metadata.javaee.spec.EJBLocalReferenceMetaData;
 import org.jboss.metadata.javaee.spec.EJBLocalReferencesMetaData;
 import org.jboss.metadata.javaee.spec.EJBReferenceMetaData;
@@ -37,7 +35,6 @@
 import org.jboss.metadata.javaee.spec.EnvironmentEntryMetaData;
 import org.jboss.metadata.javaee.spec.EnvironmentRefsGroupMetaData;
 import org.jboss.metadata.javaee.spec.LifecycleCallbacksMetaData;
-import org.jboss.metadata.javaee.spec.MessageDestinationMetaData;
 import org.jboss.metadata.javaee.spec.MessageDestinationReferenceMetaData;
 import org.jboss.metadata.javaee.spec.MessageDestinationReferencesMetaData;
 import org.jboss.metadata.javaee.spec.MessageDestinationsMetaData;

Modified: projects/metadata/trunk/src/test/java/org/jboss/test/metadata/ejb/JBoss5xEverythingUnitTestCase.java
===================================================================
--- projects/metadata/trunk/src/test/java/org/jboss/test/metadata/ejb/JBoss5xEverythingUnitTestCase.java	2007-10-09 17:24:32 UTC (rev 65979)
+++ projects/metadata/trunk/src/test/java/org/jboss/test/metadata/ejb/JBoss5xEverythingUnitTestCase.java	2007-10-09 17:29:41 UTC (rev 65980)
@@ -26,6 +26,8 @@
 
 import junit.framework.Test;
 
+import org.jboss.metadata.common.jboss.WebserviceDescriptionsMetaData;
+import org.jboss.metadata.common.jboss.WebserviceDescriptionMetaData;
 import org.jboss.metadata.ejb.jboss.CommitOption;
 import org.jboss.metadata.ejb.jboss.ContainerConfigurationMetaData;
 import org.jboss.metadata.ejb.jboss.ContainerConfigurationsMetaData;
@@ -45,8 +47,6 @@
 import org.jboss.metadata.ejb.jboss.LoaderRepositoryMetaData;
 import org.jboss.metadata.ejb.jboss.ResourceManagerMetaData;
 import org.jboss.metadata.ejb.jboss.ResourceManagersMetaData;
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionMetaData;
-import org.jboss.metadata.ejb.jboss.WebserviceDescriptionsMetaData;
 import org.jboss.metadata.ejb.jboss.WebservicesMetaData;
 import org.jboss.metadata.ejb.jboss.JBossMetaDataWrapper;
 import org.jboss.metadata.ejb.spec.AssemblyDescriptorMetaData;




More information about the jboss-cvs-commits mailing list