gatein SVN: r147 - in components/common/tags/2.0.0-Beta01: build and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-09-01 15:59:15 -0400 (Tue, 01 Sep 2009)
New Revision: 147
Modified:
components/common/tags/2.0.0-Beta01/build/pom.xml
components/common/tags/2.0.0-Beta01/common/pom.xml
components/common/tags/2.0.0-Beta01/mc/pom.xml
components/common/tags/2.0.0-Beta01/pom.xml
Log:
Changing pom versions to 2.0.0.Beta1
Modified: components/common/tags/2.0.0-Beta01/build/pom.xml
===================================================================
--- components/common/tags/2.0.0-Beta01/build/pom.xml 2009-09-01 19:55:14 UTC (rev 146)
+++ components/common/tags/2.0.0-Beta01/build/pom.xml 2009-09-01 19:59:15 UTC (rev 147)
@@ -10,7 +10,7 @@
<artifactId>module-parent</artifactId>
<packaging>pom</packaging>
<name>GateIn - Common component (parent)</name>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.0.0-Beta01</version>
<url>http://labs.jboss.com/jbossportal</url>
<properties>
Modified: components/common/tags/2.0.0-Beta01/common/pom.xml
===================================================================
--- components/common/tags/2.0.0-Beta01/common/pom.xml 2009-09-01 19:55:14 UTC (rev 146)
+++ components/common/tags/2.0.0-Beta01/common/pom.xml 2009-09-01 19:59:15 UTC (rev 147)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.0.0-Beta01</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/common/tags/2.0.0-Beta01/mc/pom.xml
===================================================================
--- components/common/tags/2.0.0-Beta01/mc/pom.xml 2009-09-01 19:55:14 UTC (rev 146)
+++ components/common/tags/2.0.0-Beta01/mc/pom.xml 2009-09-01 19:59:15 UTC (rev 147)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.gatein.common</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.0.0-Beta01</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/common/tags/2.0.0-Beta01/pom.xml
===================================================================
--- components/common/tags/2.0.0-Beta01/pom.xml 2009-09-01 19:55:14 UTC (rev 146)
+++ components/common/tags/2.0.0-Beta01/pom.xml 2009-09-01 19:59:15 UTC (rev 147)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>GateIn - Common component (aggregator)</name>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.0.0-Beta01</version>
<distributionManagement>
<repository>
15 years, 3 months
gatein SVN: r146 - components/common/tags.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-09-01 15:55:14 -0400 (Tue, 01 Sep 2009)
New Revision: 146
Added:
components/common/tags/2.0.0-Beta01/
Log:
Taggin common 2.0.0-Beta01
Copied: components/common/tags/2.0.0-Beta01 (from rev 145, components/common/trunk)
15 years, 3 months
gatein SVN: r145 - components/pc/trunk/test.
by do-not-reply@jboss.org
Author: thomas.heute(a)jboss.com
Date: 2009-09-01 12:59:52 -0400 (Tue, 01 Sep 2009)
New Revision: 145
Modified:
components/pc/trunk/test/pom.xml
Log:
Trying to get this path to work with newer versions of Maven... (2.2.1)
Modified: components/pc/trunk/test/pom.xml
===================================================================
--- components/pc/trunk/test/pom.xml 2009-09-01 13:21:58 UTC (rev 144)
+++ components/pc/trunk/test/pom.xml 2009-09-01 16:59:52 UTC (rev 145)
@@ -271,7 +271,7 @@
<property name="dependency.portal-portlet-portlet.jar" value="${maven.dependency.org.gatein.pc.pc-portlet.jar.path}"/>
<property name="dependency.portal-portlet-controller.jar" value="${maven.dependency.org.gatein.pc.pc-controller.jar.path}"/>
<property name="dependency.portal-portlet-mc.jar" value="${maven.dependency.org.gatein.pc.pc-mc.jar.path}"/>
- <property name="dependency.portal-portlet-tests.test-jar" value="${maven.dependency.org.gatein.pc.pc-portlet.tests.test-jar.path}"/>
+ <property name="dependency.portal-portlet-tests.test-jar" value="${maven.dependency.org.gatein.pc.pc-portlet.tests.jar.path}"/>
<property name="dependency.portal-portlet-api.jar" value="${maven.dependency.org.gatein.pc.pc-api.jar.path}"/>
<property name="dependency.jboss-unit.jar" value="${maven.dependency.org.jboss.unit.jboss-unit.jar.path}"/>
15 years, 3 months
gatein SVN: r144 - in components/pc/trunk: mc/src/main/java/org/gatein/pc/mc and 10 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-09-01 09:21:58 -0400 (Tue, 01 Sep 2009)
New Revision: 144
Modified:
components/pc/trunk/build/pom.xml
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/factory/PortletApplicationModelFactory.java
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication10MetaData.java
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication20MetaData.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomPortletModeTestEverythingTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomWindowStateTestEverythingTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/GeneralMetaDataTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/PortletTestEverythingTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/SecurityConstraintTestEverythingTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/UserAttributeTestEverythingTestCase.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/info/ContainerInfoBuilder.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomPortletModeMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomWindowStateMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/ListenerMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication10MetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication20MetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PublicRenderParameterMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/UserAttributeMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/ContainerRuntimeMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/InitParamMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionReferenceMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/filter/FilterMappingMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletInfoMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferenceMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferencesMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SecurityRoleRefMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SupportsMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/SecurityConstraintMetaData.java
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/UserDataConstraintMetaData.java
Log:
- add back JBoss XB version change for deploying in AS 5.1
Modified: components/pc/trunk/build/pom.xml
===================================================================
--- components/pc/trunk/build/pom.xml 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/build/pom.xml 2009-09-01 13:21:58 UTC (rev 144)
@@ -30,7 +30,7 @@
<version.javax.servlet.jsp>2.1</version.javax.servlet.jsp>
<version.apache.tomcat>5.5.12</version.apache.tomcat>
<version.jboss-logging>2.0.4.GA</version.jboss-logging>
- <version.jbossxb>2.0.0.GA</version.jbossxb>
+ <version.jbossxb>2.0.1.GA</version.jbossxb>
<version.jboss-remoting>2.5.0.GA</version.jboss-remoting>
<version.jboss.serialization>1.0.3.GA</version.jboss.serialization>
<version.gatein.common>2.0.0-SNAPSHOT</version.gatein.common>
@@ -39,7 +39,7 @@
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
<version.apache.commons-httpclient>3.0.1</version.apache.commons-httpclient>
- <version.jboss.microcontainer>2.0.2.GA</version.jboss.microcontainer>
+ <version.jboss.microcontainer>2.0.6.GA</version.jboss.microcontainer>
<version.jboss.reflect>2.0.2.GA</version.jboss.reflect>
<version.cargo>1.0.1-SNAPSHOT</version.cargo>
<version.junit>3.8.2</version.junit>
Modified: components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java
===================================================================
--- components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -54,7 +54,7 @@
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.resolver.MutableSchemaResolver;
import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
import java.io.IOException;
@@ -76,13 +76,13 @@
try
{
SingletonSchemaResolverFactory factory = SingletonSchemaResolverFactory.getInstance();
- DefaultSchemaResolver resolver = (DefaultSchemaResolver)factory.getSchemaBindingResolver();
+ MutableSchemaResolver resolver = factory.getSchemaBindingResolver();
/** SchemaResolver */
- resolver.addSchemaLocation(PORTLET_JSR_168_NS, "portlet-app_1_0.xsd");
- resolver.addSchemaLocation(PORTLET_JSR_286_NS, "portlet-app_2_0.xsd");
- resolver.addClassBinding(PORTLET_JSR_286_NS, AnnotationPortletApplication20MetaData.class);
- resolver.addClassBinding(PORTLET_JSR_168_NS, AnnotationPortletApplication10MetaData.class);
+ resolver.mapSchemaLocation(PORTLET_JSR_168_NS, "portlet-app_1_0.xsd");
+ resolver.mapSchemaLocation(PORTLET_JSR_286_NS, "portlet-app_2_0.xsd");
+ resolver.mapLocationToClass(PORTLET_JSR_286_NS, AnnotationPortletApplication20MetaData.class);
+ resolver.mapLocationToClass(PORTLET_JSR_168_NS, AnnotationPortletApplication10MetaData.class);
}
catch (Exception e)
{
Modified: components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/factory/PortletApplicationModelFactory.java
===================================================================
--- components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/factory/PortletApplicationModelFactory.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/factory/PortletApplicationModelFactory.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -722,7 +722,7 @@
UserDataConstraintMetaData md = (UserDataConstraintMetaData)object;
if ("transport-guarantee".equals(localName))
{
- md.setTransportQuarantee(TransportGuarantee.valueOf(value));
+ md.setTransportGuarantee(TransportGuarantee.valueOf(value));
}
}
Modified: components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication10MetaData.java
===================================================================
--- components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication10MetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication10MetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -37,7 +37,8 @@
* @version $Revision$
*/
@XmlRootElement(name = "portlet-app")
-@XmlType(name = "portlet-appType")
+@XmlType(name = "portlet-appType", propOrder={"portlets", "customPortletModes", "customWindowStates", "userAttributes",
+ "securityConstraints", "portletCollection"})
@JBossXmlSchema(xmlns = {@XmlNs(namespaceURI = PortletMetaDataConstants.PORTLET_JSR_168_NS, prefix = "portlet")},
ignoreUnresolvedFieldOrClass = false,
namespace = PortletMetaDataConstants.PORTLET_JSR_168_NS,
Modified: components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication20MetaData.java
===================================================================
--- components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication20MetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/impl/AnnotationPortletApplication20MetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -38,7 +38,9 @@
*/
@XmlRootElement(name = "portlet-app")
-@XmlType(name = "portlet-appType")
+@XmlType(name = "portlet-appType", propOrder={"portlets", "customPortletModes", "customWindowStates", "userAttributes",
+ "securityConstraints", "resourceBundle", "filters", "filterMapping", "defaultNamespace", "events",
+ "publicRenderParameters", "listeners", "containerRuntimeOptions"})
@JBossXmlSchema(xmlns = {@XmlNs(namespaceURI = PortletMetaDataConstants.PORTLET_JSR_286_NS, prefix = "portlet")},
ignoreUnresolvedFieldOrClass = false,
namespace = PortletMetaDataConstants.PORTLET_JSR_286_NS,
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -39,8 +39,9 @@
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver;
+import org.jboss.xb.binding.resolver.MutableSchemaResolver;
import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+import org.jboss.xb.builder.JBossXBBuilder;
import org.xml.sax.SAXException;
import static org.jboss.unit.api.Assert.*;
import org.jboss.util.xml.JBossEntityResolver;
@@ -62,7 +63,7 @@
protected static SingletonSchemaResolverFactory factory;
/** The schema resolver. */
- protected static DefaultSchemaResolver resolver;
+ protected static MutableSchemaResolver resolver;
/** The unmarshaller. */
protected Unmarshaller unmarshaller = null;
@@ -81,17 +82,16 @@
try
{
factory = SingletonSchemaResolverFactory.getInstance();
- resolver = (DefaultSchemaResolver) factory.getSchemaBindingResolver();
+ resolver = factory.getSchemaBindingResolver();
- /** SchemaResolver */
- // The two following lines are not effective, we need for now to register xsd globally
-// resolver.addSchemaLocation(PORTLET_JSR_168_NS, "portlet-app_1_0.xsd");
-// resolver.addSchemaLocation(PORTLET_JSR_286_NS, "portlet-app_2_0.xsd");
JBossEntityResolver.registerEntity(PORTLET_JSR_168_NS, "metadata/portlet-app_1_0.xsd");
JBossEntityResolver.registerEntity(PORTLET_JSR_286_NS, "metadata/portlet-app_2_0.xsd");
- resolver.addClassBinding(PORTLET_JSR_286_NS, AnnotationPortletApplication20MetaData.class);
- resolver.addClassBinding(PORTLET_JSR_168_NS, AnnotationPortletApplication10MetaData.class);
+ /** SchemaResolver */
+ resolver.mapSchemaLocation(PORTLET_JSR_168_NS, "portlet-app_1_0.xsd");
+ resolver.mapSchemaLocation(PORTLET_JSR_286_NS, "portlet-app_2_0.xsd");
+ resolver.mapLocationToClass(PORTLET_JSR_286_NS, AnnotationPortletApplication20MetaData.class);
+ resolver.mapLocationToClass(PORTLET_JSR_168_NS, AnnotationPortletApplication10MetaData.class);
}
catch (Exception e)
{
@@ -103,7 +103,7 @@
{
if (ANNOTATION_BINDING.equals(parser))
{
- return this.unmarshallAnnotation(file);
+ return this.unmarshallAnnotation(file, AnnotationPortletApplication10MetaData.class);
}
else if (FACTORY_BINDING.equals(parser))
{
@@ -119,7 +119,7 @@
{
if (ANNOTATION_BINDING.equals(parser))
{
- return (PortletApplication20MetaData)this.unmarshallAnnotation(file);
+ return this.unmarshallAnnotation(file, AnnotationPortletApplication20MetaData.class);
}
else if (FACTORY_BINDING.equals(parser))
{
@@ -131,19 +131,6 @@
}
}
- private PortletApplication10MetaData unmarshallAnnotation(String file) throws JBossXBException, SAXException,
- IOException
- {
- /** validate */
- unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- unmarshaller.setNamespaceAware(true);
- unmarshaller.setSchemaValidation(true);
- unmarshaller.setValidation(true);
-
- /** unmarshal */
- return (PortletApplication10MetaData) unmarshaller.unmarshal(getPath(file), resolver);
- }
-
private PortletApplication10MetaData unmarshallWithFactory(String file) throws JBossXBException
{
/** validate */
@@ -158,6 +145,18 @@
null);
}
+ private <T> T unmarshallAnnotation(String file, Class<T> clazz) throws JBossXBException
+ {
+ /** validate */
+ unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setNamespaceAware(true);
+ unmarshaller.setSchemaValidation(true);
+ unmarshaller.setValidation(true);
+
+ /** unmarshal */
+ return clazz.cast(unmarshaller.unmarshal(getPath(file), JBossXBBuilder.build(clazz)));
+ }
+
protected String getPath(String file)
{
URL url = Thread.currentThread().getContextClassLoader().getResource(file);
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomPortletModeTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomPortletModeTestEverythingTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomPortletModeTestEverythingTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -63,8 +63,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e);
}
}
@@ -76,7 +75,7 @@
String xmlFile = "metadata/customPortletMode/portlet2.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication20MetaData md = unmarshall20(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -106,8 +105,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e);
}
}
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomWindowStateTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomWindowStateTestEverythingTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomWindowStateTestEverythingTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -76,7 +76,7 @@
String xmlFile = "metadata/customWindowState/portlet2.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication20MetaData md = unmarshall20(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/GeneralMetaDataTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/GeneralMetaDataTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/GeneralMetaDataTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -52,8 +52,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail("No exception expected");
+ fail(e, "No exception expected");
}
}
@@ -62,15 +61,14 @@
{
try
{
- PortletApplication10MetaData md = this.unmarshall10("metadata/general/portlet2.xml");
+ PortletApplication20MetaData md = unmarshall20("metadata/general/portlet2.xml");
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e, "No exception expected");
}
}
@@ -108,8 +106,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e, "No exception expected");
}
}
@@ -128,8 +125,7 @@
}
catch(Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e, "No exception expected");
}
}
@@ -138,14 +134,13 @@
{
try
{
- PortletApplication10MetaData md = this.unmarshall10("metadata/general/portlet-app_2_0.xml");
+ PortletApplication20MetaData md = this.unmarshall20("metadata/general/portlet-app_2_0.xml");
assertEquals("2.0", md.getVersion());
assertTrue(md instanceof PortletApplication20MetaData);
}
catch(Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e, "No exception expected");
}
}
}
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/PortletTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/PortletTestEverythingTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/PortletTestEverythingTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -224,7 +224,7 @@
{
String xmlFile = "metadata/portlet/portlet2.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication20MetaData md = this.unmarshall20(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -384,7 +384,7 @@
{
String xmlFile = "metadata/portlet/portlet2-jsr286.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication20MetaData md = this.unmarshall20(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/SecurityConstraintTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/SecurityConstraintTestEverythingTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/SecurityConstraintTestEverythingTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -56,7 +56,7 @@
assertNotNull(scd1);
assertEquals("test", scd1.getDisplayName().getDefaultString());
assertEquals("Test", scd1.getDisplayName().getString(new Locale("de"), false));
- assertEquals(TransportGuarantee.NONE, scd1.getUserDataConstraint().getTransportQuarantee());
+ assertEquals(TransportGuarantee.NONE, scd1.getUserDataConstraint().getTransportGuarantee());
assertEquals("foo", scd1.getPortletList().getPortletNames().get(0));
assertEquals("foobar", scd1.getPortletList().getPortletNames().get(1));
@@ -64,7 +64,7 @@
SecurityConstraintMetaData scd2 = md.getSecurityConstraints().get(1);
assertNotNull(scd2);
- assertEquals(TransportGuarantee.INTEGRAL, scd2.getUserDataConstraint().getTransportQuarantee());
+ assertEquals(TransportGuarantee.INTEGRAL, scd2.getUserDataConstraint().getTransportGuarantee());
assertEquals("foo", scd2.getPortletList().getPortletNames().get(0));
assertEquals("fooConstraint", scd1.getUserDataConstraint().getDescription().getDefaultString());
assertEquals("FooConstraint", scd1.getUserDataConstraint().getDescription().getString(new Locale("de"), false));
@@ -137,7 +137,7 @@
String xmlFile = "metadata/security/portlet2.xml";
- PortletApplication10MetaData md = unmarshall10( xmlFile);
+ PortletApplication20MetaData md = this.unmarshall20( xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -148,14 +148,14 @@
assertEquals("Test", scd1.getDisplayName().getString(new Locale("de"), false));
assertEquals("foo", scd1.getId());
- assertEquals(TransportGuarantee.NONE, scd1.getUserDataConstraint().getTransportQuarantee());
+ assertEquals(TransportGuarantee.NONE, scd1.getUserDataConstraint().getTransportGuarantee());
assertEquals("foo", scd1.getPortletList().getPortletNames().get(0));
assertEquals("foobar", scd1.getPortletList().getPortletNames().get(1));
SecurityConstraintMetaData scd2 = md.getSecurityConstraints().get(1);
assertNotNull(scd2);
- assertEquals(TransportGuarantee.INTEGRAL, scd2.getUserDataConstraint().getTransportQuarantee());
+ assertEquals(TransportGuarantee.INTEGRAL, scd2.getUserDataConstraint().getTransportGuarantee());
assertEquals("foo", scd2.getPortletList().getPortletNames().get(0));
assertEquals("fooConstraint", scd1.getUserDataConstraint().getDescription().getDefaultString());
assertEquals("FooConstraint", scd1.getUserDataConstraint().getDescription().getString(new Locale("de"), false));
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/UserAttributeTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/UserAttributeTestEverythingTestCase.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/UserAttributeTestEverythingTestCase.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -75,7 +75,7 @@
{
String xmlFile = "metadata/userAttribute/portlet2.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication20MetaData md = this.unmarshall20(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/info/ContainerInfoBuilder.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/info/ContainerInfoBuilder.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/info/ContainerInfoBuilder.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -835,7 +835,7 @@
{
if (securityConstraintMD.getPortletList().getPortletNames().contains(portletMD.getPortletName()))
{
- containerSecurity.addTransportGuarantee(securityConstraintMD.getUserDataConstraint().getTransportQuarantee());
+ containerSecurity.addTransportGuarantee(securityConstraintMD.getUserDataConstraint().getTransportGuarantee());
}
}
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomPortletModeMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomPortletModeMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomPortletModeMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -33,7 +33,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "custom-portlet-modeType")
+@XmlType(name = "custom-portlet-modeType", propOrder={"description", "portletMode", "portalManaged"})
public class CustomPortletModeMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomWindowStateMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomWindowStateMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/CustomWindowStateMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -32,7 +32,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "custom-window-stateType")
+@XmlType(name = "custom-window-stateType", propOrder={"description", "windowState"})
public class CustomWindowStateMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/ListenerMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/ListenerMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/ListenerMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -36,7 +36,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "listenerType")
+@XmlType(name = "listenerType", propOrder={"description", "displayName", "listenerClass"})
public class ListenerMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication10MetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication10MetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication10MetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -51,7 +51,8 @@
*/
@XmlRootElement(name = "portlet-app")
-@XmlType(name = "portlet-appType")
+@XmlType(name = "portlet-appType", propOrder={"portlets", "customPortletModes", "customWindowStates", "userAttributes",
+ "securityConstraints", "portletCollection"})
public class PortletApplication10MetaData
{
/** The portlet application id. */
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication20MetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication20MetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication20MetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -32,6 +32,7 @@
import java.util.Set;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import org.gatein.pc.portlet.impl.metadata.adapter.ContainerRuntimeAdapter;
@@ -45,6 +46,9 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
+@XmlType(name = "portlet-appType", propOrder={"portlets", "customPortletModes", "customWindowStates", "userAttributes",
+ "securityConstraints", "resourceBundle", "filters", "filterMapping", "defaultNamespace", "events",
+ "publicRenderParameters", "listeners", "containerRuntimeOptions"})
public class PortletApplication20MetaData extends PortletApplication10MetaData
{
/** The resource bundle (JSR 286) */
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PublicRenderParameterMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PublicRenderParameterMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PublicRenderParameterMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -36,7 +36,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "public-render-parameterType")
+@XmlType(name = "public-render-parameterType", propOrder={"description", "identifier", "name", "qname", "alias"})
public class PublicRenderParameterMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/UserAttributeMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/UserAttributeMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/UserAttributeMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -32,7 +32,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "user-attributeType")
+@XmlType(name = "user-attributeType", propOrder={"description", "name"})
public class UserAttributeMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/ContainerRuntimeMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/ContainerRuntimeMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/ContainerRuntimeMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -32,7 +32,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "container-runtime-optionType")
+@XmlType(name = "container-runtime-optionType", propOrder={"name", "values"})
public class ContainerRuntimeMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/InitParamMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/InitParamMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/common/InitParamMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -32,7 +32,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "init-paramType")
+@XmlType(name = "init-paramType", propOrder={"description", "name", "value"})
public class InitParamMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -38,7 +38,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "event-definitionType")
+@XmlType(name = "event-definitionType", propOrder={"description", "qname", "name", "alias", "valueType"})
public class EventDefinitionMetaData extends DescribableMetaData
{
/** The event definition id */
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionReferenceMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionReferenceMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/event/EventDefinitionReferenceMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -31,7 +31,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "event-definition-referenceType")
+@XmlType(name = "event-definition-referenceType", propOrder={"name", "qname"})
public class EventDefinitionReferenceMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/filter/FilterMappingMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/filter/FilterMappingMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/filter/FilterMappingMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -33,7 +33,7 @@
* @version $Revision$
*/
-@XmlType(name = "filter-mappingType")
+@XmlType(name = "filter-mappingType", propOrder={"name", "portletNames"})
public class FilterMappingMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletInfoMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletInfoMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletInfoMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -31,7 +31,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "portlet-infoType")
+@XmlType(name = "portlet-infoType", propOrder={"title", "shortTitle", "keywords"})
public class PortletInfoMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferenceMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferenceMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferenceMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -33,7 +33,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "portlet-preferenceType")
+@XmlType(name = "portlet-preferenceType", propOrder={"name", "value", "readOnly"})
public class PortletPreferenceMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferencesMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferencesMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/PortletPreferencesMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -37,7 +37,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "portlet-preferencesType")
+@XmlType(name = "portlet-preferencesType", propOrder={"portletPreferences", "preferenceValidator"})
public class PortletPreferencesMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SecurityRoleRefMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SecurityRoleRefMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SecurityRoleRefMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -34,7 +34,7 @@
* @version $Revision$
*/
-@XmlType(name = "security-role-refType")
+@XmlType(name = "security-role-refType", propOrder={"description", "roleName", "roleLink"})
public class SecurityRoleRefMetaData extends DescribableMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SupportsMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SupportsMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/portlet/SupportsMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -35,7 +35,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "supportsType")
+@XmlType(name = "supportsType", propOrder={"mimeType", "portletModes", "windowStates"})
public class SupportsMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/SecurityConstraintMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/SecurityConstraintMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/SecurityConstraintMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -34,7 +34,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "security-constraintType")
+@XmlType(name = "security-constraintType", propOrder={"displayName", "portletList", "userDataConstraint"})
public class SecurityConstraintMetaData
{
Modified: components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/UserDataConstraintMetaData.java
===================================================================
--- components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/UserDataConstraintMetaData.java 2009-09-01 12:04:37 UTC (rev 143)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/security/UserDataConstraintMetaData.java 2009-09-01 13:21:58 UTC (rev 144)
@@ -33,7 +33,7 @@
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-@XmlType(name = "user-data-constraint")
+@XmlType(name = "user-data-constraint", propOrder={"description", "transportGuarantee"})
public class UserDataConstraintMetaData extends DescribableMetaData
{
@@ -62,12 +62,12 @@
}
@XmlElement(name = "transport-guarantee")
- public TransportGuarantee getTransportQuarantee()
+ public TransportGuarantee getTransportGuarantee()
{
return transportQuarantee;
}
- public void setTransportQuarantee(TransportGuarantee transportQuarantee)
+ public void setTransportGuarantee(TransportGuarantee transportQuarantee)
{
this.transportQuarantee = transportQuarantee;
}
15 years, 3 months
gatein SVN: r143 - components/pc/trunk/samples/src/assemble.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-09-01 08:04:37 -0400 (Tue, 01 Sep 2009)
New Revision: 143
Modified:
components/pc/trunk/samples/src/assemble/samples-basic-portlet.xml
components/pc/trunk/samples/src/assemble/samples-eventdebug-portlet.xml
components/pc/trunk/samples/src/assemble/samples-google-portlet.xml
components/pc/trunk/samples/src/assemble/samples-jsp-portlet.xml
components/pc/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml
components/pc/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml
Log:
update samples to make them usable for teting
Modified: components/pc/trunk/samples/src/assemble/samples-basic-portlet.xml
===================================================================
--- components/pc/trunk/samples/src/assemble/samples-basic-portlet.xml 2009-09-01 11:35:37 UTC (rev 142)
+++ components/pc/trunk/samples/src/assemble/samples-basic-portlet.xml 2009-09-01 12:04:37 UTC (rev 143)
@@ -14,7 +14,7 @@
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes</outputDirectory>
<includes>
- <include>org/jboss/portal/portlet/samples/basic/**</include>
+ <include>org/gatein/pc/samples/basic/**</include>
</includes>
</fileSet>
</fileSets>
Modified: components/pc/trunk/samples/src/assemble/samples-eventdebug-portlet.xml
===================================================================
--- components/pc/trunk/samples/src/assemble/samples-eventdebug-portlet.xml 2009-09-01 11:35:37 UTC (rev 142)
+++ components/pc/trunk/samples/src/assemble/samples-eventdebug-portlet.xml 2009-09-01 12:04:37 UTC (rev 143)
@@ -14,7 +14,7 @@
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes</outputDirectory>
<includes>
- <include>org/jboss/portal/portlet/samples/eventdebug/**</include>
+ <include>org/gatein/pc/samples/eventdebug/**</include>
</includes>
</fileSet>
</fileSets>
Modified: components/pc/trunk/samples/src/assemble/samples-google-portlet.xml
===================================================================
--- components/pc/trunk/samples/src/assemble/samples-google-portlet.xml 2009-09-01 11:35:37 UTC (rev 142)
+++ components/pc/trunk/samples/src/assemble/samples-google-portlet.xml 2009-09-01 12:04:37 UTC (rev 143)
@@ -14,7 +14,7 @@
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes</outputDirectory>
<includes>
- <include>org/jboss/portal/portlet/samples/google/**</include>
+ <include>org/gatein/pc/samples/google/**</include>
</includes>
</fileSet>
</fileSets>
Modified: components/pc/trunk/samples/src/assemble/samples-jsp-portlet.xml
===================================================================
--- components/pc/trunk/samples/src/assemble/samples-jsp-portlet.xml 2009-09-01 11:35:37 UTC (rev 142)
+++ components/pc/trunk/samples/src/assemble/samples-jsp-portlet.xml 2009-09-01 12:04:37 UTC (rev 143)
@@ -14,7 +14,7 @@
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes</outputDirectory>
<includes>
- <include>org/jboss/portal/portlet/samples/jsp/**</include>
+ <include>org/gatein/pc/samples/jsp/**</include>
</includes>
</fileSet>
</fileSets>
Modified: components/pc/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml
===================================================================
--- components/pc/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml 2009-09-01 11:35:37 UTC (rev 142)
+++ components/pc/trunk/samples/src/assemble/samples-remotecontroller-portlet.xml 2009-09-01 12:04:37 UTC (rev 143)
@@ -14,7 +14,7 @@
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes</outputDirectory>
<includes>
- <include>org/jboss/portal/portlet/samples/remotecontroller/**</include>
+ <include>org/gatein/pc/samples/remotecontroller/**</include>
</includes>
</fileSet>
</fileSets>
Modified: components/pc/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml
===================================================================
--- components/pc/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml 2009-09-01 11:35:37 UTC (rev 142)
+++ components/pc/trunk/samples/src/assemble/samples-shoppingcart-portlet.xml 2009-09-01 12:04:37 UTC (rev 143)
@@ -14,7 +14,7 @@
<directory>target/classes</directory>
<outputDirectory>WEB-INF/classes</outputDirectory>
<includes>
- <include>org/jboss/portal/portlet/samples/shoppingcart/**</include>
+ <include>org/gatein/pc/samples/shoppingcart/**</include>
</includes>
</fileSet>
</fileSets>
15 years, 3 months
gatein SVN: r142 - in components/wci/trunk/wci/src: main/java/org/gatein/wci/command and 7 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2009-09-01 07:35:37 -0400 (Tue, 01 Sep 2009)
New Revision: 142
Added:
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericWebAppContext.java
Removed:
components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericServletContainerContext.java
components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericWebAppContext.java
Modified:
components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GateInServlet.java
components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java
components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandServlet.java
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6ServletContainerContext.java
components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6WebAppContext.java
components/wci/trunk/wci/src/test/resources/support/jboss-4.2-generic/server-war/WEB-INF/web.xml
components/wci/trunk/wci/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml
components/wci/trunk/wci/src/test/resources/support/jetty-6.1-generic/server-war/WEB-INF/web.xml
components/wci/trunk/wci/src/test/resources/support/tomcat-6.0-generic/server-war/WEB-INF/web.xml
Log:
GTNWCI-6 : Generic SPI implementation coexistence with native SPI implementations
Modified: components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GateInServlet.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GateInServlet.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GateInServlet.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -23,6 +23,8 @@
package org.gatein.wci.api;
import org.gatein.wci.command.CommandServlet;
+import org.gatein.wci.impl.generic.GenericServletContainerContext;
+import org.gatein.wci.impl.generic.GenericWebAppContext;
import javax.servlet.ServletException;
import javax.servlet.ServletContext;
@@ -42,16 +44,16 @@
{
try
{
- Method m = ServletContext.class.getMethod("getContextPath", new Class[0]);
+ Method m = ServletContext.class.getMethod("getContextPath");
ServletContext servletContext = getServletContext();
//
- String contextPath = (String)m.invoke(servletContext, new Object[0]);
+ String contextPath = (String)m.invoke(servletContext);
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
GenericWebAppContext webAppContext = new GenericWebAppContext(servletContext, contextPath, classLoader);
//
- GenericServletContainerContext.instance.register(webAppContext);
+ GenericServletContainerContext.register(webAppContext);
this.contextPath = contextPath;
}
catch (Exception e)
@@ -64,7 +66,7 @@
{
if (contextPath != null)
{
- GenericServletContainerContext.instance.unregister(contextPath);
+ GenericServletContainerContext.unregister(contextPath);
}
}
}
\ No newline at end of file
Deleted: components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericServletContainerContext.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericServletContainerContext.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericServletContainerContext.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -1,92 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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.gatein.wci.api;
-
-import org.gatein.wci.RequestDispatchCallback;
-import org.gatein.wci.impl.DefaultServletContainerFactory;
-import org.gatein.wci.spi.ServletContainerContext;
-import org.gatein.wci.command.CommandDispatcher;
-
-import javax.servlet.ServletContext;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-class GenericServletContainerContext implements ServletContainerContext
-{
-
- /** . */
- static final GenericServletContainerContext instance = new GenericServletContainerContext();
-
- /** . */
- private Registration registration;
-
- static
- {
- DefaultServletContainerFactory.registerContext(instance);
- }
-
- void register(GenericWebAppContext webAppContext)
- {
- if (registration != null)
- {
- registration.registerWebApp(webAppContext);
- }
- }
-
- void unregister(String webAppId)
- {
- if (registration != null)
- {
- registration.unregisterWebApp(webAppId);
- }
- }
-
- /** . */
- private final CommandDispatcher dispatcher = new CommandDispatcher();
-
- public Object include(
- ServletContext targetServletContext,
- HttpServletRequest request,
- HttpServletResponse response,
- RequestDispatchCallback callback,
- Object handback) throws ServletException, IOException
- {
- return dispatcher.include(targetServletContext, request, response, callback, handback);
- }
-
- public void setCallback(Registration registration)
- {
- this.registration = registration;
- }
-
- public void unsetCallback(Registration registration)
- {
- this.registration = null;
- }
-}
\ No newline at end of file
Deleted: components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericWebAppContext.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericWebAppContext.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericWebAppContext.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -1,81 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, 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.gatein.wci.api;
-
-import org.gatein.wci.spi.WebAppContext;
-
-import javax.servlet.ServletContext;
-import java.io.InputStream;
-import java.io.IOException;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-class GenericWebAppContext implements WebAppContext
-{
-
- /** . */
- private final ServletContext servletContext;
-
- /** . */
- private final String contextPath;
-
- /** . */
- private final ClassLoader classLoader;
-
- public GenericWebAppContext(ServletContext servletContext, String contextPath, ClassLoader classLoader)
- {
- this.servletContext = servletContext;
- this.contextPath = contextPath;
- this.classLoader = classLoader;
- }
-
- public void start() throws Exception
- {
- }
-
- public void stop()
- {
- }
-
- public ServletContext getServletContext()
- {
- return servletContext;
- }
-
- public ClassLoader getClassLoader()
- {
- return classLoader;
- }
-
- public String getContextPath()
- {
- return contextPath;
- }
-
- public boolean importFile(String parentDirRelativePath, String name, InputStream source, boolean overwrite) throws IOException
- {
- return false;
- }
-}
\ No newline at end of file
Modified: components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandDispatcher.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -37,7 +37,15 @@
public class CommandDispatcher
{
- public Object include(
+ /** . */
+ private final String servletPath;
+
+ public CommandDispatcher(String servletPath)
+ {
+ this.servletPath = servletPath;
+ }
+
+ public Object include(
ServletContext targetServletContext,
HttpServletRequest req,
HttpServletResponse resp,
@@ -47,7 +55,7 @@
CallbackCommand cmd = new CallbackCommand(targetServletContext, callback, handback);
//
- return CommandServlet.include(req, resp, cmd, targetServletContext);
+ return CommandServlet.include(servletPath, req, resp, cmd, targetServletContext);
}
public static class CallbackCommand
Modified: components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandServlet.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandServlet.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/command/CommandServlet.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -43,13 +43,13 @@
{
/** . */
- private static final ThreadLocal localCmd = new ThreadLocal();
+ private static final ThreadLocal<Object> localCmd = new ThreadLocal<Object>();
/** . */
- private static final ThreadLocal localResponse = new ThreadLocal();
+ private static final ThreadLocal<Object> localResponse = new ThreadLocal<Object>();
/** . */
- private static final ThreadLocal localThrowable = new ThreadLocal();
+ private static final ThreadLocal<Throwable> localThrowable = new ThreadLocal<Throwable>();
/**
* <p>Execute a command after having performed a request dispatch in the target servlet context.</p>
@@ -61,12 +61,17 @@
* <p>Any throwable thrown by the callback invocation will be wrapped in a <code>ServletException</code> and
* rethrown, unless it is an instance of <code>ServletException</code> or <code>IOException</code>.</p>
*
+ * @param servletPath the servlet path on which the command servlet is mapped
+ * @param request the servlet container request
+ * @param response the servlet container response
* @param callback the callback to invoke after the inclusion is done
* @param targetContext the target servlet context
+ * @return the object returned by the callback
* @throws IOException likely thrown by the request dispatch operation
* @throws ServletException wraps any exception thrown by the callback
*/
- public static Object include(
+ static Object include(
+ String servletPath,
HttpServletRequest request,
HttpServletResponse response,
Object callback,
@@ -75,11 +80,11 @@
try
{
localCmd.set(callback);
- RequestDispatcher switcher = targetContext.getRequestDispatcher("/gateinservlet");
+ RequestDispatcher switcher = targetContext.getRequestDispatcher(servletPath);
switcher.include(request, response);
//
- Throwable throwable = (Throwable)localThrowable.get();
+ Throwable throwable = localThrowable.get();
//
if (throwable != null)
@@ -127,7 +132,7 @@
HttpServletResponse.class});
//
- Object response = methods.invoke(cmd, new Object[]{req, resp});
+ Object response = methods.invoke(cmd, req, resp);
//
localResponse.set(response);
Copied: components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java (from rev 141, components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericServletContainerContext.java)
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java (rev 0)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericServletContainerContext.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -0,0 +1,141 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.gatein.wci.impl.generic;
+
+import org.gatein.wci.RequestDispatchCallback;
+import org.gatein.wci.impl.DefaultServletContainerFactory;
+import org.gatein.wci.spi.ServletContainerContext;
+import org.gatein.wci.command.CommandDispatcher;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletException;
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GenericServletContainerContext implements ServletContainerContext, ServletContextListener
+{
+
+ /** . */
+ private static final Map<String, GenericWebAppContext> pendingContexts = Collections.synchronizedMap(new HashMap<String, GenericWebAppContext>());
+
+ /** . */
+ private static GenericServletContainerContext instance;
+
+ public static GenericServletContainerContext getInstance()
+ {
+ return instance;
+ }
+
+ /** . */
+ private Registration registration;
+
+ public GenericServletContainerContext()
+ {
+ }
+
+ public static void register(GenericWebAppContext webAppContext)
+ {
+ if (instance != null && instance.registration != null)
+ {
+ instance.registration.registerWebApp(webAppContext);
+ }
+ else
+ {
+ pendingContexts.put(webAppContext.getContextPath(), webAppContext);
+ }
+ }
+
+ public static void unregister(String contextPath)
+ {
+ if (instance != null && instance.registration != null)
+ {
+ instance.registration.unregisterWebApp(contextPath);
+ }
+
+ //
+ if (pendingContexts.containsKey(contextPath))
+ {
+ pendingContexts.remove(contextPath);
+ }
+ }
+
+ /** . */
+ private final CommandDispatcher dispatcher = new CommandDispatcher("/gateinservlet");
+
+ public Object include(
+ ServletContext targetServletContext,
+ HttpServletRequest request,
+ HttpServletResponse response,
+ RequestDispatchCallback callback,
+ Object handback) throws ServletException, IOException
+ {
+ return dispatcher.include(targetServletContext, request, response, callback, handback);
+ }
+
+ public void setCallback(Registration registration)
+ {
+ this.registration = registration;
+
+ //
+ for (GenericWebAppContext pendingContext : pendingContexts.values())
+ {
+ registration.registerWebApp(pendingContext);
+ }
+ }
+
+ public void unsetCallback(Registration registration)
+ {
+ this.registration = null;
+ }
+
+ //
+
+ public void contextInitialized(ServletContextEvent servletContextEvent)
+ {
+ if (instance != null)
+ {
+ throw new IllegalStateException("Shared instance singleton already created");
+ }
+
+ //
+ instance = this;
+
+ // Register
+ DefaultServletContainerFactory.registerContext(this);
+ }
+
+ public void contextDestroyed(ServletContextEvent servletContextEvent)
+ {
+ // Should we really do something ?
+ }
+}
\ No newline at end of file
Copied: components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericWebAppContext.java (from rev 141, components/wci/trunk/wci/src/main/java/org/gatein/wci/api/GenericWebAppContext.java)
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericWebAppContext.java (rev 0)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/generic/GenericWebAppContext.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -0,0 +1,81 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, 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.gatein.wci.impl.generic;
+
+import org.gatein.wci.spi.WebAppContext;
+
+import javax.servlet.ServletContext;
+import java.io.InputStream;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class GenericWebAppContext implements WebAppContext
+{
+
+ /** . */
+ private final ServletContext servletContext;
+
+ /** . */
+ private final String contextPath;
+
+ /** . */
+ private final ClassLoader classLoader;
+
+ public GenericWebAppContext(ServletContext servletContext, String contextPath, ClassLoader classLoader)
+ {
+ this.servletContext = servletContext;
+ this.contextPath = contextPath;
+ this.classLoader = classLoader;
+ }
+
+ public void start() throws Exception
+ {
+ }
+
+ public void stop()
+ {
+ }
+
+ public ServletContext getServletContext()
+ {
+ return servletContext;
+ }
+
+ public ClassLoader getClassLoader()
+ {
+ return classLoader;
+ }
+
+ public String getContextPath()
+ {
+ return contextPath;
+ }
+
+ public boolean importFile(String parentDirRelativePath, String name, InputStream source, boolean overwrite) throws IOException
+ {
+ return false;
+ }
+}
\ No newline at end of file
Modified: components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6ServletContainerContext.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6ServletContainerContext.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6ServletContainerContext.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -57,7 +57,7 @@
private final static Logger log = Logger.getLogger(TC6ServletContainerContext.class);
/** . */
- private final CommandDispatcher dispatcher = new CommandDispatcher();
+ private final CommandDispatcher dispatcher = new CommandDispatcher("/tomcatgateinservlet");
/** The monitored hosts. */
private final Set<String> monitoredHosts = new HashSet<String>();
Modified: components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6WebAppContext.java
===================================================================
--- components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6WebAppContext.java 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/main/java/org/gatein/wci/impl/tomcat/TC6WebAppContext.java 2009-09-01 11:35:37 UTC (rev 142)
@@ -75,11 +75,11 @@
try
{
commandServlet = context.createWrapper();
- commandServlet.setName("GateInServlet");
+ commandServlet.setName("TomcatGateInServlet");
commandServlet.setLoadOnStartup(0);
commandServlet.setServletClass(CommandServlet.class.getName());
context.addChild(commandServlet);
- context.addServletMapping("/gateinservlet", "GateInServlet");
+ context.addServletMapping("/tomcatgateinservlet", "TomcatGateInServlet");
}
catch (Exception e)
{
@@ -99,7 +99,7 @@
{
try
{
- context.removeServletMapping("gateinservlet");
+ context.removeServletMapping("tomcatgateinservlet");
context.removeChild(commandServlet);
}
catch (Exception e)
Modified: components/wci/trunk/wci/src/test/resources/support/jboss-4.2-generic/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/wci/src/test/resources/support/jboss-4.2-generic/server-war/WEB-INF/web.xml 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/test/resources/support/jboss-4.2-generic/server-war/WEB-INF/web.xml 2009-09-01 11:35:37 UTC (rev 142)
@@ -37,6 +37,9 @@
<listener>
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
</listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>org.gatein.wci.TestServlet</servlet-class>
Modified: components/wci/trunk/wci/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/wci/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/test/resources/support/jboss-5.0-generic/server-war/WEB-INF/web.xml 2009-09-01 11:35:37 UTC (rev 142)
@@ -37,6 +37,9 @@
<listener>
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
</listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>org.gatein.wci.TestServlet</servlet-class>
Modified: components/wci/trunk/wci/src/test/resources/support/jetty-6.1-generic/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/wci/src/test/resources/support/jetty-6.1-generic/server-war/WEB-INF/web.xml 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/test/resources/support/jetty-6.1-generic/server-war/WEB-INF/web.xml 2009-09-01 11:35:37 UTC (rev 142)
@@ -37,6 +37,9 @@
<listener>
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
</listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>org.gatein.wci.TestServlet</servlet-class>
Modified: components/wci/trunk/wci/src/test/resources/support/tomcat-6.0-generic/server-war/WEB-INF/web.xml
===================================================================
--- components/wci/trunk/wci/src/test/resources/support/tomcat-6.0-generic/server-war/WEB-INF/web.xml 2009-08-31 02:20:50 UTC (rev 141)
+++ components/wci/trunk/wci/src/test/resources/support/tomcat-6.0-generic/server-war/WEB-INF/web.xml 2009-09-01 11:35:37 UTC (rev 142)
@@ -37,6 +37,9 @@
<listener>
<listener-class>org.gatein.common.mc.bootstrap.WebBootstrap</listener-class>
</listener>
+ <listener>
+ <listener-class>org.gatein.wci.impl.generic.GenericServletContainerContext</listener-class>
+ </listener>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>org.gatein.wci.TestServlet</servlet-class>
15 years, 3 months