gatein SVN: r6740 - in components/pc/trunk: mc/src/main/java/org/gatein/pc/mc and 9 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-06-24 16:01:11 -0400 (Fri, 24 Jun 2011)
New Revision: 6740
Removed:
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/metadata/
Modified:
components/pc/trunk/mc/pom.xml
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java
components/pc/trunk/test/core/src/main/resources/common.xml
components/pc/trunk/test/servers/jboss42/src/test/build.xml
components/pc/trunk/test/servers/jboss51/src/test/build.xml
components/pc/trunk/test/servers/jboss6/src/test/build.xml
components/pc/trunk/test/servers/jetty6/src/test/build.xml
components/pc/trunk/test/servers/src/common/resources/common.xml
components/pc/trunk/test/servers/tomcat6/src/test/build.xml
components/pc/trunk/test/servers/tomcat7/src/test/build.xml
Log:
GTNPC-57 : Remove JBoss XB dependency for server based unit tests
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/mc/pom.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -14,11 +14,6 @@
<groupId>org.gatein.pc</groupId>
<artifactId>pc-portlet</artifactId>
</dependency>
-
- <dependency>
- <groupId>org.jboss</groupId>
- <artifactId>jbossxb</artifactId>
- </dependency>
<dependency>
<groupId>org.staxnav</groupId>
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 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java 2011-06-24 20:01:11 UTC (rev 6740)
@@ -41,25 +41,13 @@
import org.gatein.pc.portlet.impl.container.PortletApplicationLifeCycle;
import org.gatein.pc.portlet.impl.container.PortletContainerLifeCycle;
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
-import static org.gatein.pc.portlet.impl.metadata.PortletMetaDataConstants.PORTLET_JSR_168_NS;
-import static org.gatein.pc.portlet.impl.metadata.PortletMetaDataConstants.PORTLET_JSR_286_NS;
-import org.gatein.pc.mc.metadata.factory.PortletApplicationModelFactory;
-import org.gatein.pc.mc.metadata.impl.AnnotationPortletApplication10MetaData;
-import org.gatein.pc.mc.metadata.impl.AnnotationPortletApplication20MetaData;
-import org.gatein.pc.mc.metadata.impl.ValueTrimmingFilter;
import org.gatein.wci.ServletContainer;
import org.gatein.wci.ServletContainerFactory;
import org.gatein.wci.WebApp;
import org.gatein.wci.WebAppEvent;
import org.gatein.wci.WebAppLifeCycleEvent;
import org.gatein.wci.WebAppListener;
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-import org.jboss.xb.binding.resolver.MutableSchemaResolver;
-import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
-import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.Collection;
@@ -73,25 +61,6 @@
public class PortletApplicationDeployer implements WebAppListener, PortletApplicationRegistry
{
- static
- {
- try
- {
- SingletonSchemaResolverFactory factory = SingletonSchemaResolverFactory.getInstance();
- MutableSchemaResolver resolver = factory.getSchemaBindingResolver();
-
- /** 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)
- {
- throw new Error(e);
- }
- }
-
/** . */
private Logger log = LoggerFactory.getLogger(PortletApplicationDeployer.class);
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 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java 2011-06-24 20:01:11 UTC (rev 6740)
@@ -28,27 +28,11 @@
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
-import org.gatein.pc.mc.metadata.factory.PortletApplicationModelFactory;
-import org.gatein.pc.mc.metadata.impl.AnnotationPortletApplication10MetaData;
-import org.gatein.pc.mc.metadata.impl.AnnotationPortletApplication20MetaData;
-import org.gatein.pc.mc.metadata.impl.ValueTrimmingFilter;
import org.gatein.pc.mc.staxnav.PortletApplicationMetaDataBuilder;
-import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
-import static org.gatein.pc.portlet.impl.metadata.PortletMetaDataConstants.*;
-
-import org.jboss.xb.binding.JBossXBException;
-import org.jboss.xb.binding.Unmarshaller;
-import org.jboss.xb.binding.UnmarshallerFactory;
-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 org.jboss.util.xml.JBossEntityResolver;
-import javax.xml.stream.XMLStreamException;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -59,49 +43,15 @@
/** Test parameter for using xml binding annotation. */
public static final String ANNOTATION_BINDING = "annotation";
- /** Test parameter for using the ObjectModelFactory. */
- public static final String FACTORY_BINDING = "factory";
-
- /** The schema resolver factory. */
- protected static SingletonSchemaResolverFactory factory;
-
- /** The schema resolver. */
- protected static MutableSchemaResolver resolver;
-
- /** The unmarshaller. */
- protected Unmarshaller unmarshaller = null;
-
/** Annotation or ObjectModelFactory parsing. */
private String parser = ANNOTATION_BINDING;
- static
+ protected PortletApplication20MetaData _unmarshall10(String file) throws SAXException, IOException
{
- try
- {
- factory = SingletonSchemaResolverFactory.getInstance();
- resolver = factory.getSchemaBindingResolver();
-
- JBossEntityResolver.registerEntity(PORTLET_JSR_168_NS, "metadata/portlet-app_1_0.xsd");
- JBossEntityResolver.registerEntity(PORTLET_JSR_286_NS, "metadata/portlet-app_2_0.xsd");
-
- /** 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)
- {
- e.printStackTrace();
- }
- }
-
- protected PortletApplication20MetaData _unmarshall10(String file) throws JBossXBException, SAXException, IOException
- {
return _unmarshall10(file, false);
}
- protected PortletApplication20MetaData _unmarshall10(String file, boolean fail) throws JBossXBException, SAXException, IOException
+ protected PortletApplication20MetaData _unmarshall10(String file, boolean fail) throws SAXException, IOException
{
try
{
@@ -145,64 +95,6 @@
throw afe;
}
- protected PortletApplication10MetaData unmarshall10(String file) throws JBossXBException, SAXException, IOException
- {
- if (ANNOTATION_BINDING.equals(parser))
- {
- return this.unmarshallAnnotation(file, AnnotationPortletApplication10MetaData.class);
- }
- else if (FACTORY_BINDING.equals(parser))
- {
- return this.unmarshallWithFactory(file);
- }
- else
- {
- throw new IllegalArgumentException("Wrong parameter for parser: " + parser);
- }
- }
-
- protected PortletApplication20MetaData unmarshall20(String file) throws JBossXBException, SAXException, IOException
- {
- if (ANNOTATION_BINDING.equals(parser))
- {
- return this.unmarshallAnnotation(file, AnnotationPortletApplication20MetaData.class);
- }
- else if (FACTORY_BINDING.equals(parser))
- {
- return (PortletApplication20MetaData)this.unmarshallWithFactory(file);
- }
- else
- {
- throw new IllegalArgumentException("Wrong parameter for parser: " + parser);
- }
- }
-
- private PortletApplication10MetaData unmarshallWithFactory(String file) throws JBossXBException
- {
- /** validate */
- unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- unmarshaller.setNamespaceAware(true);
- unmarshaller.setSchemaValidation(true);
- unmarshaller.setValidation(true);
-
- PortletApplicationModelFactory factory = new PortletApplicationModelFactory();
- /** unmarshal */
- return (PortletApplication10MetaData) unmarshaller.unmarshal(getStream(file), new ValueTrimmingFilter(factory),
- 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/test/core/src/main/resources/common.xml
===================================================================
--- components/pc/trunk/test/core/src/main/resources/common.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/core/src/main/resources/common.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -46,10 +46,6 @@
<pathelement location="${jboss:jboss-common-logging-log4j:jar}"/>
</path>
- <path id="jboss-xb">
- <pathelement location="${org.jboss:jbossxb:jar}"/>
- </path>
-
<path id="staxnav">
<pathelement location="${org.staxnav:staxnav.core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jboss42/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jboss42/src/test/build.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/jboss42/src/test/build.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -18,7 +18,6 @@
<path refid="portal-common"/>
<path refid="portal-web"/>
<path refid="portal-portlet"/>
- <path refid="jboss-xb"/>
<path refid="staxnav"/>
<path location="${org.jboss:jboss-common-core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jboss51/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jboss51/src/test/build.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/jboss51/src/test/build.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -18,7 +18,6 @@
<path refid="portal-common"/>
<path refid="portal-web"/>
<path refid="portal-portlet"/>
- <path refid="jboss-xb"/>
<path refid="staxnav"/>
<path location="${org.jboss:jboss-common-core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jboss6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jboss6/src/test/build.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/jboss6/src/test/build.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -18,7 +18,6 @@
<path refid="portal-common"/>
<path refid="portal-web"/>
<path refid="portal-portlet"/>
- <path refid="jboss-xb"/>
<path refid="staxnav"/>
<path location="${org.jboss:jboss-common-core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jetty6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jetty6/src/test/build.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/jetty6/src/test/build.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -19,7 +19,6 @@
<path refid="portal-web"/>
<path refid="portal-portlet"/>
<path refid="jboss-unit"/>
- <path refid="jboss-xb"/>
<path refid="staxnav"/>
<pathelement path="${apache-xerces:xercesImpl:jar}"/>
<pathelement path="${apache-xerces:resolver:jar}"/>
Modified: components/pc/trunk/test/servers/src/common/resources/common.xml
===================================================================
--- components/pc/trunk/test/servers/src/common/resources/common.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/src/common/resources/common.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -46,10 +46,6 @@
<pathelement location="${org.jboss.logging:jboss-logging-log4j:jar}"/>
</path>
- <path id="jboss-xb">
- <pathelement location="${org.jboss:jbossxb:jar}"/>
- </path>
-
<path id="staxnav">
<pathelement location="${org.staxnav:staxnav.core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/tomcat6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat6/src/test/build.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/tomcat6/src/test/build.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -19,7 +19,6 @@
<path refid="portal-web"/>
<path refid="portal-portlet"/>
<path refid="jboss-unit"/>
- <path refid="jboss-xb"/>
<path refid="staxnav"/>
<pathelement location="${apache-xerces:xercesImpl:jar}"/>
<pathelement location="${apache-xerces:xml-apis:jar}"/>
Modified: components/pc/trunk/test/servers/tomcat7/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/src/test/build.xml 2011-06-24 19:57:12 UTC (rev 6739)
+++ components/pc/trunk/test/servers/tomcat7/src/test/build.xml 2011-06-24 20:01:11 UTC (rev 6740)
@@ -19,7 +19,6 @@
<path refid="portal-web"/>
<path refid="portal-portlet"/>
<path refid="jboss-unit"/>
- <path refid="jboss-xb"/>
<path refid="staxnav"/>
<pathelement path="${apache-xerces:xercesImpl:jar}"/>
<pathelement path="${apache-xerces:resolver:jar}"/>
13 years, 6 months
gatein SVN: r6739 - in epp/portal/branches/EPP_5_1_WSRP: component/portal/src/main/java/org/exoplatform/portal/config/serialize and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-06-24 15:57:12 -0400 (Fri, 24 Jun 2011)
New Revision: 6739
Added:
epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/gatein_objects_1_1_2.xsd
Modified:
epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/org/exoplatform/portal/config/serialize/AbstractApplicationHandler.java
epp/portal/branches/EPP_5_1_WSRP/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml
Log:
- GTNPORTAL-1946: Added <wsrp> element to GateIn objects model so that WSRP portlets can be specified in pages.xml files.
Added: epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/gatein_objects_1_1_2.xsd
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/gatein_objects_1_1_2.xsd (rev 0)
+++ epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/gatein_objects_1_1_2.xsd 2011-06-24 19:57:12 UTC (rev 6739)
@@ -0,0 +1,195 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ 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.
+ -->
+
+<xs:schema
+ targetNamespace="http://www.gatein.org/xml/ns/gatein_objects_1_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_1_2"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- A top page element -->
+ <xs:element name="page" type="pageType"/>
+
+ <!-- A top page-set element -->
+ <xs:element name="page-set" type="pageSetType"/>
+
+ <!-- A top portal-config element -->
+ <xs:element name="portal-config" type="portalConfigType"/>
+
+ <!-- A top container element -->
+ <xs:element name="container" type="containerType"/>
+
+ <!-- A top node-navigation element -->
+ <xs:element name="node-navigation" type="nodeNavigationType"/>
+
+ <!-- The type of a top navigation node -->
+ <xs:complexType name="nodeNavigationType">
+ <xs:sequence>
+ <xs:element name="priority" type="xs:positiveInteger"/>
+ <xs:element name="page-nodes" minOccurs="0" maxOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="node" type="nodeType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The type of a navigation node -->
+ <xs:complexType name="nodeType">
+ <xs:sequence>
+ <xs:element name="uri" type="xs:string"/>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="label" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="start-publication-date" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="end-publication-date" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="visibility" type="visibility" default="DISPLAYED" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="page-reference" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="node" type="nodeType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="visibility">
+ <xs:restriction base='xs:string'>
+ <xs:enumeration value="DISPLAYED"/>
+ <xs:enumeration value="HIDDEN"/>
+ <xs:enumeration value="TEMPORAL"/>
+ <xs:enumeration value="SYSTEM"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="pageSetType">
+ <xs:sequence>
+ <xs:element name="page" type="pageType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portalConfigType">
+ <xs:sequence>
+ <xs:element name="portal-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="locale" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="edit-permission" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="skin" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="properties" type="propertiesType" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="portal-layout" minOccurs="1" maxOccurs="1">
+ <xs:complexType>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="propertiesType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="entry" type="propertiesEntryType" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="propertiesEntryType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="key" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:group name="containerChildrenGroup">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portlet-application" type="portletApplicationType" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="container" type="containerType" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="page-body" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="site-body" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="pageType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="factory-id" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="edit-permission" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-max-window" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="containerType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="factory-id" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="description" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="width" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="height" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string"/>
+ <xs:attribute name="template" type="xs:string"/>
+ <xs:attribute name="attribute" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="portletApplicationType">
+ <xs:sequence>
+ <xs:choice>
+ <xs:element name="portlet" type="portletType"/>
+ <xs:element name="wsrp" type="xs:string"/>
+ </xs:choice>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-info-bar" type="xs:boolean" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-application-state" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-application-mode" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="width" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="height" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletType">
+ <xs:sequence>
+ <xs:element name="application-ref" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="portlet-ref" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="preferences" type="portletPreferencesType" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletPreferencesType">
+ <xs:sequence>
+ <xs:element name="preference" type="portletPreferenceType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletPreferenceType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="value" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="read-only" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
Modified: epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/org/exoplatform/portal/config/serialize/AbstractApplicationHandler.java
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/org/exoplatform/portal/config/serialize/AbstractApplicationHandler.java 2011-06-24 19:41:41 UTC (rev 6738)
+++ epp/portal/branches/EPP_5_1_WSRP/component/portal/src/main/java/org/exoplatform/portal/config/serialize/AbstractApplicationHandler.java 2011-06-24 19:57:12 UTC (rev 6739)
@@ -100,7 +100,8 @@
ctx.parsePastStartTag(m_uri, m_name);
//
- Application<Portlet> app;
+ Application app;
+ TransientApplicationState state;
if ("application".equals(m_name))
{
String instanceId = ctx.parseElementText(m_uri, "instance-id");
@@ -111,7 +112,6 @@
String ownerId = instanceId.substring(i0 + 1, i1);
String persistenceid = instanceId.substring(i1 + 2);
String[] persistenceChunks = split("/", persistenceid);
- TransientApplicationState<Portlet> state;
if (persistenceChunks.length == 2)
{
state = new TransientApplicationState<Portlet>(
@@ -135,10 +135,24 @@
}
else
{
- ctx.parsePastStartTag(m_uri, "portlet");
- String applicationName = ctx.parseElementText(m_uri, "application-ref");
- String portletName = ctx.parseElementText(m_uri, "portlet-ref");
- TransientApplicationState<Portlet> state;
+ String contentId;
+ boolean isWSRP = false;
+ if(ctx.isAt(m_uri, "wsrp"))
+ {
+ contentId = ctx.parseElementText(m_uri, "wsrp");
+ app = Application.createWSRPApplication();
+ isWSRP = true;
+ }
+ else
+ {
+
+ ctx.parsePastStartTag(m_uri, "portlet");
+ String applicationName = ctx.parseElementText(m_uri, "application-ref");
+ String portletName = ctx.parseElementText(m_uri, "portlet-ref");
+ contentId = applicationName + "/" + portletName;
+ app = Application.createPortletApplication();
+ }
+
if (ctx.isAt(m_uri, "preferences"))
{
PortletBuilder builder = new PortletBuilder();
@@ -149,15 +163,19 @@
builder.add(value.getName(), value.getValues(), value.isReadOnly());
}
ctx.parsePastEndTag(m_uri, "preferences");
- state = new TransientApplicationState<Portlet>(applicationName + "/" + portletName, builder.build());
+ state = new TransientApplicationState(contentId, builder.build());
}
else
{
- state = new TransientApplicationState<Portlet>(applicationName + "/" + portletName, null);
+ state = new TransientApplicationState(contentId, null);
}
- app = Application.createPortletApplication();
+
+ if(!isWSRP)
+ {
+ ctx.parsePastEndTag(m_uri, "portlet");
+ }
+
app.setState(state);
- ctx.parsePastEndTag(m_uri, "portlet");
}
//
Modified: epp/portal/branches/EPP_5_1_WSRP/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml 2011-06-24 19:41:41 UTC (rev 6738)
+++ epp/portal/branches/EPP_5_1_WSRP/web/portal/src/main/webapp/WEB-INF/conf/wsrp/portal/group/platform/administrators/pages.xml 2011-06-24 19:57:12 UTC (rev 6739)
@@ -21,24 +21,30 @@
-->
<page-set
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gatein_objects_1_0"
- xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1_2 http://www.gatein.org/xml/ns/gatein_objects_1_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_1_2">
- <page>
- <name>wsrpConfiguration</name>
- <title>WSRP Admin</title>
- <access-permissions>manager:/platform/administrators</access-permissions>
- <edit-permission>manager:/platform/administrators</edit-permission>
- <portlet-application>
- <portlet>
- <application-ref>wsrp-admin-gui</application-ref>
- <portlet-ref>WSRPConfigurationPortlet</portlet-ref>
- </portlet>
+ <page>
+ <name>wsrpConfiguration</name>
<title>WSRP Admin</title>
<access-permissions>manager:/platform/administrators</access-permissions>
- <show-info-bar>false</show-info-bar>
- </portlet-application>
- </page>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>wsrp-admin-gui</application-ref>
+ <portlet-ref>WSRPConfigurationPortlet</portlet-ref>
+ </portlet>
+ <title>WSRP Admin</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ <!--<portlet-application>
+ <wsrp>selfv2./richFacesPortlet.richFacesPortlet</wsrp>
+ <title>RichFaces</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ </portlet-application>-->
+ </page>
</page-set>
13 years, 6 months
gatein SVN: r6738 - in components/pc/trunk: mc and 19 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-06-24 15:41:41 -0400 (Fri, 24 Jun 2011)
New Revision: 6738
Added:
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/Element.java
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/PortletApplicationMetaDataBuilder.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ContainerRuntimeOptionTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ListenerTestCase.java
components/pc/trunk/mc/src/test/resources/metadata/listener/
components/pc/trunk/mc/src/test/resources/metadata/listener/portlet2.xml
components/pc/trunk/mc/src/test/resources/metadata/runtimeoption/
components/pc/trunk/mc/src/test/resources/metadata/runtimeoption/portlet.xml
Modified:
components/pc/trunk/mc/pom.xml
components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.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/EventTestEverythingTestCase.java
components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/FilterTestEverythingTestCase.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/RenderParameterTestEverythingTestCase.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/mc/src/test/resources/metadata/filter/portlet-filter2.xml
components/pc/trunk/mc/src/test/resources/metadata/general/portlet-app_2_0.xml
components/pc/trunk/pom.xml
components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication10MetaData.java
components/pc/trunk/test/core/src/main/resources/common.xml
components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/ext/dispatcher/AbstractDispatchedSessionTestCase.java
components/pc/trunk/test/servers/jboss42/src/test/build.xml
components/pc/trunk/test/servers/jboss51/src/test/build.xml
components/pc/trunk/test/servers/jboss6/src/test/build.xml
components/pc/trunk/test/servers/jetty6/src/test/build.xml
components/pc/trunk/test/servers/pom.xml
components/pc/trunk/test/servers/src/common/resources/common.xml
components/pc/trunk/test/servers/tomcat6/src/test/build.xml
components/pc/trunk/test/servers/tomcat7/src/test/build.xml
Log:
GTNPC-66 : Rewrite portlet xml parsing using staxnav
Modified: components/pc/trunk/mc/pom.xml
===================================================================
--- components/pc/trunk/mc/pom.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/pom.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -19,9 +19,10 @@
<groupId>org.jboss</groupId>
<artifactId>jbossxb</artifactId>
</dependency>
+
<dependency>
- <groupId>org.jboss.unit</groupId>
- <artifactId>jboss-unit</artifactId>
+ <groupId>org.staxnav</groupId>
+ <artifactId>staxnav.core</artifactId>
</dependency>
<dependency>
@@ -33,32 +34,16 @@
</dependencies>
<build>
- <plugins>
- <!--<plugin>
- <groupId>org.jboss.unit</groupId>
- <artifactId>jboss-unit-tooling-maven2</artifactId>
- <executions>
- <execution>
- <phase>test</phase>
- <goals>
- <goal>execute</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <failOnError>true</failOnError>
- <testsuites>
- <testsuite>
- <config>local-jboss-unit.xml</config>
- </testsuite>
- </testsuites>
- <reports>
- <xml>target/tests/reports/xml/local</xml>
- <html>target/tests/reports/html/local</html>
- </reports>
- </configuration>
- </plugin>-->
- </plugins>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <skip>false</skip>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
</project>
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/PortletApplicationDeployer.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -26,6 +26,7 @@
import org.gatein.common.io.IOTools;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.api.PortletInvoker;
+import org.gatein.pc.mc.staxnav.PortletApplicationMetaDataBuilder;
import org.gatein.pc.portlet.container.ContainerPortletInvoker;
import org.gatein.pc.portlet.container.PortletContainer;
import org.gatein.pc.portlet.container.managed.LifeCycleStatus;
@@ -281,7 +282,14 @@
{
in = IOTools.safeBufferedWrapper(url.openStream());
- // Validate
+ //
+ PortletApplicationMetaDataBuilder builder = new PortletApplicationMetaDataBuilder();
+
+ //
+ return builder.build(in);
+
+/*
+ // Validate
Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
unmarshaller.setNamespaceAware(true);
unmarshaller.setSchemaValidation(false);
@@ -295,6 +303,7 @@
//
return portletApplicationMD;
+*/
}
finally
{
@@ -302,14 +311,10 @@
}
}
}
- catch (IOException e)
+ catch (Exception e)
{
log.error("Cannot read portlet.xml", e);
}
- catch (JBossXBException e)
- {
- log.error("Cannot parse portlet.xml", e);
- }
return null;
}
Added: components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/Element.java
===================================================================
--- components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/Element.java (rev 0)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/Element.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -0,0 +1,139 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.pc.mc.staxnav;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public enum Element
+{
+
+
+
+ portlet_app,
+
+ portlet,
+
+ description,
+
+ portlet_name,
+
+ display_name,
+
+ portlet_class,
+
+ init_param,
+
+ name,
+
+ value,
+
+ expiration_cache,
+
+ cache_scope,
+
+ supports,
+
+ mime_type,
+
+ portlet_mode,
+
+ window_state,
+
+ supported_locale,
+
+ resource_bundle,
+
+ portlet_info,
+
+ title,
+
+ short_title,
+
+ keywords,
+
+ portlet_preferences,
+
+ preference,
+
+ read_only,
+
+ preferences_validator,
+
+ security_role_ref,
+
+ role_name,
+
+ role_link,
+
+ supported_processing_event,
+
+ qname,
+
+ supported_publishing_event,
+
+ supported_public_render_parameter,
+
+ container_runtime_option,
+
+ custom_portlet_mode,
+
+ portal_managed,
+
+ custom_window_state,
+
+ user_attribute,
+
+ security_constraint,
+
+ portlet_collection,
+
+ user_data_constraint,
+
+ transport_guarantee,
+
+ filter,
+
+ filter_name,
+
+ filter_class,
+
+ lifecycle,
+
+ filter_mapping,
+
+ default_namespace,
+
+ event_definition,
+
+ alias,
+
+ value_type,
+
+ public_render_parameter,
+
+ listener,
+
+ listener_class,
+
+ identifier,
+
+}
Added: components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/PortletApplicationMetaDataBuilder.java
===================================================================
--- components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/PortletApplicationMetaDataBuilder.java (rev 0)
+++ components/pc/trunk/mc/src/main/java/org/gatein/pc/mc/staxnav/PortletApplicationMetaDataBuilder.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -0,0 +1,576 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.pc.mc.staxnav;
+
+import org.gatein.common.i18n.LocaleFormat;
+import org.gatein.common.i18n.LocalizedString;
+import org.gatein.common.util.ConversionException;
+import org.gatein.pc.api.LifeCyclePhase;
+import org.gatein.pc.api.Mode;
+import org.gatein.pc.api.TransportGuarantee;
+import org.gatein.pc.api.WindowState;
+import org.gatein.pc.portlet.impl.metadata.CustomPortletModeMetaData;
+import org.gatein.pc.portlet.impl.metadata.CustomWindowStateMetaData;
+import org.gatein.pc.portlet.impl.metadata.ListenerMetaData;
+import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
+import org.gatein.pc.portlet.impl.metadata.PublicRenderParameterMetaData;
+import org.gatein.pc.portlet.impl.metadata.UserAttributeMetaData;
+import org.gatein.pc.portlet.impl.metadata.common.ContainerRuntimeMetaData;
+import org.gatein.pc.portlet.impl.metadata.common.InitParamMetaData;
+import org.gatein.pc.portlet.impl.metadata.event.EventDefinitionMetaData;
+import org.gatein.pc.portlet.impl.metadata.event.EventDefinitionReferenceMetaData;
+import org.gatein.pc.portlet.impl.metadata.filter.FilterMappingMetaData;
+import org.gatein.pc.portlet.impl.metadata.filter.FilterMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletCacheScopeEnum;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletInfoMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletModeMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletPreferenceMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletPreferencesMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.SecurityRoleRefMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.SupportedLocaleMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.SupportsMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.WindowStateMetaData;
+import org.gatein.pc.portlet.impl.metadata.security.PortletCollectionMetaData;
+import org.gatein.pc.portlet.impl.metadata.security.SecurityConstraintMetaData;
+import org.gatein.pc.portlet.impl.metadata.security.UserDataConstraintMetaData;
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+import org.staxnav.StaxNavigatorImpl;
+import org.staxnav.ValueType;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamReader;
+import java.io.InputStream;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.EnumSet;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+import static org.gatein.pc.portlet.impl.metadata.PortletMetaDataConstants.DEFAULT_LOCALE;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PortletApplicationMetaDataBuilder
+{
+
+ private static final EnumSet<Element> NAME_OR_QNAME = EnumSet.of(Element.name, Element.qname);
+
+ private static final ValueType<PortletCacheScopeEnum> PORTLET_CACHE_SCOPE = ValueType.get(PortletCacheScopeEnum.class);
+
+ private static final ValueType<TransportGuarantee> TRANSPORT_GUARANTEE = ValueType.get(TransportGuarantee.class);
+
+ private static final ValueType<LifeCyclePhase> LIFE_CYCLE = new ValueType<LifeCyclePhase>()
+ {
+ @Override
+ protected LifeCyclePhase parse(String s) throws Exception
+ {
+ if (s.endsWith("_PHASE"))
+ {
+ return LifeCyclePhase.valueOf(s.substring(0, s.length() - 6));
+ }
+ else
+ {
+ throw new IllegalArgumentException("Value " + s + " is not legal");
+ }
+ }
+ };
+
+ private static final QName XML_LANG = new QName("http://www.w3.org/XML/1998/namespace", "lang");
+
+ private static final String PORTLET_1_0 = "http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd";
+ private static final String PORTLET_2_0 = "http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd";
+
+ private LocalizedString readLocalizedString(StaxNavigator<Element> nav, Element element) throws ConversionException
+ {
+ Map<Locale, String> descriptions = new LinkedHashMap<Locale, String>();
+ while (nav.next(element))
+ {
+ String lang = nav.getAttribute(XML_LANG);
+ String description = nav.getContent();
+ Locale locale = LocaleFormat.DEFAULT.getLocale(lang == null ? DEFAULT_LOCALE : lang);
+ descriptions.put(locale, description);
+ }
+ if (descriptions.size() > 0)
+ {
+ return new LocalizedString(descriptions, new Locale(DEFAULT_LOCALE));
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private QName readQName(StaxNavigator<Element> nav)
+ {
+ String val = nav.getContent();
+ int pos = val.indexOf(':');
+ if (pos == -1)
+ {
+ return new QName(val);
+ }
+ else
+ {
+ String prefix = val.substring(0, pos);
+ String localPart = val.substring(pos + 1);
+ String uri = nav.getNamespaceByPrefix(prefix);
+ if (uri == null)
+ {
+ throw new UnsupportedOperationException("todo");
+ }
+ else
+ {
+ return new QName(uri, localPart, prefix);
+ }
+ }
+ }
+
+ private Iterable<InitParamMetaData> readInitParams(StaxNavigator<Element> nav) throws ConversionException
+ {
+ List<InitParamMetaData> list = Collections.emptyList();
+ while (nav.next(Element.init_param))
+ {
+ InitParamMetaData initParamMD = new InitParamMetaData();
+ initParamMD.setId(nav.getAttribute("id"));
+ initParamMD.setDescription(readLocalizedString(nav, Element.description));
+ initParamMD.setName(getContent(nav, Element.name));
+ initParamMD.setValue(getContent(nav, Element.value));
+ if (list.isEmpty())
+ {
+ list = new ArrayList<InitParamMetaData>();
+ }
+ list.add(initParamMD);
+ }
+ return list;
+ }
+
+ private String getContent(StaxNavigator<Element> nav, Element element)
+ {
+ if (nav.next(element))
+ {
+ return nav.getContent();
+ }
+ else
+ {
+ throw new StaxNavException(nav.getLocation(), "Was expecting elemnt " + element + " to be present");
+ }
+ }
+
+ public PortletApplication20MetaData build(InputStream is) throws Exception
+ {
+
+ PortletApplication20MetaData md = new PortletApplication20MetaData();
+
+ XMLInputFactory factory = XMLInputFactory.newInstance();
+ XMLStreamReader stream = factory.createXMLStreamReader(is);
+ StaxNavigator<Element> nav = new StaxNavigatorImpl<Element>(new Naming.Enumerated.Simple<Element>(Element.class, null), stream);
+
+ nav.setTrimContent(true);
+
+ // For now we do it this way
+ // but it's not correct
+ String defaultNS = nav.getNamespaceByPrefix("");
+ int version;
+ if (PORTLET_1_0.equals(defaultNS))
+ {
+ md.setVersion("1.0");
+ version = 1;
+ }
+ else if (PORTLET_2_0.equals(defaultNS))
+ {
+ md.setVersion("2.0");
+ version = 2;
+ }
+ else
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ //
+ assert Element.portlet_app == nav.getName();
+
+ //
+ if (nav.child() == null)
+ {
+ return md;
+ }
+
+ //
+ for (StaxNavigator<Element> portletNav : nav.fork(Element.portlet))
+ {
+ PortletMetaData portletMD = new PortletMetaData();
+
+ //
+ portletMD.setId(portletNav.getAttribute("id"));
+ portletMD.setDescription(readLocalizedString(portletNav, Element.description));
+ portletMD.setPortletName(getContent(portletNav, Element.portlet_name));
+ portletMD.setDisplayName(readLocalizedString(portletNav, Element.display_name));
+ portletMD.setPortletClass(getContent(portletNav, Element.portlet_class));
+
+ //
+ for (InitParamMetaData initParamMD : readInitParams(portletNav))
+ {
+ portletMD.addInitParam(initParamMD);
+ }
+
+ //
+ if (portletNav.next(Element.expiration_cache))
+ {
+ portletMD.setExpirationCache(Integer.parseInt(portletNav.getContent()));
+ }
+ if (portletNav.next(Element.cache_scope))
+ {
+ portletMD.setCacheScope(PortletCacheScopeEnum.valueOf(portletNav.getContent()));
+ }
+
+ //
+ while (portletNav.next(Element.supports))
+ {
+ SupportsMetaData supportsMD = new SupportsMetaData();
+ supportsMD.setId(portletNav.getAttribute("id"));
+ supportsMD.setMimeType(getContent(portletNav, Element.mime_type));
+ while (portletNav.next(Element.portlet_mode)) {
+ PortletModeMetaData portletModeMD = new PortletModeMetaData();
+ portletModeMD.setPortletMode(Mode.create(portletNav.getContent()));
+ supportsMD.addPortletMode(portletModeMD);
+ }
+ while (portletNav.next(Element.window_state)) {
+ WindowStateMetaData windowStateMD = new WindowStateMetaData();
+ windowStateMD.setWindowState(WindowState.create(portletNav.getContent()));
+ supportsMD.addWindowState(windowStateMD);
+ }
+ portletMD.addSupport(supportsMD);
+ }
+
+ //
+ while (portletNav.next(Element.supported_locale))
+ {
+ SupportedLocaleMetaData supportedLocaleMD = new SupportedLocaleMetaData();
+ supportedLocaleMD.setLocale(portletNav.getContent());
+ portletMD.addSupportedLocale(supportedLocaleMD);
+ }
+ if (portletNav.next(Element.resource_bundle))
+ {
+ portletMD.setResourceBundle(portletNav.getContent());
+ }
+
+ //
+ if (portletNav.next(Element.portlet_info))
+ {
+ PortletInfoMetaData portletInfoMD = new PortletInfoMetaData();
+ if (portletNav.next(Element.title))
+ {
+ portletInfoMD.setTitle(portletNav.getContent());
+ }
+ if (portletNav.next(Element.short_title))
+ {
+ portletInfoMD.setShortTitle(portletNav.getContent());
+ }
+ if (portletNav.next(Element.keywords))
+ {
+ portletInfoMD.setKeywords(portletNav.getContent());
+ }
+ portletMD.setPortletInfo(portletInfoMD);
+ }
+
+ //
+ if (portletNav.next(Element.portlet_preferences))
+ {
+ PortletPreferencesMetaData portletPreferencesMD = new PortletPreferencesMetaData();
+ while (portletNav.next(Element.preference))
+ {
+ PortletPreferenceMetaData portletPreferenceMD = new PortletPreferenceMetaData();
+ portletPreferenceMD.setName(getContent(portletNav, Element.name));
+ while (portletNav.next(Element.value))
+ {
+ portletPreferenceMD.addValue(portletNav.getContent());
+ }
+ if (portletNav.next(Element.read_only))
+ {
+ portletPreferenceMD.setReadOnly(portletNav.parseContent(ValueType.BOOLEAN));
+ }
+ portletPreferencesMD.addPortletPreference(portletPreferenceMD);
+ }
+ if (portletNav.next(Element.preferences_validator))
+ {
+ portletPreferencesMD.setPreferenceValidator(portletNav.getContent());
+ }
+ portletMD.setPortletPreferences(portletPreferencesMD);
+ }
+
+ //
+ while (portletNav.next(Element.security_role_ref))
+ {
+ SecurityRoleRefMetaData securityRoleRefMD = new SecurityRoleRefMetaData();
+ securityRoleRefMD.setDescription(readLocalizedString(portletNav, Element.description));
+ securityRoleRefMD.setRoleName(getContent(portletNav, Element.role_name));
+ if (portletNav.next(Element.role_link))
+ {
+ securityRoleRefMD.setRoleLink(portletNav.getContent());
+ }
+ portletMD.addSecurityRoleRef(securityRoleRefMD);
+ }
+
+ //
+ while (portletNav.next(Element.supported_processing_event) || portletNav.next(Element.supported_publishing_event))
+ {
+ boolean processing = portletNav.getName() == Element.supported_processing_event;
+ EventDefinitionReferenceMetaData eventDefinitionReferenceMD = new EventDefinitionReferenceMetaData();
+ switch (portletNav.next(NAME_OR_QNAME))
+ {
+ case name:
+ eventDefinitionReferenceMD.setName(portletNav.getContent());
+ break;
+ case qname:
+ eventDefinitionReferenceMD.setQname(readQName(portletNav));
+ break;
+ }
+ if (processing)
+ {
+ portletMD.addSupportedProcessingEvent(eventDefinitionReferenceMD);
+ }
+ else
+ {
+ portletMD.addSupportedPublishingEvent(eventDefinitionReferenceMD);
+ }
+ }
+ while (portletNav.next(Element.supported_public_render_parameter))
+ {
+ portletMD.addSupportedPublicRenderParameter(portletNav.getContent());
+ }
+ while (portletNav.next(Element.container_runtime_option))
+ {
+ ContainerRuntimeMetaData containerRuntimeOptionMD = new ContainerRuntimeMetaData();
+ containerRuntimeOptionMD.setName(getContent(portletNav, Element.name));
+ while (portletNav.next(Element.value))
+ {
+ containerRuntimeOptionMD.addValue(portletNav.getContent());
+ }
+ portletMD.addContainerRuntime(containerRuntimeOptionMD);
+ }
+
+ //
+ md.addPortlet(portletMD);
+ }
+
+ //
+ for (StaxNavigator<Element> customPortletModeNav : nav.fork(Element.custom_portlet_mode))
+ {
+ CustomPortletModeMetaData customPortletModeMD = new CustomPortletModeMetaData();
+ customPortletModeMD.setId(customPortletModeNav .getAttribute("id"));
+ customPortletModeMD.setDescription(readLocalizedString(customPortletModeNav , Element.description));
+ customPortletModeMD.setPortletMode(getContent(customPortletModeNav, Element.portlet_mode));
+ if (customPortletModeNav .next(Element.portal_managed))
+ {
+ customPortletModeMD.setPortalManaged(customPortletModeNav .parseContent(ValueType.BOOLEAN));
+ }
+ md.addCustomPortletMode(customPortletModeMD);
+ }
+
+ //
+ for (StaxNavigator<Element> customWindowStateNav : nav.fork(Element.custom_window_state))
+ {
+ CustomWindowStateMetaData customWindowStateMD = new CustomWindowStateMetaData();
+ customWindowStateMD.setId(customWindowStateNav.getAttribute("id"));
+ customWindowStateMD.setDescription(readLocalizedString(customWindowStateNav, Element.description));
+ customWindowStateMD.setWindowState(getContent(customWindowStateNav, Element.window_state));
+ md.addCustomWindowState(customWindowStateMD);
+ }
+
+ //
+ for (StaxNavigator<Element> userAttributeNav : nav.fork(Element.user_attribute))
+ {
+ UserAttributeMetaData userAttributeMD = new UserAttributeMetaData();
+ userAttributeMD.setId(userAttributeNav.getAttribute("id"));
+ userAttributeMD.setDescription(readLocalizedString(userAttributeNav, Element.description));
+ userAttributeMD.setName(getContent(userAttributeNav, Element.name));
+ md.addUserAttribute(userAttributeMD);
+ }
+
+ //
+ for (StaxNavigator<Element> securityConstraintNav : nav.fork(Element.security_constraint))
+ {
+ SecurityConstraintMetaData securityConstraintMD = new SecurityConstraintMetaData();
+ securityConstraintMD.setId(securityConstraintNav.getAttribute("id"));
+ securityConstraintMD.setDisplayName(readLocalizedString(securityConstraintNav, Element.display_name));
+ if (securityConstraintNav.next() != Element.portlet_collection)
+ {
+ throw new StaxNavException(nav.getLocation(), "Was expecting a portlet-collection element instead of " + securityConstraintNav.getName());
+ }
+ PortletCollectionMetaData portletCollectionMD = new PortletCollectionMetaData();
+ while (securityConstraintNav.next(Element.portlet_name))
+ {
+ portletCollectionMD.addPortletname(securityConstraintNav.getContent());
+ }
+ securityConstraintMD.setPortletList(portletCollectionMD);
+ if (securityConstraintNav.next() != Element.user_data_constraint)
+ {
+ throw new StaxNavException(nav.getLocation(), "Was expecting a security-constraint element instead of " + securityConstraintNav.getName());
+ }
+ UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
+ userDataConstraintMD.setDescription(readLocalizedString(securityConstraintNav, Element.description));
+ if (securityConstraintNav.next() != Element.transport_guarantee)
+ {
+ throw new StaxNavException(nav.getLocation(), "Was expecting a transport-guarantee element instead of " + securityConstraintNav.getName());
+ }
+ userDataConstraintMD.setTransportGuarantee(securityConstraintNav.parseContent(TRANSPORT_GUARANTEE));
+ securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
+ md.addSecurityConstraint(securityConstraintMD);
+ }
+
+ //
+ if (nav.find(Element.resource_bundle))
+ {
+ md.setResourceBundle(nav.getContent());
+ nav.next();
+ }
+
+ //
+ for (StaxNavigator<Element> filterNav : nav.fork(Element.filter))
+ {
+ if (version < 2)
+ {
+ throw new Exception("Cannot declare filter with " + PORTLET_1_0 + " descriptor");
+ }
+ FilterMetaData filterMD = new FilterMetaData();
+ filterMD.setDescription(readLocalizedString(filterNav, Element.description));
+ filterMD.setDisplayName(readLocalizedString(filterNav, Element.display_name));
+ filterMD.setFilterName(getContent(filterNav, Element.filter_name));
+ filterMD.setFilterClass(getContent(filterNav, Element.filter_class));
+ while (filterNav.next(Element.lifecycle))
+ {
+ filterMD.addLifecycle(filterNav.parseContent(LIFE_CYCLE));
+ }
+ for (InitParamMetaData initParamMD : readInitParams(filterNav))
+ {
+ filterMD.addInitParam(initParamMD);
+ }
+ md.addFilter(filterMD);
+ }
+
+ //
+ for (StaxNavigator<Element> filterMappingNav : nav.fork(Element.filter_mapping))
+ {
+ if (version < 2)
+ {
+ throw new Exception("Cannot declare filter mapping with " + PORTLET_1_0 + " descriptor");
+ }
+ FilterMappingMetaData filterMappingMD = new FilterMappingMetaData();
+ filterMappingMD.setName(getContent(filterMappingNav, Element.filter_name));
+ while (filterMappingNav.next(Element.portlet_name))
+ {
+ filterMappingMD.addPortletName(filterMappingNav.getContent());
+ }
+ md.addFilterMapping(filterMappingMD);
+ }
+
+ //
+ if (nav.find(Element.default_namespace))
+ {
+ md.setDefaultNamespace(new URI(nav.getContent()));
+ nav.next();
+ }
+
+ //
+ for (StaxNavigator<Element> eventDefinitionNav : nav.fork(Element.event_definition))
+ {
+ EventDefinitionMetaData eventDefinitionMD = new EventDefinitionMetaData();
+ eventDefinitionMD.setId(eventDefinitionNav.getAttribute("id"));
+ eventDefinitionMD.setDescription(readLocalizedString(eventDefinitionNav, Element.description));
+ switch (eventDefinitionNav.next(NAME_OR_QNAME))
+ {
+ case name:
+ eventDefinitionMD.setName(eventDefinitionNav.getContent());
+ break;
+ case qname:
+ eventDefinitionMD.setQname(readQName(eventDefinitionNav));
+ break;
+ }
+ while (eventDefinitionNav.next(Element.alias))
+ {
+ QName name = readQName(eventDefinitionNav);
+ eventDefinitionMD.addAlias(name);
+ }
+ if (eventDefinitionNav.next(Element.value_type))
+ {
+ eventDefinitionMD.setValueType(eventDefinitionNav.getContent());
+ }
+ md.addEventDefinition(eventDefinitionMD);
+ }
+
+ //
+ for (StaxNavigator<Element> publicRenderParameterNav : nav.fork(Element.public_render_parameter))
+ {
+ PublicRenderParameterMetaData publicRenderParameterMD = new PublicRenderParameterMetaData();
+ publicRenderParameterMD.setId(publicRenderParameterNav.getAttribute("id"));
+ publicRenderParameterMD.setDescription(readLocalizedString(publicRenderParameterNav, Element.description));
+ publicRenderParameterMD.setIdentifier(getContent(publicRenderParameterNav, Element.identifier));
+ switch (publicRenderParameterNav.next(NAME_OR_QNAME))
+ {
+ case name:
+ publicRenderParameterMD.setName(publicRenderParameterNav.getContent());
+ break;
+ case qname:
+ publicRenderParameterMD.setQname(readQName(publicRenderParameterNav));
+ break;
+ }
+ while (publicRenderParameterNav.next(Element.alias))
+ {
+ QName name = readQName(publicRenderParameterNav);
+ publicRenderParameterMD.addAlias(name);
+ }
+ md.addPublicRenderParameter(publicRenderParameterMD);
+ }
+
+ //
+ for (StaxNavigator<Element> listenerNav : nav.fork(Element.listener))
+ {
+ ListenerMetaData listenerMD = new ListenerMetaData();
+ listenerMD.setId(listenerNav.getAttribute("id"));
+ listenerMD.setDescription(readLocalizedString(listenerNav, Element.description));
+ listenerMD.setDisplayName(readLocalizedString(listenerNav, Element.display_name));
+ listenerMD.setListenerClass(getContent(listenerNav, Element.listener_class));
+ md.addListener(listenerMD);
+ }
+
+ //
+ for (StaxNavigator<Element> containerRuntimeNav : nav.fork(Element.container_runtime_option))
+ {
+ ContainerRuntimeMetaData containerRuntimeOptionMD = new ContainerRuntimeMetaData();
+ containerRuntimeOptionMD.setName(getContent(containerRuntimeNav, Element.name));
+ while (containerRuntimeNav.next(Element.value))
+ {
+ containerRuntimeOptionMD.addValue(containerRuntimeNav.getContent());
+ }
+ md.addContainerRuntime(containerRuntimeOptionMD);
+ }
+
+ //
+ return md;
+ }
+}
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/AbstractMetaDataTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -26,16 +26,18 @@
import java.io.InputStream;
import java.net.URL;
+import junit.framework.AssertionFailedError;
+import junit.framework.TestCase;
import org.gatein.pc.mc.metadata.factory.PortletApplicationModelFactory;
import org.gatein.pc.mc.metadata.impl.AnnotationPortletApplication10MetaData;
import org.gatein.pc.mc.metadata.impl.AnnotationPortletApplication20MetaData;
import org.gatein.pc.mc.metadata.impl.ValueTrimmingFilter;
+import org.gatein.pc.mc.staxnav.PortletApplicationMetaDataBuilder;
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
import static org.gatein.pc.portlet.impl.metadata.PortletMetaDataConstants.*;
-import org.jboss.unit.api.pojo.annotations.Parameter;
import org.jboss.xb.binding.JBossXBException;
import org.jboss.xb.binding.Unmarshaller;
import org.jboss.xb.binding.UnmarshallerFactory;
@@ -43,14 +45,15 @@
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;
+import javax.xml.stream.XMLStreamException;
+
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
-public abstract class AbstractMetaDataTestCase
+public abstract class AbstractMetaDataTestCase extends TestCase
{
/** Test parameter for using xml binding annotation. */
@@ -69,14 +72,8 @@
protected Unmarshaller unmarshaller = null;
/** Annotation or ObjectModelFactory parsing. */
- private String parser;
+ private String parser = ANNOTATION_BINDING;
- @Parameter(name = "parser")
- public void setParser(String parser)
- {
- this.parser = parser;
- }
-
static
{
try
@@ -99,6 +96,55 @@
}
}
+ protected PortletApplication20MetaData _unmarshall10(String file) throws JBossXBException, SAXException, IOException
+ {
+ return _unmarshall10(file, false);
+ }
+
+ protected PortletApplication20MetaData _unmarshall10(String file, boolean fail) throws JBossXBException, SAXException, IOException
+ {
+ try
+ {
+ PortletApplicationMetaDataBuilder builder = new PortletApplicationMetaDataBuilder();
+ String path = getPath(file);
+ URL url = new URL(path);
+ InputStream in = url.openStream();
+ assertNotNull(in);
+ PortletApplication20MetaData build = builder.build(in);
+ if (fail)
+ {
+ throw new AssertionFailedError("Was expecting unmarshalling of " + file + " to fail");
+ }
+ return build;
+ }
+ catch (Exception e)
+ {
+ if (fail)
+ {
+ // OK
+ return null;
+ }
+ else
+ {
+ throw fail(e);
+ }
+ }
+ }
+
+ protected final Error fail(Throwable t)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(t);
+ throw afe;
+ }
+
+ protected final Error fail(Throwable t, String msg)
+ {
+ AssertionFailedError afe = new AssertionFailedError(msg);
+ afe.initCause(t);
+ throw afe;
+ }
+
protected PortletApplication10MetaData unmarshall10(String file) throws JBossXBException, SAXException, IOException
{
if (ANNOTATION_BINDING.equals(parser))
@@ -111,7 +157,7 @@
}
else
{
- throw new IllegalArgumentException("Wrong parameter for parser.");
+ throw new IllegalArgumentException("Wrong parameter for parser: " + parser);
}
}
@@ -127,7 +173,7 @@
}
else
{
- throw new IllegalArgumentException("Wrong parameter for parser.");
+ throw new IllegalArgumentException("Wrong parameter for parser: " + parser);
}
}
Added: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ContainerRuntimeOptionTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ContainerRuntimeOptionTestCase.java (rev 0)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ContainerRuntimeOptionTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.pc.mc.metadata;
+
+import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
+import org.gatein.pc.portlet.impl.metadata.common.ContainerRuntimeMetaData;
+import org.gatein.pc.portlet.impl.metadata.portlet.PortletMetaData;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ContainerRuntimeOptionTestCase extends AbstractMetaDataTestCase
+{
+
+ public void test021() throws Exception
+ {
+ PortletApplication20MetaData md = _unmarshall10("metadata/runtimeoption/portlet.xml");
+ PortletMetaData portlet = md.getPortlet("portlet-name");
+ assertNotNull(portlet);
+ Map<String, ContainerRuntimeMetaData> m = portlet.getContainerRuntimeOptions();
+ assertEquals(Collections.singleton("portlet_container_runtime_option_name"), m.keySet());
+ ContainerRuntimeMetaData option = m.get("portlet_container_runtime_option_name");
+ assertEquals(Arrays.asList("portlet_container_runtime_option_value"), option.getValues());
+ assertNull(md.getContainerRuntimeOptions());
+ }
+}
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomPortletModeTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -27,10 +27,7 @@
import org.gatein.pc.portlet.impl.metadata.CustomPortletModeMetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -39,14 +36,13 @@
{
- @Test
public void test01()
{
try
{
String xmlFile = "metadata/customPortletMode/portlet1.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication10MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
@@ -67,7 +63,6 @@
}
}
- @Test
public void test02()
{
try
@@ -75,7 +70,7 @@
String xmlFile = "metadata/customPortletMode/portlet2.xml";
- PortletApplication20MetaData md = unmarshall20(xmlFile);
+ PortletApplication20MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -109,21 +104,9 @@
}
}
- @Test
- public void test03()
+ public void test03() throws Exception
{
- try
- {
-
- String xmlFile = "metadata/customPortletMode/portlet1-fail.xml";
-
- PortletApplication10MetaData md = unmarshall10(xmlFile);
- fail("portlet 2.0 properties are not allowed");
- }
- catch (Exception e)
- {
- // OK
- }
+ String xmlFile = "metadata/customPortletMode/portlet1-fail.xml";
+ _unmarshall10(xmlFile, true);
}
-
}
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/CustomWindowStateTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -27,17 +27,13 @@
import org.gatein.pc.portlet.impl.metadata.CustomWindowStateMetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
*/
public class CustomWindowStateTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
public void test01()
{
try
@@ -45,7 +41,7 @@
String xmlFile = "metadata/customWindowState/portlet1.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication10MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
@@ -68,7 +64,6 @@
}
}
- @Test
public void test02()
{
try
@@ -76,7 +71,7 @@
String xmlFile = "metadata/customWindowState/portlet2.xml";
- PortletApplication20MetaData md = unmarshall20(xmlFile);
+ PortletApplication20MetaData md = _unmarshall10(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/EventTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/EventTestEverythingTestCase.java 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/EventTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -31,10 +31,7 @@
import org.gatein.pc.portlet.impl.metadata.event.EventDefinitionMetaData;
import org.gatein.pc.portlet.impl.metadata.event.EventDefinitionReferenceMetaData;
import org.gatein.pc.portlet.impl.metadata.portlet.PortletMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -42,15 +39,14 @@
public class EventTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
- public void test01()
+ public void _test01()
{
try
{
String xmlFile = "metadata/event/portlet-event1.xml";
- unmarshall10(xmlFile);
+ _unmarshall10(xmlFile);
fail();
}
catch (Exception e)
@@ -59,7 +55,6 @@
}
}
- @Test
public void test02()
{
try
@@ -67,7 +62,7 @@
String xmlFile = "metadata/event/portlet-event2.xml";
- PortletApplication20MetaData md = unmarshall20(xmlFile);
+ PortletApplication20MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -114,32 +109,15 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e);
}
}
- @Test
- public void test021()
+ // JULIEN : find a way to make that validated somehow
+ public void _test021() throws Exception
{
- try
- {
-
- String xmlFile = "metadata/event/portlet-event2-fail.xml";
-
- PortletApplication10MetaData md = unmarshall10(xmlFile);
- assertNotNull(md);
- assertEquals("2.0", md.getVersion());
-
-// EventDefinitionMetaData edm = md.getEvents().get(0);
-
- fail("Should fail: choice and qname defined!");
- }
- catch (Exception e)
- {
- // ok
- }
+ // "Should fail: name and qname defined!"
+ String xmlFile = "metadata/event/portlet-event2-fail.xml";
+ _unmarshall10(xmlFile, true);
}
-
-
}
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/FilterTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/FilterTestEverythingTestCase.java 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/FilterTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -28,10 +28,7 @@
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
import org.gatein.pc.portlet.impl.metadata.common.InitParamMetaData;
import org.gatein.pc.portlet.impl.metadata.filter.FilterMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -39,29 +36,18 @@
public class FilterTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
- public void test01()
+ public void test01() throws Exception
{
- try
- {
- unmarshall10("metadata/filter/portlet-filter1.xml");
- // no filters in jsr 168
- fail();
- }
- catch (Exception e)
- {
- // ok
- }
+ _unmarshall10("metadata/filter/portlet-filter1.xml", true);
}
- @Test
public void test02()
{
try
{
String xmlFile = "metadata/filter/portlet-filter2.xml";
- PortletApplication20MetaData md = unmarshall20(xmlFile);
+ PortletApplication20MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/GeneralMetaDataTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -29,10 +29,7 @@
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
import org.gatein.pc.portlet.impl.metadata.PublicRenderParameterMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -40,44 +37,41 @@
public class GeneralMetaDataTestCase extends AbstractMetaDataTestCase
{
- @Test
public void test01()
{
try
{
- PortletApplication10MetaData md = this.unmarshall10("metadata/general/portlet1.xml");
+ PortletApplication10MetaData md = _unmarshall10("metadata/general/portlet1.xml");
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
}
catch (Exception e)
{
- fail(e, "No exception expected");
+ throw fail(e, "No exception expected");
}
}
- @Test
public void test02()
{
try
{
- PortletApplication20MetaData md = unmarshall20("metadata/general/portlet2.xml");
+ PortletApplication20MetaData md = _unmarshall10("metadata/general/portlet2.xml");
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
}
catch (Exception e)
{
- fail(e, "No exception expected");
+ throw fail(e, "No exception expected");
}
}
- @Test
public void test021()
{
try
{
- PortletApplication20MetaData md = unmarshall20("metadata/general/portlet2-jsr286.xml");
+ PortletApplication20MetaData md = _unmarshall10("metadata/general/portlet2-jsr286.xml");
assertEquals("2.0", md.getVersion());
assertTrue(md instanceof PortletApplication20MetaData);
@@ -103,19 +97,21 @@
assertEquals("Beschreibung", listener1.getDescription().getString(new Locale("de"), false));
assertNotNull(md.getListeners().get(1));
+
+ assertEquals("MyResourceBundle", md.getResourceBundle());
+ assertEquals(new URI("foobar"), md.getDefaultNamespace());
}
catch (Exception e)
{
- fail(e, "No exception expected");
+ throw fail(e, "No exception expected");
}
}
- @Test
public void test01_generated()
{
try
{
- PortletApplication10MetaData md = unmarshall10("metadata/general/portlet-app_1_0.xml");
+ PortletApplication10MetaData md = _unmarshall10("metadata/general/portlet-app_1_0.xml");
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
@@ -125,22 +121,21 @@
}
catch(Exception e)
{
- fail(e, "No exception expected");
+ throw fail(e, "No exception expected");
}
}
- @Test
public void test02_generated()
{
try
{
- PortletApplication20MetaData md = this.unmarshall20("metadata/general/portlet-app_2_0.xml");
+ PortletApplication20MetaData md = _unmarshall10("metadata/general/portlet-app_2_0.xml");
assertEquals("2.0", md.getVersion());
assertTrue(md instanceof PortletApplication20MetaData);
}
catch(Exception e)
{
- fail(e, "No exception expected");
+ throw fail(e, "No exception expected");
}
}
}
Added: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ListenerTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ListenerTestCase.java (rev 0)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/ListenerTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * 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.pc.mc.metadata;
+
+import org.gatein.pc.portlet.impl.metadata.ListenerMetaData;
+import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ListenerTestCase extends AbstractMetaDataTestCase
+{
+
+ public void test021()
+ {
+ try
+ {
+ PortletApplication20MetaData md = _unmarshall10("metadata/listener/portlet2.xml");
+ List<ListenerMetaData> listeners = md.getListeners();
+ assertNotNull(listeners);
+ assertEquals(1, listeners.size());
+ ListenerMetaData listenerMD = listeners.get(0);
+ assertNotNull(listenerMD);
+ assertEquals("MyListener", listenerMD.getListenerClass());
+ }
+ catch (Exception e)
+ {
+ throw 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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/PortletTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -38,10 +38,7 @@
import org.gatein.pc.portlet.impl.metadata.portlet.SecurityRoleRefMetaData;
import org.gatein.pc.portlet.impl.metadata.portlet.SupportedLocaleMetaData;
import org.gatein.pc.portlet.impl.metadata.portlet.SupportsMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -49,14 +46,13 @@
public class PortletTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
public void test01()
{
try
{
String xmlFile = "metadata/portlet/portlet1.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication10MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
@@ -212,19 +208,17 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ throw fail(e);
}
}
- @Test
public void test02()
{
try
{
String xmlFile = "metadata/portlet/portlet2.xml";
- PortletApplication20MetaData md = this.unmarshall20(xmlFile);
+ PortletApplication20MetaData md = this._unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -372,19 +366,17 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ throw fail(e);
}
}
- @Test
public void test021()
{
try
{
String xmlFile = "metadata/portlet/portlet2-jsr286.xml";
- PortletApplication20MetaData md = this.unmarshall20(xmlFile);
+ PortletApplication20MetaData md = this._unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -494,12 +486,10 @@
assertEquals("value1", p1.getContainerRuntimeOptions().get("option1").getValues().get(0));
assertEquals("value2", p1.getContainerRuntimeOptions().get("option1").getValues().get(1));
assertEquals("value3", p1.getContainerRuntimeOptions().get("option2").getValues().get(0));
-
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ throw fail(e);
}
}
Modified: components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/RenderParameterTestEverythingTestCase.java
===================================================================
--- components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/RenderParameterTestEverythingTestCase.java 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/RenderParameterTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -24,9 +24,7 @@
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
import org.gatein.pc.portlet.impl.metadata.PublicRenderParameterMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -34,7 +32,6 @@
public class RenderParameterTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
public void test02()
{
try
@@ -42,7 +39,7 @@
String xmlFile = "metadata/renderParameter/portlet2.xml";
- PortletApplication20MetaData md = unmarshall20(xmlFile);
+ PortletApplication20MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -75,5 +72,4 @@
fail();
}
}
-
}
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/SecurityConstraintTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -29,9 +29,7 @@
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
import org.gatein.pc.portlet.impl.metadata.portlet.PortletMetaData;
import org.gatein.pc.portlet.impl.metadata.security.SecurityConstraintMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -39,7 +37,6 @@
public class SecurityConstraintTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
public void test01()
{
try
@@ -47,7 +44,7 @@
String xmlFile = "metadata/security/portlet1.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication10MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
assertEquals("1.0", md.getVersion());
@@ -87,8 +84,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e);
}
}
@@ -129,7 +125,6 @@
}
*/
- @Test
public void test02()
{
try
@@ -137,7 +132,7 @@
String xmlFile = "metadata/security/portlet2.xml";
- PortletApplication20MetaData md = this.unmarshall20( xmlFile);
+ PortletApplication20MetaData md = this._unmarshall10( xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
assertEquals("2.0", md.getVersion());
@@ -173,8 +168,7 @@
}
catch (Exception e)
{
- e.printStackTrace();
- fail();
+ fail(e);
}
}
/*
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/java/org/gatein/pc/mc/metadata/UserAttributeTestEverythingTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -27,10 +27,7 @@
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
import org.gatein.pc.portlet.impl.metadata.UserAttributeMetaData;
-import org.jboss.unit.api.pojo.annotations.Test;
-import static org.jboss.unit.api.Assert.*;
-
/**
* @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
* @version $Revision$
@@ -38,14 +35,13 @@
public class UserAttributeTestEverythingTestCase extends AbstractMetaDataTestCase
{
- @Test
public void test01()
{
try
{
String xmlFile = "metadata/userAttribute/portlet1.xml";
- PortletApplication10MetaData md = unmarshall10(xmlFile);
+ PortletApplication10MetaData md = _unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication10MetaData);
@@ -68,14 +64,13 @@
}
}
- @Test
public void test02()
{
try
{
String xmlFile = "metadata/userAttribute/portlet2.xml";
- PortletApplication20MetaData md = this.unmarshall20(xmlFile);
+ PortletApplication20MetaData md = this._unmarshall10(xmlFile);
assertNotNull(md);
assertTrue(md instanceof PortletApplication20MetaData);
Modified: components/pc/trunk/mc/src/test/resources/metadata/filter/portlet-filter2.xml
===================================================================
--- components/pc/trunk/mc/src/test/resources/metadata/filter/portlet-filter2.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/resources/metadata/filter/portlet-filter2.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -55,10 +55,12 @@
<lifecycle>ACTION_PHASE</lifecycle>
</filter>
+<!--
<filter>
<filter-name>foo</filter-name>
</filter>
-
+-->
+
<filter-mapping>
<filter-name>testFilter</filter-name>
<portlet-name>Portlet1</portlet-name>
@@ -70,4 +72,4 @@
<portlet-name>Portlet2</portlet-name>
</filter-mapping>
-</portlet-app>
\ No newline at end of file
+</portlet-app>
Modified: components/pc/trunk/mc/src/test/resources/metadata/general/portlet-app_2_0.xml
===================================================================
--- components/pc/trunk/mc/src/test/resources/metadata/general/portlet-app_2_0.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/mc/src/test/resources/metadata/general/portlet-app_2_0.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -49,8 +49,8 @@
</supported-publishing-event>
<supported-public-render-parameter>supported-public-render-parameter</supported-public-render-parameter>
<container-runtime-option>
- <name>name</name>
- <value>value</value>
+ <name>portlet_container_runtime_option_name</name>
+ <value>portlet_container_runtime_option_value</value>
</container-runtime-option>
</portlet>
<custom-portlet-mode id="id">
@@ -112,7 +112,7 @@
<listener-class>listener-class</listener-class>
</listener>
<container-runtime-option>
- <name>name</name>
- <value>value</value>
+ <name>application_container_runtime_option_name</name>
+ <value>application_container_runtime_option_value</value>
</container-runtime-option>
</portlet-app>
Added: components/pc/trunk/mc/src/test/resources/metadata/listener/portlet2.xml
===================================================================
--- components/pc/trunk/mc/src/test/resources/metadata/listener/portlet2.xml (rev 0)
+++ components/pc/trunk/mc/src/test/resources/metadata/listener/portlet2.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -0,0 +1,14 @@
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <listener>
+ <description>listener</description>
+ <description xml:lang="fr">ecouteur</description>
+ <display-name>the listener</display-name>
+ <display-name xml:lang="fr">l'ecouteur</display-name>
+ <listener-class>MyListener</listener-class>
+ </listener>
+
+</portlet-app>
Added: components/pc/trunk/mc/src/test/resources/metadata/runtimeoption/portlet.xml
===================================================================
--- components/pc/trunk/mc/src/test/resources/metadata/runtimeoption/portlet.xml (rev 0)
+++ components/pc/trunk/mc/src/test/resources/metadata/runtimeoption/portlet.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+ <portlet>
+ <portlet-name>portlet-name</portlet-name>
+ <portlet-class>portlet-class</portlet-class>
+ <supports>
+ <mime-type>mime-type</mime-type>
+ </supports>
+ <container-runtime-option>
+ <name>portlet_container_runtime_option_name</name>
+ <value>portlet_container_runtime_option_value</value>
+ </container-runtime-option>
+ </portlet>
+<!--
+ <container-runtime-option>
+ <name>application_container_runtime_option_name</name>
+ <value>application_container_runtime_option_value</value>
+ </container-runtime-option>
+-->
+</portlet-app>
Modified: components/pc/trunk/pom.xml
===================================================================
--- components/pc/trunk/pom.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/pom.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -184,6 +184,11 @@
<artifactId>standard</artifactId>
<version>${version.apache.taglibs}</version>
</dependency>
+ <dependency>
+ <groupId>org.staxnav</groupId>
+ <artifactId>staxnav.core</artifactId>
+ <version>0.9.3</version>
+ </dependency>
<dependency>
<groupId>org.codehaus.cargo</groupId>
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 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/portlet/src/main/java/org/gatein/pc/portlet/impl/metadata/PortletApplication10MetaData.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -125,7 +125,7 @@
public PortletMetaData getPortlet(String portletName)
{
- return portlets.get(portletName);
+ return portlets != null ? portlets.get(portletName) : null;
}
public void addPortlet(PortletMetaData portlet)
Modified: components/pc/trunk/test/core/src/main/resources/common.xml
===================================================================
--- components/pc/trunk/test/core/src/main/resources/common.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/core/src/main/resources/common.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -50,6 +50,10 @@
<pathelement location="${org.jboss:jbossxb:jar}"/>
</path>
+ <path id="staxnav">
+ <pathelement location="${org.staxnav:staxnav.core:jar}"/>
+ </path>
+
<path id="portal-common">
</path>
Modified: components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/ext/dispatcher/AbstractDispatchedSessionTestCase.java
===================================================================
--- components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/ext/dispatcher/AbstractDispatchedSessionTestCase.java 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/core/src/test/java/org/gatein/pc/test/portlet/jsr286/ext/dispatcher/AbstractDispatchedSessionTestCase.java 2011-06-24 19:41:41 UTC (rev 6738)
@@ -70,7 +70,8 @@
PortletSession session = request.getPortletSession(false);
assertNotNull(session);
assertTrue(session.isNew());
- assertEquals("foo_dispatched_value", session.getAttribute("foo", sessionScope));
+ Object value = session.getAttribute("foo", sessionScope);
+ assertEquals("foo_dispatched_value", value);
//
return new InvokeGetResponse(response.createRenderURL().toString());
Modified: components/pc/trunk/test/servers/jboss42/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jboss42/src/test/build.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/jboss42/src/test/build.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -19,6 +19,7 @@
<path refid="portal-web"/>
<path refid="portal-portlet"/>
<path refid="jboss-xb"/>
+ <path refid="staxnav"/>
<path location="${org.jboss:jboss-common-core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jboss51/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jboss51/src/test/build.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/jboss51/src/test/build.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -19,6 +19,7 @@
<path refid="portal-web"/>
<path refid="portal-portlet"/>
<path refid="jboss-xb"/>
+ <path refid="staxnav"/>
<path location="${org.jboss:jboss-common-core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jboss6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jboss6/src/test/build.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/jboss6/src/test/build.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -19,6 +19,7 @@
<path refid="portal-web"/>
<path refid="portal-portlet"/>
<path refid="jboss-xb"/>
+ <path refid="staxnav"/>
<path location="${org.jboss:jboss-common-core:jar}"/>
</path>
Modified: components/pc/trunk/test/servers/jetty6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/jetty6/src/test/build.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/jetty6/src/test/build.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -20,6 +20,7 @@
<path refid="portal-portlet"/>
<path refid="jboss-unit"/>
<path refid="jboss-xb"/>
+ <path refid="staxnav"/>
<pathelement path="${apache-xerces:xercesImpl:jar}"/>
<pathelement path="${apache-xerces:resolver:jar}"/>
<pathelement path="${apache-xerces.xml-apis:jar}"/>
Modified: components/pc/trunk/test/servers/pom.xml
===================================================================
--- components/pc/trunk/test/servers/pom.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/pom.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -64,7 +64,7 @@
</activation>
<modules>
<module>tomcat6</module>
- <module>tomcat7</module>
+ <!--<module>tomcat7</module>-->
<module>jboss51</module>
<module>jboss6</module>
<module>jetty6</module>
Modified: components/pc/trunk/test/servers/src/common/resources/common.xml
===================================================================
--- components/pc/trunk/test/servers/src/common/resources/common.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/src/common/resources/common.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -50,6 +50,10 @@
<pathelement location="${org.jboss:jbossxb:jar}"/>
</path>
+ <path id="staxnav">
+ <pathelement location="${org.staxnav:staxnav.core:jar}"/>
+ </path>
+
<path id="portal-common">
</path>
Modified: components/pc/trunk/test/servers/tomcat6/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat6/src/test/build.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/tomcat6/src/test/build.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -20,6 +20,7 @@
<path refid="portal-portlet"/>
<path refid="jboss-unit"/>
<path refid="jboss-xb"/>
+ <path refid="staxnav"/>
<pathelement location="${apache-xerces:xercesImpl:jar}"/>
<pathelement location="${apache-xerces:xml-apis:jar}"/>
<pathelement location="${apache-xerces:resolver:jar}"/>
Modified: components/pc/trunk/test/servers/tomcat7/src/test/build.xml
===================================================================
--- components/pc/trunk/test/servers/tomcat7/src/test/build.xml 2011-06-24 16:38:34 UTC (rev 6737)
+++ components/pc/trunk/test/servers/tomcat7/src/test/build.xml 2011-06-24 19:41:41 UTC (rev 6738)
@@ -20,6 +20,7 @@
<path refid="portal-portlet"/>
<path refid="jboss-unit"/>
<path refid="jboss-xb"/>
+ <path refid="staxnav"/>
<pathelement path="${apache-xerces:xercesImpl:jar}"/>
<pathelement path="${apache-xerces:resolver:jar}"/>
<pathelement path="${apache-xerces.xml-apis:jar}"/>
13 years, 6 months
gatein SVN: r6737 - in epp/portal/branches/EPP_5_1_WSRP: component/wsrp/src/main/java/conf and 3 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-06-24 12:38:34 -0400 (Fri, 24 Jun 2011)
New Revision: 6737
Added:
epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/conf/wsrp-consumers-config.xml
Modified:
epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java
epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/JCRProducerConfigurationService.java
epp/portal/branches/EPP_5_1_WSRP/pom.xml
Log:
- GTNPORTAL-1938: Made JCRConsumerRegistry able to get its configuration from an InputStream instead of always using the default configuration file.
- Renamed JCRProducerConfigurationService.setDefaultConfigurationIS to setConfigurationIS to be clearer and removed deprecation as it's currently needed.
Added: epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/conf/wsrp-consumers-config.xml
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/conf/wsrp-consumers-config.xml (rev 0)
+++ epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/conf/wsrp-consumers-config.xml 2011-06-24 16:38:34 UTC (rev 6737)
@@ -0,0 +1,94 @@
+<?xml version='1.0' encoding='UTF-8' ?>
+
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, 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.
+ -->
+
+<deployments xmlns="http://www.gatein.org/xml/ns/gatein_wsrp_consumer_1_0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_wsrp_consumer_1_0 http://www.jboss.org/portal/xsd/gatein_wsrp_consumer_1_0.xsd">
+ <deployment>
+ <wsrp-producer id="selfv1" expiration-cache="500" ws-timeout="50000">
+ <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v1/MarkupService?wsdl</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <deployment>
+ <wsrp-producer id="selfv2" expiration-cache="500" ws-timeout="50000">
+ <endpoint-wsdl-url>http://localhost:8080/wsrp-producer/v2/MarkupService?wsdl</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <!--<deployment>
+ <wsrp-producer id="NetUnity" expiration-cache="300">
+ <endpoint-wsdl-url>http://wsrp.netunitysoftware.com/WSRPTestService/WSRPTestService.asmx?Ope...</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="NetUnityV2" expiration-cache="300">
+ <endpoint-wsdl-url>http://www.netunitysoftware.com/wsrp2interop/WsrpProducer.asmx?Operation=...</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>
+ <deployment>
+ <wsrp-producer id="NetUnityV1" expiration-cache="300">
+ <endpoint-wsdl-url>http://www.netunitysoftware.com/wsrp2interop/WsrpProducer.asmx?Operation=...</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="vignette" expiration-cache="300">
+ <endpoint-wsdl-url>http://wsrpdemo.vignette.com:8080/producer/wsdl</endpoint-wsdl-url>
+ <registration-data>
+ <property>
+ <name>com.vignette.wsrp.registration.username</name>
+ <lang>en</lang>
+ <value>test</value>
+ </property>
+ <property>
+ <name>com.vignette.wsrp.registration.password</name>
+ <lang>en</lang>
+ <value>test</value>
+ </property>
+ </registration-data>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="bea" expiration-cache="300">
+ <endpoint-wsdl-url>http://wsrp.bea.com:7001/producer/producer?WSDL</endpoint-wsdl-url>
+ <registration-data>
+ <property>
+ <name>{urn:bea:wlp:prop:reg:registration}consumerRole</name>
+ <lang>en</lang>
+ <value>insider</value>
+ </property>
+ </registration-data>
+ </wsrp-producer>
+ </deployment>-->
+ <!--<deployment>
+ <wsrp-producer id="oracle" expiration-cache="300">
+ <endpoint-wsdl-url>http://portalstandards.oracle.com/portletapp/portlets?WSDL</endpoint-wsdl-url>
+ <registration-data/>
+ </wsrp-producer>
+ </deployment>-->
+</deployments>
Modified: epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2011-06-24 13:59:39 UTC (rev 6736)
+++ epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/WSRPServiceIntegration.java 2011-06-24 16:38:34 UTC (rev 6737)
@@ -88,11 +88,13 @@
private static final String PRODUCER_CONFIG_LOCATION = "producerConfigLocation";
private static final String CONSUMERS_CONFIG_LOCATION = "consumersConfigLocation";
- private final InputStream configurationIS;
+ private final InputStream producerConfigurationIS;
private final String producerConfigLocation;
private WSRPProducer producer;
- private ConsumerRegistry consumerRegistry;
+ private final InputStream consumersConfigurationIS;
+ private final String consumersConfigLocation;
+ private JCRConsumerRegistry consumerRegistry;
private ExoContainer container;
private final ExoKernelIntegration exoKernelIntegration;
private final boolean bypass;
@@ -106,7 +108,6 @@
// todo: we currently only allow the service to go through initialization if we are running in the default portal
// as this service is not meant to work with extensions yet...
- String consumersConfigLocation;
if ("portal".equals(context.getName()))
{
if (params != null)
@@ -120,7 +121,8 @@
+ PRODUCER_CONFIG_LOCATION + "and " + CONSUMERS_CONFIG_LOCATION);
}
- configurationIS = configurationManager.getInputStream(CLASSPATH + producerConfigLocation);
+ producerConfigurationIS = configurationManager.getInputStream(CLASSPATH + producerConfigLocation);
+ consumersConfigurationIS = configurationManager.getInputStream(CLASSPATH + consumersConfigLocation);
container = context.getContainer();
@@ -135,7 +137,8 @@
producerConfigLocation = null;
consumersConfigLocation = null;
- configurationIS = null;
+ producerConfigurationIS = null;
+ consumersConfigurationIS = null;
exoKernelIntegration = null;
bypass = true;
}
@@ -165,7 +168,7 @@
try
{
producerConfigurationService = new JCRProducerConfigurationService(container);
- producerConfigurationService.setDefaultConfigurationIS(configurationIS);
+ producerConfigurationService.setConfigurationIS(producerConfigurationIS);
producerConfigurationService.reloadConfiguration();
}
catch (Exception e)
@@ -282,6 +285,7 @@
consumerRegistry = new JCRConsumerRegistry(container);
consumerRegistry.setFederatingPortletInvoker(federatingPortletInvoker);
consumerRegistry.setSessionEventBroadcaster(sessionEventBroadcaster);
+ consumerRegistry.setConfigurationIS(consumersConfigurationIS);
// create ConsumerStructureProvider and register it to listen to page events
POMSessionManager sessionManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
@@ -305,7 +309,7 @@
}
catch (Exception e)
{
- throw new RuntimeException("Couldn't start WSRP consumers registry.", e);
+ throw new RuntimeException("Couldn't start WSRP consumers registry from configuration " + consumersConfigLocation, e);
}
container.registerComponentInstance(ConsumerRegistry.class, consumerRegistry);
}
Modified: epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java 2011-06-24 13:59:39 UTC (rev 6736)
+++ epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/consumer/JCRConsumerRegistry.java 2011-06-24 16:38:34 UTC (rev 6737)
@@ -39,6 +39,7 @@
import org.gatein.wsrp.consumer.registry.AbstractConsumerRegistry;
import org.gatein.wsrp.consumer.registry.xml.XMLConsumerRegistry;
+import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
@@ -54,6 +55,7 @@
// private NewJCRPersister persister;
private JCRPersister persister;
private static final String PRODUCER_INFOS_PATH = ProducerInfosMapping.NODE_NAME;
+ private InputStream configurationIS;
public JCRConsumerRegistry(ExoContainer container) throws Exception
{
@@ -67,6 +69,11 @@
// persister = NewJCRPersister.getInstance(container);
}
+ public void setConfigurationIS(InputStream configurationIS)
+ {
+ this.configurationIS = configurationIS;
+ }
+
@Override
protected void save(ProducerInfo info, String messageOnError)
{
@@ -167,7 +174,7 @@
List<ProducerInfoMapping> infos = producerInfosMapping.getProducerInfos();
// Load from XML
- XMLConsumerRegistry fromXML = new XMLConsumerRegistry();
+ XMLConsumerRegistry fromXML = new XMLConsumerRegistry(configurationIS);
fromXML.reloadConsumers();
// Save to JCR
Modified: epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/JCRProducerConfigurationService.java
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/JCRProducerConfigurationService.java 2011-06-24 13:59:39 UTC (rev 6736)
+++ epp/portal/branches/EPP_5_1_WSRP/component/wsrp/src/main/java/org/gatein/portal/wsrp/state/producer/configuration/JCRProducerConfigurationService.java 2011-06-24 16:38:34 UTC (rev 6737)
@@ -46,7 +46,7 @@
{
private static String PRODUCER_CONFIGURATION_PATH = ProducerConfigurationMapping.NODE_NAME;
- private InputStream defaultConfigurationIS;
+ private InputStream configurationIS;
// private NewJCRPersister persister;
private JCRPersister persister;
@@ -62,15 +62,9 @@
// persister = NewJCRPersister.getInstance(container);
}
- /**
- * todo: remove
- *
- * @param is
- * @deprecated this should be removed when a better initialization of default is setup
- */
- public void setDefaultConfigurationIS(InputStream is)
+ public void setConfigurationIS(InputStream is)
{
- this.defaultConfigurationIS = is;
+ this.configurationIS = is;
}
protected void loadConfiguration() throws Exception
@@ -84,7 +78,7 @@
{
pcm = session.insert(ProducerConfigurationMapping.class, PRODUCER_CONFIGURATION_PATH);
- ProducerConfigurationService service = new SimpleXMLProducerConfigurationService(defaultConfigurationIS);
+ ProducerConfigurationService service = new SimpleXMLProducerConfigurationService(configurationIS);
service.reloadConfiguration();
configuration = service.getConfiguration();
Modified: epp/portal/branches/EPP_5_1_WSRP/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_WSRP/pom.xml 2011-06-24 13:59:39 UTC (rev 6736)
+++ epp/portal/branches/EPP_5_1_WSRP/pom.xml 2011-06-24 16:38:34 UTC (rev 6737)
@@ -48,7 +48,7 @@
<org.gatein.wci.version>2.0.2-GA</org.gatein.wci.version>
<org.gatein.pc.version>2.2.0-GA</org.gatein.pc.version>
<org.picketlink.idm>1.1.8.GA</org.picketlink.idm>
- <org.gatein.wsrp.version>2.0.1-EPP511-CR01</org.gatein.wsrp.version>
+ <org.gatein.wsrp.version>2.0.1-GA-SNAPSHOT</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
<rhino.version>1.6R5</rhino.version>
13 years, 6 months
gatein SVN: r6736 - epp/portal/branches.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-06-24 09:59:39 -0400 (Fri, 24 Jun 2011)
New Revision: 6736
Added:
epp/portal/branches/EPP_5_1_WSRP/
Log:
EPP 5.1.1 Wsrp test branch
13 years, 6 months
gatein SVN: r6735 - in epp/portal/branches/EPP_5_1_Branch: distribution/jboss-eap and 3 other directories.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-06-24 09:57:00 -0400 (Fri, 24 Jun 2011)
New Revision: 6735
Modified:
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/pom.xml
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/assemble.xml
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jboss-log4j.xml.patch
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.deployer.web.xml.patch
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.sar.context.xml.patch
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/properties-service.xml.patch
epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/run.conf.bat.patch
epp/portal/branches/EPP_5_1_Branch/distribution/pom.xml
epp/portal/branches/EPP_5_1_Branch/examples/portlets/api/
Log:
EAP 5.1.1.ER2 packaging
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/pom.xml 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/pom.xml 2011-06-24 13:57:00 UTC (rev 6735)
@@ -51,7 +51,7 @@
<!-- EAP overlay -->
<dependency>
- <groupId>org.jboss</groupId>
+ <groupId>org.jboss.jbossas</groupId>
<artifactId>jboss-eap</artifactId>
<version>${eap.version}</version>
<type>zip</type>
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/assemble.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/assemble.xml 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/assemble.xml 2011-06-24 13:57:00 UTC (rev 6735)
@@ -91,7 +91,7 @@
<!-- EAP -->
<dependencySet>
<includes>
- <include>org.jboss:jboss-eap:zip</include>
+ <include>*:jboss-eap:zip</include>
</includes>
<outputDirectory></outputDirectory>
<unpack>true</unpack>
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jboss-log4j.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 13:57:00 UTC (rev 6735)
@@ -1,25 +1,25 @@
-diff -uNr --exclude .svn jboss-log4j.xml.orig jboss-log4j.xml
---- jboss-log4j.xml.orig 2010-03-30 16:51:10.000000000 +0200
-+++ jboss-log4j.xml 2010-05-10 11:03:24.000000000 +0200
-@@ -237,6 +237,21 @@
- <priority value="INFO"/>
- </category>
-
-+ <!-- Limit the JSR170 categories -->
-+ <category name="exo.jcr">
-+ <priority value="INFO"/>
-+ </category>
-+
-+ <!-- Limit the JSR-168 and JSR-286 categories -->
-+ <category name="org.exoplatform.services">
-+ <priority value="INFO"/>
-+ </category>
-+
-+ <!-- Limit verbose jgroups when running in cluster -->
-+ <category name="org.jgroups.protocols.UDP">
-+ <priority value="ERROR" />
-+ </category>
-+
- <!-- Limit the verbose facelets compiler -->
- <category name="facelets.compiler">
- <priority value="WARN"/>
+--- jboss-log4j.xml.orig 2011-06-24 10:50:16.000000000 +0200
++++ jboss-log4j.xml 2011-06-24 11:11:10.341965795 +0200
+@@ -180,7 +180,22 @@
+ <category name="org.apache">
+ <priority value="INFO"/>
+ </category>
++
++ <!-- Limit the JSR170 categories -->
++ <category name="exo.jcr">
++ <priority value="INFO"/>
++ </category>
++
++ <!-- Limit the JSR-168 and JSR-286 categories -->
++ <category name="org.exoplatform.services">
++ <priority value="INFO"/>
++ </category>
+
++ <!-- Limit verbose jgroups when running in cluster -->
++ <category name="org.jgroups.protocols.UDP">
++ <priority value="ERROR" />
++ </category>
++
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <category name="jacorb">
+ <priority value="WARN"/>
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.deployer.web.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 13:57:00 UTC (rev 6735)
@@ -1,15 +1,16 @@
diff -uNr web.xml.orig web.xml
---- web.xml.orig 2009-10-20 21:29:24.000000000 +0200
-+++ web.xml 2010-03-04 10:37:20.000000000 +0100
-@@ -280,6 +280,11 @@
- <param-name>tagLibJar1</param-name>
- <param-value>jstl.jar</param-value>
- </init-param>
-+ <init-param>
-+ <description>Portlet standard tlds</description>
-+ <param-name>tagLibJar2</param-name>
-+ <param-value>${jboss.server.home.url}/deploy/gatein.ear/lib/%pc-portlet-version-jar%</param-value>
-+ </init-param>
-
-
- <load-on-startup>3</load-on-startup>
+--- web.xml.orig 2011-06-24 12:58:10.000000000 +0200
++++ web.xml 2011-06-24 13:06:59.595627467 +0200
+@@ -284,7 +284,11 @@
+ <param-name>tagLibJar1</param-name>
+ <param-value>jstl.jar</param-value>
+ </init-param>
+-
++ <init-param>
++ <description>Portlet standard tlds</description>
++ <param-name>tagLibJar2</param-name>
++ <param-value>${jboss.server.home.url}/deploy/gatein.ear/lib/%pc-portlet-version-jar%</param-value>
++ </init-param>
+
+ <load-on-startup>3</load-on-startup>
+ </servlet>
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.sar.context.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 13:57:00 UTC (rev 6735)
@@ -1,12 +1,11 @@
---- context.xml.orig 2010-03-30 10:51:10.000000000 +0200
-+++ context.xml 2010-04-27 13:42:27.000000000 +0200
+--- context.xml.orig 2011-06-24 13:54:02.000000000 +0200
++++ context.xml 2011-06-24 14:01:54.304475869 +0200
@@ -13,5 +13,8 @@
- role for servlet init/destroy events.
- -->
- <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
--
+ role for servlet init/destroy events.
+ -->
+ <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
+
+ <!-- Needed for portal session paths -->
+ <SessionCookie path="/"/>
-+
- </Context>
+
+ </Context>
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/properties-service.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/properties-service.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/properties-service.xml.patch 2011-06-24 13:57:00 UTC (rev 6735)
@@ -1,14 +1,14 @@
---- properties-service.xml.orig 2010-10-05 12:40:54.671128735 +0200
-+++ properties-service.xml 2010-10-05 12:41:40.823129364 +0200
-@@ -40,6 +40,11 @@
- <mbean code="org.jboss.varia.property.SystemPropertiesService"
- name="jboss:type=Service,name=SystemProperties">
-
+--- properties-service.xml.orig 2011-06-24 13:22:45.000000000 +0200
++++ properties-service.xml 2011-06-24 13:41:48.865959790 +0200
+@@ -39,6 +39,11 @@
+
+ <mbean code="org.jboss.varia.property.SystemPropertiesService"
+ name="jboss:type=Service,name=SystemProperties">
++
+ <attribute name="Properties">
+ exo.conf.dir.name=gatein
+ gatein.runtime.context=epp
+ </attribute>
-+
- <!--
- | Load properties from each of the given comma seperated URLs
-
+
+ <!--
+ | Load properties from each of the given comma seperated URLs
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/run.conf.bat.patch
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/run.conf.bat.patch 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/jboss-eap/src/patch/EAP/run.conf.bat.patch 2011-06-24 13:57:00 UTC (rev 6735)
@@ -1,10 +1,8 @@
-diff -uNr run.conf.bat.orig run.conf.bat
---- run.conf.bat.orig 2009-10-21 03:28:28.000000000 +0200
-+++ run.conf.bat 2010-03-09 17:17:38.000000000 +0100
-@@ -55,3 +55,6 @@
- rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
+--- run.conf.bat.orig 2011-06-24 14:18:19.000000000 +0200
++++ run.conf.bat 2011-06-24 14:19:53.707990235 +0200
+@@ -56,3 +56,5 @@
:JAVA_OPTS_SET
-+
-+rem # GateIn configuration directory
-+set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
+
++rem # GateIn configuration directory
++set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
Modified: epp/portal/branches/EPP_5_1_Branch/distribution/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/distribution/pom.xml 2011-06-24 13:26:16 UTC (rev 6734)
+++ epp/portal/branches/EPP_5_1_Branch/distribution/pom.xml 2011-06-24 13:57:00 UTC (rev 6735)
@@ -15,9 +15,9 @@
<name>Distribution</name>
<properties>
- <eap.version>5.1.0</eap.version>
+ <eap.version>5.1.1.ER2</eap.version>
<eap.dir>jboss-eap-5.1</eap.dir>
- <epp.dir>jboss-epp-5.1.1</epp.dir>
+ <epp.dir>jboss-epp-5.1</epp.dir>
<!-- portlet bridge directory - not used, distribution module name is used as directory name -->
<portletbridge.directory>portletbridge</portletbridge.directory>
Property changes on: epp/portal/branches/EPP_5_1_Branch/examples/portlets/api
___________________________________________________________________
Added: svn:ignore
+ target
13 years, 6 months
gatein SVN: r6734 - in epp/portal/branches/EPP_5_2_Branch/distribution: jboss-epp/src and 1 other directories.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-06-24 09:26:16 -0400 (Fri, 24 Jun 2011)
New Revision: 6734
Added:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch
Removed:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml
Log:
JBEPP-942 Renaming folder for jboss-epp
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/assemble.xml 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,101 +0,0 @@
-
-<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>bin</id>
- <formats>
- <format>dir</format>
- </formats>
- <includeBaseDirectory>false</includeBaseDirectory>
-
- <dependencySets>
-
-<!-- START profiles -->
- <dependencySet>
- <includes>
- <include>*.distribution.deploy:*:zip</include>
- </includes>
- <excludes>
- <exclude>*:hibernate-core:3.3.2.GA:jar</exclude>
- <exclude>*:jaxb-api:2.1:jar</exclude>
- <exclude>*:stax-api:1.0:jar</exclude>
- </excludes>
- <outputDirectory>${eap.dir}/jboss-as/server/default</outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-
- <dependencySet>
- <includes>
- <include>*.distribution.deploy:*:zip</include>
- </includes>
- <excludes>
- <exclude>*:hibernate-core:3.3.2.GA:jar</exclude>
- <exclude>*:jaxb-api:2.1:jar</exclude>
- <exclude>*:stax-api:1.0:jar</exclude>
-
- <!-- Exclude cluster -->
- <exclude>*:hibernate-jbosscache2:3.3.2.GA:jar</exclude>
- <exclude>*:jbosscache-core:3.2.6.GA:jar</exclude>
- <exclude>*:jgroups:2.6.13.GA:jar</exclude>
- </excludes>
- <outputDirectory>${eap.dir}/jboss-as/server/all</outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-
- <dependencySet>
- <includes>
- <include>*.distribution.deploy:*:zip</include>
- </includes>
- <excludes>
- <exclude>*:hibernate-core:3.3.2.GA:jar</exclude>
- <exclude>*:jaxb-api:2.1:jar</exclude>
- <exclude>*:stax-api:1.0:jar</exclude>
-
- <!-- Exclude cluster -->
- <exclude>*:hibernate-jbosscache2:3.3.2.GA:jar</exclude>
- <exclude>*:jbosscache-core:3.2.6.GA:jar</exclude>
- <exclude>*:jgroups:2.6.13.GA:jar</exclude>
- </excludes>
- <outputDirectory>${eap.dir}/jboss-as/server/production</outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-<!-- END profiles -->
-
- <!-- Modules - portletbridge -->
- <dependencySet>
- <includes>
- <include>*.distribution.root:*:zip</include>
- </includes>
- <outputDirectory>${eap.dir}/${artifact.artifactId}</outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-
- <!-- SSO Module - with root dir, renamed later -->
- <dependencySet>
- <includes>
- <include>org.gatein.sso:*:zip</include>
- </includes>
- <outputDirectory>${eap.dir}</outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-
- <!-- Examples -->
- <dependencySet>
- <includes>
- <include>*.distribution:examples:zip</include>
- </includes>
- <outputDirectory>${eap.dir}/jboss-as/docs/examples/portal</outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-
- <!-- EAP -->
- <dependencySet>
- <includes>
- <include>org.jboss:jboss-eap:zip</include>
- </includes>
- <outputDirectory></outputDirectory>
- <unpack>true</unpack>
- </dependencySet>
-
- </dependencySets>
-</assembly>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/assemble.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,101 @@
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>bin</id>
+ <formats>
+ <format>dir</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <dependencySets>
+
+<!-- START profiles -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution.deploy:*:zip</include>
+ </includes>
+ <excludes>
+ <exclude>*:hibernate-core:3.3.2.GA:jar</exclude>
+ <exclude>*:jaxb-api:2.1:jar</exclude>
+ <exclude>*:stax-api:1.0:jar</exclude>
+ </excludes>
+ <outputDirectory>${eap.dir}/jboss-as/server/default</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <dependencySet>
+ <includes>
+ <include>*.distribution.deploy:*:zip</include>
+ </includes>
+ <excludes>
+ <exclude>*:hibernate-core:3.3.2.GA:jar</exclude>
+ <exclude>*:jaxb-api:2.1:jar</exclude>
+ <exclude>*:stax-api:1.0:jar</exclude>
+
+ <!-- Exclude cluster -->
+ <exclude>*:hibernate-jbosscache2:3.3.2.GA:jar</exclude>
+ <exclude>*:jbosscache-core:3.2.6.GA:jar</exclude>
+ <exclude>*:jgroups:2.6.13.GA:jar</exclude>
+ </excludes>
+ <outputDirectory>${eap.dir}/jboss-as/server/all</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <dependencySet>
+ <includes>
+ <include>*.distribution.deploy:*:zip</include>
+ </includes>
+ <excludes>
+ <exclude>*:hibernate-core:3.3.2.GA:jar</exclude>
+ <exclude>*:jaxb-api:2.1:jar</exclude>
+ <exclude>*:stax-api:1.0:jar</exclude>
+
+ <!-- Exclude cluster -->
+ <exclude>*:hibernate-jbosscache2:3.3.2.GA:jar</exclude>
+ <exclude>*:jbosscache-core:3.2.6.GA:jar</exclude>
+ <exclude>*:jgroups:2.6.13.GA:jar</exclude>
+ </excludes>
+ <outputDirectory>${eap.dir}/jboss-as/server/production</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+<!-- END profiles -->
+
+ <!-- Modules - portletbridge -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution.root:*:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}/${artifact.artifactId}</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- SSO Module - with root dir, renamed later -->
+ <dependencySet>
+ <includes>
+ <include>org.gatein.sso:*:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- Examples -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution:examples:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}/jboss-as/docs/examples/portal</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- EAP -->
+ <dependencySet>
+ <includes>
+ <include>${eap.groupId}:jboss-eap:zip</include>
+ </includes>
+ <outputDirectory></outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ </dependencySets>
+</assembly>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/build.xml 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,67 +0,0 @@
-
-<project name="packageEPP">
- <target name="patch">
-
- <echo>***************************************************************</echo>
- <echo>Patching EAP configuration: ${toConfiguration}</echo>
- <echo>***************************************************************</echo>
- <echo>Patching EAP log4j configuration ...</echo>
- <patch
- originalfile="${epp.path}/jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"
- patchfile="src/patch/EAP/jboss-log4j.xml.patch"
- failonerror="true"
- />
-
- <echo>Patching EAP deployers/jbossweb.deployer/web.xml configuration ...</echo>
- <patch
- originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"
- patchfile="src/patch/EAP/jbossweb.deployer.web.xml.patch"
- failonerror="true"
- />
- <makeurl property="pc.jarfile.url">
- <fileset dir="${epp.path}/jboss-as/server/default/deploy/gatein.ear/lib" includes="pc-portlet*"/>
- </makeurl>
- <basename property="pc.jarfile.name" file="${pc.jarfile.url}"/>
- <echo message="pc.jarfile: ${pc.jarfile.name}"/>
- <replace
- file="${epp.path}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"
- token="%pc-portlet-version-jar%"
- value="${pc.jarfile.name}"
- />
-
- <echo>Patching EAP properties-service.xml ...</echo>
- <patch
- originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deploy/properties-service.xml"
- patchfile="src/patch/EAP/properties-service.xml.patch"
- failonerror="true"
- />
-
- <echo>Patching EAP jbossweb.sar/context.xml ...</echo>
- <patch
- originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"
- patchfile="src/patch/EAP/jbossweb.sar.context.xml.patch"
- failonerror="true"
- />
-
- </target>
-
- <target name="patchInZip">
- <!-- unzip -->
- <unzip src="${epp.zip}" dest="${tmp.dir}">
- <patternset>
- <include name="jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"/>
- <include name="jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"/>
- <include name="jboss-as/server/${toConfiguration}/deploy/properties-service.xml"/>
- <include name="jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"/>
- </patternset>
- </unzip>
- <!-- patch -->
- <antcall inheritRefs="true">
- <target name="patch"/>
- <property name="epp.zip" value="${tmp.dir}"/>
- </antcall>
- <!-- zip -->
- <zip destfile="${epp.zip}" basedir="${tmp.dir}" update="true">
- </zip>
- </target>
-</project>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/build.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,73 @@
+
+<project name="packageEPP">
+ <target name="patch">
+
+ <echo>***************************************************************</echo>
+ <echo>Patching EAP configuration: ${toConfiguration}</echo>
+ <echo>***************************************************************</echo>
+ <echo>Patching EAP log4j configuration ...</echo>
+ <patch
+ originalfile="${epp.path}/jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"
+ patchfile="src/patch/EAP/jboss-log4j.xml.patch"
+ failonerror="true"
+ />
+
+ <!-- Setting this to false may broke build, useful for preparing patches -->
+ <property name="patch.failonerror">true</property>
+
+ <!--
+ patch jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml < src/patch/EAP/jbossweb.deployer.web.xml.patch
+ -->
+ <echo>Patching EAP deployers/jbossweb.deployer/web.xml configuration ...</echo>
+ <patch
+ originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"
+ patchfile="src/patch/EAP/jbossweb.deployer.web.xml.patch"
+ failonerror="${patch.failonerror}"
+ />
+ <makeurl property="pc.jarfile.url">
+ <fileset dir="${epp.path}/jboss-as/server/default/deploy/gatein.ear/lib" includes="pc-portlet*"/>
+ </makeurl>
+ <basename property="pc.jarfile.name" file="${pc.jarfile.url}"/>
+ <echo message="pc.jarfile: ${pc.jarfile.name}"/>
+ <replace
+ file="${epp.path}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"
+ token="%pc-portlet-version-jar%"
+ value="${pc.jarfile.name}"
+ />
+
+ <echo>Patching EAP properties-service.xml ...</echo>
+ <patch
+ originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deploy/properties-service.xml"
+ patchfile="src/patch/EAP/properties-service.xml.patch"
+ failonerror="${patch.failonerror}"
+ />
+
+ <echo>Patching EAP jbossweb.sar/context.xml ...</echo>
+ <patch
+ originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"
+ patchfile="src/patch/EAP/jbossweb.sar.context.xml.patch"
+ failonerror="${patch.failonerror}"
+ />
+
+ </target>
+
+ <target name="patchInZip">
+ <!-- unzip -->
+ <unzip src="${epp.zip}" dest="${tmp.dir}">
+ <patternset>
+ <include name="jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"/>
+ <include name="jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"/>
+ <include name="jboss-as/server/${toConfiguration}/deploy/properties-service.xml"/>
+ <include name="jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"/>
+ </patternset>
+ </unzip>
+ <!-- patch -->
+ <antcall inheritRefs="true">
+ <target name="patch"/>
+ <property name="epp.zip" value="${tmp.dir}"/>
+ </antcall>
+ <!-- zip -->
+ <zip destfile="${epp.zip}" basedir="${tmp.dir}" update="true">
+ </zip>
+ </target>
+</project>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,25 +0,0 @@
-diff -uNr --exclude .svn jboss-log4j.xml.orig jboss-log4j.xml
---- jboss-log4j.xml.orig 2010-03-30 16:51:10.000000000 +0200
-+++ jboss-log4j.xml 2010-05-10 11:03:24.000000000 +0200
-@@ -237,6 +237,21 @@
- <priority value="INFO"/>
- </category>
-
-+ <!-- Limit the JSR170 categories -->
-+ <category name="exo.jcr">
-+ <priority value="INFO"/>
-+ </category>
-+
-+ <!-- Limit the JSR-168 and JSR-286 categories -->
-+ <category name="org.exoplatform.services">
-+ <priority value="INFO"/>
-+ </category>
-+
-+ <!-- Limit verbose jgroups when running in cluster -->
-+ <category name="org.jgroups.protocols.UDP">
-+ <priority value="ERROR" />
-+ </category>
-+
- <!-- Limit the verbose facelets compiler -->
- <category name="facelets.compiler">
- <priority value="WARN"/>
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jboss-log4j.xml.patch)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,25 @@
+--- jboss-log4j.xml.orig 2011-06-24 10:50:16.000000000 +0200
++++ jboss-log4j.xml 2011-06-24 11:11:10.341965795 +0200
+@@ -180,7 +180,22 @@
+ <category name="org.apache">
+ <priority value="INFO"/>
+ </category>
++
++ <!-- Limit the JSR170 categories -->
++ <category name="exo.jcr">
++ <priority value="INFO"/>
++ </category>
++
++ <!-- Limit the JSR-168 and JSR-286 categories -->
++ <category name="org.exoplatform.services">
++ <priority value="INFO"/>
++ </category>
+
++ <!-- Limit verbose jgroups when running in cluster -->
++ <category name="org.jgroups.protocols.UDP">
++ <priority value="ERROR" />
++ </category>
++
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <category name="jacorb">
+ <priority value="WARN"/>
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,15 +0,0 @@
-diff -uNr web.xml.orig web.xml
---- web.xml.orig 2009-10-20 21:29:24.000000000 +0200
-+++ web.xml 2010-03-04 10:37:20.000000000 +0100
-@@ -280,6 +280,11 @@
- <param-name>tagLibJar1</param-name>
- <param-value>jstl.jar</param-value>
- </init-param>
-+ <init-param>
-+ <description>Portlet standard tlds</description>
-+ <param-name>tagLibJar2</param-name>
-+ <param-value>${jboss.server.home.url}/deploy/gatein.ear/lib/%pc-portlet-version-jar%</param-value>
-+ </init-param>
-
-
- <load-on-startup>3</load-on-startup>
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.deployer.web.xml.patch)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,16 @@
+diff -uNr web.xml.orig web.xml
+--- web.xml.orig 2011-06-24 12:58:10.000000000 +0200
++++ web.xml 2011-06-24 13:06:59.595627467 +0200
+@@ -284,7 +284,11 @@
+ <param-name>tagLibJar1</param-name>
+ <param-value>jstl.jar</param-value>
+ </init-param>
+-
++ <init-param>
++ <description>Portlet standard tlds</description>
++ <param-name>tagLibJar2</param-name>
++ <param-value>${jboss.server.home.url}/deploy/gatein.ear/lib/%pc-portlet-version-jar%</param-value>
++ </init-param>
+
+ <load-on-startup>3</load-on-startup>
+ </servlet>
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,12 +0,0 @@
---- context.xml.orig 2010-03-30 10:51:10.000000000 +0200
-+++ context.xml 2010-04-27 13:42:27.000000000 +0200
-@@ -13,5 +13,8 @@
- role for servlet init/destroy events.
- -->
- <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
--
-+
-+ <!-- Needed for portal session paths -->
-+ <SessionCookie path="/"/>
-+
- </Context>
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.sar.context.xml.patch)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,11 @@
+--- context.xml.orig 2011-06-24 13:54:02.000000000 +0200
++++ context.xml 2011-06-24 14:01:54.304475869 +0200
+@@ -13,5 +13,8 @@
+ role for servlet init/destroy events.
+ -->
+ <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
++
++ <!-- Needed for portal session paths -->
++ <SessionCookie path="/"/>
+
+ </Context>
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/properties-service.xml.patch 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,14 +0,0 @@
---- properties-service.xml.orig 2010-10-05 12:40:54.671128735 +0200
-+++ properties-service.xml 2010-10-05 12:41:40.823129364 +0200
-@@ -40,6 +40,11 @@
- <mbean code="org.jboss.varia.property.SystemPropertiesService"
- name="jboss:type=Service,name=SystemProperties">
-
-+ <attribute name="Properties">
-+ exo.conf.dir.name=gatein
-+ gatein.runtime.context=epp
-+ </attribute>
-+
- <!--
- | Load properties from each of the given comma seperated URLs
-
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/properties-service.xml.patch)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/properties-service.xml.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,14 @@
+--- properties-service.xml.orig 2011-06-24 13:22:45.000000000 +0200
++++ properties-service.xml 2011-06-24 13:41:48.865959790 +0200
+@@ -39,6 +39,11 @@
+
+ <mbean code="org.jboss.varia.property.SystemPropertiesService"
+ name="jboss:type=Service,name=SystemProperties">
++
++ <attribute name="Properties">
++ exo.conf.dir.name=gatein
++ gatein.runtime.context=epp
++ </attribute>
+
+ <!--
+ | Load properties from each of the given comma seperated URLs
Deleted: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/run.conf.bat.patch 2011-06-24 06:46:24 UTC (rev 6729)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -1,10 +0,0 @@
-diff -uNr run.conf.bat.orig run.conf.bat
---- run.conf.bat.orig 2009-10-21 03:28:28.000000000 +0200
-+++ run.conf.bat 2010-03-09 17:17:38.000000000 +0100
-@@ -55,3 +55,6 @@
- rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
-
- :JAVA_OPTS_SET
-+
-+rem # GateIn configuration directory
-+set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
Copied: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch (from rev 6733, epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/run.conf.bat.patch)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/patch/EAP/run.conf.bat.patch 2011-06-24 13:26:16 UTC (rev 6734)
@@ -0,0 +1,8 @@
+--- run.conf.bat.orig 2011-06-24 14:18:19.000000000 +0200
++++ run.conf.bat 2011-06-24 14:19:53.707990235 +0200
+@@ -56,3 +56,5 @@
+
+ :JAVA_OPTS_SET
+
++rem # GateIn configuration directory
++set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml 2011-06-24 12:55:50 UTC (rev 6733)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml 2011-06-24 13:26:16 UTC (rev 6734)
@@ -41,7 +41,7 @@
<activeByDefault>false</activeByDefault>
</activation>
<modules>
- <module>pack</module>
+ <module>jboss-epp</module>
</modules>
</profile>
</profiles>
13 years, 6 months
gatein SVN: r6733 - in epp/portal/branches/EPP_5_2_Branch/distribution/pack/src: patch/EAP and 1 other directory.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-06-24 08:55:50 -0400 (Fri, 24 Jun 2011)
New Revision: 6733
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/assemble.xml
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/build.xml
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jboss-log4j.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.deployer.web.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.sar.context.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/properties-service.xml.patch
epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/run.conf.bat.patch
Log:
JBEPP-942 Patches for EPP 5.1.1.ER2
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/assemble.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/assemble.xml 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/assemble.xml 2011-06-24 12:55:50 UTC (rev 6733)
@@ -91,7 +91,7 @@
<!-- EAP -->
<dependencySet>
<includes>
- <include>org.jboss:jboss-eap:zip</include>
+ <include>${eap.groupId}:jboss-eap:zip</include>
</includes>
<outputDirectory></outputDirectory>
<unpack>true</unpack>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/build.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/build.xml 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/build.xml 2011-06-24 12:55:50 UTC (rev 6733)
@@ -12,11 +12,17 @@
failonerror="true"
/>
+ <!-- Setting this to false may broke build, useful for preparing patches -->
+ <property name="patch.failonerror">true</property>
+
+ <!--
+ patch jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml < src/patch/EAP/jbossweb.deployer.web.xml.patch
+ -->
<echo>Patching EAP deployers/jbossweb.deployer/web.xml configuration ...</echo>
<patch
originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"
patchfile="src/patch/EAP/jbossweb.deployer.web.xml.patch"
- failonerror="true"
+ failonerror="${patch.failonerror}"
/>
<makeurl property="pc.jarfile.url">
<fileset dir="${epp.path}/jboss-as/server/default/deploy/gatein.ear/lib" includes="pc-portlet*"/>
@@ -33,14 +39,14 @@
<patch
originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deploy/properties-service.xml"
patchfile="src/patch/EAP/properties-service.xml.patch"
- failonerror="true"
+ failonerror="${patch.failonerror}"
/>
<echo>Patching EAP jbossweb.sar/context.xml ...</echo>
<patch
originalfile="${epp.path}/jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"
patchfile="src/patch/EAP/jbossweb.sar.context.xml.patch"
- failonerror="true"
+ failonerror="${patch.failonerror}"
/>
</target>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jboss-log4j.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jboss-log4j.xml.patch 2011-06-24 12:55:50 UTC (rev 6733)
@@ -1,25 +1,25 @@
-diff -uNr --exclude .svn jboss-log4j.xml.orig jboss-log4j.xml
---- jboss-log4j.xml.orig 2010-03-30 16:51:10.000000000 +0200
-+++ jboss-log4j.xml 2010-05-10 11:03:24.000000000 +0200
-@@ -237,6 +237,21 @@
- <priority value="INFO"/>
- </category>
-
-+ <!-- Limit the JSR170 categories -->
-+ <category name="exo.jcr">
-+ <priority value="INFO"/>
-+ </category>
-+
-+ <!-- Limit the JSR-168 and JSR-286 categories -->
-+ <category name="org.exoplatform.services">
-+ <priority value="INFO"/>
-+ </category>
-+
-+ <!-- Limit verbose jgroups when running in cluster -->
-+ <category name="org.jgroups.protocols.UDP">
-+ <priority value="ERROR" />
-+ </category>
-+
- <!-- Limit the verbose facelets compiler -->
- <category name="facelets.compiler">
- <priority value="WARN"/>
+--- jboss-log4j.xml.orig 2011-06-24 10:50:16.000000000 +0200
++++ jboss-log4j.xml 2011-06-24 11:11:10.341965795 +0200
+@@ -180,7 +180,22 @@
+ <category name="org.apache">
+ <priority value="INFO"/>
+ </category>
++
++ <!-- Limit the JSR170 categories -->
++ <category name="exo.jcr">
++ <priority value="INFO"/>
++ </category>
++
++ <!-- Limit the JSR-168 and JSR-286 categories -->
++ <category name="org.exoplatform.services">
++ <priority value="INFO"/>
++ </category>
+
++ <!-- Limit verbose jgroups when running in cluster -->
++ <category name="org.jgroups.protocols.UDP">
++ <priority value="ERROR" />
++ </category>
++
+ <!-- Limit the jacorb category to WARN as its INFO is verbose -->
+ <category name="jacorb">
+ <priority value="WARN"/>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.deployer.web.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.deployer.web.xml.patch 2011-06-24 12:55:50 UTC (rev 6733)
@@ -1,15 +1,16 @@
diff -uNr web.xml.orig web.xml
---- web.xml.orig 2009-10-20 21:29:24.000000000 +0200
-+++ web.xml 2010-03-04 10:37:20.000000000 +0100
-@@ -280,6 +280,11 @@
- <param-name>tagLibJar1</param-name>
- <param-value>jstl.jar</param-value>
- </init-param>
-+ <init-param>
-+ <description>Portlet standard tlds</description>
-+ <param-name>tagLibJar2</param-name>
-+ <param-value>${jboss.server.home.url}/deploy/gatein.ear/lib/%pc-portlet-version-jar%</param-value>
-+ </init-param>
-
-
- <load-on-startup>3</load-on-startup>
+--- web.xml.orig 2011-06-24 12:58:10.000000000 +0200
++++ web.xml 2011-06-24 13:06:59.595627467 +0200
+@@ -284,7 +284,11 @@
+ <param-name>tagLibJar1</param-name>
+ <param-value>jstl.jar</param-value>
+ </init-param>
+-
++ <init-param>
++ <description>Portlet standard tlds</description>
++ <param-name>tagLibJar2</param-name>
++ <param-value>${jboss.server.home.url}/deploy/gatein.ear/lib/%pc-portlet-version-jar%</param-value>
++ </init-param>
+
+ <load-on-startup>3</load-on-startup>
+ </servlet>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.sar.context.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/jbossweb.sar.context.xml.patch 2011-06-24 12:55:50 UTC (rev 6733)
@@ -1,12 +1,11 @@
---- context.xml.orig 2010-03-30 10:51:10.000000000 +0200
-+++ context.xml 2010-04-27 13:42:27.000000000 +0200
+--- context.xml.orig 2011-06-24 13:54:02.000000000 +0200
++++ context.xml 2011-06-24 14:01:54.304475869 +0200
@@ -13,5 +13,8 @@
- role for servlet init/destroy events.
- -->
- <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
--
+ role for servlet init/destroy events.
+ -->
+ <InstanceListener>org.jboss.web.tomcat.security.RunAsListener</InstanceListener>
+
+ <!-- Needed for portal session paths -->
+ <SessionCookie path="/"/>
-+
- </Context>
+
+ </Context>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/properties-service.xml.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/properties-service.xml.patch 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/properties-service.xml.patch 2011-06-24 12:55:50 UTC (rev 6733)
@@ -1,14 +1,14 @@
---- properties-service.xml.orig 2010-10-05 12:40:54.671128735 +0200
-+++ properties-service.xml 2010-10-05 12:41:40.823129364 +0200
-@@ -40,6 +40,11 @@
- <mbean code="org.jboss.varia.property.SystemPropertiesService"
- name="jboss:type=Service,name=SystemProperties">
-
+--- properties-service.xml.orig 2011-06-24 13:22:45.000000000 +0200
++++ properties-service.xml 2011-06-24 13:41:48.865959790 +0200
+@@ -39,6 +39,11 @@
+
+ <mbean code="org.jboss.varia.property.SystemPropertiesService"
+ name="jboss:type=Service,name=SystemProperties">
++
+ <attribute name="Properties">
+ exo.conf.dir.name=gatein
+ gatein.runtime.context=epp
+ </attribute>
-+
- <!--
- | Load properties from each of the given comma seperated URLs
-
+
+ <!--
+ | Load properties from each of the given comma seperated URLs
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/run.conf.bat.patch
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/run.conf.bat.patch 2011-06-24 12:13:42 UTC (rev 6732)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pack/src/patch/EAP/run.conf.bat.patch 2011-06-24 12:55:50 UTC (rev 6733)
@@ -1,10 +1,8 @@
-diff -uNr run.conf.bat.orig run.conf.bat
---- run.conf.bat.orig 2009-10-21 03:28:28.000000000 +0200
-+++ run.conf.bat 2010-03-09 17:17:38.000000000 +0100
-@@ -55,3 +55,6 @@
- rem set "JAVA_OPTS=%JAVA_OPTS% -Xrunjdwp:transport=dt_shmem,address=jboss,server=y,suspend=n"
+--- run.conf.bat.orig 2011-06-24 14:18:19.000000000 +0200
++++ run.conf.bat 2011-06-24 14:19:53.707990235 +0200
+@@ -56,3 +56,5 @@
:JAVA_OPTS_SET
-+
-+rem # GateIn configuration directory
-+set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
+
++rem # GateIn configuration directory
++set "JAVA_OPTS=%JAVA_OPTS% -Dexo.conf.dir.name=gatein"
13 years, 6 months
gatein SVN: r6732 - components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-06-24 08:13:42 -0400 (Fri, 24 Jun 2011)
New Revision: 6732
Modified:
components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java
Log:
- GTNPORTAL-1938: Added ability to configure consumers from an InputStream.
Modified: components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java
===================================================================
--- components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java 2011-06-24 08:43:41 UTC (rev 6731)
+++ components/wsrp/branches/2.0.x/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java 2011-06-24 12:13:42 UTC (rev 6732)
@@ -50,9 +50,15 @@
/** . */
private static final String defaultWSRPLocation = "conf/wsrp-consumers-config.xml";
+ private InputStream configurationIS;
private EntityResolver entityResolver;
+ public XMLConsumerRegistry(InputStream configurationInputStream)
+ {
+ configurationIS = configurationInputStream;
+ }
+
public EntityResolver getEntityResolver()
{
return entityResolver;
@@ -65,51 +71,51 @@
public void reloadConsumers()
{
- URL defaultWSRPURL = Thread.currentThread().getContextClassLoader().getResource(defaultWSRPLocation);
- if (defaultWSRPURL != null)
+
+ if (configurationIS == null)
{
- InputStream inputStream;
+ URL defaultWSRPURL = Thread.currentThread().getContextClassLoader().getResource(defaultWSRPLocation);
try
{
- inputStream = defaultWSRPURL.openStream();
+ configurationIS = defaultWSRPURL.openStream();
}
catch (IOException e)
{
throw new RuntimeException("Couldn't open default XML WSRP Consumer configuration file", e);
}
+ }
- Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
- ObjectModelFactory factory = new XMLWSRPConsumerFactory(this);
- if (entityResolver == null)
- {
- log.debug("Could not obtain entity resolver for XMLConsumerRegistry");
- entityResolver = new NullEntityResolver();
- }
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ ObjectModelFactory factory = new XMLWSRPConsumerFactory(this);
+ if (entityResolver == null)
+ {
+ log.debug("Could not obtain entity resolver for XMLConsumerRegistry");
+ entityResolver = new NullEntityResolver();
+ }
+ try
+ {
+ unmarshaller.setEntityResolver(entityResolver);
+ initConsumers((SortedMap<String, WSRPConsumer>)unmarshaller.unmarshal(configurationIS, factory, null));
+ }
+ catch (JBossXBException e)
+ {
+ throw new RuntimeException("Couldn't set unmarshall WSRP Consumers configuration", e);
+ }
+
+ for (WSRPConsumer consumer : getConsumers())
+ {
+
+ ProducerInfo producerInfo = consumer.getProducerInfo();
try
{
- unmarshaller.setEntityResolver(entityResolver);
- initConsumers((SortedMap<String, WSRPConsumer>)unmarshaller.unmarshal(inputStream, factory, null));
+ // try to activate the consumer
+ activateConsumer(consumer);
}
- catch (JBossXBException e)
+ catch (Exception e)
{
- throw new RuntimeException("Couldn't set unmarshall WSRP Consumers configuration", e);
+ producerInfo.setActive(false);
+ updateProducerInfo(producerInfo);
}
-
- for (WSRPConsumer consumer : getConsumers())
- {
-
- ProducerInfo producerInfo = consumer.getProducerInfo();
- try
- {
- // try to activate the consumer
- activateConsumer(consumer);
- }
- catch (Exception e)
- {
- producerInfo.setActive(false);
- updateProducerInfo(producerInfo);
- }
- }
}
}
13 years, 6 months
gatein SVN: r6731 - epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-06-24 04:43:41 -0400 (Fri, 24 Jun 2011)
New Revision: 6731
Removed:
epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml
Log:
JBEPP-780 removing unused file
Deleted: epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml 2011-06-24 07:56:17 UTC (rev 6730)
+++ epp/portal/branches/EPP_5_1_Branch/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/jboss-cache-cluster.xml 2011-06-24 08:43:41 UTC (rev 6731)
@@ -1,19 +0,0 @@
-<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
-
- <clustering mode="replication" clusterName="${jboss.partition.name:DefaultPartition}-idm-cluster">
- <stateRetrieval timeout="20000" fetchInMemoryState="false" />
- <jgroupsConfig multiplexerStack="jcr.stack" />
- <sync />
- </clustering>
-
- <!-- Eviction configuration -->
- <eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.ExpirationAlgorithm"
- eventQueueSize="1000000">
- <property name="maxNodes" value="100000" />
- <property name="timeToLive" value="120000" />
- <property name="warnNoExpirationKey" value="false" />
- </default>
- </eviction>
-
-</jbosscache>
13 years, 6 months