[jboss-cvs] JBossAS SVN: r92679 - in projects/metadata/web/trunk/src: test/java/org/jboss/test/metadata/web and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Aug 21 13:33:00 EDT 2009
Author: remy.maucherat at jboss.com
Date: 2009-08-21 13:33:00 -0400 (Fri, 21 Aug 2009)
New Revision: 92679
Added:
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tag11MetaData.java
projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld11UnitTestCase.java
projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld12UnitTestCase.java
projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld11_testEverything.xml
projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld12_testEverything.xml
Modified:
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/TagMetaData.java
projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tld11MetaData.java
Log:
- Add two test cases for old TLDs (which fail, and I don't understand why).
- Try to handle the conflicts between the versions. Quite ugly, tld 1.1 is heavily incompatible with the newer ones.
Added: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tag11MetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tag11MetaData.java (rev 0)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tag11MetaData.java 2009-08-21 17:33:00 UTC (rev 92679)
@@ -0,0 +1,70 @@
+/*
+ * 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.spec;
+
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * taglib/tag metadata
+ *
+ * @author Remy Maucherat
+ * @version $Revision: 75201 $
+ */
+ at XmlType(name="tagType",
+ propOrder={"name", "tagclass", "teiclass", "bodycontent", "info", "attributes"})
+public class Tag11MetaData extends TagMetaData
+{
+ private static final long serialVersionUID = 1;
+
+ private String info;
+
+ @XmlElement(name="tagclass")
+ public void setTagclass(String tagClass)
+ {
+ super.setTagClass(tagClass);
+ }
+
+ @XmlElement(name="teiclass")
+ public void setTeiclass(String teiClass)
+ {
+ super.setTeiClass(teiClass);
+ }
+
+ @XmlElement(name="bodycontent")
+ public void setBodycontent(BodyContentType bodyContent)
+ {
+ super.setBodyContent(bodyContent);
+ }
+
+ public String getInfo()
+ {
+ return info;
+ }
+ public void setInfo(String info)
+ {
+ this.info = info;
+ }
+
+}
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/TagMetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/TagMetaData.java 2009-08-21 16:37:57 UTC (rev 92678)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/TagMetaData.java 2009-08-21 17:33:00 UTC (rev 92679)
@@ -60,11 +60,6 @@
{
this.tagClass = tagClass;
}
- @XmlElement(name="tagclass")
- public void setTagClass0(String tagClass)
- {
- setTagClass(tagClass);
- }
public String getTeiClass()
{
@@ -74,11 +69,6 @@
{
this.teiClass = teiClass;
}
- @XmlElement(name="teiclass")
- public void setTeiClass0(String teiClass)
- {
- setTeiClass(teiClass);
- }
public BodyContentType getBodyContent()
{
@@ -88,11 +78,6 @@
{
this.bodyContent = bodyContent;
}
- @XmlElement(name="bodycontent")
- public void setBodyContent0(BodyContentType bodyContent)
- {
- setBodyContent(bodyContent);
- }
public boolean getDynamicAttributes()
{
Modified: projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tld11MetaData.java
===================================================================
--- projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tld11MetaData.java 2009-08-21 16:37:57 UTC (rev 92678)
+++ projects/metadata/web/trunk/src/main/java/org/jboss/metadata/web/spec/Tld11MetaData.java 2009-08-21 17:33:00 UTC (rev 92679)
@@ -1,5 +1,7 @@
package org.jboss.metadata.web.spec;
+import java.util.List;
+
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlNs;
@@ -24,11 +26,14 @@
elementFormDefault=XmlNsForm.UNSET,
normalizeSpace=true)
@XmlType(name="tldTaglibType",
- propOrder={"tlibversion", "jspversion", "shortname", "uri", "descriptionGroup", "tags"})
+ propOrder={"tlibversion", "jspversion", "shortname", "uri", "info", "tags"})
public class Tld11MetaData extends TldMetaData
{
private static final long serialVersionUID = 1;
+ private String info;
+ private List<Tag11MetaData> tags;
+
@Override
public String getVersion()
{
@@ -53,4 +58,19 @@
super.setShortName(shortName);
}
+ public String getInfo()
+ {
+ return info;
+ }
+ public void setInfo(String info)
+ {
+ this.info = info;
+ }
+
+ @XmlElement(name="tag")
+ public void setTags0(List<Tag11MetaData> tags)
+ {
+ this.tags = tags;
+ }
+
}
Added: projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld11UnitTestCase.java
===================================================================
--- projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld11UnitTestCase.java (rev 0)
+++ projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld11UnitTestCase.java 2009-08-21 17:33:00 UTC (rev 92679)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.test.metadata.web;
+
+import org.jboss.metadata.web.spec.Tld11MetaData;
+import org.jboss.metadata.web.spec.TldMetaData;
+import org.jboss.test.metadata.javaee.AbstractJavaEEEverythingTest;
+
+/**
+ * Tests of 1.1 taglib elements
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 88255 $
+ */
+public class Tld11UnitTestCase extends AbstractJavaEEEverythingTest
+{
+
+ public Tld11UnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testEverything() throws Exception
+ {
+ TldMetaData taglib = unmarshal(TldMetaData.class);
+ }
+
+}
Added: projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld12UnitTestCase.java
===================================================================
--- projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld12UnitTestCase.java (rev 0)
+++ projects/metadata/web/trunk/src/test/java/org/jboss/test/metadata/web/Tld12UnitTestCase.java 2009-08-21 17:33:00 UTC (rev 92679)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2007, Red Hat Middleware LLC, 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.test.metadata.web;
+
+import org.jboss.metadata.web.spec.TldMetaData;
+import org.jboss.test.metadata.javaee.AbstractJavaEEEverythingTest;
+
+/**
+ * Tests of 1.2 taglib elements
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 88255 $
+ */
+public class Tld12UnitTestCase extends AbstractJavaEEEverythingTest
+{
+
+ public Tld12UnitTestCase(String name)
+ {
+ super(name);
+ }
+
+ public void testEverything() throws Exception
+ {
+ TldMetaData taglib = unmarshal(TldMetaData.class);
+ }
+
+}
Added: projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld11_testEverything.xml
===================================================================
--- projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld11_testEverything.xml (rev 0)
+++ projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld11_testEverything.xml 2009-08-21 17:33:00 UTC (rev 92679)
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
+ "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
+
+<!-- a tab library descriptor -->
+<taglib>
+
+ <tlibversion>1.0</tlibversion>
+ <jspversion>1.1</jspversion>
+ <shortname>simple</shortname>
+ <uri></uri>
+ <info>
+ A simple tab library for the examples
+ </info>
+
+ <tag>
+ <name>ShowSource</name>
+ <tagclass>examples.ShowSource</tagclass>
+ <info> Display JSP sources </info>
+ <attribute>
+ <name>jspFile</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <!-- A simple Tag -->
+ <!-- foo tag -->
+ <tag>
+ <name>foo</name>
+ <tagclass>examples.FooTag</tagclass>
+ <teiclass>examples.FooTagExtraInfo</teiclass>
+ <bodycontent>JSP</bodycontent>
+ <info>
+ Perform a server side action; uses 3 mandatory attributes
+ </info>
+
+ <attribute>
+ <name>att1</name>
+ <required>true</required>
+ </attribute>
+ <attribute>
+ <name>att2</name>
+ <required>true</required>
+ </attribute>
+ <attribute>
+ <name>att3</name>
+ <required>true</required>
+ </attribute>
+ </tag>
+
+ <!-- Another simple tag -->
+ <!-- log tag -->
+ <tag>
+ <name>log</name>
+ <tagclass>examples.LogTag</tagclass>
+ <bodycontent>TAGDEPENDENT</bodycontent>
+ <info>
+ Perform a server side action; Log the message.
+ </info>
+ <attribute>
+ <name>toBrowser</name>
+ <required>false</required>
+ </attribute>
+ </tag>
+
+</taglib>
Added: projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld12_testEverything.xml
===================================================================
--- projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld12_testEverything.xml (rev 0)
+++ projects/metadata/web/trunk/src/test/resources/org/jboss/test/metadata/web/Tld12_testEverything.xml 2009-08-21 17:33:00 UTC (rev 92679)
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements. See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<!DOCTYPE taglib
+ PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
+ "http://java.sun.com/j2ee/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib>
+
+ <tlib-version>1.0</tlib-version>
+ <jsp-version>1.2</jsp-version>
+ <short-name>simple</short-name>
+ <uri>http://jakarta.apache.org/tomcat/example-taglib</uri>
+ <description>
+ A simple tab library for the examples
+ </description>
+
+ <tag>
+ <name>ShowSource</name>
+ <tag-class>examples.ShowSource</tag-class>
+ <description> Display JSP sources </description>
+ <attribute>
+ <name>jspFile</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ </attribute>
+ </tag>
+
+ <!-- A simple Tag -->
+ <!-- foo tag -->
+ <tag>
+ <name>foo</name>
+ <tag-class>examples.FooTag</tag-class>
+ <tei-class>examples.FooTagExtraInfo</tei-class>
+ <body-content>JSP</body-content>
+ <description>
+ Perform a server side action; uses 3 mandatory attributes
+ </description>
+
+ <attribute>
+ <name>att1</name>
+ <required>true</required>
+ </attribute>
+ <attribute>
+ <name>att2</name>
+ <required>true</required>
+ </attribute>
+ <attribute>
+ <name>att3</name>
+ <required>true</required>
+ </attribute>
+ </tag>
+
+ <!-- Another simple tag -->
+ <!-- log tag -->
+ <tag>
+ <name>log</name>
+ <tag-class>examples.LogTag</tag-class>
+ <body-content>TAGDEPENDENT</body-content>
+ <description>
+ Perform a server side action; Log the message.
+ </description>
+ <attribute>
+ <name>toBrowser</name>
+ <required>false</required>
+ </attribute>
+ </tag>
+
+</taglib>
More information about the jboss-cvs-commits
mailing list