[jboss-cvs] JBossAS SVN: r95653 - in projects/metadata/web/trunk: src/main/java/org/jboss/metadata/web/jboss and 3 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Oct 28 00:03:46 EDT 2009
Author: remy.maucherat at jboss.com
Date: 2009-10-28 00:03:46 -0400 (Wed, 28 Oct 2009)
New Revision: 95653
Modified:
projects/metadata/web/trunk/pom.xml
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/AnnotationsMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/CookieConfigMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMappingMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FiltersMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FormLoginConfigMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/JspConfigMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LocaleEncodingsMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LoginConfigMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/MultipartConfigMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMappingMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletsMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/SessionConfigMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Web30MetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebCommonMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebFragmentMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WelcomeFileListMetaData.java
projects/metadata/web/trunk/src/main/resources/schema/jboss-web_6_0.xsd
projects/metadata/web/trunk/src/main/resources/schema/jsp_2_2.xsd
projects/metadata/web/trunk/src/main/resources/schema/web-app_3_0.xsd
projects/metadata/web/trunk/src/main/resources/schema/web-common_3_0.xsd
projects/metadata/web/trunk/src/main/resources/schema/web-fragment_3_0.xsd
projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/WebApp6Everything_testEverything.xml
Log:
- Update to the new augment interface.
- Update schemas.
- Implement the merge TODOs.
Modified: projects/metadata/web/trunk/pom.xml
===================================================================
--- projects/metadata/web/trunk/pom.xml 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/pom.xml 2009-10-28 04:03:46 UTC (rev 95653)
@@ -94,13 +94,13 @@
<dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata-common</artifactId>
- <version>2.0.0.Alpha2</version>
+ <version>2.0.0.Alpha4</version>
</dependency>
<dependency>
<groupId>org.jboss.metadata</groupId>
<artifactId>jboss-metadata-common</artifactId>
- <version>2.0.0.Alpha2</version>
+ <version>2.0.0.Alpha4</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/jboss/JBossWebMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -779,7 +779,7 @@
if(srm.getPrincipals() != null)
for(String pr : srm.getPrincipals())
{
- Set<String> roleset = (Set<String>)principalRolesMap.get(pr);
+ Set<String> roleset = principalRolesMap.get(pr);
if(roleset == null)
roleset = new HashSet<String>();
if(!roleset.contains(rolename))
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/AnnotationsMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/AnnotationsMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/AnnotationsMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -22,12 +22,14 @@
package org.jboss.metadata.web.spec;
import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
/**
* @author Remy Maucherat
* @version $Revision: 65943 $
*/
public class AnnotationsMetaData extends AbstractMappedMetaData<AnnotationMetaData>
+ implements AugmentableMetaData<AnnotationsMetaData>
{
private static final long serialVersionUID = 1;
public AnnotationsMetaData()
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/CookieConfigMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/CookieConfigMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/CookieConfigMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -25,6 +25,7 @@
import javax.xml.bind.annotation.XmlType;
import org.jboss.metadata.javaee.spec.JavaEEMetaDataConstants;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -35,6 +36,7 @@
namespace=JavaEEMetaDataConstants.JAVAEE_NS,
propOrder={"name", "domain", "path", "comment", "httpOnly", "secure", "maxAge"})
public class CookieConfigMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<CookieConfigMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMappingMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMappingMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMappingMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -28,6 +28,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -38,6 +39,7 @@
*/
@XmlType(name="filter-mappingType", propOrder={"filterName", "urlPatterns", "servletNames", "dispatchers"})
public class FilterMappingMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<FilterMappingMetaData>
{
private static final long serialVersionUID = 1;
private String filterName;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FilterMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -29,6 +29,7 @@
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.jboss.metadata.javaee.spec.ParamValueMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.NamedMetaDataWithDescriptionGroup;
/**
@@ -37,6 +38,7 @@
*/
@XmlType(name="filterType", propOrder={"descriptionGroup", "filterName", "filterClass", "asyncSupported", "initParam"})
public class FilterMetaData extends NamedMetaDataWithDescriptionGroup
+ implements AugmentableMetaData<FilterMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FiltersMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FiltersMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FiltersMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -22,12 +22,14 @@
package org.jboss.metadata.web.spec;
import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
/**
* @author Scott.Stark at jboss.org
* @version $Revision: 65928 $
*/
-public class FiltersMetaData extends AbstractMappedMetaData<FilterMetaData>
+public class FiltersMetaData extends AbstractMappedMetaData<FilterMetaData>
+ implements AugmentableMetaData<FiltersMetaData>
{
private static final long serialVersionUID = 1;
public FiltersMetaData()
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FormLoginConfigMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FormLoginConfigMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/FormLoginConfigMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -24,6 +24,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -32,6 +33,7 @@
*/
@XmlType(name="form-login-configType", propOrder={"loginPage", "errorPage"})
public class FormLoginConfigMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<FormLoginConfigMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/JspConfigMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/JspConfigMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/JspConfigMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -27,6 +27,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -36,6 +37,7 @@
*/
@XmlType(name="jsp-configType", propOrder={"taglibs", "propertyGroups"})
public class JspConfigMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<JspConfigMetaData>
{
private static final long serialVersionUID = 1;
private List<TaglibMetaData> taglib;
@@ -117,15 +119,10 @@
}
else if (webFragmentMetaData.getPropertyGroups() != null)
{
- // TODO: conflict detection (maybe if there's a url pattern in common between two
- // property groups ?)
- // TODO: possible method: add to a temp map keyed by pattern
+ // JSP property groups are additive
List<JspPropertyGroupMetaData> mergedPropertyGroups = new ArrayList<JspPropertyGroupMetaData>();
for (JspPropertyGroupMetaData propertyGroup : webFragmentMetaData.getPropertyGroups())
{
- // TODO: conflict check here, and augment in JspPropertyGroupMetaData
- // Very complex: single elements conflict (lots of them ...), include prelude and coda
- // should be additive
mergedPropertyGroups.add(propertyGroup);
}
for (JspPropertyGroupMetaData propertyGroup : getPropertyGroups())
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LocaleEncodingsMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LocaleEncodingsMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LocaleEncodingsMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -26,6 +26,7 @@
import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -33,6 +34,7 @@
* @version $Revision: 75470 $
*/
public class LocaleEncodingsMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<LocaleEncodingsMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LoginConfigMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LoginConfigMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/LoginConfigMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -23,6 +23,7 @@
import javax.xml.bind.annotation.XmlType;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -31,6 +32,7 @@
*/
@XmlType(name="login-configType", propOrder={"authMethod", "realmName", "formLoginConfig"})
public class LoginConfigMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<LoginConfigMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/MultipartConfigMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/MultipartConfigMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/MultipartConfigMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -23,6 +23,7 @@
import javax.xml.bind.annotation.XmlType;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -32,6 +33,7 @@
*/
@XmlType(name="multipart-configType", propOrder={"location", "maxFileSize", "maxRequestSize", "fileSizeThreshold"})
public class MultipartConfigMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<MultipartConfigMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMappingMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMappingMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMappingMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -27,6 +27,7 @@
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -37,6 +38,7 @@
*/
@XmlType(name="servlet-mappingType", propOrder={"servletName", "urlPatterns"})
public class ServletMappingMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<ServletMappingMetaData>
{
private static final long serialVersionUID = 1;
protected String servletName;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -31,6 +31,7 @@
import org.jboss.metadata.javaee.spec.RunAsMetaData;
import org.jboss.metadata.javaee.spec.SecurityRoleRefMetaData;
import org.jboss.metadata.javaee.spec.SecurityRoleRefsMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.MergeableMetaData;
import org.jboss.metadata.javaee.support.NamedMetaDataWithDescriptionGroup;
@@ -43,7 +44,7 @@
@XmlType(name="servletType", propOrder={"descriptionGroup", "servletName", "servletClass", "jspFile", "initParam", "loadOnStartup",
"enabled", "asyncSupported", "runAs", "securityRoleRefs", "multipartConfig"})
public class ServletMetaData extends NamedMetaDataWithDescriptionGroup
- implements MergeableMetaData<ServletMetaData>
+ implements MergeableMetaData<ServletMetaData>, AugmentableMetaData<ServletMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletsMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletsMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/ServletsMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -22,12 +22,14 @@
package org.jboss.metadata.web.spec;
import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
/**
* @author Scott.Stark at jboss.org
* @version $Revision: 65943 $
*/
public class ServletsMetaData extends AbstractMappedMetaData<ServletMetaData>
+ implements AugmentableMetaData<ServletsMetaData>
{
private static final long serialVersionUID = 1;
public ServletsMetaData()
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/SessionConfigMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/SessionConfigMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/SessionConfigMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -27,6 +27,7 @@
import javax.xml.bind.annotation.XmlType;
import org.jboss.metadata.javaee.spec.JavaEEMetaDataConstants;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -37,6 +38,7 @@
namespace=JavaEEMetaDataConstants.JAVAEE_NS,
propOrder={"sessionTimeout", "cookieConfig", "sessionTrackingModes"})
public class SessionConfigMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<SessionConfigMetaData>
{
private static final long serialVersionUID = 1;
private int sessionTimeout = 30;
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Web30MetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Web30MetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Web30MetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -25,7 +25,7 @@
normalizeSpace=true)
@XmlType(name="web-appType",
namespace=JavaEEMetaDataConstants.JAVAEE_NS,
- propOrder={"moduleName", "absoluteOrdering", "descriptionGroup", "name", "distributable", "contextParams", "filters", "filterMappings", "listeners", "servlets",
+ propOrder={"moduleName", "absoluteOrdering", "descriptionGroup", "distributable", "contextParams", "filters", "filterMappings", "listeners", "servlets",
"servletMappings", "sessionConfig", "mimeMappings", "welcomeFileList", "errorPages", "jspConfig", "securityConstraints",
"loginConfig", "securityRoles", "jndiEnvironmentRefsGroup", "messageDestinations", "localEncodings", "absoluteOrdering"})
public class Web30MetaData extends WebMetaData
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebCommonMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebCommonMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebCommonMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -31,6 +31,8 @@
import javax.xml.bind.annotation.XmlTransient;
import org.jboss.metadata.javaee.spec.AnnotatedEJBReferencesMetaData;
+import org.jboss.metadata.javaee.spec.DataSourceMetaData;
+import org.jboss.metadata.javaee.spec.DataSourcesMetaData;
import org.jboss.metadata.javaee.spec.EJBLocalReferenceMetaData;
import org.jboss.metadata.javaee.spec.EJBLocalReferencesMetaData;
import org.jboss.metadata.javaee.spec.EJBReferenceMetaData;
@@ -58,6 +60,7 @@
import org.jboss.metadata.javaee.spec.ServiceReferenceMetaData;
import org.jboss.metadata.javaee.spec.ServiceReferencesMetaData;
import org.jboss.metadata.javaee.support.AbstractMappedMetaData;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImplWithDescriptionGroup;
/**
@@ -66,7 +69,7 @@
* @version $Revision: 70996 $
*/
public class WebCommonMetaData extends IdMetaDataImplWithDescriptionGroup
- implements Environment
+ implements Environment, AugmentableMetaData<WebCommonMetaData>
{
private static final long serialVersionUID = 1;
@@ -89,7 +92,6 @@
private SecurityRolesMetaData securityRoles;
private WelcomeFileListMetaData welcomeFileList;
private LocaleEncodingsMetaData localEncodings;
- private String name;
/** The environment */
private EnvironmentRefsGroupMetaData jndiEnvironmentRefsGroup;
@@ -344,6 +346,18 @@
this.jndiEnvironmentRefsGroup = env;
}
+ public DataSourceMetaData getDataSourceByName(String name)
+ {
+ return AbstractMappedMetaData.getByName(name, getDataSources());
+ }
+
+ public DataSourcesMetaData getDataSources()
+ {
+ if (jndiEnvironmentRefsGroup != null)
+ return jndiEnvironmentRefsGroup.getDataSources();
+ return null;
+ }
+
public EJBLocalReferenceMetaData getEjbLocalReferenceByName(String name)
{
return AbstractMappedMetaData.getByName(name, getEjbLocalReferences());
@@ -367,7 +381,7 @@
return jndiEnvironmentRefsGroup.getEjbReferences();
return null;
}
- // TODO?
+
@XmlTransient
public AnnotatedEJBReferencesMetaData getAnnotatedEjbReferences()
{
@@ -485,16 +499,6 @@
this.messageDestinations = messageDestinations;
}
- public String getName()
- {
- return name;
- }
- @XmlElement(name="name")
- public void setName(String name)
- {
- this.name = name;
- }
-
public AnnotationsMetaData getAnnotations()
{
return annotations;
@@ -519,7 +523,7 @@
* then as all conflict will be resolved in favor of this object, webMetaData
* will not be used and can be null
*/
- public void augment(WebCommonMetaData webFragmentMetaData, WebMetaData webMetaData, boolean resolveConflicts)
+ public void augment(WebCommonMetaData webFragmentMetaData, WebCommonMetaData webMetaData, boolean resolveConflicts)
{
// Distributable
@@ -846,14 +850,43 @@
else if (webFragmentMetaData.getSecurityConstraints() != null)
{
List<SecurityConstraintMetaData> mergedSecurityConstraints = new ArrayList<SecurityConstraintMetaData>();
+ // No conflict, but URL patterns which are already present are ignored
Set<String> urlPatterns = new HashSet<String>();
- // TODO: URL patterns which are already present are ignored (pending actual spec update)
for (SecurityConstraintMetaData securityConstraint : getSecurityConstraints())
{
mergedSecurityConstraints.add(securityConstraint);
+ // Collect URL patterns for existing constraints
+ if (securityConstraint.getResourceCollections() != null)
+ {
+ for (WebResourceCollectionMetaData wrc : securityConstraint.getResourceCollections())
+ {
+ if (wrc.getUrlPatterns() != null)
+ {
+ urlPatterns.addAll(wrc.getUrlPatterns());
+ }
+ }
+ }
}
for (SecurityConstraintMetaData securityConstraint : webFragmentMetaData.getSecurityConstraints())
{
+ if (securityConstraint.getResourceCollections() != null && urlPatterns.size() > 0)
+ {
+ for (WebResourceCollectionMetaData wrc : securityConstraint.getResourceCollections())
+ {
+ if (wrc.getUrlPatterns() != null)
+ {
+ List<String> newUrlPatterns = new ArrayList<String>();
+ for (String urlPattern : wrc.getUrlPatterns())
+ {
+ if (!urlPatterns.contains(urlPattern))
+ {
+ newUrlPatterns.add(urlPattern);
+ }
+ }
+ wrc.setUrlPatterns(newUrlPatterns);
+ }
+ }
+ }
mergedSecurityConstraints.add(securityConstraint);
}
setSecurityConstraints(mergedSecurityConstraints);
@@ -892,30 +925,26 @@
}
// All ENC elements except message destinations
- // The default override merge applies to these elements
- if (webFragmentMetaData.getJndiEnvironmentRefsGroup() != null)
+ if (getJndiEnvironmentRefsGroup() == null)
{
- if (getJndiEnvironmentRefsGroup() != null)
- {
- getJndiEnvironmentRefsGroup().merge((webMetaData != null) ? webMetaData.getJndiEnvironmentRefsGroup() : null,
- webFragmentMetaData.getJndiEnvironmentRefsGroup(), "web.xml", "web-fragment.xml", !resolveConflicts);
- }
- else
- {
+ if (webFragmentMetaData.getJndiEnvironmentRefsGroup() != null)
setJndiEnvironmentRefsGroup(webFragmentMetaData.getJndiEnvironmentRefsGroup());
- }
}
+ else if (webFragmentMetaData.getJndiEnvironmentRefsGroup() != null)
+ {
+ getJndiEnvironmentRefsGroup().augment(webFragmentMetaData.getJndiEnvironmentRefsGroup(),
+ (webMetaData != null) ? webMetaData.getJndiEnvironmentRefsGroup() : null, resolveConflicts);
+ }
// Message destinations
- // The default override merge applies to this elements
if (getMessageDestinations() == null)
{
setMessageDestinations(webFragmentMetaData.getMessageDestinations());
}
else if (webFragmentMetaData.getMessageDestinations() != null)
{
- getMessageDestinations().merge((webMetaData != null) ? webMetaData.getMessageDestinations() : null,
- webFragmentMetaData.getMessageDestinations());
+ getMessageDestinations().augment(webFragmentMetaData.getMessageDestinations(),
+ (webMetaData != null) ? webMetaData.getMessageDestinations() : null, resolveConflicts);
}
// Annotations
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebFragmentMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebFragmentMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WebFragmentMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -22,6 +22,7 @@
package org.jboss.metadata.web.spec;
import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
@@ -36,6 +37,7 @@
private OrderingMetaData ordering;
private boolean metadataComplete;
+ private String name;
public OrderingMetaData getOrdering()
{
@@ -55,4 +57,15 @@
{
this.metadataComplete = metadataComplete;
}
+
+ public String getName()
+ {
+ return name;
+ }
+ @XmlElement(name="name")
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
}
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WelcomeFileListMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WelcomeFileListMetaData.java 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/WelcomeFileListMetaData.java 2009-10-28 04:03:46 UTC (rev 95653)
@@ -26,6 +26,7 @@
import javax.xml.bind.annotation.XmlElement;
+import org.jboss.metadata.javaee.support.AugmentableMetaData;
import org.jboss.metadata.javaee.support.IdMetaDataImpl;
/**
@@ -34,6 +35,7 @@
* @version $Revision: 75470 $
*/
public class WelcomeFileListMetaData extends IdMetaDataImpl
+ implements AugmentableMetaData<WelcomeFileListMetaData>
{
private static final long serialVersionUID = 1;
Modified: projects/metadata/web/trunk/src/main/resources/schema/jboss-web_6_0.xsd
===================================================================
--- projects/metadata/web/trunk/src/main/resources/schema/jboss-web_6_0.xsd 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/resources/schema/jboss-web_6_0.xsd 2009-10-28 04:03:46 UTC (rev 95653)
@@ -65,7 +65,7 @@
</xsd:annotation>
<xsd:import namespace="http://java.sun.com/xml/ns/javaee" schemaLocation="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"/>
- <xsd:include schemaLocation="http://www.jboss.org/j2ee/schema/jboss-common_5_1.xsd"/>
+ <xsd:include schemaLocation="http://www.jboss.org/j2ee/schema/jboss-common_6_0.xsd"/>
<xsd:element name="jboss-web" type="jboss:jboss-webType">
<xsd:annotation>
Modified: projects/metadata/web/trunk/src/main/resources/schema/jsp_2_2.xsd
===================================================================
--- projects/metadata/web/trunk/src/main/resources/schema/jsp_2_2.xsd 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/resources/schema/jsp_2_2.xsd 2009-10-28 04:03:46 UTC (rev 95653)
@@ -1,52 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
-
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="2.2">
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.2">
<xsd:annotation>
<xsd:documentation>
- @(#)jsp_2_2.xsds 02/26/09
+
+ $Id$
+
</xsd:documentation>
</xsd:annotation>
<xsd:annotation>
<xsd:documentation>
- Copyright 2003-2009 Sun Microsystems, Inc.
- 4150 Network Circle
- Santa Clara, California 95054
- U.S.A
- All rights reserved.
-
- Sun Microsystems, Inc. has intellectual property rights
- relating to technology described in this document. In
- particular, and without limitation, these intellectual
- property rights may include one or more of the U.S. patents
- listed at http://www.sun.com/patents and one or more
- additional patents or pending patent applications in the
- U.S. and other countries.
-
- This document and the technology which it describes are
- distributed under licenses restricting their use, copying,
- distribution, and decompilation. No part of this document
- may be reproduced in any form by any means without prior
- written authorization of Sun and its licensors, if any.
-
- Third-party software, including font technology, is
- copyrighted and licensed from Sun suppliers.
-
- Sun, Sun Microsystems, the Sun logo, Solaris, Java, J2EE,
- JavaServer Pages, Enterprise JavaBeans and the Java Coffee
- Cup logo are trademarks or registered trademarks of Sun
- Microsystems, Inc. in the U.S. and other countries.
-
- Federal Acquisitions: Commercial Software - Government Users
- Subject to Standard License Terms and Conditions.
-
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+
+ Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
+
+ The contents of this file are subject to the terms of either the
+ GNU General Public License Version 2 only ("GPL") or the Common
+ Development and Distribution License("CDDL") (collectively, the
+ "License"). You may not use this file except in compliance with
+ the License. You can obtain a copy of the License at
+ https://glassfish.dev.java.net/public/CDDL+GPL.html or
+ glassfish/bootstrap/legal/LICENSE.txt. See the License for the
+ specific language governing permissions and limitations under the
+ License.
+
+ When distributing the software, include this License Header
+ Notice in each file and include the License file at
+ glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
+ particular file as subject to the "Classpath" exception as
+ provided by Sun in the GPL Version 2 section of the License file
+ that accompanied this code. If applicable, add the following
+ below the License Header, with the fields enclosed by brackets []
+ replaced by your own identifying information:
+ "Portions Copyrighted [year] [name of copyright owner]"
+
+ Contributor(s):
+
+ If you wish your version of this file to be governed by only the
+ CDDL or only the GPL Version 2, indicate your decision by adding
+ "[Contributor] elects to include this software in this
+ distribution under the [CDDL or GPL Version 2] license." If you
+ don't indicate a single choice of license, a recipient has the
+ option to distribute your version of this file under either the
+ CDDL, the GPL Version 2 or to extend the choice of license to its
+ licensees as provided above. However, if you add GPL Version 2
+ code and therefore, elected the GPL Version 2 license, then the
+ option applies only if the new code is made subject to such
+ option by the copyright holder.
+
</xsd:documentation>
</xsd:annotation>
@@ -56,11 +64,11 @@
This is the XML Schema for the JSP 2.2 deployment descriptor
types. The JSP 2.2 schema contains all the special
structures and datatypes that are necessary to use JSP files
- from a web application.
-
- The contents of this schema is used by the web-app_3_0.xsd
- file to define JSP specific content.
-
+ from a web application.
+
+ The contents of this schema is used by the web-common_3_0.xsd
+ file to define JSP specific content.
+
</xsd:documentation>
</xsd:annotation>
@@ -69,16 +77,16 @@
The following conventions apply to all Java EE
deployment descriptor elements unless indicated otherwise.
-
+
- In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
</xsd:documentation>
</xsd:annotation>
@@ -91,203 +99,203 @@
<xsd:annotation>
<xsd:documentation>
- The jsp-configType is used to provide global configuration
- information for the JSP files in a web application. It has
- two subelements, taglib and jsp-property-group.
-
+ The jsp-configType is used to provide global configuration
+ information for the JSP files in a web application. It has
+ two subelements, taglib and jsp-property-group.
+
</xsd:documentation>
</xsd:annotation>
-
<xsd:sequence>
<xsd:element name="taglib"
- type="javaee:taglibType"
- minOccurs="0"
- maxOccurs="unbounded"/>
+ type="javaee:taglibType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
<xsd:element name="jsp-property-group"
- type="javaee:jsp-property-groupType"
- minOccurs="0"
- maxOccurs="unbounded"/>
+ type="javaee:jsp-property-groupType"
+ minOccurs="0"
+ maxOccurs="unbounded"/>
</xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
</xsd:complexType>
+
<!-- **************************************************** -->
<xsd:complexType name="jsp-fileType">
<xsd:annotation>
<xsd:documentation>
- The jsp-file element contains the full path to a JSP file
- within the web application beginning with a `/'.
-
+ The jsp-file element contains the full path to a JSP file
+ within the web application beginning with a `/'.
+
</xsd:documentation>
</xsd:annotation>
-
<xsd:simpleContent>
<xsd:restriction base="javaee:pathType"/>
</xsd:simpleContent>
</xsd:complexType>
+
<!-- **************************************************** -->
<xsd:complexType name="jsp-property-groupType">
<xsd:annotation>
<xsd:documentation>
- The jsp-property-groupType is used to group a number of
- files so they can be given global property information.
- All files so described are deemed to be JSP files. The
- following additional properties can be described:
-
- - Control whether EL is ignored.
- - Control whether scripting elements are invalid.
- - Indicate pageEncoding information.
- - Indicate that a resource is a JSP document (XML).
- - Prelude and Coda automatic includes.
- - Control whether the character sequence #{ is allowed
- when used as a String literal.
- - Control whether template text containing only
- whitespaces must be removed from the response output.
- - Indicate the default contentType information.
- - Indicate the default buffering model for JspWriter
- - Control whether error should be raised for the use of
- undeclared namespaces in a JSP page.
-
+ The jsp-property-groupType is used to group a number of
+ files so they can be given global property information.
+ All files so described are deemed to be JSP files. The
+ following additional properties can be described:
+
+ - Control whether EL is ignored.
+ - Control whether scripting elements are invalid.
+ - Indicate pageEncoding information.
+ - Indicate that a resource is a JSP document (XML).
+ - Prelude and Coda automatic includes.
+ - Control whether the character sequence #{ is allowed
+ when used as a String literal.
+ - Control whether template text containing only
+ whitespaces must be removed from the response output.
+ - Indicate the default contentType information.
+ - Indicate the default buffering model for JspWriter
+ - Control whether error should be raised for the use of
+ undeclared namespaces in a JSP page.
+
</xsd:documentation>
</xsd:annotation>
-
<xsd:sequence>
<xsd:group ref="javaee:descriptionGroup"/>
<xsd:element name="url-pattern"
- type="javaee:url-patternType"
- maxOccurs="unbounded"/>
+ type="javaee:url-patternType"
+ maxOccurs="unbounded"/>
<xsd:element name="el-ignored"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:true-falseType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
- Can be used to easily set the isELIgnored
- property of a group of JSP pages. By default, the
- EL evaluation is enabled for Web Applications using
- a Servlet 2.4 or greater web.xml, and disabled
- otherwise.
-
- </xsd:documentation>
- </xsd:annotation>
+ Can be used to easily set the isELIgnored
+ property of a group of JSP pages. By default, the
+ EL evaluation is enabled for Web Applications using
+ a Servlet 2.4 or greater web.xml, and disabled
+ otherwise.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="page-encoding"
- type="javaee:string"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:string"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
- The valid values of page-encoding are those of the
- pageEncoding page directive. It is a
- translation-time error to name different encodings
- in the pageEncoding attribute of the page directive
- of a JSP page and in a JSP configuration element
- matching the page. It is also a translation-time
- error to name different encodings in the prolog
- or text declaration of a document in XML syntax and
- in a JSP configuration element matching the document.
- It is legal to name the same encoding through
- mulitple mechanisms.
-
- </xsd:documentation>
- </xsd:annotation>
+ The valid values of page-encoding are those of the
+ pageEncoding page directive. It is a
+ translation-time error to name different encodings
+ in the pageEncoding attribute of the page directive
+ of a JSP page and in a JSP configuration element
+ matching the page. It is also a translation-time
+ error to name different encodings in the prolog
+ or text declaration of a document in XML syntax and
+ in a JSP configuration element matching the document.
+ It is legal to name the same encoding through
+ mulitple mechanisms.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="scripting-invalid"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:true-falseType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
- Can be used to easily disable scripting in a
- group of JSP pages. By default, scripting is
- enabled.
-
- </xsd:documentation>
- </xsd:annotation>
+ Can be used to easily disable scripting in a
+ group of JSP pages. By default, scripting is
+ enabled.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="is-xml"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:true-falseType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
- If true, denotes that the group of resources
- that match the URL pattern are JSP documents,
- and thus must be interpreted as XML documents.
- If false, the resources are assumed to not
- be JSP documents, unless there is another
- property group that indicates otherwise.
-
- </xsd:documentation>
- </xsd:annotation>
+ If true, denotes that the group of resources
+ that match the URL pattern are JSP documents,
+ and thus must be interpreted as XML documents.
+ If false, the resources are assumed to not
+ be JSP documents, unless there is another
+ property group that indicates otherwise.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="include-prelude"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:pathType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
- The include-prelude element is a context-relative
- path that must correspond to an element in the
- Web Application. When the element is present,
- the given path will be automatically included (as
- in an include directive) at the beginning of each
- JSP page in this jsp-property-group.
-
- </xsd:documentation>
- </xsd:annotation>
+ The include-prelude element is a context-relative
+ path that must correspond to an element in the
+ Web Application. When the element is present,
+ the given path will be automatically included (as
+ in an include directive) at the beginning of each
+ JSP page in this jsp-property-group.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="include-coda"
- type="javaee:pathType"
- minOccurs="0"
- maxOccurs="unbounded">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:pathType"
+ minOccurs="0"
+ maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>
- The include-coda element is a context-relative
- path that must correspond to an element in the
- Web Application. When the element is present,
- the given path will be automatically included (as
- in an include directive) at the end of each
- JSP page in this jsp-property-group.
-
- </xsd:documentation>
- </xsd:annotation>
+ The include-coda element is a context-relative
+ path that must correspond to an element in the
+ Web Application. When the element is present,
+ the given path will be automatically included (as
+ in an include directive) at the end of each
+ JSP page in this jsp-property-group.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="deferred-syntax-allowed-as-literal"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:true-falseType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
- The character sequence #{ is reserved for EL expressions.
- Consequently, a translation error occurs if the #{
- character sequence is used as a String literal, unless
- this element is enabled (true). Disabled (false) by
- default.
-
- </xsd:documentation>
- </xsd:annotation>
+ The character sequence #{ is reserved for EL expressions.
+ Consequently, a translation error occurs if the #{
+ character sequence is used as a String literal, unless
+ this element is enabled (true). Disabled (false) by
+ default.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="trim-directive-whitespaces"
- type="javaee:true-falseType"
- minOccurs="0">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:true-falseType"
+ minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>
- Indicates that template text containing only whitespaces
- must be removed from the response output. It has no
- effect on JSP documents (XML syntax). Disabled (false)
- by default.
-
- </xsd:documentation>
- </xsd:annotation>
+ Indicates that template text containing only whitespaces
+ must be removed from the response output. It has no
+ effect on JSP documents (XML syntax). Disabled (false)
+ by default.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
<xsd:element name="default-content-type"
type="javaee:string"
@@ -299,7 +307,7 @@
contentType page directive. It specifies the default
response contentType if the page directive does not include
a contentType attribute.
-
+
</xsd:documentation>
</xsd:annotation>
</xsd:element>
@@ -313,7 +321,7 @@
buffer page directive. It specifies if buffering should be
used for the output to response, and if so, the size of the
buffer to use.
-
+
</xsd:documentation>
</xsd:annotation>
</xsd:element>
@@ -328,62 +336,62 @@
set to true, then an error must be raised during the translation
time when an undeclared tag is used in a JSP page. Disabled
(false) by default.
-
+
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
</xsd:complexType>
+
<!-- **************************************************** -->
<xsd:complexType name="taglibType">
<xsd:annotation>
<xsd:documentation>
- The taglibType defines the syntax for declaring in
- the deployment descriptor that a tag library is
- available to the application. This can be done
- to override implicit map entries from TLD files and
- from the container.
-
+ The taglibType defines the syntax for declaring in
+ the deployment descriptor that a tag library is
+ available to the application. This can be done
+ to override implicit map entries from TLD files and
+ from the container.
+
</xsd:documentation>
</xsd:annotation>
-
<xsd:sequence>
<xsd:element name="taglib-uri"
- type="javaee:string">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:string">
+ <xsd:annotation>
+ <xsd:documentation>
- A taglib-uri element describes a URI identifying a
- tag library used in the web application. The body
- of the taglib-uri element may be either an
- absolute URI specification, or a relative URI.
- There should be no entries in web.xml with the
- same taglib-uri value.
-
- </xsd:documentation>
- </xsd:annotation>
+ A taglib-uri element describes a URI identifying a
+ tag library used in the web application. The body
+ of the taglib-uri element may be either an
+ absolute URI specification, or a relative URI.
+ There should be no entries in web.xml with the
+ same taglib-uri value.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
-
<xsd:element name="taglib-location"
- type="javaee:pathType">
- <xsd:annotation>
- <xsd:documentation>
+ type="javaee:pathType">
+ <xsd:annotation>
+ <xsd:documentation>
- the taglib-location element contains the location
- (as a resource relative to the root of the web
- application) where to find the Tag Library
- Description file for the tag library.
-
- </xsd:documentation>
- </xsd:annotation>
+ the taglib-location element contains the location
+ (as a resource relative to the root of the web
+ application) where to find the Tag Library
+ Description file for the tag library.
+
+ </xsd:documentation>
+ </xsd:annotation>
</xsd:element>
-
</xsd:sequence>
- <xsd:attribute name="id" type="xsd:ID"/>
+ <xsd:attribute name="id"
+ type="xsd:ID"/>
</xsd:complexType>
</xsd:schema>
Modified: projects/metadata/web/trunk/src/main/resources/schema/web-app_3_0.xsd
===================================================================
--- projects/metadata/web/trunk/src/main/resources/schema/web-app_3_0.xsd 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/resources/schema/web-app_3_0.xsd 2009-10-28 04:03:46 UTC (rev 95653)
@@ -60,7 +60,7 @@
<xsd:annotation>
<xsd:documentation>
-<![CDATA[[
+ <![CDATA[[
This is the XML Schema for the Servlet 3.0 deployment descriptor.
The deployment descriptor must be named "WEB-INF/web.xml" in the
web application's war file. All Servlet deployment descriptors
@@ -85,7 +85,7 @@
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd
-]]>
+ ]]>
</xsd:documentation>
</xsd:annotation>
@@ -278,3 +278,4 @@
</xsd:element>
</xsd:schema>
+
Modified: projects/metadata/web/trunk/src/main/resources/schema/web-common_3_0.xsd
===================================================================
--- projects/metadata/web/trunk/src/main/resources/schema/web-common_3_0.xsd 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/resources/schema/web-common_3_0.xsd 2009-10-28 04:03:46 UTC (rev 95653)
@@ -1581,3 +1581,4 @@
</xsd:complexType>
</xsd:schema>
+
Modified: projects/metadata/web/trunk/src/main/resources/schema/web-fragment_3_0.xsd
===================================================================
--- projects/metadata/web/trunk/src/main/resources/schema/web-fragment_3_0.xsd 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/main/resources/schema/web-fragment_3_0.xsd 2009-10-28 04:03:46 UTC (rev 95653)
@@ -1,14 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://java.sun.com/xml/ns/javaee"
- xmlns:javaee="http://java.sun.com/xml/ns/javaee"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="3.0">
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="3.0">
<xsd:annotation>
<xsd:documentation>
- @(#)web-fragment_3_0.xsds
+
+ $Id$
+
</xsd:documentation>
</xsd:annotation>
@@ -16,9 +18,9 @@
<xsd:documentation>
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
- Copyright 2003-2007 Sun Microsystems, Inc. All rights reserved.
-
+
+ Copyright 2003-2009 Sun Microsystems, Inc. All rights reserved.
+
The contents of this file are subject to the terms of either the
GNU General Public License Version 2 only ("GPL") or the Common
Development and Distribution License("CDDL") (collectively, the
@@ -28,7 +30,7 @@
glassfish/bootstrap/legal/LICENSE.txt. See the License for the
specific language governing permissions and limitations under the
License.
-
+
When distributing the software, include this License Header
Notice in each file and include the License file at
glassfish/bootstrap/legal/LICENSE.txt. Sun designates this
@@ -38,9 +40,9 @@
below the License Header, with the fields enclosed by brackets []
replaced by your own identifying information:
"Portions Copyrighted [year] [name of copyright owner]"
-
+
Contributor(s):
-
+
If you wish your version of this file to be governed by only the
CDDL or only the GPL Version 2, indicate your decision by adding
"[Contributor] elects to include this software in this
@@ -52,39 +54,38 @@
code and therefore, elected the GPL Version 2 license, then the
option applies only if the new code is made subject to such
option by the copyright holder.
-
+
</xsd:documentation>
</xsd:annotation>
<xsd:annotation>
<xsd:documentation>
- <![CDATA[
-
- This is the XML Schema for the Servlet 3.0 deployment descriptor.
- The deployment descriptor must be named "META-INF/web-fragment.xml" in the
- web fragment's jar file. All Servlet deployment descriptors
- must indicate the web fragment schema by using the Java EE
- namespace:
-
- http://java.sun.com/xml/ns/javaee
-
- and by indicating the version of the schema by
- using the version element as shown below:
-
- <web-fragment xmlns="http://java.sun.com/xml/ns/javaee"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="..."
- version="3.0">
- ...
- </web-fragment>
-
- The instance documents may indicate the published version of
- the schema using the xsi:schemaLocation attribute for Java EE
- namespace with the following location:
-
- http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd
-
- ]]>
+ <![CDATA[[
+ This is the XML Schema for the Servlet 3.0 deployment descriptor.
+ The deployment descriptor must be named "META-INF/web-fragment.xml"
+ in the web fragment's jar file. All Servlet deployment descriptors
+ must indicate the web application schema by using the Java EE
+ namespace:
+
+ http://java.sun.com/xml/ns/javaee
+
+ and by indicating the version of the schema by
+ using the version element as shown below:
+
+ <web-fragment xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="..."
+ version="3.0">
+ ...
+ </web-fragment>
+
+ The instance documents may indicate the published version of
+ the schema using the xsi:schemaLocation attribute for Java EE
+ namespace with the following location:
+
+ http://java.sun.com/xml/ns/javaee/web-fragment_3_0.xsd
+
+ ]]>
</xsd:documentation>
</xsd:annotation>
@@ -93,16 +94,16 @@
The following conventions apply to all Java EE
deployment descriptor elements unless indicated otherwise.
-
+
- In elements that specify a pathname to a file within the
- same JAR file, relative filenames (i.e., those not
- starting with "/") are considered relative to the root of
- the JAR file's namespace. Absolute filenames (i.e., those
- starting with "/") also specify names in the root of the
- JAR file's namespace. In general, relative names are
- preferred. The exception is .war files where absolute
- names are preferred for consistency with the Servlet API.
-
+ same JAR file, relative filenames (i.e., those not
+ starting with "/") are considered relative to the root of
+ the JAR file's namespace. Absolute filenames (i.e., those
+ starting with "/") also specify names in the root of the
+ JAR file's namespace. In general, relative names are
+ preferred. The exception is .war files where absolute
+ names are preferred for consistency with the Servlet API.
+
</xsd:documentation>
</xsd:annotation>
@@ -111,178 +112,168 @@
<!-- **************************************************** -->
- <xsd:element name="web-fragment" type="javaee:web-fragmentType">
+ <xsd:element name="web-fragment"
+ type="javaee:web-fragmentType">
<xsd:annotation>
<xsd:documentation>
- The web-fragment element is the root of the deployment
- descriptor for a web fragment. Note that the sub-elements
- of this element can be in the arbitrary order. Because of
- that, the multiplicity of the elements of distributable,
- session-config, welcome-file-list, jsp-config, login-config,
- and locale-encoding-mapping-list was changed from "?" to "*"
- in this schema. However, the deployment descriptor instance
- file must not contain multiple elements of session-config,
- jsp-config, and login-config. When there are multiple elements of
- welcome-file-list or locale-encoding-mapping-list, the container
- must concatenate the element contents. The multiple occurence
- of the element distributable is redundant and the container
- treats that case exactly in the same way when there is only
- one distributable.
-
+ The web-fragment element is the root of the deployment
+ descriptor for a web fragment. Note that the sub-elements
+ of this element can be in the arbitrary order. Because of
+ that, the multiplicity of the elements of distributable,
+ session-config, welcome-file-list, jsp-config, login-config,
+ and locale-encoding-mapping-list was changed from "?" to "*"
+ in this schema. However, the deployment descriptor instance
+ file must not contain multiple elements of session-config,
+ jsp-config, and login-config. When there are multiple elements of
+ welcome-file-list or locale-encoding-mapping-list, the container
+ must concatenate the element contents. The multiple occurence
+ of the element distributable is redundant and the container
+ treats that case exactly in the same way when there is only
+ one distributable.
+
</xsd:documentation>
</xsd:annotation>
-
<xsd:unique name="web-common-servlet-name-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The servlet element contains the name of a servlet.
- The name must be unique within the web application.
-
- </xsd:documentation>
+ The servlet element contains the name of a servlet.
+ The name must be unique within the web application.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:servlet"/>
- <xsd:field xpath="javaee:servlet-name"/>
+ <xsd:field xpath="javaee:servlet-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-filter-name-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The filter element contains the name of a filter.
- The name must be unique within the web application.
-
- </xsd:documentation>
+ The filter element contains the name of a filter.
+ The name must be unique within the web application.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:filter"/>
- <xsd:field xpath="javaee:filter-name"/>
+ <xsd:field xpath="javaee:filter-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-ejb-local-ref-name-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The ejb-local-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the web
- application's environment and is relative to the
- java:comp/env context. The name must be unique within
- the web application.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
+ The ejb-local-ref-name element contains the name of an EJB
+ reference. The EJB reference is an entry in the web
+ application's environment and is relative to the
+ java:comp/env context. The name must be unique within
+ the web application.
+
+ It is recommended that name is prefixed with "ejb/".
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:ejb-local-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
+ <xsd:field xpath="javaee:ejb-ref-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-ejb-ref-name-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The ejb-ref-name element contains the name of an EJB
- reference. The EJB reference is an entry in the web
- application's environment and is relative to the
- java:comp/env context. The name must be unique within
- the web application.
-
- It is recommended that name is prefixed with "ejb/".
-
- </xsd:documentation>
+ The ejb-ref-name element contains the name of an EJB
+ reference. The EJB reference is an entry in the web
+ application's environment and is relative to the
+ java:comp/env context. The name must be unique within
+ the web application.
+
+ It is recommended that name is prefixed with "ejb/".
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:ejb-ref"/>
- <xsd:field xpath="javaee:ejb-ref-name"/>
+ <xsd:field xpath="javaee:ejb-ref-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-resource-env-ref-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The resource-env-ref-name element specifies the name of
- a resource environment reference; its value is the
- environment entry name used in the web application code.
- The name is a JNDI name relative to the java:comp/env
- context and must be unique within a web application.
-
- </xsd:documentation>
+ The resource-env-ref-name element specifies the name of
+ a resource environment reference; its value is the
+ environment entry name used in the web application code.
+ The name is a JNDI name relative to the java:comp/env
+ context and must be unique within a web application.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:resource-env-ref"/>
- <xsd:field xpath="javaee:resource-env-ref-name"/>
+ <xsd:field xpath="javaee:resource-env-ref-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-message-destination-ref-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The message-destination-ref-name element specifies the name of
- a message destination reference; its value is the
- environment entry name used in the web application code.
- The name is a JNDI name relative to the java:comp/env
- context and must be unique within a web application.
-
- </xsd:documentation>
+ The message-destination-ref-name element specifies the name of
+ a message destination reference; its value is the
+ environment entry name used in the web application code.
+ The name is a JNDI name relative to the java:comp/env
+ context and must be unique within a web application.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:message-destination-ref"/>
- <xsd:field xpath="javaee:message-destination-ref-name"/>
+ <xsd:field xpath="javaee:message-destination-ref-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-res-ref-name-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The res-ref-name element specifies the name of a
- resource manager connection factory reference. The name
- is a JNDI name relative to the java:comp/env context.
- The name must be unique within a web application.
-
- </xsd:documentation>
+ The res-ref-name element specifies the name of a
+ resource manager connection factory reference. The name
+ is a JNDI name relative to the java:comp/env context.
+ The name must be unique within a web application.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:resource-ref"/>
- <xsd:field xpath="javaee:res-ref-name"/>
+ <xsd:field xpath="javaee:res-ref-name"/>
</xsd:unique>
-
<xsd:unique name="web-common-env-entry-name-uniqueness">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The env-entry-name element contains the name of a web
- application's environment entry. The name is a JNDI
- name relative to the java:comp/env context. The name
- must be unique within a web application.
-
- </xsd:documentation>
+ The env-entry-name element contains the name of a web
+ application's environment entry. The name is a JNDI
+ name relative to the java:comp/env context. The name
+ must be unique within a web application.
+
+ </xsd:documentation>
</xsd:annotation>
-
<xsd:selector xpath="javaee:env-entry"/>
- <xsd:field xpath="javaee:env-entry-name"/>
+ <xsd:field xpath="javaee:env-entry-name"/>
</xsd:unique>
-
<xsd:key name="web-common-role-name-key">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- A role-name-key is specified to allow the references
- from the security-role-refs.
-
- </xsd:documentation>
+ A role-name-key is specified to allow the references
+ from the security-role-refs.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:security-role"/>
- <xsd:field xpath="javaee:role-name"/>
+ <xsd:field xpath="javaee:role-name"/>
</xsd:key>
-
<xsd:keyref name="web-common-role-name-references"
- refer="javaee:web-common-role-name-key">
+ refer="javaee:web-common-role-name-key">
<xsd:annotation>
- <xsd:documentation>
+ <xsd:documentation>
- The keyref indicates the references from
- security-role-ref to a specified role-name.
-
- </xsd:documentation>
+ The keyref indicates the references from
+ security-role-ref to a specified role-name.
+
+ </xsd:documentation>
</xsd:annotation>
<xsd:selector xpath="javaee:servlet/javaee:security-role-ref"/>
- <xsd:field xpath="javaee:role-link"/>
+ <xsd:field xpath="javaee:role-link"/>
</xsd:keyref>
</xsd:element>
Modified: projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/WebApp6Everything_testEverything.xml
===================================================================
--- projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/WebApp6Everything_testEverything.xml 2009-10-28 03:42:18 UTC (rev 95652)
+++ projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/WebApp6Everything_testEverything.xml 2009-10-28 04:03:46 UTC (rev 95653)
@@ -4,6 +4,8 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0" id="web-app-everything" metadata-complete="true">
+ <module-name>foo</module-name>
+
<absolute-ordering>
<name>foo1</name>
<name>foo2</name>
@@ -35,8 +37,6 @@
<large-icon>de-web-app-large-icon</large-icon>
</icon>
- <name>foo</name>
-
<distributable/>
<context-param id="context-param0">
More information about the jboss-cvs-commits
mailing list