gatein SVN: r5829 - portal/trunk.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-31 15:49:00 -0500 (Mon, 31 Jan 2011)
New Revision: 5829
Modified:
portal/trunk/pom.xml
Log:
GTNPORTAL-1768 : Remove legacy exo.portal.component.xml-parser dependency management declaration
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2011-01-31 15:11:09 UTC (rev 5828)
+++ portal/trunk/pom.xml 2011-01-31 20:49:00 UTC (rev 5829)
@@ -682,11 +682,6 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.xml-parser</artifactId>
- <version>3.2.0-Beta01-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.scripting</artifactId>
<version>3.2.0-Beta01-SNAPSHOT</version>
</dependency>
13 years, 11 months
gatein SVN: r5828 - components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-31 10:11:09 -0500 (Mon, 31 Jan 2011)
New Revision: 5828
Added:
components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/javaee_web_services_metadata_handler_2_0.xsd
Modified:
components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/wshandlers.xml
Log:
- JBEPP-400: Bundled schema so that an internet connection is not needed?\226?\128?\166
Added: components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/javaee_web_services_metadata_handler_2_0.xsd
===================================================================
--- components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/javaee_web_services_metadata_handler_2_0.xsd (rev 0)
+++ components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/javaee_web_services_metadata_handler_2_0.xsd 2011-01-31 15:11:09 UTC (rev 5828)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsd:schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://java.sun.com/xml/ns/javaee"
+ xmlns:javaee="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="2.0">
+ <xsd:annotation>
+
+ <xsd:documentation>
+ javaee_web_services_metadata_handler.xsd v2.0.1 11/09/2007
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:annotation>
+ <xsd:documentation>
+
+ Copyright 2004-2007 BEA Systems, Inc.
+
+ </xsd:documentation>
+ </xsd:annotation>
+
+ <xsd:include schemaLocation="javaee_5.xsd"/>
+
+ <xsd:element name="handler-chains"
+ type="javaee:service-ref_handler-chainsType">
+ <xsd:annotation>
+ <xsd:documentation>
+
+ The handler-chains element is the root element for defining
+ handlerchains.
+
+ The Web Services Metadata for the Java Platform (JSR-181), Version 2.0
+ specification defines the @javax.jws.HandlerChain annotation
+ that refers to an XML descriptor conforming to this schema.
+
+ </xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+
+</xsd:schema>
Modified: components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/wshandlers.xml
===================================================================
--- components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/wshandlers.xml 2011-01-27 17:08:11 UTC (rev 5827)
+++ components/wsrp/branches/1.1.x/wsrp-producer-war/src/main/webapp/WEB-INF/classes/wshandlers.xml 2011-01-31 15:11:09 UTC (rev 5828)
@@ -23,7 +23,7 @@
-->
<javaee:handler-chains xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/javaee_web_services_metadata_handler_2_...">
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee javaee_web_services_metadata_handler_2_0.xsd">
<javaee:handler-chain>
<javaee:handler>
<javaee:handler-name>WSRP Extension Handler</javaee:handler-name>
13 years, 11 months
gatein SVN: r5827 - portal/branches.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-27 12:08:11 -0500 (Thu, 27 Jan 2011)
New Revision: 5827
Added:
portal/branches/wsrp-extraction/
Log:
Branching trunk from revision 5826 to work on WSRP service extraction
Copied: portal/branches/wsrp-extraction (from rev 5826, portal/trunk)
13 years, 11 months
gatein SVN: r5826 - components/wsrp/branches/1.1.x.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-27 11:03:57 -0500 (Thu, 27 Jan 2011)
New Revision: 5826
Modified:
components/wsrp/branches/1.1.x/
components/wsrp/branches/1.1.x/pom.xml
Log:
- Upgraded to common 2.0.3-GA.
Property changes on: components/wsrp/branches/1.1.x
___________________________________________________________________
Name: svn:ignore
- .settings
.project
+ .settings
.project
.idea
Modified: components/wsrp/branches/1.1.x/pom.xml
===================================================================
--- components/wsrp/branches/1.1.x/pom.xml 2011-01-27 11:21:31 UTC (rev 5825)
+++ components/wsrp/branches/1.1.x/pom.xml 2011-01-27 16:03:57 UTC (rev 5826)
@@ -49,7 +49,7 @@
<properties>
<version.gatein.pc>2.1.1-GA</version.gatein.pc>
- <version.gatein.common>2.0.3-GA-SNAPSHOT</version.gatein.common>
+ <version.gatein.common>2.0.3-GA</version.gatein.common>
<version.gatein.wci>2.0.1-GA</version.gatein.wci>
<version.jsf>1.2_12</version.jsf>
13 years, 11 months
gatein SVN: r5825 - in portal/trunk/packaging: jboss-as5/pkg and 8 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-27 06:21:31 -0500 (Thu, 27 Jan 2011)
New Revision: 5825
Modified:
portal/trunk/packaging/jboss-as5/
portal/trunk/packaging/jboss-as5/pkg/
portal/trunk/packaging/jboss-as6/
portal/trunk/packaging/jboss-as6/pkg/
portal/trunk/packaging/jetty/
portal/trunk/packaging/jetty/pkg/
portal/trunk/packaging/tomcat/
portal/trunk/packaging/tomcat/integration/
portal/trunk/packaging/tomcat/pkg/tc6/
portal/trunk/packaging/tomcat/pkg/tc7/
Log:
svn ignore for packaging
Property changes on: portal/trunk/packaging/jboss-as5
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
Property changes on: portal/trunk/packaging/jboss-as5/pkg
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
Property changes on: portal/trunk/packaging/jboss-as6
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
Property changes on: portal/trunk/packaging/jboss-as6/pkg
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
Property changes on: portal/trunk/packaging/jetty
___________________________________________________________________
Name: svn:ignore
+ target
*.iml
Property changes on: portal/trunk/packaging/jetty/pkg
___________________________________________________________________
Name: svn:ignore
+ target
*.iml
Property changes on: portal/trunk/packaging/tomcat
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
Property changes on: portal/trunk/packaging/tomcat/integration
___________________________________________________________________
Name: svn:ignore
- target
+ *.iml
target
Property changes on: portal/trunk/packaging/tomcat/pkg/tc6
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
Property changes on: portal/trunk/packaging/tomcat/pkg/tc7
___________________________________________________________________
Name: svn:ignore
+ *.iml
target
13 years, 11 months
gatein SVN: r5824 - portal/trunk/packaging.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-27 06:18:20 -0500 (Thu, 27 Jan 2011)
New Revision: 5824
Removed:
portal/trunk/packaging/jboss-as/
Modified:
portal/trunk/packaging/pom.xml
Log:
- packaging cleanup: remove jboss maven packaging prototype (thanks martin!)
- keep exobuild but execute it in the pgk-jbossas legacy profile
Modified: portal/trunk/packaging/pom.xml
===================================================================
--- portal/trunk/packaging/pom.xml 2011-01-27 10:43:01 UTC (rev 5823)
+++ portal/trunk/packaging/pom.xml 2011-01-27 11:18:20 UTC (rev 5824)
@@ -38,20 +38,10 @@
<activeByDefault>true</activeByDefault>
</activation>
<modules>
- <module>module</module>
- <module>product</module>
- <module>pkg</module>
<module>reports</module>
</modules>
</profile>
<profile>
- <id>pkg-jbossas-beta</id>
- <modules>
- <module>jboss-as</module>
- <module>reports</module>
- </modules>
- </profile>
- <profile>
<id>pkg-tomcat</id>
<modules>
<module>tomcat</module>
@@ -73,6 +63,14 @@
</modules>
</profile>
<profile>
+ <id>pkg-jbossas</id>
+ <modules>
+ <module>module</module>
+ <module>product</module>
+ <module>pkg</module>
+ </modules>
+ </profile>
+ <profile>
<id>pkg-jbossas6</id>
<modules>
<module>jboss-as6</module>
@@ -82,6 +80,9 @@
<profile>
<id>pkg-jbossas5</id>
<modules>
+ <module>module</module>
+ <module>product</module>
+ <module>pkg</module>
<module>jboss-as5</module>
<module>reports</module>
</modules>
13 years, 11 months
gatein SVN: r5823 - portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-01-27 05:43:01 -0500 (Thu, 27 Jan 2011)
New Revision: 5823
Modified:
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java
Log:
use gatein NotImplementedException instead of sun proprietary Exception
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java 2011-01-27 09:50:23 UTC (rev 5822)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java 2011-01-27 10:43:01 UTC (rev 5823)
@@ -19,7 +19,7 @@
package org.exoplatform.web.security.security;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+import org.gatein.common.NotYetImplemented;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.web.security.GateInToken;
@@ -42,35 +42,35 @@
@Override
public GateInToken getToken(String id)
{
- throw new NotImplementedException();
+ throw new NotYetImplemented();
}
@Override
public GateInToken deleteToken(String id)
{
- throw new NotImplementedException();
+ throw new NotYetImplemented();
}
@Override
public String[] getAllTokens()
{
- throw new NotImplementedException();
+ throw new NotYetImplemented();
}
@Override
protected String decodeKey(String stringKey)
{
- throw new NotImplementedException();
+ throw new NotYetImplemented();
}
@Override
public long size() throws Exception
{
- throw new NotImplementedException();
+ throw new NotYetImplemented();
}
public String createToken(Credentials credentials) throws IllegalArgumentException, NullPointerException
{
- throw new NotImplementedException();
+ throw new NotYetImplemented();
}
}
13 years, 11 months
gatein SVN: r5822 - in portal/trunk: component/common/src/main/java/conf and 60 other directories.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2011-01-27 04:50:23 -0500 (Thu, 27 Jan 2011)
New Revision: 5822
Added:
portal/trunk/component/common/src/main/java/conf/configuration-jetty.properties
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/LogoutControl.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java
portal/trunk/packaging/jetty/
portal/trunk/packaging/jetty/pkg/
portal/trunk/packaging/jetty/pkg/pom.xml
portal/trunk/packaging/jetty/pkg/src/
portal/trunk/packaging/jetty/pkg/src/main/
portal/trunk/packaging/jetty/pkg/src/main/resources/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/commons-logging.properties
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.bat
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.sh
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.bat
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.sh
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoGadgetServer.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoResources.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/portal.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/rest.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/login.conf
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/configuration.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/WEB-INF/
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/WEB-INF/web.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/index.jsp
portal/trunk/packaging/jetty/pkg/transform.xsl
portal/trunk/packaging/jetty/pom.xml
portal/trunk/packaging/tomcat/pkg/tc6/
portal/trunk/packaging/tomcat/pkg/tc6/pom.xml
portal/trunk/packaging/tomcat/pkg/tc6/src/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/conf/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/conf/integration/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/conf/integration/web.xml
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties
portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties
portal/trunk/packaging/tomcat/pkg/tc7/
portal/trunk/packaging/tomcat/pkg/tc7/pom.xml
portal/trunk/packaging/tomcat/pkg/tc7/src/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/conf/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/conf/integration/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/conf/integration/web.xml
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties
portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/jetty-web.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalLogoutLifecycle.java
Removed:
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat-patch/
Modified:
portal/trunk/component/web/security/pom.xml
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ClusteredSSOFilter.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/GateInToken.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Token.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/TokenStore.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/AbstractTokenService.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/CookieTokenService.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenContainer.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenEntry.java
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TransientTokenService.java
portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
portal/trunk/examples/portal/README.txt
portal/trunk/examples/portal/ear/src/main/application/META-INF/gatein-jboss-beans.xml
portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml
portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetToken.java
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetTokenInfoService.java
portal/trunk/packaging/jboss-as/ear/pom.xml
portal/trunk/packaging/jboss-as5/README.txt
portal/trunk/packaging/jboss-as5/pkg/pom.xml
portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml
portal/trunk/packaging/jboss-as6/pkg/pom.xml
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml
portal/trunk/packaging/module/pom.xml
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
portal/trunk/packaging/pkg/pom.xml
portal/trunk/packaging/pom.xml
portal/trunk/packaging/profiles.xml
portal/trunk/packaging/tomcat/pkg/pom.xml
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/conf/jaas.conf
portal/trunk/pom.xml
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
Log:
Merge the wci branch into trunk
Added: portal/trunk/component/common/src/main/java/conf/configuration-jetty.properties
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration-jetty.properties (rev 0)
+++ portal/trunk/component/common/src/main/java/conf/configuration-jetty.properties 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,62 @@
+#
+# 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.
+#
+
+# Data
+gatein.data.dir=../gatein/data
+
+# DB
+gatein.db.data.dir=${gatein.data.dir}/db
+
+# JCR
+gatein.jcr.config.type=local
+gatein.jcr.datasource.name=jdbcjcr
+gatein.jcr.datasource.dialect=auto
+gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
+gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcjcr_${name}
+gatein.jcr.datasource.username=sa
+gatein.jcr.datasource.password=
+
+gatein.jcr.data.dir=${gatein.data.dir}/jcr
+gatein.jcr.storage.data.dir=${gatein.jcr.data.dir}/values
+gatein.jcr.cache.config=classpath:/conf/jcr/jbosscache/${gatein.jcr.config.type}/config.xml
+gatein.jcr.lock.cache.config=classpath:/conf/jcr/jbosscache/${gatein.jcr.config.type}/lock-config.xml
+gatein.jcr.index.data.dir=${gatein.jcr.data.dir}/lucene
+gatein.jcr.index.changefilterclass=org.exoplatform.services.jcr.impl.core.query.DefaultChangesFilter
+gatein.jcr.index.cache.config=classpath:/conf/jcr/jbosscache/cluster/indexer-config.xml
+gatein.jcr.jgroups.config=classpath:/conf/jcr/jbosscache/cluster/udp-mux.xml
+
+# IDM
+gatein.idm.datasource.name=jdbcidm
+gatein.idm.datasource.driver=org.hsqldb.jdbcDriver
+gatein.idm.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/jdbcidm_${name}
+gatein.idm.datasource.username=sa
+gatein.idm.datasource.password=
+
+# Arjuna configuration
+com.arjuna.ats.arjuna.objectstore.objectStoreDir=${gatein.data.dir}/jta
+
+# EMail
+gatein.email.smtp.username=
+gatein.email.smtp.password=
+gatein.email.smtp.host=smtp.gmail.com
+gatein.email.smtp.port=465
+gatein.email.smtp.starttls.enable=true
+gatein.email.smtp.auth=true
+gatein.email.smtp.socketFactory.port=465
+gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
\ No newline at end of file
Modified: portal/trunk/component/web/security/pom.xml
===================================================================
--- portal/trunk/component/web/security/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -63,5 +63,9 @@
<artifactId>jboss-as-tomcat</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
</dependencies>
</project>
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ClusteredSSOFilter.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ClusteredSSOFilter.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/ClusteredSSOFilter.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -25,9 +25,9 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.web.AbstractFilter;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.PortalLoginModule;
+import org.gatein.wci.security.Credentials;
import org.jboss.web.tomcat.security.login.WebAuthentication;
import javax.servlet.FilterChain;
@@ -77,4 +77,4 @@
public void destroy()
{
}
-}
+}
\ No newline at end of file
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/InitiateLoginServlet.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -19,18 +19,20 @@
package org.exoplatform.web.login;
-import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.web.AbstractHttpServlet;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.security.AbstractTokenService;
import org.exoplatform.web.security.security.CookieTokenService;
-import org.exoplatform.web.security.security.TransientTokenService;
+import org.exoplatform.web.security.security.TicketConfiguration;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.authentication.AuthenticationResult;
+import org.gatein.wci.authentication.GenericAuthenticationResult;
+import org.gatein.wci.authentication.ProgrammaticAuthenticationResult;
+import org.gatein.wci.security.Credentials;
+import org.gatein.wci.impl.DefaultServletContainerFactory;
import java.io.IOException;
-import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
@@ -53,7 +55,8 @@
public static final String COOKIE_NAME = "rememberme";
/** . */
- public static final String CREDENTIALS = "credentials";
+ public static final long LOGIN_VALIDITY =
+ 1000 * TicketConfiguration.getInstance(TicketConfiguration.class).getValidityTime();
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
@@ -62,14 +65,11 @@
HttpSession session = req.getSession();
// Looking for credentials stored in the session
- Credentials credentials = (Credentials)session.getAttribute(InitiateLoginServlet.CREDENTIALS);
+ Credentials credentials = (Credentials)session.getAttribute(Credentials.CREDENTIALS);
//
if (credentials == null)
{
- PortalContainer pContainer = PortalContainer.getInstance();
- ServletContext context = pContainer.getPortalContext();
-
//
String token = getRememberMeTokenCookie(req);
if (token != null)
@@ -96,6 +96,7 @@
// Send authentication request
log.debug("Login initiated with no credentials in session but found token " + token + " with existing credentials, " +
"performing authentication");
+ //sendAuth(resp, credentials.getUsername(), token);
sendAuth(req, resp, credentials.getUsername(), token);
}
}
@@ -109,19 +110,29 @@
}
else
{
- // We create a temporary token just for the login time
- TransientTokenService tokenService = AbstractTokenService.getInstance(TransientTokenService.class);
- String token = tokenService.createToken(credentials);
- req.getSession().removeAttribute(InitiateLoginServlet.CREDENTIALS);
+ // WCI authentication
+ AuthenticationResult result = DefaultServletContainerFactory.getInstance().getServletContainer()
+ .login(req, resp, credentials.getUsername(), credentials.getPassword(), LOGIN_VALIDITY);
- // Send authentication request
log.debug("Login initiated with credentials in session, performing authentication");
- sendAuth(req, resp, credentials.getUsername(), token);
+ if (result instanceof GenericAuthenticationResult)
+ {
+ ((GenericAuthenticationResult) result).perform(req, resp);
+ }
+ else if (result instanceof ProgrammaticAuthenticationResult)
+ {
+ resp.sendRedirect(resp.encodeRedirectURL((String)req.getAttribute("javax.servlet.forward.request_uri")));
+ }
}
}
private void showLoginForm(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
+ /*String initialURI = (String)req.getAttribute("javax.servlet.forward.request_uri");
+ if (initialURI == null)
+ {
+ throw new IllegalStateException("request attribute javax.servlet.forward.request_uri should not be null here");
+ }*/
String initialURI = getInitialURI(req);
try
{
@@ -130,11 +141,15 @@
{
initialURI = initialURI + "?" + queryString;
}
+ //req.setAttribute("org.gatein.portal.login.initial_uri", initialURI);
+ //req.getSession(true).setAttribute("org.gatein.portal.login.initial_uri", initialURI);
req.setAttribute("org.gatein.portal.login.initial_uri", initialURI);
getServletContext().getRequestDispatcher("/login/jsp/login.jsp").include(req, resp);
}
finally
{
+ //req.removeAttribute("org.gatein.portal.login.initial_uri");
+ //req.getSession(true).removeAttribute("org.gatein.portal.login.initial_uri");
req.removeAttribute("org.gatein.portal.login.initial_uri");
}
}
@@ -149,13 +164,16 @@
return initialURI;
}
+
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
{
doGet(req, resp);
}
+ //private void sendAuth(HttpServletResponse resp, String jUsername, String jPassword) throws IOException
private void sendAuth(HttpServletRequest req, HttpServletResponse resp, String jUsername, String jPassword) throws IOException
{
+ //String url = "j_security_check?j_username=" + jUsername + "&j_password=" + jPassword;
String initialURI = getInitialURI(req);
if (!initialURI.endsWith("/"))
{
Added: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/LogoutControl.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/LogoutControl.java (rev 0)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/LogoutControl.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,50 @@
+/*
+* Copyright (C) 2003-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.
+*/
+
+package org.exoplatform.web.login;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class LogoutControl
+{
+ private static final ThreadLocal<Boolean> wantLogout = new ThreadLocal<Boolean>()
+ {
+ @Override
+ protected Boolean initialValue() {
+ return false;
+ }
+ };
+
+ public static void cancelLogout()
+ {
+ wantLogout.set(false);
+ }
+
+ public static void wantLogout()
+ {
+ wantLogout.set(true);
+ }
+
+ public static boolean isLogoutRequired()
+ {
+ return wantLogout.get();
+ }
+}
\ No newline at end of file
Deleted: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/PortalLoginController.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,114 +0,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.
- */
-
-package org.exoplatform.web.login;
-
-import org.exoplatform.container.web.AbstractHttpServlet;
-import org.exoplatform.web.security.Credentials;
-import org.exoplatform.web.security.security.AbstractTokenService;
-import org.exoplatform.web.security.security.CookieTokenService;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-
-import java.io.IOException;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.Cookie;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-/**
- * @author <a href="mailto:trong.tran@exoplatform.com">Tran The Trong</a>
- * @version $Revision$
- */
-public class PortalLoginController extends AbstractHttpServlet
-{
-
- /** . */
- private static final Logger log = LoggerFactory.getLogger(PortalLoginController.class);
-
- protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
- {
- String username = req.getParameter("username");
- String password = req.getParameter("password");
-
- //
- if (username == null)
- {
- log.error("Tried to access the portal login controller without username provided");
- resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "No username provided");
- return;
- }
- if (password == null)
- {
- log.error("Tried to access the portal login controller without password provided");
- resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "No password provided");
- return;
- }
-
- //
- log.debug("Found username and password and set credentials in http session");
- Credentials credentials = new Credentials(username, password);
- req.getSession().setAttribute(InitiateLoginServlet.CREDENTIALS, credentials);
-
- // Obtain initial URI
- String uri = req.getParameter("initialURI");
-
- // otherwise compute one
- if (uri == null || uri.length() == 0)
- {
- uri = req.getContextPath();
- log.debug("No initial URI found, will use default " + uri + " instead ");
- }
- else
- {
- log.debug("Found initial URI " + uri);
- }
-
- // if we do have a remember me
- String rememberme = req.getParameter("rememberme");
- if ("true".equals(rememberme))
- {
- //Create token
- AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
- String cookieToken = tokenService.createToken(credentials);
-
- log.debug("Found a remember me request parameter, created a persistent token " + cookieToken
- + " for it and set it up " + "in the next response");
- Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, cookieToken);
- cookie.setPath(req.getContextPath());
- cookie.setMaxAge((int) tokenService.getValidityTime());
- resp.addCookie(cookie);
- }
-
- //
- resp.sendRedirect(uri);
- }
-
- protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
- {
- doGet(req, resp);
- }
-
- @Override
- protected boolean requirePortalEnvironment()
- {
- return true;
- }
-}
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/login/RememberMeFilter.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -19,9 +19,13 @@
package org.exoplatform.web.login;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.web.AbstractFilter;
+import org.exoplatform.web.security.security.CookieTokenService;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.common.text.FastURLEncoder;
+import org.gatein.wci.security.Credentials;
import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
@@ -36,18 +40,14 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public class RememberMeFilter implements Filter
+public class RememberMeFilter extends AbstractFilter
{
/** . */
private static final FastURLEncoder CONVERTER = FastURLEncoder.getUTF8Instance();
/** . */
private static final Logger log = LoggerFactory.getLogger(RememberMeFilter.class);
-
- public void init(FilterConfig filterConfig) throws ServletException
- {
- }
-
+
public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException
{
doFilter((HttpServletRequest)req, (HttpServletResponse)resp, chain);
@@ -60,39 +60,67 @@
String token = InitiateLoginServlet.getRememberMeTokenCookie(req);
if (token != null)
{
- StringBuilder builder = new StringBuilder();
- builder.append(req.getContextPath());
- builder.append("/private");
- String pathInfo = req.getPathInfo();
- if (pathInfo != null)
+
+ ExoContainer container = getContainer();
+ Object o =
+ ((CookieTokenService)container.getComponentInstanceOfType(CookieTokenService.class)).validateToken(
+ token, false);
+ if (o instanceof Credentials)
{
- builder.append(pathInfo);
+ req.getSession().setAttribute(Credentials.CREDENTIALS, o);
+ resp.sendRedirect(resp.encodeRedirectURL(
+ loginUrl(
+ req.getContextPath(),
+ privateUri(req)
+ )
+ ));
+ resp.flushBuffer();
}
- char sep = '?';
- for (Enumeration<String> e = req.getParameterNames();e.hasMoreElements();)
- {
- String parameterName = e.nextElement();
- for (String parameteValue : req.getParameterValues(parameterName))
- {
- builder.append(sep);
- sep = '&';
- builder.append(CONVERTER.encode(parameterName));
- builder.append('=');
- builder.append(CONVERTER.encode(parameteValue));
- }
- }
- String s = builder.toString();
- log.debug("Redirecting unauthenticated request with token " + token + " to URL " + s);
- resp.sendRedirect(s);
- return;
}
}
//
- chain.doFilter(req, resp);
+ if (!resp.isCommitted())
+ {
+ chain.doFilter(req, resp);
+ }
}
public void destroy()
{
}
+
+ private String privateUri(HttpServletRequest req)
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append(req.getContextPath());
+ builder.append("/private");
+ String pathInfo = req.getPathInfo();
+ if (pathInfo != null)
+ {
+ builder.append(pathInfo);
+ }
+ char sep = '?';
+ for (Enumeration<String> e = req.getParameterNames();e.hasMoreElements();)
+ {
+ String parameterName = e.nextElement();
+ for (String parameteValue : req.getParameterValues(parameterName))
+ {
+ builder.append(sep);
+ sep = '&';
+ builder.append(CONVERTER.encode(parameterName));
+ builder.append('=');
+ builder.append(CONVERTER.encode(parameteValue));
+ }
+ }
+ return builder.toString();
+ }
+
+ private String loginUrl(String context, String initUrl)
+ {
+ return String.format(
+ "%s/login?initialURI=%s",
+ context, initUrl
+ );
+ }
}
Deleted: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Credentials.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,81 +0,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.
- */
-
-package org.exoplatform.web.security;
-
-import java.io.Serializable;
-
-/**
- * An immutable object that contains a username and a password.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class Credentials implements Serializable
-{
-
-
-
- /** . */
- private final String username;
-
- /** . */
- private final String password;
-
- /**
- * Construct a new instance.
- *
- * @param username the username value
- * @param password the password value
- * @throws NullPointerException if any argument is null
- */
- public Credentials(String username, String password) throws NullPointerException
- {
- if (username == null)
- {
- throw new NullPointerException("Username is null");
- }
- if (password == null)
- {
- throw new NullPointerException("Password is null");
- }
- this.username = username;
- this.password = password;
- }
-
- /**
- * Returns the username.
- *
- * @return the username
- */
- public String getUsername()
- {
- return username;
- }
-
- /**
- * Returns the password.
- *
- * @return the password
- */
- public String getPassword()
- {
- return password;
- }
-}
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/GateInToken.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/GateInToken.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/GateInToken.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -19,7 +19,9 @@
package org.exoplatform.web.security;
+import org.gatein.wci.security.Credentials;
+
/**
* Created by The eXo Platform SAS
* Author : Tan Pham Dinh
Added: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java (rev 0)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,88 @@
+/*
+* Copyright (C) 2003-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.
+*/
+
+package org.exoplatform.web.security;
+
+import org.exoplatform.web.login.InitiateLoginServlet;
+import org.exoplatform.web.security.security.AbstractTokenService;
+import org.exoplatform.web.security.security.CookieTokenService;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.wci.security.WCILoginController;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.Cookie;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class PortalLoginController extends WCILoginController {
+
+ /** . */
+ private static final Logger log = LoggerFactory.getLogger(PortalLoginController.class);
+
+ @Override
+ protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
+ super.doGet(req, resp);
+
+ // Obtain initial URI
+ String uri = req.getParameter("initialURI");
+
+ // otherwise compute one
+ if (uri == null || uri.length() == 0)
+ {
+ //uri = req.getContextPath() + "/private/classic";
+ uri = req.getContextPath();
+ log.debug("No initial URI found, will use default " + uri + " instead ");
+ }
+ else
+ {
+ log.debug("Found initial URI " + uri);
+ //req.getSession(true).setAttribute("org.gatein.portal.login.initial_uri", uri);
+ }
+
+ // if we do have a remember me
+ String rememberme = req.getParameter("rememberme");
+ if ("true".equals(rememberme))
+ {
+ boolean isRemember = "true".equals(req.getParameter(InitiateLoginServlet.COOKIE_NAME));
+ if (isRemember)
+ {
+ //Create token
+ AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
+ String cookieToken = tokenService.createToken(credentials);
+
+ log.debug("Found a remember me request parameter, created a persistent token " + cookieToken + " for it and set it up " +
+ "in the next response");
+ Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, cookieToken);
+ cookie.setPath(req.getContextPath());
+ //cookie.setMaxAge((int)tokenService.getValidityTime() / 1000);
+ cookie.setMaxAge((int)tokenService.getValidityTime());
+ resp.addCookie(cookie);
+ }
+ }
+
+ //
+ resp.sendRedirect(uri);
+ }
+}
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginModule.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -24,8 +24,7 @@
import org.exoplatform.services.log.Log;
import org.exoplatform.services.security.jaas.AbstractLoginModule;
import org.exoplatform.web.login.InitiateLoginServlet;
-import org.exoplatform.web.security.security.CookieTokenService;
-import org.exoplatform.web.security.security.TransientTokenService;
+import org.gatein.wci.security.Credentials;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.NameCallback;
@@ -99,25 +98,23 @@
callbackHandler.handle(callbacks);
String password = new String(((PasswordCallback)callbacks[1]).getPassword());
- ExoContainer container = getContainer();
- Object o =
- ((TransientTokenService)container.getComponentInstanceOfType(TransientTokenService.class)).validateToken(
- password, true);
- if (o == null)
- o =
- ((CookieTokenService)container.getComponentInstanceOfType(CookieTokenService.class)).validateToken(
- password, false);
+ Credentials c = null;
+
//
-
// For clustered config check credentials stored and propagated in session. This won't work in tomcat because
// of lack of JACC PolicyContext so the code must be a bit defensive
- if (o == null && getContextMethod != null && password.startsWith(InitiateLoginServlet.COOKIE_NAME))
+ if (getContextMethod != null && password.startsWith(InitiateLoginServlet.COOKIE_NAME))
{
HttpServletRequest request;
try
{
request = (HttpServletRequest)getContextMethod.invoke(null, "javax.servlet.http.HttpServletRequest");
- o = request.getSession().getAttribute(AUTHENTICATED_CREDENTIALS);
+ Object o = request.getSession().getAttribute(AUTHENTICATED_CREDENTIALS);
+
+ if (o instanceof Credentials)
+ {
+ c = (Credentials) o;
+ }
}
catch(Throwable e)
{
@@ -125,16 +122,12 @@
log.error("LoginModule error. Turn off session credentials checking with proper configuration option of " +
"LoginModule set to false");
}
-
}
- if (o instanceof Credentials)
+ if (c != null)
{
- Credentials wc = (Credentials)o;
-
- // Set shared state
- sharedState.put("javax.security.auth.login.name", wc.getUsername());
- sharedState.put("javax.security.auth.login.password", wc.getPassword());
+ sharedState.put("javax.security.auth.login.name", c.getUsername());
+ sharedState.put("javax.security.auth.login.password", c.getPassword());
}
return true;
}
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Token.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Token.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/Token.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.web.security;
+import org.gatein.wci.security.Credentials;
+
/**
* A token.
*/
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/TokenStore.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/TokenStore.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/TokenStore.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -19,6 +19,8 @@
package org.exoplatform.web.security;
+import org.gatein.wci.security.Credentials;
+
/**
* The token store is a place where temporary tokens are held.
*
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/AbstractTokenService.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/AbstractTokenService.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/AbstractTokenService.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -25,9 +25,9 @@
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
import org.exoplatform.web.login.InitiateLoginServlet;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.Token;
import org.exoplatform.web.security.TokenStore;
+import org.gatein.wci.security.Credentials;
import org.picocontainer.Startable;
import java.util.List;
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/CookieTokenService.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/CookieTokenService.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/CookieTokenService.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -26,8 +26,8 @@
import org.exoplatform.commons.chromattic.SessionContext;
import org.exoplatform.container.component.ComponentPlugin;
import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.GateInToken;
+import org.gatein.wci.security.Credentials;
import java.util.Collection;
import java.util.Date;
Added: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java (rev 0)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TicketConfiguration.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,76 @@
+/*
+* Copyright (C) 2003-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.
+*/
+
+package org.exoplatform.web.security.security;
+
+import sun.reflect.generics.reflectiveObjects.NotImplementedException;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.web.security.GateInToken;
+import org.gatein.wci.security.Credentials;
+
+/**
+ * This class is only used to get validity form configuration.
+ *
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class TicketConfiguration extends AbstractTokenService<GateInToken, String>
+{
+
+ public TicketConfiguration(InitParams initParams)
+ {
+ super(initParams);
+ }
+
+ @Override
+ public GateInToken getToken(String id)
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public GateInToken deleteToken(String id)
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public String[] getAllTokens()
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ protected String decodeKey(String stringKey)
+ {
+ throw new NotImplementedException();
+ }
+
+ @Override
+ public long size() throws Exception
+ {
+ throw new NotImplementedException();
+ }
+
+ public String createToken(Credentials credentials) throws IllegalArgumentException, NullPointerException
+ {
+ throw new NotImplementedException();
+ }
+}
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenContainer.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenContainer.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenContainer.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -21,8 +21,8 @@
import org.chromattic.api.annotations.Create;
import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.OneToMany;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.GateInToken;
+import org.gatein.wci.security.Credentials;
import java.util.Collection;
import java.util.Date;
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenEntry.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenEntry.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TokenEntry.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -22,8 +22,8 @@
import org.chromattic.api.annotations.Name;
import org.chromattic.api.annotations.PrimaryType;
import org.chromattic.api.annotations.Property;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.GateInToken;
+import org.gatein.wci.security.Credentials;
import java.util.Date;
Modified: portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TransientTokenService.java
===================================================================
--- portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TransientTokenService.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/security/TransientTokenService.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -20,8 +20,8 @@
package org.exoplatform.web.security.security;
import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.GateInToken;
+import org.gatein.wci.security.Credentials;
import java.util.concurrent.ConcurrentHashMap;
Modified: portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,5 +1,5 @@
<%
- String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+ String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
%>
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
Modified: portal/trunk/examples/portal/README.txt
===================================================================
--- portal/trunk/examples/portal/README.txt 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/examples/portal/README.txt 2011-01-27 09:50:23 UTC (rev 5822)
@@ -52,6 +52,9 @@
7. Define the related realm in your file tomcat/conf/jaas.conf, as below:
gatein-domain-sample-portal {
+ org.gatein.wci.security.WCILoginModule optional
+ portalContainerName="sample-portal"
+ realmName="gatein-domain-sample-portal";
org.exoplatform.web.security.PortalLoginModule required
portalContainerName="sample-portal"
realmName="gatein-domain-sample-portal";
Modified: portal/trunk/examples/portal/ear/src/main/application/META-INF/gatein-jboss-beans.xml
===================================================================
--- portal/trunk/examples/portal/ear/src/main/application/META-INF/gatein-jboss-beans.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/examples/portal/ear/src/main/application/META-INF/gatein-jboss-beans.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -2,6 +2,10 @@
<application-policy xmlns="urn:jboss:security-beans:1.0" name="gatein-domain-sample-portal">
<authentication>
+ <login-module code="org.gatein.wci.security.WCILoginModule" flag="optional">
+ <module-option name="portalContainerName">sample-portal</module-option>
+ <module-option name="realmName">gatein-domain-sample-portal</module-option>
+ </login-module>
<login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
<module-option name="portalContainerName">sample-portal</module-option>
<module-option name="realmName">gatein-domain-sample-portal</module-option>
Modified: portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -176,7 +176,7 @@
<servlet>
<servlet-name>PortalLoginController</servlet-name>
- <servlet-class>org.exoplatform.web.login.PortalLoginController</servlet-class>
+ <servlet-class>org.exoplatform.web.security.PortalLoginController</servlet-class>
</servlet>
<servlet>
<servlet-name>InitiateLoginServlet</servlet-name>
Modified: portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
--- portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,5 +1,5 @@
<%
- String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+ String initialURI = _ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() + "/private/" + _ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
%>
<div class="UIHomePagePortlet" id="$uicomponent.id">
<div class="TRContainer">
Modified: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetToken.java
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetToken.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetToken.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,8 +1,8 @@
package org.exoplatform.portal.gadget.core;
import org.apache.shindig.gadgets.oauth.OAuthStore.TokenInfo;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.Token;
+import org.gatein.wci.security.Credentials;
public class GadgetToken extends TokenInfo implements Token
Modified: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetTokenInfoService.java
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetTokenInfoService.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GadgetTokenInfoService.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -27,8 +27,8 @@
import org.exoplatform.commons.chromattic.ContextualTask;
import org.exoplatform.commons.chromattic.SessionContext;
import org.exoplatform.container.xml.InitParams;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.security.AbstractTokenService;
+import org.gatein.wci.security.Credentials;
import java.util.Collection;
Modified: portal/trunk/packaging/jboss-as/ear/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as/ear/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/jboss-as/ear/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -291,7 +291,7 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
+ <artifactId>wci-tomcat6</artifactId>
</dependency>
<dependency>
<groupId>org.gatein.pc</groupId>
Modified: portal/trunk/packaging/jboss-as5/README.txt
===================================================================
--- portal/trunk/packaging/jboss-as5/README.txt 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/jboss-as5/README.txt 2011-01-27 09:50:23 UTC (rev 5822)
@@ -16,7 +16,6 @@
-
== Usage ==
@@ -26,10 +25,14 @@
Then go to packaging/jboss-as5 to perform packaging.
-There are three profiles that cover dependency download (-Pdownload), packaging as exploded (default), and bundling as a zip (-Pbundle).
+There are three profiles that cover dependency download (-Pdownload), packaging as exploded (-Ppack), and bundling as a zip (-Pbundle).
-For main build use either 'download' profile or no profile (default). Both of these automatically perform 'clean' to ensure consistent results.
+For main build use either 'download' or 'pack' profile, but not both, as 'download' also includes 'pack' functionality.
+Both of these profiles also automatically perform 'clean' to assure consistent results.
+Profile 'pack' is the one active by default. When activating any other profile, the 'pack' profile is automatically turned off, so
+ it may have to be explicitly activated again if packaging is required (i.e. -Ppack,bundle).
+
There are two system properties that control where the root directory for JBoss AS servers is located, and what specific JBoss AS directory to use.
They are preset to default location:
@@ -43,17 +46,16 @@
+== Examples ==
-== Some examples ==
-
1) The simplest form uses default location for JBoss AS
mvn
This is equivalent to:
-mvn clean package -Dservers.dir=$GATEIN/portal/trunk/packaging/servers -Djbossas.name=jboss-5.1.0.GA
+mvn clean package -Ppack -Dservers.dir=$GATEIN/portal/trunk/packaging/servers -Djbossas.name=jboss-5.1.0.GA
2) If JBoss AS is located somewhere else adjust servers.dir and jbossas.name accordingly
@@ -65,11 +67,11 @@
mvn -Pdownload
-If SERVERS_DIR is not at default location, explicitly set it:
+If SERVERS_DIR is not at default location explicitly set it:
mvn -Pdownload -Dservers.dir=SERVERS_DIR
-There's no need to set 'jbossas.name' property when using -Pdownload (if set, its value should be 'jboss-5.1.0.GA').
+You shouldn't set jbossas.name property when using -Pdownload.
4) Zip bundle may be produced by activating 'bundle' profile
@@ -78,72 +80,8 @@
or
-mvn -Pbundle
+mvn -Ppack,bundle
+or just
-
-
-
-== Compatibility with previous packaging (PKG) ==
-
-
-The previous packaging uses two different properties to specify 'servers.dir' and 'jbossas.name':
-
- - exo.projects.directory.dependencies (equivalent to 'servers.dir')
- - exo.projects.app.jboss.version (equivalent to 'jbossas.name')
-
-
-Compatibility mode can be activated by using -Ppkg-jbossas5.
-
-
-
-
-
-== Build integration ==
-
-
-Packaging can be run separately from portal build as described before:
-
-# build portal first
-cd $GATEIN/portal/trunk
-mvn clean install -DskipTests
-
-# then package
-cd packaging/jboss-as5
-mvn
-
-
-Or it can be run together with the portal build, by using -Ppkg-jbossas5 compatibility mode:
-
-# build and package all at once
-cd $GATEIN/portal/trunk
-mvn clean install -Ppkg-jbossas5,download -DskipTests -Dexo.projects.directory.dependencies=$GATEIN/portal/trunk/packaging/servers
-
-(Notice how we also activate 'download' profile in this example - that's ideal for a new user who's building GateIn for the first time)
-
-
-
-
-
-== Troubleshoot ==
-
-
-1) 'Checksum validation failed!'
-
-When using -Pdownload it may happen that the download is interrupted, and the resulting file corrupt.
-The solution is to manually delete the target file from the filesystem, and run 'mvn -Pdownload' again.
-
-2) 'DIRECTORY does not exist.' when using -Pdownload.
-
-When using -Pdownload, and specifying -Djbossas.name=NAME at the same time (something you're adviced not to practice),
-the download part of the build will completely ignore 'jbossas.name' property, but the packaging part will use it, and look for
-JBoss AS instance in the specified directory.
-The solution is to not specify -Djbossas.name=NAME at all, or to set its value to 'jboss-5.1.0.GA'.
-
-3) 'Destination JBossAS directory exists already: DIRECTORY'
-
-When using -Pdownload the downloaded JBoss AS distribution is unpacked into a local directory. If the directory exists already
-the build will abort, to avoid corrupting a possibly carefully prepared specially configured JBoss AS instance.
-One solution is to not use -Pdownload in this case since the appropriate JBoss AS is already present. Or, you can move the
-directory out of the way, or delete it.
-
+mvn -Pbundle
Modified: portal/trunk/packaging/jboss-as5/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as5/pkg/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/jboss-as5/pkg/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -17,13 +17,11 @@
<name>GateIn for JBoss AS 5.x.x packaging</name>
<properties>
- <!-- The following two properties should not be changed! -->
<jbossas.version>5.1.0.GA</jbossas.version>
<jbossas.dist.version>5.1.0.GA-jdk6</jbossas.dist.version>
-
- <servers.dir>${project.basedir}/../../servers</servers.dir>
+ <servers.dir>${exo.projects.directory.dependencies}</servers.dir>
<jbossas.path>${servers.dir}</jbossas.path>
- <jbossas.name>jboss-${jbossas.version}</jbossas.name>
+ <jbossas.name>${exo.projects.app.jboss5.version}</jbossas.name>
<jbossas.dir>${jbossas.path}/${jbossas.name}</jbossas.dir>
<jbossas.target.dir>${project.build.directory}/jboss</jbossas.target.dir>
</properties>
@@ -310,7 +308,7 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
+ <artifactId>wci-tomcat6</artifactId>
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
@@ -911,206 +909,133 @@
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>check-jboss-environment-ready</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>jbossas.path</property>
- <message>"
-You must define the property 'jbossas.path'
-to give the path to the directory where you store your applications servers.
-"
- </message>
- </requireProperty>
- <requireProperty>
- <property>jbossas.name</property>
- <message>"
-You must define the property 'jbossas.name'
-to give the name of the directory where JBoss AS is stored.
-"
- </message>
- </requireProperty>
- <requireFilesExist>
- <files>
- <file>${jbossas.path}/${jbossas.name}/</file>
- </files>
- <message>"
-The following JBoss AS directory doesn't exist :
- ${jbossas.path}/${jbossas.name}
-Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to the correct location of servers directory
-and/or -Djbossas.name=NAME to point to the correct directory under the servers directory.
-You can also use -Pdownload to automatically provide JBoss AS instance.
-"
- </message>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
- <executions>
- <execution>
- <id>auto-clean</id>
- <phase>initialize</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
- <executions>
- <execution>
- <id>prepare-package</id>
- <phase>prepare-package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <ant antfile="${project.basedir}/package.xml" inheritRefs="true">
- <target name="package"/>
- <property name="maven.project.basedir" value="${project.basedir}"/>
- <property name="maven.project.build.directory" value="${project.build.directory}"/>
- </ant>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-
<profiles>
<profile>
- <id>pkg-jbossas5</id>
-
- <properties>
- <exo.projects.app.jboss.version>jboss-5.1.0.GA</exo.projects.app.jboss.version>
- <servers.dir>${exo.projects.directory.dependencies}</servers.dir>
- <jbossas.name>${exo.projects.app.jboss.version}</jbossas.name>
- </properties>
-
+ <id>download</id>
<build>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
<executions>
<execution>
- <id>check-jboss-legacy-environment-dependencies-dir</id>
+ <id>auto-clean</id>
+ <phase>initialize</phase>
<goals>
- <goal>enforce</goal>
+ <goal>clean</goal>
</goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>exo.projects.directory.dependencies</property>
- <message>"
-You must define the property 'exo.projects.directory.dependencies'
-to specify the path to the directory where you store your application servers.
-"
- </message>
- </requireProperty>
- </rules>
- <fail>true</fail>
- </configuration>
</execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
<execution>
- <id>check-jboss-legacy-environment-jboss-name</id>
+ <id>prepare-package</id>
+ <phase>prepare-package</phase>
<goals>
- <goal>enforce</goal>
+ <goal>run</goal>
</goals>
<configuration>
- <rules>
- <requireProperty>
- <property>exo.projects.app.jboss.version</property>
- <message>"
-You must define the property 'exo.projects.app.jboss.version'
-to specify the name of the directory where JBoss AS is stored.
-"
- </message>
- </requireProperty>
- </rules>
- <fail>true</fail>
+ <target>
+ <property name="jbossas.zip" value="${jbossas.path}/jboss-${jbossas.dist.version}.zip"/>
+
+ <!-- Autocreate servers.dir if necessary -->
+ <mkdir dir="${jbossas.path}"/>
+
+ <!-- Download JBossAS unless already downloaded -->
+ <ant antfile="${project.basedir}/download-jboss.xml">
+ <target name="download-jboss"/>
+ <property name="url"
+ value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version..."/>
+ <property name="dest" value="${jbossas.zip}"/>
+ </ant>
+
+ <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}"/>
+
+ <fail message="Destination JBossAS directory exists already: ${jbossas.dir} (Won't overwrite!)"
+ if="jbossas.dir.exists"/>
+
+ <!-- Extract downloaded JBossAS to servers dir -->
+ <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false"/>
+
+ <ant antfile="${project.basedir}/package.xml" inheritRefs="true">
+ <target name="package"/>
+ <property name="maven.project.basedir" value="${project.basedir}"/>
+ <property name="maven.project.build.directory" value="${project.build.directory}"/>
+ </ant>
+ </target>
</configuration>
</execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>pack</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
<execution>
- <id>check-jboss-dir-exists</id>
+ <id>jboss-check-environment-ready</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
- <requireFilesExist>
- <files>
- <file>${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}/</file>
- </files>
- <message>"
-The following JBoss AS directory doesn't exist :
- ${exo.projects.directory.dependencies}/${exo.projects.app.jboss.version}
+ <requireProperty>
+ <property>jbossas.path</property>
+ <message>"You must define the property jbossas.path to give the path to the directory
+ where you store your applications servers"
+ </message>
+ </requireProperty>
+ <requireProperty>
+ <property>jbossas.name</property>
+ <message>"You must define the property jbossas.name to give the name of the directory
+ where JBoss AS is stored"
+ </message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${jbossas.path}/${jbossas.name}/</file>
+ </files>
+ <message>"The following JBoss AS directory doesn't exist :
+ ${jbossas.path}/${jbossas.name}
-Make JBoss AS instance available at that location, or use -Dexo.projects.directory.dependencies=PATH to point to the correct location of servers directory
-and/or -Dexo.projects.app.jboss.version=NAME to point to the correct directory under the servers directory.
+Make JBoss AS instance available at that location, or use -Dservers.dir=PATH to point to the correct location.
You can also use -Pdownload to automatically provide JBoss AS instance.
"
- </message>
- </requireFilesExist>
+ </message>
+ </requireFilesExist>
</rules>
<fail>true</fail>
</configuration>
</execution>
- <execution>
- <id>check-jboss-environment-ready</id>
- <phase>none</phase>
- </execution>
</executions>
</plugin>
-
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>download</id>
- <build>
- <plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
<executions>
<execution>
- <id>check-jboss-environment-ready</id>
- <phase>none</phase>
+ <id>auto-clean</id>
+ <phase>initialize</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
</execution>
- <execution>
- <id>check-jboss-legacy-environment-jboss-name</id>
- <phase>none</phase>
- </execution>
- <execution>
- <id>check-jboss-dir-exists</id>
- <phase>none</phase>
- </execution>
</executions>
</plugin>
<plugin>
@@ -1126,32 +1051,6 @@
</goals>
<configuration>
<target>
- <available property="jbossas.dir.exists" type="dir" file="${jbossas.dir}"/>
-
- <fail if="jbossas.dir.exists">"
-Destination JBossAS directory exists already:
- ${jbossas.dir}
-
-Either rename it, delete it, or deactivate -Pdownload profile.
-"
- </fail>
-
- <property name="jbossas.zip" value="${jbossas.path}/jboss-${jbossas.dist.version}.zip"/>
-
- <!-- Autocreate servers.dir if necessary -->
- <mkdir dir="${jbossas.path}"/>
-
- <!-- Download JBossAS unless already downloaded -->
- <ant antfile="${project.basedir}/download-jboss.xml">
- <target name="download-jboss"/>
- <property name="url"
- value="http://sourceforge.net/projects/jboss/files/JBoss/JBoss-${jbossas.version..."/>
- <property name="dest" value="${jbossas.zip}"/>
- </ant>
-
- <!-- Extract downloaded JBossAS to servers dir -->
- <unzip src="${jbossas.zip}" dest="${jbossas.path}" overwrite="false"/>
-
<ant antfile="${project.basedir}/package.xml" inheritRefs="true">
<target name="package"/>
<property name="maven.project.basedir" value="${project.basedir}"/>
@@ -1165,7 +1064,7 @@
</plugins>
</build>
</profile>
-
+
<profile>
<id>bundle</id>
<build>
Modified: portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml
===================================================================
--- portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -2,6 +2,10 @@
<application-policy xmlns="urn:jboss:security-beans:1.0" name="gatein-domain">
<authentication>
+ <login-module code="org.gatein.wci.security.WCILoginModule" flag="optional">
+ <module-option name="portalContainerName">portal</module-option>
+ <module-option name="realmName">gatein-domain</module-option>
+ </login-module>
<login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
<module-option name="portalContainerName">portal</module-option>
<module-option name="realmName">gatein-domain</module-option>
Modified: portal/trunk/packaging/jboss-as6/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/jboss-as6/pkg/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -19,9 +19,9 @@
<properties>
<jbossas.version>6.0.0.Final</jbossas.version>
<jbossas.dist.version>${jbossas.version}</jbossas.dist.version>
- <servers.dir>${project.basedir}/../../servers</servers.dir>
+ <servers.dir>${exo.projects.directory.dependencies}</servers.dir>
<jbossas.path>${servers.dir}</jbossas.path>
- <jbossas.name>jboss-${jbossas.version}</jbossas.name>
+ <jbossas.name>${exo.projects.app.jboss6.version}</jbossas.name>
<jbossas.dir>${jbossas.path}/${jbossas.name}</jbossas.dir>
<jbossas.target.dir>${project.build.directory}/jboss</jbossas.target.dir>
</properties>
@@ -308,7 +308,7 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
+ <artifactId>wci-tomcat6</artifactId>
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
Modified: portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -2,6 +2,10 @@
<application-policy xmlns="urn:jboss:security-beans:1.0" name="gatein-domain">
<authentication>
+ <login-module code="org.gatein.wci.security.WCILoginModule" flag="optional">
+ <module-option name="portalContainerName">portal</module-option>
+ <module-option name="realmName">gatein-domain</module-option>
+ </login-module>
<login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
<module-option name="portalContainerName">portal</module-option>
<module-option name="realmName">gatein-domain</module-option>
Added: portal/trunk/packaging/jetty/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/pom.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,963 @@
+<?xml version="1.0"?>
+<?rename tofile="portal.war"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.parent</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </parent>
+ <artifactId>exo.portal.packaging.jetty.pkg</artifactId>
+ <packaging>pom</packaging>
+ <name>GateIn for Jetty packaging</name>
+
+ <properties>
+ <jetty.dir>${exo.projects.directory.dependencies}/${exo.projects.app.jetty.version}</jetty.dir>
+ </properties>
+
+ <dependencies>
+
+ <!-- Logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-jdk14</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+
+ <!-- Apache commons -->
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-chain</groupId>
+ <artifactId>commons-chain</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ </dependency>
+
+ <!-- JBoss -->
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>2.2.9.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <version>2.0.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.0.5.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>3.2.6.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossjts</artifactId>
+ <version>4.6.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.jbossts</groupId>
+ <artifactId>jbossts-common</artifactId>
+ <version>4.6.1.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>javassist</groupId>
+ <artifactId>javassist</artifactId>
+ <version>3.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ <version>2.6.13.GA</version>
+ </dependency>
+
+ <!-- JCR stack -->
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.cache</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.command</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.remote</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.organization.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.database</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.organization.jdbc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.organization.ldap</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.security.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.document</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.core</groupId>
+ <artifactId>exo.core.component.xml-processing</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.ext</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.webdav</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.component.ftp</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.framework.web</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.jcr</groupId>
+ <artifactId>exo.jcr.framework.command</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.frameworks.json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.frameworks.servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.rest.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.rest.ext</artifactId>
+ </dependency>
+
+ <!-- Reflext -->
+ <dependency>
+ <groupId>org.reflext</groupId>
+ <artifactId>reflext.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.reflext</groupId>
+ <artifactId>reflext.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.reflext</groupId>
+ <artifactId>reflext.jlr</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.reflext</groupId>
+ <artifactId>reflext.spi</artifactId>
+ </dependency>
+
+ <!-- Chromattic -->
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.apt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.metamodel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.ext</artifactId>
+ </dependency>
+
+ <!-- Picket link -->
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-spi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-cache</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-hibernate</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.picketlink.idm</groupId>
+ <artifactId>picketlink-idm-ldap</artifactId>
+ </dependency>
+
+ <!-- Gatein common -->
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-logging</artifactId>
+ </dependency>
+
+ <!-- Gatein wci -->
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-wci</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-jetty</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-exo</artifactId>
+ </dependency>
+
+ <!-- Gatein PC -->
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-portlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-controller</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-federation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-mc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-bridge</artifactId>
+ </dependency>
+
+ <!-- GateIn MOP -->
+ <dependency>
+ <groupId>org.gatein.mop</groupId>
+ <artifactId>mop-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.mop</groupId>
+ <artifactId>mop-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.mop</groupId>
+ <artifactId>mop-spi</artifactId>
+ </dependency>
+
+ <!-- GateIn Captcha -->
+ <dependency>
+ <groupId>org.gatein.captcha</groupId>
+ <artifactId>simplecaptcha</artifactId>
+ </dependency>
+
+ <!-- GateIn Shinding -->
+ <dependency>
+ <groupId>org.gatein.shindig</groupId>
+ <artifactId>shindig-gadgets</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.shindig</groupId>
+ <artifactId>shindig-features</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.shindig</groupId>
+ <artifactId>shindig-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.shindig</groupId>
+ <artifactId>shindig-social-api</artifactId>
+ </dependency>
+
+ <!-- GateIn -->
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.application-registry</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.identity</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.management</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.pc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.portal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.resources</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.scripting</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.controller</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.resources</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.web.server</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.dashboard</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.eXo</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.framework</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.portal</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.webui.portlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.gadgets-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>gatein.portal.component.wsrp</artifactId>
+ </dependency>
+
+ <!-- Provided -->
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.jcr</groupId>
+ <artifactId>jcr</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.portlet</groupId>
+ <artifactId>portlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ws.rs</groupId>
+ <artifactId>jsr311-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector-api</artifactId>
+ <version>1.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.ccpp</groupId>
+ <artifactId>ccpp</artifactId>
+ <version>1.0</version>
+ </dependency>
+
+ <!-- Hibernate -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>ejb3-persistence</artifactId>
+ <version>1.0.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-commons-annotations</artifactId>
+ <version>3.1.0.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ <version>3.3.2.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.4.0.GA</version>
+ </dependency>
+
+ <!-- Various -->
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.google.code.guice</groupId>
+ <artifactId>guice-jmx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>antlr</groupId>
+ <artifactId>antlr</artifactId>
+ <version>2.7.6rc1</version>
+ </dependency>
+ <dependency>
+ <groupId>aopalliance</groupId>
+ <artifactId>aopalliance</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>asm</groupId>
+ <artifactId>asm</artifactId>
+ <version>1.5.3</version>
+ </dependency>
+ <dependency>
+ <groupId>bouncycastle</groupId>
+ <artifactId>bcmail-jdk14</artifactId>
+ <version>136</version>
+ </dependency>
+ <dependency>
+ <groupId>bouncycastle</groupId>
+ <artifactId>bcprov-jdk14</artifactId>
+ <version>136</version>
+ </dependency>
+ <dependency>
+ <groupId>caja</groupId>
+ <artifactId>caja</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>caja</groupId>
+ <artifactId>json_simple</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>oswego-concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4</version>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ <version>1.6.0</version>
+ </dependency>
+ <dependency>
+ <groupId>com.jhlabs</groupId>
+ <artifactId>filters</artifactId>
+ <version>2.0.235</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>hsqldb</groupId>
+ <artifactId>hsqldb</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>html-parser</groupId>
+ <artifactId>html-parser</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>icu4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.lowagie</groupId>
+ <artifactId>itext</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>net.jcip</groupId>
+ <artifactId>jcip-annotations</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-bind</artifactId>
+ <version>${org.jibx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-run</artifactId>
+ <version>${org.jibx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>joda-time</groupId>
+ <artifactId>joda-time</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jsecurity</groupId>
+ <artifactId>jsecurity</artifactId>
+ <version>0.9.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>de.odysseus.juel</groupId>
+ <artifactId>juel-api</artifactId>
+ <version>2.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>de.odysseus.juel</groupId>
+ <artifactId>juel-impl</artifactId>
+ <version>2.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-core</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-memory</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.lucene</groupId>
+ <artifactId>lucene-spellchecker</artifactId>
+ <version>2.4.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.pdfbox</groupId>
+ <artifactId>pdfbox</artifactId>
+ <version>1.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.poi</groupId>
+ <artifactId>poi</artifactId>
+ <version>3.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.poi</groupId>
+ <artifactId>poi-ooxml</artifactId>
+ <version>3.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.poi</groupId>
+ <artifactId>poi-scratchpad</artifactId>
+ <version>3.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.portals.bridges</groupId>
+ <artifactId>portals-bridges-common</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>rome</groupId>
+ <artifactId>rome</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.sanselan</groupId>
+ <artifactId>sanselan</artifactId>
+ <version>0.97-incubator</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons</groupId>
+ <artifactId>ws-commons-util</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.xmlbeans</groupId>
+ <artifactId>xmlbeans</artifactId>
+ <version>2.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ <version>1.1.3.4.O</version>
+ </dependency>
+ <dependency>
+ <groupId>com.thoughtworks.xstream</groupId>
+ <artifactId>xstream</artifactId>
+ <version>1.3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.oauth</groupId>
+ <artifactId>core</artifactId>
+ </dependency>
+
+ <!-- War files -->
+ <dependency>
+ <?rename portal.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.web.portal</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <?rename eXoGadgetServer.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.gadgets-server</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <?rename eXoGadgets.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.eXoGadgets</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <?rename web.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.portlet.web</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <?rename rest.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.web.rest</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <?rename exoadmin.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.portlet.exoadmin</artifactId>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <?rename eXoResources.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.web.eXoResources</artifactId>
+ <type>war</type>
+ </dependency>
+
+ <dependency>
+ <?rename gatein-sample-skin.war?>
+ <groupId>org.gatein.portal.examples.skins</groupId>
+ <artifactId>gatein-sample-skin</artifactId>
+ <type>war</type>
+ </dependency>
+
+ <dependency>
+ <?rename dashboard.war?>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.portlet.dashboard</artifactId>
+ <type>war</type>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>exo.projects.directory.dependencies</property>
+ <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+ </requireProperty>
+ <requireProperty>
+ <property>exo.projects.app.jetty.version</property>
+ <message>"You must define the property exo.projects.app.jetty.version to give the name of the directory where is stored jetty"</message>
+ </requireProperty>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>prepare-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+
+ <!-- Copy the dependencies -->
+ <dependencyfilesets/>
+ <xslt
+ basedir="${project.basedir}"
+ destdir="${project.build.directory}"
+ includes="pom.xml"
+ extension=".xml"
+ style="${project.basedir}/transform.xsl">
+ <param name="lib.dir" expression="${project.build.directory}/jetty/lib"/>
+ <param name="webapps.dir" expression="${project.build.directory}/jetty/webapps"/>
+ <mapper type="glob" from="pom.xml" to="copy-dependencies.xml"/>
+ </xslt>
+ <ant antfile="${project.build.directory}/copy-dependencies.xml" inheritRefs="true">
+ <target name="copy-dependencies" />
+ </ant>
+
+ <!-- Copy jetty -->
+ <copy todir="${project.build.directory}/jetty">
+ <fileset dir="${jetty.dir}">
+ <exclude name="webapps/**"/>
+ <exclude name="contexts/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy configuration -->
+ <copy todir="${project.build.directory}/jetty" overwrite="true">
+ <fileset dir="${project.basedir}/src/main/resources/jetty"/>
+ </copy>
+
+ <!-- Copy configuration -->
+ <copy tofile="${project.build.directory}/jetty/gatein/conf/configuration.properties">
+ <fileset dir="${project.basedir}/../../../component/common/src/main/java/conf" includes="configuration-jetty.properties"/>
+ </copy>
+
+ <!-- File permissions -->
+ <chmod perm="0644" type="file" dir="${project.build.directory}/jetty/bin" excludes="**/*.sh"/>
+ <chmod perm="0755" type="file" dir="${project.build.directory}/jetty/bin" includes="**/*.sh"/>
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>bundle</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <zip destfile="${project.build.directory}/jetty.zip" basedir="${project.build.directory}/jetty"/>
+ <attachartifact file="${project.build.directory}/jetty.zip" classifier="bundle" type="zip"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/commons-logging.properties
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/commons-logging.properties (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/commons-logging.properties 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,3 @@
+# Configure commons logging to use JDK logger
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
+org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/exokey.pem 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,29 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXAIBAAKBgQDMYzu2ZJb6Mt89RxjYcPb01clMna7PJTm+UneDYELKjG6EZ4Nu
++v8Di7e2PxpNlW4cCwUiEkiWBrZH8S1caz4CYIAG+VmKXZXBgmNCINgRVzNtj0/E
+4xi5Yz+G1uGCkaB+1mheJWke1rO6SgL6tJ5LmEYCGGu0mj+vxD8W2i4nBwIDAQAB
+AoGAJS1zwiSf9djlFI9nLI+3zCdLG32fO5zI2R7FEIek/pT20WzG0pwjYPC8NRFb
+Zntk8QLsJxtuSqPj6kgreSEkwRR/YGVIo/xIr46vwl/WydMLKJljvu+E7Y4yjYHb
+X4+FDRSL+huOMNNrHgnMy8WnplvtuW5LNV4kD3izU37jxQECQQD15re+8J3C8O6m
+wt8+5Ed6a+1+BIdFggFFpV4oC2AKE11+dnwxD5ZyB77sg6sCbcWbLTXOyp/CCAY8
+bkp9ZbOBAkEA1MgP7ZKUUrtrIIg0VYaTTH24iMWTOsPbgNWg9DlLzmIagHHmmmLC
+O6gFT05bsNPcFv5a25m+jT1yfvjuKLN+hwJBAJHD544/UjWZ3s5p3C6K4bg3PDwk
+cQ+KBjkD0zHHtHGkkxqBIBNxGwyTfOD1GC1DZw0amrfvsw4w9YljE7ML04ECQHrX
+IPLrm3uDvZ3jZCs37RPMxNsZDR1w8ukW67vy1APK+TfMCfB5MV8VajNVrnOQa9BO
+eY+r26lYnyAUgBG5RkMCQHW5qFDYmgJjb38+uwxd53zGy6m+Jd7kdnGms9V4pPd1
+b21WA/5ncxrpFaz5OFPLtv2zrKYVBAj0tros5hs8Fwk=
+-----END RSA PRIVATE KEY-----
+-----BEGIN CERTIFICATE-----
+MIICGzCCAYSgAwIBAgIJAJ/PJcjrAB25MA0GCSqGSIb3DQEBBAUAMBQxEjAQBgNV
+BAMTCW15dGVzdGtleTAeFw0wOTAxMDgwNzUwMjlaFw0xMDAxMDgwNzUwMjlaMBQx
+EjAQBgNVBAMTCW15dGVzdGtleTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA
+zGM7tmSW+jLfPUcY2HD29NXJTJ2uzyU5vlJ3g2BCyoxuhGeDbvr/A4u3tj8aTZVu
+HAsFIhJIlga2R/EtXGs+AmCABvlZil2VwYJjQiDYEVczbY9PxOMYuWM/htbhgpGg
+ftZoXiVpHtazukoC+rSeS5hGAhhrtJo/r8Q/FtouJwcCAwEAAaN1MHMwHQYDVR0O
+BBYEFB6QdOIZawuedUjT4F+bK9RG8+sMMEQGA1UdIwQ9MDuAFB6QdOIZawuedUjT
+4F+bK9RG8+sMoRikFjAUMRIwEAYDVQQDEwlteXRlc3RrZXmCCQCfzyXI6wAduTAM
+BgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBAAE/6mmd8/mMyzzFozblp04e
+TonwNrUB7TldXj+0WnYP04u0hNJuFJ/KD29gHdMnYDdOiVdmK/WS6a7Mn+7HVDT7
+wytizzu/Jfvlrr3yMQYCZssvNIbXPTmr+MjLErjkRxYi4quAnkankTNCDxa4mxN3
+WNlNt2SavfSi3d60wd5o
+-----END CERTIFICATE-----
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.bat
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.bat (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.bat 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,39 @@
+@REM
+@REM Copyright (C) 2009 eXo Platform SAS.
+@REM
+@REM This is free software; you can redistribute it and/or modify it
+@REM under the terms of the GNU Lesser General Public License as
+@REM published by the Free Software Foundation; either version 2.1 of
+@REM the License, or (at your option) any later version.
+@REM
+@REM This software is distributed in the hope that it will be useful,
+@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+@REM Lesser General Public License for more details.
+@REM
+@REM You should have received a copy of the GNU Lesser General Public
+@REM License along with this software; if not, write to the Free
+@REM Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+@REM 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+@REM
+
+@echo off
+
+rem Computes the absolute path of eXo
+setlocal ENABLEDELAYEDEXPANSION
+for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
+cd %BIN_DIR%
+
+rem Sets some variables
+set LOG_OPTS=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+set SECURITY_OPTS=-Djava.security.auth.login.config=etc\login.conf
+set EXO_OPTS=-Dexo.product.developing=true -Dexo.conf.dir.name=gatein\conf
+set EXO_CONFIG_OPTS=-Dorg.exoplatform.container.configuration.debug
+set REMOTE_DEBUG=-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n
+
+set JAVA_OPTIONS=-Xms128m -Xmx512m -XX:MaxPermSize=256m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS% %EXO_CONFIG_OPTS% %REMOTE_DEBUG%
+set JPDA_TRANSPORT=dt_socket
+set JPDA_ADDRESS=8000
+
+rem Launches the server
+call jetty.bat %*
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.sh
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.sh (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein-dev.sh 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# 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.
+#
+
+# Computes the absolute path of eXo
+cd `dirname "$0"`
+
+# Sets some variables
+LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
+SECURITY_OPTS="-Djava.security.auth.login.config=etc/login.conf"
+EXO_OPTS="-Dexo.product.developing=true -Dexo.conf.dir.name=gatein/conf -Djava.awt.headless=true"
+EXO_CONFIG_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.exoplatform.container.configuration.debug"
+JPDA_TRANSPORT=dt_socket
+JPDA_ADDRESS=8000
+REMOTE_DEBUG="-Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n"
+JMX_AGENT="-Dcom.sun.management.jmxremote"
+GATEIN_OPTS=""
+
+while getopts "D:" OPTION
+do
+ case $OPTION in
+ D)
+ GATEIN_OPTS="$GATEIN_OPTS -D$OPTARG"
+ ;;
+ esac
+done
+
+# skip getopt parms
+shift $((OPTIND-1))
+
+JAVA_OPTIONS="$JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $EXO_CONFIG_OPTS $REMOTE_DEBUG $GATEIN_OPTS"
+export JAVA_OPTIONS
+
+# Launches the server
+exec "$PRGDIR"./jetty.sh "$@"
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.bat
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.bat (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.bat 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,34 @@
+@REM
+@REM Copyright (C) 2009 eXo Platform SAS.
+@REM
+@REM This is free software; you can redistribute it and/or modify it
+@REM under the terms of the GNU Lesser General Public License as
+@REM published by the Free Software Foundation; either version 2.1 of
+@REM the License, or (at your option) any later version.
+@REM
+@REM This software is distributed in the hope that it will be useful,
+@REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+@REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+@REM Lesser General Public License for more details.
+@REM
+@REM You should have received a copy of the GNU Lesser General Public
+@REM License along with this software; if not, write to the Free
+@REM Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+@REM 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+@REM
+
+@echo off
+
+rem Computes the absolute path of eXo
+setlocal ENABLEDELAYEDEXPANSION
+for %%i in ( !%~f0! ) do set BIN_DIR=%%~dpi
+cd %BIN_DIR%
+
+rem Sets some variables
+set LOG_OPTS=-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
+set SECURITY_OPTS=-Djava.security.auth.login.config=etc\login.conf
+set EXO_OPTS=-Dexo.product.developing=false -Dexo.conf.dir.name=gatein\conf
+set JAVA_OPTIONS=-Xms128m -Xmx512m -XX:MaxPermSize=256m %LOG_OPTS% %SECURITY_OPTS% %EXO_OPTS%
+
+rem Launches the server
+call jetty.bat %*
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.sh
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.sh (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/gatein.sh 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# 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.
+#
+
+#Production Script to launch GateIn
+#See gatein-dev.sh for development starup
+
+# Computes the absolute path of eXo
+cd `dirname "$0"`
+
+# Sets some variables
+LOG_OPTS="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
+SECURITY_OPTS="-Djava.security.auth.login.config=etc/login.conf"
+EXO_OPTS="-Dexo.product.developing=false -Dexo.conf.dir.name=gatein/conf -Djava.awt.headless=true"
+GATEIN_OPTS=""
+
+while getopts "D:" OPTION
+do
+ case $OPTION in
+ D)
+ GATEIN_OPTS="$GATEIN_OPTS -D$OPTARG"
+ ;;
+ esac
+done
+
+# skip getopt parms
+shift $((OPTIND-1))
+
+JAVA_OPTIONS="-Xms128m -Xmx384m -XX:MaxPermSize=192m $JAVA_OPTS $LOG_OPTS $SECURITY_OPTS $EXO_OPTS $GATEIN_OPTS"
+export JAVA_OPTIONS
+
+# Launches the server
+exec "$PRGDIR"./jetty.sh "$@"
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/bin/oauthkey.pem 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,16 @@
+-----BEGIN PRIVATE KEY-----
+MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMxjO7Zklvoy3z1H
+GNhw9vTVyUydrs8lOb5Sd4NgQsqMboRng276/wOLt7Y/Gk2VbhwLBSISSJYGtkfx
+LVxrPgJggAb5WYpdlcGCY0Ig2BFXM22PT8TjGLljP4bW4YKRoH7WaF4laR7Ws7pK
+Avq0nkuYRgIYa7SaP6/EPxbaLicHAgMBAAECgYAlLXPCJJ/12OUUj2csj7fMJ0sb
+fZ87nMjZHsUQh6T+lPbRbMbSnCNg8Lw1EVtme2TxAuwnG25Ko+PqSCt5ISTBFH9g
+ZUij/Eivjq/CX9bJ0wsomWO+74TtjjKNgdtfj4UNFIv6G44w02seCczLxaemW+25
+bks1XiQPeLNTfuPFAQJBAPXmt77wncLw7qbC3z7kR3pr7X4Eh0WCAUWlXigLYAoT
+XX52fDEPlnIHvuyDqwJtxZstNc7Kn8IIBjxuSn1ls4ECQQDUyA/tkpRSu2sgiDRV
+hpNMfbiIxZM6w9uA1aD0OUvOYhqAceaaYsI7qAVPTluw09wW/lrbmb6NPXJ++O4o
+s36HAkEAkcPnjj9SNZnezmncLorhuDc8PCRxD4oGOQPTMce0caSTGoEgE3EbDJN8
+4PUYLUNnDRqat++zDjD1iWMTswvTgQJAetcg8uube4O9neNkKzftE8zE2xkNHXDy
+6Rbru/LUA8r5N8wJ8HkxXxVqM1Wuc5Br0E55j6vbqVifIBSAEblGQwJAdbmoUNia
+AmNvfz67DF3nfMbLqb4l3uR2caaz1Xik93VvbVYD/mdzGukVrPk4U8u2/bOsphUE
+CPS2uizmGzwXCQ==
+-----END PRIVATE KEY-----
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoGadgetServer.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoGadgetServer.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoGadgetServer.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<!-- ==================================================================
+Configure and deploy the test web application in $(jetty.home)/webapps/test
+
+Note. If this file did not exist or used a context path other that /test
+then the default configuration of jetty.xml would discover the test
+webapplication with a WebAppDeployer. By specifying a context in this
+directory, additional configuration may be specified and hot deployments
+detected.
+===================================================================== -->
+
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+ <Set name="contextPath">/eXoGadgetServer</Set>
+ <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/eXoGadgetServer.war</Set>
+
+</Configure>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoResources.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoResources.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/eXoResources.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<!-- ==================================================================
+Configure and deploy the test web application in $(jetty.home)/webapps/test
+
+Note. If this file did not exist or used a context path other that /test
+then the default configuration of jetty.xml would discover the test
+webapplication with a WebAppDeployer. By specifying a context in this
+directory, additional configuration may be specified and hot deployments
+detected.
+===================================================================== -->
+
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+ <Set name="contextPath">/eXoResources</Set>
+ <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/eXoResources.war</Set>
+
+</Configure>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/portal.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/portal.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/portal.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<!-- ==================================================================
+Configure and deploy the test web application in $(jetty.home)/webapps/test
+
+Note. If this file did not exist or used a context path other that /test
+then the default configuration of jetty.xml would discover the test
+webapplication with a WebAppDeployer. By specifying a context in this
+directory, additional configuration may be specified and hot deployments
+detected.
+===================================================================== -->
+
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+ <Set name="contextPath">/portal</Set>
+ <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/portal.war</Set>
+
+</Configure>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/rest.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/rest.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/contexts/rest.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<!-- ==================================================================
+Configure and deploy the test web application in $(jetty.home)/webapps/test
+
+Note. If this file did not exist or used a context path other that /test
+then the default configuration of jetty.xml would discover the test
+webapplication with a WebAppDeployer. By specifying a context in this
+directory, additional configuration may be specified and hot deployments
+detected.
+===================================================================== -->
+
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+ <Set name="contextPath">/rest</Set>
+ <Set name="war"><SystemProperty name="jetty.home" default="."/>/webapps/rest.war</Set>
+
+</Configure>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/jetty.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,235 @@
+<?xml version="1.0"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+
+<!-- =============================================================== -->
+<!-- Configure the Jetty Server -->
+<!-- -->
+<!-- Documentation of this file format can be found at: -->
+<!-- http://docs.codehaus.org/display/JETTY/jetty.xml -->
+<!-- -->
+<!-- =============================================================== -->
+
+
+<Configure id="Server" class="org.mortbay.jetty.Server">
+
+ <!-- =========================================================== -->
+ <!-- Server Thread Pool -->
+ <!-- =========================================================== -->
+ <Set name="ThreadPool">
+
+ <New class="org.mortbay.thread.QueuedThreadPool">
+ <Set name="minThreads">10</Set>
+ <Set name="maxThreads">200</Set>
+ <Set name="lowThreads">20</Set>
+ <Set name="SpawnOrShrinkAt">2</Set>
+ </New>
+
+ <!-- Optional Java 5 bounded threadpool with job queue
+ <New class="org.mortbay.thread.concurrent.ThreadPool">
+ <Set name="corePoolSize">50</Set>
+ <Set name="maximumPoolSize">50</Set>
+ </New>
+ -->
+ </Set>
+
+
+
+ <!-- =========================================================== -->
+ <!-- Set connectors -->
+ <!-- =========================================================== -->
+ <!-- One of each type! -->
+ <!-- =========================================================== -->
+
+ <!-- Use this connector for many frequently idle connections
+ and for threadless continuations.
+ -->
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.mortbay.jetty.nio.SelectChannelConnector">
+ <Set name="host"><SystemProperty name="jetty.host" /></Set>
+ <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
+ <Set name="maxIdleTime">30000</Set>
+ <Set name="Acceptors">2</Set>
+ <Set name="statsOn">false</Set>
+ <Set name="confidentialPort">8443</Set>
+ <Set name="lowResourcesConnections">5000</Set>
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- Use this connector if NIO is not available.
+ <Call name="addConnector">
+ <Arg>
+ <New class="org.mortbay.jetty.bio.SocketConnector">
+ <Set name="port">8081</Set>
+ <Set name="maxIdleTime">50000</Set>
+ <Set name="lowResourceMaxIdleTime">1500</Set>
+ </New>
+ </Arg>
+ </Call>
+ -->
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- To add a HTTPS SSL listener -->
+ <!-- see jetty-ssl.xml to add an ssl connector. use -->
+ <!-- java -jar start.jar etc/jetty.xml etc/jetty-ssl.xml -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+ <!-- To allow Jetty to be started from xinetd -->
+ <!-- mixin jetty-xinetd.xml: -->
+ <!-- java -jar start.jar etc/jetty.xml etc/jetty-xinetd.xml -->
+ <!-- -->
+ <!-- See jetty-xinetd.xml for further instructions. -->
+ <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
+
+ <!-- =========================================================== -->
+ <!-- Set up global session ID manager -->
+ <!-- =========================================================== -->
+ <!--
+ <Set name="sessionIdManager">
+ <New class="org.mortbay.jetty.servlet.HashSessionIdManager">
+ <Set name="workerName">node1</Set>
+ </New>
+ </Set>
+ -->
+
+ <!-- =========================================================== -->
+ <!-- Set handler Collection Structure -->
+ <!-- =========================================================== -->
+ <Set name="handler">
+ <New id="Handlers" class="org.mortbay.jetty.handler.HandlerCollection">
+ <Set name="handlers">
+ <Array type="org.mortbay.jetty.Handler">
+ <Item>
+ <New id="Contexts" class="org.mortbay.jetty.handler.ContextHandlerCollection"/>
+ </Item>
+ <Item>
+ <New id="DefaultHandler" class="org.mortbay.jetty.handler.DefaultHandler"/>
+ </Item>
+ <Item>
+ <New id="RequestLog" class="org.mortbay.jetty.handler.RequestLogHandler"/>
+ </Item>
+ </Array>
+ </Set>
+ </New>
+ </Set>
+
+ <!-- =========================================================== -->
+ <!-- Configure the context deployer -->
+ <!-- A context deployer will deploy contexts described in -->
+ <!-- configuration files discovered in a directory. -->
+ <!-- The configuration directory can be scanned for hot -->
+ <!-- deployments at the configured scanInterval. -->
+ <!-- -->
+ <!-- This deployer is configured to deploy contexts configured -->
+ <!-- in the $JETTY_HOME/contexts directory -->
+ <!-- -->
+ <!-- =========================================================== -->
+ <Call name="addLifeCycle">
+ <Arg>
+ <New class="org.mortbay.jetty.deployer.ContextDeployer">
+ <Set name="contexts"><Ref id="Contexts"/></Set>
+ <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
+ <Set name="scanInterval">5</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- =========================================================== -->
+ <!-- Configure the webapp deployer. -->
+ <!-- A webapp deployer will deploy standard webapps discovered -->
+ <!-- in a directory at startup, without the need for additional -->
+ <!-- configuration files. It does not support hot deploy or -->
+ <!-- non standard contexts (see ContextDeployer above). -->
+ <!-- -->
+ <!-- This deployer is configured to deploy webapps from the -->
+ <!-- $JETTY_HOME/webapps directory -->
+ <!-- -->
+ <!-- Normally only one type of deployer need be used. -->
+ <!-- -->
+ <!-- =========================================================== -->
+ <Call name="addLifeCycle">
+ <Arg>
+ <New class="org.mortbay.jetty.deployer.WebAppDeployer">
+ <Set name="contexts"><Ref id="Contexts"/></Set>
+ <Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps</Set>
+ <Set name="parentLoaderPriority">false</Set>
+ <Set name="extract">true</Set>
+ <Set name="allowDuplicates">false</Set>
+ <Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
+ </New>
+ </Arg>
+ </Call>
+
+ <!-- =========================================================== -->
+ <!-- Configure Authentication Realms -->
+ <!-- Realms may be configured for the entire server here, or -->
+ <!-- they can be configured for a specific web app in a context -->
+ <!-- configuration (see $(jetty.home)/contexts/test.xml for an -->
+ <!-- example). -->
+ <!-- =========================================================== -->
+ <Set name="UserRealms">
+<!--
+ <Array type="org.mortbay.jetty.security.UserRealm">
+ <Item>
+ <New class="org.mortbay.jetty.security.HashUserRealm">
+ <Set name="name">Test Realm</Set>
+ <Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
+ <Set name="refreshInterval">0</Set>
+ </New>
+ </Item>
+ </Array>
+-->
+ <Array type="org.mortbay.jetty.plus.jaas.JAASUserRealm">
+ <Item>
+ <New class="org.mortbay.jetty.plus.jaas.JAASUserRealm">
+ <Set name="Name">gatein-domain</Set>
+ <Set name="LoginModuleName">gatein-domain</Set>
+ <Set name="RoleCheckPolicy">
+ <New class="org.mortbay.jetty.plus.jaas.StrictRoleCheckPolicy"/>
+ </Set>
+ <Set name="CallbackHandlerClass">
+ org.mortbay.jetty.plus.jaas.callback.DefaultCallbackHandler
+ </Set>
+ <Set name="roleClassNames">
+ <Array type="java.lang.String">
+ <Item>org.exoplatform.services.security.jaas.RolePrincipal</Item>
+ </Array>
+ </Set>
+ </New>
+ </Item>
+ </Array>
+ </Set>
+
+ <!-- =========================================================== -->
+ <!-- Configure Request Log -->
+ <!-- Request logs may be configured for the entire server here, -->
+ <!-- or they can be configured for a specific web app in a -->
+ <!-- contexts configuration (see $(jetty.home)/contexts/test.xml -->
+ <!-- for an example). -->
+ <!-- =========================================================== -->
+ <Ref id="RequestLog">
+ <Set name="requestLog">
+ <New id="RequestLogImpl" class="org.mortbay.jetty.NCSARequestLog">
+ <Set name="filename"><SystemProperty name="jetty.logs" default="./logs"/>/yyyy_mm_dd.request.log</Set>
+ <Set name="filenameDateFormat">yyyy_MM_dd</Set>
+ <Set name="retainDays">90</Set>
+ <Set name="append">true</Set>
+ <Set name="extended">false</Set>
+ <Set name="logCookies">false</Set>
+ <Set name="LogTimeZone">GMT</Set>
+ </New>
+ </Set>
+ </Ref>
+
+ <!-- =========================================================== -->
+ <!-- extra options -->
+ <!-- =========================================================== -->
+ <Set name="stopAtShutdown">true</Set>
+ <Set name="sendServerVersion">true</Set>
+ <Set name="sendDateHeader">true</Set>
+ <Set name="gracefulShutdown">1000</Set>
+
+</Configure>
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/login.conf
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/login.conf (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/etc/login.conf 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,13 @@
+gatein-domain {
+ org.gatein.wci.security.WCILoginModule optional;
+ org.exoplatform.web.security.PortalLoginModule required;
+ org.exoplatform.services.security.jaas.SharedStateLoginModule required;
+ org.exoplatform.services.security.j2ee.TomcatLoginModule required;
+
+ // Uncomment the following part (and comment the other part for CAS integration
+ // org.gatein.sso.agent.login.SSOLoginModule required
+ // org.exoplatform.services.security.j2ee.TomcatLoginModule required
+ // portalContainerName=portal
+ // realmName=gatein-domain
+
+};
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/configuration.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/configuration.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/configuration.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,65 @@
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <!-- The full qualified name of the PortalContainerConfig -->
+ <type>org.exoplatform.container.definition.PortalContainerConfig</type>
+ <init-params>
+ <!-- The name of the default portal container -->
+ <value-param>
+ <name>default.portal.container</name>
+ <value>portal</value>
+ </value-param>
+ <!-- The name of the default rest ServletContext -->
+ <value-param>
+ <name>default.rest.context</name>
+ <value>rest</value>
+ </value-param>
+ <!-- The name of the default realm -->
+ <value-param>
+ <name>default.realm.name</name>
+ <value>gatein-domain</value>
+ </value-param>
+ <!-- The default portal container definition -->
+ <!-- It cans be used to avoid duplicating configuration -->
+ <object-param>
+ <name>default.portal.definition</name>
+ <object type="org.exoplatform.container.definition.PortalContainerDefinition">
+ <!-- The path to the external properties file -->
+ <field name="externalSettingsPath">
+ <string>configuration.properties</string>
+ </field>
+ <field name="dependencies">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>eXoResources</string>
+ </value>
+ <value>
+ <string>portal</string>
+ </value>
+ <value>
+ <string>dashboard</string>
+ </value>
+ <value>
+ <string>exoadmin</string>
+ </value>
+ <value>
+ <string>eXoGadgets</string>
+ </value>
+ <value>
+ <string>eXoGadgetServer</string>
+ </value>
+ <value>
+ <string>rest</string>
+ </value>
+ <value>
+ <string>web</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+</configuration>
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/WEB-INF/web.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/WEB-INF/web.xml (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/WEB-INF/web.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+
+ 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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <display-name>Welcome to eXo platform</display-name>
+ <description>Welcome to eXo platform</description>
+</web-app>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/index.jsp
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/index.jsp (rev 0)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/webapps/ROOT/index.jsp 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,4 @@
+<%
+response.setStatus(response.SC_MOVED_TEMPORARILY);
+response.setHeader("Location", "/portal");
+%>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pkg/transform.xsl
===================================================================
--- portal/trunk/packaging/jetty/pkg/transform.xsl (rev 0)
+++ portal/trunk/packaging/jetty/pkg/transform.xsl 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<xsl:stylesheet
+ version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:mvn="http://maven.apache.org/POM/4.0.0">
+ <xsl:param name="lib.dir"/>
+ <xsl:param name="webapps.dir"/>
+ <xsl:output method="xml" indent="yes"/>
+ <xsl:template match="/" >
+ <xsl:comment>Generated file</xsl:comment>
+ <project name="copy-dependencies">
+ <target name="copy-dependencies">
+ <xsl:element name="copy">
+ <xsl:attribute name="todir"><xsl:value-of select="$lib.dir"/></xsl:attribute>
+ <xsl:for-each select="//mvn:dependencies/mvn:dependency[count(mvn:type)=0 or mvn:type/text()='jar']">
+ <xsl:element name="fileset">
+ <xsl:attribute name="refid"><xsl:value-of select="./mvn:groupId"/>:<xsl:value-of select="./mvn:artifactId"/>:jar</xsl:attribute>
+ </xsl:element>
+ </xsl:for-each>
+ </xsl:element>
+ <xsl:for-each select="//mvn:dependencies/mvn:dependency[mvn:type/text()='war']">
+ <xsl:variable name="webapps.name">
+ <xsl:for-each select="processing-instruction()[name()='rename']">
+ <xsl:value-of select="."/>
+ </xsl:for-each>
+ </xsl:variable>
+ <xsl:choose>
+ <xsl:when test="$webapps.name=''">
+ <xsl:element name="copy">
+ <xsl:attribute name="todir"><xsl:value-of select="$webapps.dir"/></xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute name="refid"><xsl:value-of select="./mvn:groupId"/>:<xsl:value-of select="./mvn:artifactId"/>:war</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:element name="copy">
+ <xsl:attribute name="tofile"><xsl:value-of select="$webapps.dir"/>/<xsl:value-of select="$webapps.name"/></xsl:attribute>
+ <xsl:element name="fileset">
+ <xsl:attribute name="refid"><xsl:value-of select="./mvn:groupId"/>:<xsl:value-of select="./mvn:artifactId"/>:war</xsl:attribute>
+ </xsl:element>
+ </xsl:element>
+ </xsl:otherwise>
+ </xsl:choose>
+
+ </xsl:for-each>
+ </target>
+ </project>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Added: portal/trunk/packaging/jetty/pom.xml
===================================================================
--- portal/trunk/packaging/jetty/pom.xml (rev 0)
+++ portal/trunk/packaging/jetty/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,18 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.parent</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </parent>
+ <artifactId>exo.portal.packaging.jetty</artifactId>
+ <packaging>pom</packaging>
+ <name>GateIn Jetty package</name>
+
+ <modules>
+ <module>pkg</module>
+ </modules>
+
+</project>
\ No newline at end of file
Modified: portal/trunk/packaging/module/pom.xml
===================================================================
--- portal/trunk/packaging/module/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/module/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -34,8 +34,20 @@
<properties>
<exobuild.name>portal</exobuild.name>
<exobuild.type>module</exobuild.type>
+ <wci.native.module>tomcat6</wci.native.module>
+ <patch.tomcat.version>tomcat</patch.tomcat.version>
</properties>
+ <profiles>
+ <profile>
+ <id>pkg-tomcat7</id>
+ <properties>
+ <wci.native.module>tomcat7</wci.native.module>
+ <patch.tomcat.version>tomcat7</patch.tomcat.version>
+ </properties>
+ </profile>
+ </profiles>
+
<build>
<plugins>
<plugin>
Modified: portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
--- portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2011-01-27 09:50:23 UTC (rev 5822)
@@ -70,7 +70,7 @@
addDependency(new Project("org.gatein.pc", "pc-controller", "jar", pcVersion)).
addDependency(new Project("org.gatein.pc", "pc-federation", "jar", pcVersion)).
addDependency(new Project("org.gatein.wci", "wci-wci", "jar", wciVersion)).
- addDependency(new Project("org.gatein.wci", "wci-tomcat", "jar", wciVersion)).
+ addDependency(new Project("org.gatein.wci", "wci-${wci.native.module}", "jar", wciVersion)).
addDependency(new Project("org.gatein.wci", "wci-exo", "jar", wciVersion)).
addDependency(new Project("org.gatein.common", "common-common", "jar", commonVersion)).
addDependency(new Project("log4j", "log4j", "jar", "1.2.14")).
@@ -276,7 +276,7 @@
module.server.tomcat = {}
module.server.tomcat.patch =
- new Project("org.exoplatform.portal", "exo.portal.server.tomcat.patch", "jar", module.version);
+ new Project("org.exoplatform.portal", "exo.portal.server.${patch.tomcat.version}.patch", "jar", module.version);
module.server.jboss = {}
module.server.jboss.patch =
Modified: portal/trunk/packaging/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/pkg/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/pkg/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -135,6 +135,106 @@
<profiles>
<profile>
+ <id>pkg-tomcat7</id>
+ <build>
+ <finalName>GateIn-${project.version}</finalName>
+ <plugins>
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>exo.projects.directory.dependencies</property>
+ <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+ </requireProperty>
+ <requireProperty>
+ <property>exo.projects.app.tomcat7.version</property>
+ <message>"You must define the property exo.projects.app.tomcat7.version to give the name of the directory where is stored tomcat"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat7.version}/</file>
+ </files>
+ <message>"The following Tomcat directory doesn't exist : ${exo.projects.directory.dependencies}/${exo.projects.app.tomcat7.version}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- run exo build -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-packaging</id>
+ <phase>package</phase>
+ <configuration>
+ <executable>java</executable>
+ <workingDirectory>${basedir}</workingDirectory>
+ <arguments>
+ <argument>-Dexo.package.home=${basedir}/target/packager</argument>
+ <argument>-Dexo.current.dir=${basedir}</argument>
+ <argument>-Dexo.base.dir=${exo.projects.directory.base}</argument>
+ <argument>-Dexo.conf.dir=${basedir}/target/packager-conf</argument>
+ <argument>-Dexo.working.dir=${gatein.working.dir}/</argument>
+ <!--argument>-Dexo.src.dir=NONE</argument-->
+ <argument>-Dexo.dep.dir=${exo.projects.directory.dependencies}</argument><!-- to get the server ref install -->
+ <argument>-Dexo.m2.repos=file:${settings.localRepository}</argument>
+ <argument>-Dclean.server=${exo.projects.app.tomcat7.version}</argument>
+ <argument>-Dexo.m2.home=${maven.home}</argument>
+ <argument>-Xms128m</argument>
+ <argument>-Xmx512m</argument>
+ <argument>-classpath</argument>
+ <argument>${basedir}/target/packager/lib/js.jar</argument>
+ <argument>org.mozilla.javascript.tools.shell.Main</argument>
+ <argument>${basedir}/target/packager/javascript/eXo/eXo.js</argument>
+ <argument>exobuild</argument>
+ <argument>--product=portal</argument>
+ <argument>--deploy=tomcat</argument>
+ </arguments>
+ </configuration>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+<!--
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/tomcat-zip.xml</descriptor>
+ </descriptors>
+ <attach>false</attach>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+-->
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
<id>pkg-jbossas</id>
<build>
<finalName>GateIn-${project.version}</finalName>
Modified: portal/trunk/packaging/pom.xml
===================================================================
--- portal/trunk/packaging/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -59,6 +59,20 @@
</modules>
</profile>
<profile>
+ <id>pkg-tomcat7</id>
+ <modules>
+ <module>tomcat</module>
+ <module>reports</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>pkg-jetty</id>
+ <modules>
+ <module>jetty</module>
+ <module>reports</module>
+ </modules>
+ </profile>
+ <profile>
<id>pkg-jbossas6</id>
<modules>
<module>jboss-as6</module>
@@ -72,6 +86,5 @@
<module>reports</module>
</modules>
</profile>
-
</profiles>
</project>
Modified: portal/trunk/packaging/profiles.xml
===================================================================
--- portal/trunk/packaging/profiles.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/profiles.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,17 +1,17 @@
<!--
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
@@ -24,28 +24,40 @@
<profile>
<id>gatein-projects</id>
<properties>
- <!--
+ <!--
Replace with the directory where uncompressed Tomcat 6 and/or JBoss 5.1 can be found
ex: On Windows 'c:/AS'
ex: On Linux '/home/user/AS'
-->
<exo.projects.directory.dependencies>REPLACE_WITH_YOUR_OWN_DIRECTORY</exo.projects.directory.dependencies>
- <!--
+ <!--
If you want that the server is deployed always at the same place (not in packaging/pkg/target/<server> dir)
Uncomment and Replace with the directory you prefer
-->
- <!--
+ <!--
<gatein.working.dir>REPLACE_WITH_SERVER_DIR</gatein.working.dir>
-->
<!--
Replace with the name of the directory containing Tomcat 6
- -->
+ -->
<exo.projects.app.tomcat.version>apache-tomcat-6.0.20</exo.projects.app.tomcat.version>
<!--
- Replace with the name of the directory containing JBoss AS 5.1
+ Replace with the name of the directory containing Tomcat 7
-->
- <exo.projects.app.jboss.version>jboss-5.1.0.GA</exo.projects.app.jboss.version>
+ <exo.projects.app.tomcat7.version>apache-tomcat-7.0.2</exo.projects.app.tomcat7.version>
+ <!--
+ Replace with the name of the directory containing Jetty 6
+ -->
+ <exo.projects.app.jetty.version>jetty-6.1.25/jetty-6.1.25</exo.projects.app.jetty.version>
+ <!--
+ Replace with the name of the directory containing JBoss AS 5
+ -->
+ <exo.projects.app.jboss5.version>jboss-5.1.0.GA</exo.projects.app.jboss5.version>
+ <!--
+ Replace with the name of the directory containing JBoss AS 6
+ -->
+ <exo.projects.app.jboss6.version>jboss-6.0.0.Final</exo.projects.app.jboss6.version>
</properties>
</profile>
</profiles>
Modified: portal/trunk/packaging/tomcat/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/tomcat/pkg/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -14,10 +14,6 @@
<packaging>pom</packaging>
<name>GateIn for Tomcat packaging</name>
- <properties>
- <tomcat.dir>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}</tomcat.dir>
- </properties>
-
<dependencies>
<!-- Logging -->
@@ -323,10 +319,6 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wci</groupId>
<artifactId>wci-exo</artifactId>
</dependency>
@@ -865,18 +857,8 @@
<rules>
<requireProperty>
<property>exo.projects.directory.dependencies</property>
- <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
+ <message>"You must define the property exo.projects.directory.dependencies to give the path to the directory where you store your applications servers"</message>
</requireProperty>
- <requireProperty>
- <property>exo.projects.app.tomcat.version</property>
- <message>"You must define the property exo.projects.app.tomcat.version to give the name of the directory where is stored tomcat"</message>
- </requireProperty>
- <requireFilesExist>
- <files>
- <file>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}/</file>
- </files>
- <message>"The following Tomcat directory doesn't exist : ${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}"</message>
- </requireFilesExist>
</rules>
<fail>true</fail>
</configuration>
@@ -888,6 +870,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
+ <inherited>false</inherited>
<executions>
<execution>
<id>prepare-package</id>
@@ -897,16 +880,6 @@
</goals>
<configuration>
<target>
-
- <!-- Copy tomcat -->
- <copy todir="${project.build.directory}/tomcat">
- <fileset dir="${tomcat.dir}">
- <exclude name="webapps/ROOT/**"/>
- <exclude name="webapps/examples/**"/>
- <exclude name="webapps/docs/**"/>
- </fileset>
- </copy>
-
<!-- Copy the dependencies -->
<dependencyfilesets/>
<xslt
@@ -933,10 +906,6 @@
<fileset dir="${project.basedir}/../../../component/common/src/main/java/conf" includes="configuration-tomcat.properties"/>
</copy>
- <!-- File permissions -->
- <chmod perm="0644" type="file" dir="${project.build.directory}/tomcat" excludes="**/*.sh"/>
- <chmod perm="0755" type="file" dir="${project.build.directory}/tomcat" includes="**/*.sh"/>
-
</target>
</configuration>
</execution>
@@ -947,31 +916,16 @@
<profiles>
<profile>
- <id>bundle</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-antrun-plugin</artifactId>
- <version>1.6</version>
- <executions>
- <execution>
- <id>package</id>
- <phase>package</phase>
- <goals>
- <goal>run</goal>
- </goals>
- <configuration>
- <target>
- <zip destfile="${project.build.directory}/tomcat.zip" basedir="${project.build.directory}/tomcat"/>
- <attachartifact file="${project.build.directory}/tomcat.zip" classifier="bundle" type="zip"/>
- </target>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
+ <id>pkg-tomcat</id>
+ <modules>
+ <module>tc6</module>
+ </modules>
</profile>
+ <profile>
+ <id>pkg-tomcat7</id>
+ <modules>
+ <module>tc7</module>
+ </modules>
+ </profile>
</profiles>
</project>
\ No newline at end of file
Modified: portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/conf/jaas.conf
===================================================================
--- portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/conf/jaas.conf 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/conf/jaas.conf 2011-01-27 09:50:23 UTC (rev 5822)
@@ -1,4 +1,5 @@
gatein-domain {
+ org.gatein.wci.security.WCILoginModule optional;
org.exoplatform.web.security.PortalLoginModule required;
org.exoplatform.services.security.jaas.SharedStateLoginModule required;
org.exoplatform.services.security.j2ee.TomcatLoginModule required;
Added: portal/trunk/packaging/tomcat/pkg/tc6/pom.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc6/pom.xml (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc6/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+<?rename tofile="portal.war"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.packaging.tomcat.pkg</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </parent>
+ <artifactId>exo.portal.packaging.tomcat.pkg.tc6</artifactId>
+ <packaging>pom</packaging>
+ <name>GateIn for Tomcat 6 packaging</name>
+
+ <properties>
+ <tomcat.dir>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat.version}</tomcat.dir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-tomcat6</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>exo.projects.app.tomcat.version</property>
+ <message>"You must define the property exo.projects.app.tomcat.version to give the name of the directory where is stored tomcat"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${tomcat.dir}/</file>
+ </files>
+ <message>"The following Tomcat directory doesn't exist : ${tomcat.dir}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>prepare-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <!-- Copy tomcat 6 -->
+ <copy todir="${project.build.directory}/tomcat6">
+ <fileset dir="${tomcat.dir}">
+ <exclude name="webapps/ROOT/**"/>
+ <exclude name="webapps/examples/**"/>
+ <exclude name="webapps/docs/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy generic tomcat packaging -->
+ <copy todir="${project.build.directory}/tomcat6">
+ <fileset dir="${project.build.directory}/../../target/tomcat"/>
+ </copy>
+
+ <!-- Copy specific tomcat configration -->
+ <copy todir="${project.build.directory}/tomcat6" overwrite="true">
+ <fileset dir="${project.basedir}/src/main/resources/tomcat"/>
+ </copy>
+
+ <!-- Tomcat 6 specific dependencies -->
+ <copy
+ file="${maven.dependency.org.gatein.wci.wci-tomcat6.jar.path}"
+ todir="${project.build.directory}/tomcat6/lib"/>
+
+ <!-- Tomcat 6 specific configuration -->
+ <copy
+ file="${project.basedir}/src/main/resources/conf/integration/web.xml"
+ todir="${project.build.directory}/tomcat6/webapps/integration/WEB-INF"/>
+
+ <!-- File permissions -->
+ <chmod perm="0644" type="file" dir="${project.build.directory}/tomcat6" excludes="**/*.sh"/>
+ <chmod perm="0755" type="file" dir="${project.build.directory}/tomcat6" includes="**/*.sh"/>
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>bundle</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <zip destfile="${project.build.directory}/tomcat6.zip" basedir="${project.build.directory}/tomcat6"/>
+ <attachartifact file="${project.build.directory}/tomcat6.zip" classifier="bundle" type="zip"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
Added: portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/conf/integration/web.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/conf/integration/web.xml (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/conf/integration/web.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <servlet>
+ <servlet-name>ContainerServlet</servlet-name>
+ <servlet-class>org.gatein.wci.tomcat.TC6ContainerServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+</web-app>
Added: portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/catalina.properties 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,82 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+#common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/gatein/lib/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "server"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+server.loader=
+
+#
+# List of comma-separated paths defining the contents of the "shared"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000
Added: portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc6/src/main/resources/tomcat/conf/logging.properties 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,109 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler, 6gatein.org.apache.juli.FileHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#org.apache.catalina.startup.ContextConfig.level = FINE
+#org.apache.catalina.startup.HostConfig.level = FINE
+#org.apache.catalina.session.ManagerBase.level = FINE
+#org.apache.catalina.core.AprLifecycleListener.level=FINE
+
+############################################################
+# GateIn log configuration
+############################################################
+
+# Gatein log Handler
+6gatein.org.apache.juli.FileHandler.level = FINE
+6gatein.org.apache.juli.FileHandler.directory = ${catalina.base}/gatein/logs
+6gatein.org.apache.juli.FileHandler.prefix = gatein
+
+# logger configuration
+org.exoplatform.level = INFO
+org.exoplatform.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.gatein.level = INFO
+org.gatein.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.chromattic.level = INFO
+org.chromattic.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+jcr.level = INFO
+jcr.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+ws.level = INFO
+ws.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+XMLResolvingServiceImpl.level = INFO
+XMLResolvingServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+TRAXTemplatesServiceImpl.level = INFO
+TRAXTemplatesServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.hibernate.level = INFO
+org.hibernate.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+com.arjuna.level = INFO
+com.arjuna.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.jboss.level = INFO
+org.jboss.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.apache.shindig.level = INFO
+org.apache.shindig.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
Added: portal/trunk/packaging/tomcat/pkg/tc7/pom.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc7/pom.xml (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc7/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,145 @@
+<?xml version="1.0"?>
+<?rename tofile="portal.war"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.packaging.tomcat.pkg</artifactId>
+ <version>3.2.0-Beta01-SNAPSHOT</version>
+ </parent>
+ <artifactId>exo.portal.packaging.tomcat.pkg.tc7</artifactId>
+ <packaging>pom</packaging>
+ <name>GateIn for Tomcat 7 packaging</name>
+
+ <properties>
+ <tomcat.dir>${exo.projects.directory.dependencies}/${exo.projects.app.tomcat7.version}</tomcat.dir>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-tomcat7</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+
+ <!-- Ensure your environment is correctly setup -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>exo.projects.app.tomcat7.version</property>
+ <message>"You must define the property exo.projects.app.tomcat7.version to give the name of the directory where is stored tomcat"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${tomcat.dir}/</file>
+ </files>
+ <message>"The following Tomcat directory doesn't exist : ${tomcat.dir}"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>prepare-package</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+
+ <!-- Copy tomcat 7 -->
+ <copy todir="${project.build.directory}/tomcat7">
+ <fileset dir="${tomcat.dir}">
+ <exclude name="webapps/ROOT/**"/>
+ <exclude name="webapps/examples/**"/>
+ <exclude name="webapps/docs/**"/>
+ </fileset>
+ </copy>
+
+ <!-- Copy generic tomcat packaging -->
+ <copy todir="${project.build.directory}/tomcat7">
+ <fileset dir="${project.build.directory}/../../target/tomcat"/>
+ </copy>
+
+ <!-- Copy specific tomcat configration -->
+ <copy todir="${project.build.directory}/tomcat7" overwrite="true">
+ <fileset dir="${project.basedir}/src/main/resources/tomcat"/>
+ </copy>
+
+ <!-- Tomcat 7 specific dependencies -->
+ <copy
+ file="${maven.dependency.org.gatein.wci.wci-tomcat7.jar.path}"
+ todir="${project.build.directory}/tomcat7/lib"/>
+
+ <!-- Tomcat 7 specific configuration -->
+ <copy
+ file="${project.basedir}/src/main/resources/conf/integration/web.xml"
+ tofile="${project.build.directory}/tomcat7/webapps/integration/WEB-INF/web.xml"/>
+
+ <!-- File permissions -->
+ <chmod perm="0644" type="file" dir="${project.build.directory}/tomcat7" excludes="**/*.sh"/>
+ <chmod perm="0755" type="file" dir="${project.build.directory}/tomcat7" includes="**/*.sh"/>
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>bundle</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <zip destfile="${project.build.directory}/tomcat7.zip" basedir="${project.build.directory}/tomcat7"/>
+ <attachartifact file="${project.build.directory}/tomcat7.zip" classifier="bundle" type="zip"/>
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
Added: portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/conf/integration/web.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/conf/integration/web.xml (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/conf/integration/web.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+
+<!DOCTYPE web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+<web-app>
+ <servlet>
+ <servlet-name>ContainerServlet</servlet-name>
+ <servlet-class>org.gatein.wci.tomcat.TC7ContainerServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+</web-app>
Added: portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/catalina.properties 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,111 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageAccess unless the
+# corresponding RuntimePermission ("accessClassInPackage."+package) has
+# been granted.
+package.access=sun.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.,sun.beans.
+#
+# List of comma-separated packages that start with or equal this string
+# will cause a security exception to be thrown when
+# passed to checkPackageDefinition unless the
+# corresponding RuntimePermission ("defineClassInPackage."+package) has
+# been granted.
+#
+# by default, no packages are restricted for definition, and none of
+# the class loaders supplied with the JDK call checkPackageDefinition.
+#
+package.definition=sun.,java.,org.apache.catalina.,org.apache.coyote.,org.apache.tomcat.,org.apache.jasper.
+
+#
+#
+# List of comma-separated paths defining the contents of the "common"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+#common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar
+common.loader=${catalina.base}/lib,${catalina.base}/lib/*.jar,${catalina.home}/lib,${catalina.home}/lib/*.jar,${catalina.base}/gatein/lib/*.jar
+
+#
+# List of comma-separated paths defining the contents of the "server"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server"
+# loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+server.loader=
+
+#
+# List of comma-separated paths defining the contents of the "shared"
+# classloader. Prefixes should be used to define what is the repository type.
+# Path may be relative to the CATALINA_BASE path or absolute. If left as blank,
+# the "common" loader will be used as Catalina's "shared" loader.
+# Examples:
+# "foo": Add this folder as a class repository
+# "foo/*.jar": Add all the JARs of the specified folder as class
+# repositories
+# "foo/bar.jar": Add bar.jar as a class repository
+# Please note that for single jars, e.g. bar.jar, you need the URL form
+# starting with file:.
+shared.loader=
+
+# List of JAR files that should not be scanned for configuration information
+# such as web fragments, TLD files etc. It must be a comma separated list of
+# JAR file names.
+# The JARs listed below include:
+# - Tomcat Bootstrap JARs
+# - Tomcat API JARs
+# - Catalina JARs
+# - Jasper JARs
+# - Tomcat JARs
+# - Common non-Tomcat JARs
+# - Sun JDK JARs
+# - Apple JDK JARs
+tomcat.util.scan.DefaultJarScanner.jarsToSkip=\
+bootstrap.jar,commons-daemon.jar,tomcat-juli.jar,\
+annotations-api.jar,el-api.jar,jsp-api.jar,servlet-api.jar,\
+catalina.jar,catalina-ant.jar,catalina-ha.jar,catalina-tribes.jar,\
+jasper.jar,jasper-el.jar,ecj-3.6.jar,\
+tomcat-api.jar,tomcat-util.jar,tomcat-coyote.jar,tomcat-dbcp.jar,\
+tomcat-i18n-en.jar,tomcat-i18n-es.jar,tomcat-i18n-fr.jar,tomcat-i18n-ja.jar,\
+commons-beanutils.jar,commons-collections.jar,commons-dbcp.jar,\
+commons-digester.jar,commons-fileupload-1.0.jar,commons-logging.jar,\
+commons-pool.jar,\
+ant.jar,jmx.jar,jmx-tools.jar,\
+xercesImpl.jar,xmlParserAPIs.jar,xml-apis.jar,\
+dnsns.jar,ldapsec.jar,localedata.jar,sunjce_provider.jar,sunpkcs11.jar,tools.jar,\
+apple_provider.jar,AppleScriptEngine.jar,CoreAudio.jar,dns_sd.jar,\
+j3daudio.jar,j3dcore.jar,j3dutils.jar,jai_core.jar,jai_codec.jar,\
+mlibwrapper_jai.jar,MRJToolkit.jar,vecmath.jar
+
+#
+# String cache configuration.
+tomcat.util.buf.StringCache.byte.enabled=true
+#tomcat.util.buf.StringCache.char.enabled=true
+#tomcat.util.buf.StringCache.trainThreshold=500000
+#tomcat.util.buf.StringCache.cacheSize=5000
\ No newline at end of file
Added: portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties
===================================================================
--- portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties (rev 0)
+++ portal/trunk/packaging/tomcat/pkg/tc7/src/main/resources/tomcat/conf/logging.properties 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,109 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+handlers = 1catalina.org.apache.juli.FileHandler, 2localhost.org.apache.juli.FileHandler, 3manager.org.apache.juli.FileHandler, 4host-manager.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler, 6gatein.org.apache.juli.FileHandler
+
+.handlers = 1catalina.org.apache.juli.FileHandler, java.util.logging.ConsoleHandler
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+1catalina.org.apache.juli.FileHandler.level = FINE
+1catalina.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+1catalina.org.apache.juli.FileHandler.prefix = catalina.
+
+2localhost.org.apache.juli.FileHandler.level = FINE
+2localhost.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+2localhost.org.apache.juli.FileHandler.prefix = localhost.
+
+3manager.org.apache.juli.FileHandler.level = FINE
+3manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+3manager.org.apache.juli.FileHandler.prefix = manager.
+
+4host-manager.org.apache.juli.FileHandler.level = FINE
+4host-manager.org.apache.juli.FileHandler.directory = ${catalina.base}/logs
+4host-manager.org.apache.juli.FileHandler.prefix = host-manager.
+
+java.util.logging.ConsoleHandler.level = FINE
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.FileHandler
+
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO
+org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.FileHandler
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#org.apache.catalina.startup.ContextConfig.level = FINE
+#org.apache.catalina.startup.HostConfig.level = FINE
+#org.apache.catalina.session.ManagerBase.level = FINE
+#org.apache.catalina.core.AprLifecycleListener.level=FINE
+
+############################################################
+# GateIn log configuration
+############################################################
+
+# Gatein log Handler
+6gatein.org.apache.juli.FileHandler.level = FINE
+6gatein.org.apache.juli.FileHandler.directory = ${catalina.base}/gatein/logs
+6gatein.org.apache.juli.FileHandler.prefix = gatein
+
+# logger configuration
+org.exoplatform.level = INFO
+org.exoplatform.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.gatein.level = INFO
+org.gatein.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.chromattic.level = INFO
+org.chromattic.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+jcr.level = INFO
+jcr.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+ws.level = INFO
+ws.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+XMLResolvingServiceImpl.level = INFO
+XMLResolvingServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+TRAXTemplatesServiceImpl.level = INFO
+TRAXTemplatesServiceImpl.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.hibernate.level = INFO
+org.hibernate.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+com.arjuna.level = INFO
+com.arjuna.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.jboss.level = INFO
+org.jboss.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
+org.apache.shindig.level = INFO
+org.apache.shindig.handlers = java.util.logging.ConsoleHandler,6gatein.org.apache.juli.FileHandler
+
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/pom.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -45,8 +45,8 @@
<org.shindig.version>1.0-r790473-Patch04</org.shindig.version>
<nl.captcha.simplecaptcha.version>1.1.1-GA-Patch01</nl.captcha.simplecaptcha.version>
<org.gatein.common.version>2.0.3-GA</org.gatein.common.version>
- <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.gatein.wci.version>2.1.0-Alpha02</org.gatein.wci.version>
+ <org.gatein.pc.version>2.3.0-Alpha01</org.gatein.pc.version>
<org.picketlink.idm>1.1.8.CR01</org.picketlink.idm>
<org.gatein.wsrp.version>2.0.0-GA</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.3-GA</org.gatein.mop.version>
@@ -533,10 +533,20 @@
</dependency>
<dependency>
<groupId>org.gatein.wci</groupId>
- <artifactId>wci-tomcat</artifactId>
+ <artifactId>wci-tomcat6</artifactId>
<version>${org.gatein.wci.version}</version>
</dependency>
<dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-tomcat7</artifactId>
+ <version>${org.gatein.wci.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wci</groupId>
+ <artifactId>wci-jetty</artifactId>
+ <version>${org.gatein.wci.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-bridge</artifactId>
<version>${org.gatein.pc.version}</version>
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -44,6 +44,7 @@
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.util.ReflectionUtil;
import org.exoplatform.web.application.ApplicationMessage;
+import org.exoplatform.web.login.LogoutControl;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
@@ -252,7 +253,7 @@
if (config == null || Util.getUIPortal().getName().equals(portalName))
{
HttpServletRequest request = prContext.getRequest();
- request.getSession().invalidate();
+ LogoutControl.wantLogout();
prContext.setResponseComplete(true);
prContext.getResponse().sendRedirect(request.getContextPath());
return;
Modified: portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml
===================================================================
--- portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/server/jboss/patch-ear/src/main/jboss/server/default/deploy/gatein.ear/META-INF/gatein-jboss-beans.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -2,6 +2,10 @@
<application-policy xmlns="urn:jboss:security-beans:1.0" name="gatein-domain">
<authentication>
+ <login-module code="org.gatein.wci.security.WCILoginModule" flag="optional">
+ <module-option name="portalContainerName">portal</module-option>
+ <module-option name="realmName">gatein-domain</module-option>
+ </login-module>
<login-module code="org.exoplatform.web.security.PortalLoginModule" flag="required">
<module-option name="portalContainerName">portal</module-option>
<module-option name="realmName">gatein-domain</module-option>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/autologin-configuration.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -40,12 +40,12 @@
</component>
<component>
- <key>org.exoplatform.web.security.security.TransientTokenService</key>
- <type>org.exoplatform.web.security.security.TransientTokenService</type>
+ <key>org.exoplatform.web.security.security.TicketConfiguration</key>
+ <type>org.exoplatform.web.security.security.TicketConfiguration</type>
<init-params>
<values-param>
<name>service.configuration</name>
- <value>memory-token</value>
+ <value>wci-ticket</value>
<value>1</value>
<value>MINUTE</value>
</values-param>
Added: portal/trunk/web/portal/src/main/webapp/WEB-INF/jetty-web.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/jetty-web.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/jetty-web.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
+<Configure class="org.mortbay.jetty.webapp.WebAppContext">
+
+ <Get id="serverObject" name="server"/>
+
+ <New id="jettySetup" class="org.gatein.wci.jetty.Jetty6Handler">
+ <Arg><Ref id="serverObject"/></Arg>
+ </New>
+
+</Configure>
+
+
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -216,7 +216,7 @@
<servlet>
<servlet-name>PortalLoginController</servlet-name>
- <servlet-class>org.exoplatform.web.login.PortalLoginController</servlet-class>
+ <servlet-class>org.exoplatform.web.security.PortalLoginController</servlet-class>
</servlet>
<servlet>
<servlet-name>InitiateLoginServlet</servlet-name>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/webui-configuration.xml 2011-01-27 09:50:23 UTC (rev 5822)
@@ -33,6 +33,7 @@
<application-lifecycle-listeners>
<listener>org.exoplatform.portal.application.UserSiteLifeCycle</listener>
+ <listener>org.exoplatform.portal.application.PortalLogoutLifecycle</listener>
<listener>org.exoplatform.portal.application.PortalStatisticLifecycle</listener>
<listener>org.exoplatform.portal.application.PortalApplicationLifecycle</listener>
<listener>org.exoplatform.webui.application.MonitorApplicationLifecycle</listener>
Added: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalLogoutLifecycle.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalLogoutLifecycle.java (rev 0)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalLogoutLifecycle.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -0,0 +1,67 @@
+/*
+* Copyright (C) 2003-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.
+*/
+
+package org.exoplatform.portal.application;
+
+import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.web.application.Application;
+import org.exoplatform.web.application.ApplicationLifecycle;
+import org.exoplatform.web.application.RequestFailure;
+import org.exoplatform.web.login.LogoutControl;
+import org.exoplatform.webui.application.WebuiRequestContext;
+import org.gatein.wci.impl.DefaultServletContainerFactory;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * @author <a href="mailto:alain.defrance@exoplatform.com">Alain Defrance</a>
+ * @version $Revision$
+ */
+public class PortalLogoutLifecycle implements ApplicationLifecycle<WebuiRequestContext>
+{
+
+ public void onInit(Application app) throws Exception
+ {
+ }
+
+ public void onStartRequest(Application app, WebuiRequestContext context) throws Exception
+ {
+ LogoutControl.cancelLogout();
+ }
+
+ public void onFailRequest(Application app, WebuiRequestContext context, RequestFailure failureType) throws Exception
+ {
+ }
+
+ public void onEndRequest(Application app, WebuiRequestContext context) throws Exception
+ {
+ if (LogoutControl.isLogoutRequired())
+ {
+ PortalRequestContext prContext = Util.getPortalRequestContext();
+ HttpServletRequest request = prContext.getRequest();
+ HttpServletResponse response = prContext.getResponse();
+ DefaultServletContainerFactory.getInstance().getServletContainer().logout(request, response);
+ }
+ }
+
+ public void onDestroy(Application app) throws Exception
+ {
+ }
+}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/login/UIForgetPassword.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -27,7 +27,6 @@
import org.exoplatform.services.organization.Query;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.web.security.Credentials;
import org.exoplatform.web.security.security.RemindPasswordTokenService;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -40,6 +39,7 @@
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.validator.EmailAddressValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.gatein.wci.security.Credentials;
import java.net.URLEncoder;
import java.util.MissingResourceException;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -45,6 +45,7 @@
import org.exoplatform.services.organization.User;
import org.exoplatform.services.resources.ResourceBundleManager;
import org.exoplatform.web.login.InitiateLoginServlet;
+import org.exoplatform.web.login.LogoutControl;
import org.exoplatform.web.security.security.AbstractTokenService;
import org.exoplatform.web.security.security.CookieTokenService;
import org.exoplatform.webui.application.WebuiRequestContext;
@@ -413,8 +414,8 @@
AbstractTokenService tokenService = AbstractTokenService.getInstance(CookieTokenService.class);
tokenService.deleteToken(token);
}
-
- req.getSession().invalidate();
+
+ LogoutControl.wantLogout();
Cookie cookie = new Cookie(InitiateLoginServlet.COOKIE_NAME, "");
cookie.setPath(req.getContextPath());
cookie.setMaxAge(0);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalActionListener.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -22,6 +22,7 @@
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.web.login.LogoutControl;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
@@ -45,7 +46,7 @@
public void execute(Event<UIComponent> event) throws Exception
{
PortalRequestContext prContext = Util.getPortalRequestContext();
- prContext.getRequest().getSession().invalidate();
+ LogoutControl.wantLogout();
HttpServletRequest request = prContext.getRequest();
String portalName = URLEncoder.encode(Util.getUIPortal().getName(), "UTF-8");
String redirect = request.getContextPath() + "/public/" + portalName + "/";
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2011-01-27 03:56:42 UTC (rev 5821)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2011-01-27 09:50:23 UTC (rev 5822)
@@ -46,6 +46,7 @@
import org.exoplatform.services.resources.LocaleConfigService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.JavascriptManager;
+import org.exoplatform.web.login.LogoutControl;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
@@ -497,7 +498,7 @@
if (editPortal.getOwner().equals(prContext.getPortalOwner()))
{
HttpServletRequest request = prContext.getRequest();
- request.getSession().invalidate();
+ LogoutControl.wantLogout();
prContext.setResponseComplete(true);
prContext.getResponse().sendRedirect(request.getContextPath());
return;
13 years, 11 months
gatein SVN: r5821 - in portal/trunk: component/portal/src/test/java/org/exoplatform/portal/config and 21 other directories.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-01-26 22:56:42 -0500 (Wed, 26 Jan 2011)
New Revision: 5821
Added:
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInContainerConfigLoader.java
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInJsonContainerConfig.java
portal/trunk/gadgets/server/src/main/webapp/containers/
portal/trunk/gadgets/server/src/main/webapp/containers/default/
portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js
Removed:
portal/trunk/gadgets/core/src/main/java/containers/default/container.js
portal/trunk/gadgets/server/src/main/webapp/WEB-INF/classes/
portal/trunk/gadgets/server/src/main/webapp/containers/default/
portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js
Modified:
portal/trunk/component/portal/src/main/resources/binding.xml
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
portal/trunk/component/resources/pom.xml
portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java
portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml
portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java
portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UILanguageSelector.gtmpl
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Param.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalSessionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
Log:
GTNPORTAL-1745 Merge the commit branch of sprint 46 back to trunk
Modified: portal/trunk/component/portal/src/main/resources/binding.xml
===================================================================
--- portal/trunk/component/portal/src/main/resources/binding.xml 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/component/portal/src/main/resources/binding.xml 2011-01-27 03:56:42 UTC (rev 5821)
@@ -117,8 +117,8 @@
</mapping>
<mapping name="node-navigation" class="org.exoplatform.portal.config.model.PageNavigation">
- <structure name="owner-type" usage="optional"/>
- <structure name="owner-id" usage="optional"/>
+ <value name="owner-type" field="ownerType" usage="optional"/>
+ <value name="owner-id" field="ownerId" usage="optional"/>
<value name="priority" field="priority" usage="optional"/>
<collection name="page-nodes" field="pageNodes" usage="optional"
item-type="org.exoplatform.portal.config.model.PageNode"/>
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -85,6 +85,8 @@
PageNavigation pageNavigation = (PageNavigation)obj;
assertEquals("portal::classic::homepage", pageNavigation.getNode("home").getPageReference());
+ assertEquals("portal", pageNavigation.getOwnerType());
+ assertEquals("classic", pageNavigation.getOwnerId());
IMarshallingContext mctx = bfact.createMarshallingContext();
mctx.setIndent(2);
Modified: portal/trunk/component/resources/pom.xml
===================================================================
--- portal/trunk/component/resources/pom.xml 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/component/resources/pom.xml 2011-01-27 03:56:42 UTC (rev 5821)
@@ -49,6 +49,10 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.test.core</artifactId>
<scope>test</scope>
</dependency>
Modified: portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java
===================================================================
--- portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/component/resources/src/main/java/org/exoplatform/services/resources/impl/BaseResourceBundleService.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -19,6 +19,9 @@
package org.exoplatform.services.resources.impl;
+import org.exoplatform.commons.cache.future.FutureCache;
+import org.exoplatform.commons.cache.future.FutureExoCache;
+import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.commons.utils.IOUtil;
import org.exoplatform.commons.utils.MapResourceBundle;
import org.exoplatform.commons.utils.PageList;
@@ -64,6 +67,19 @@
protected ExoCache<String, ResourceBundle> cache_;
+ private volatile FutureCache<String, ResourceBundle, ResourceBundleContext> futureCache_;
+
+ private final Loader<String, ResourceBundle, ResourceBundleContext> loader_ = new Loader<String, ResourceBundle, ResourceBundleContext>()
+ {
+ /**
+ * {@inheritDoc}
+ */
+ public ResourceBundle retrieve(ResourceBundleContext context, String key) throws Exception
+ {
+ return context.get(key);
+ }
+ };
+
private volatile List<String> initResources_;
@SuppressWarnings("unchecked")
@@ -300,7 +316,7 @@
candidateFiles.add(baseName + "_" + language + "_" + country + ".properties");
}
- if (language != null && language.length() > 0 )
+ if (language != null && language.length() > 0)
{
candidateFiles.add(baseName + "_" + language + ".properties");
}
@@ -395,56 +411,35 @@
boolean isClasspathResource = isClasspathResource(name);
boolean isCacheable = !isClasspathResource || !PropertyManager.isDevelopping();
- if (isCacheable)
+ if (isCacheable && isClasspathResource)
{
- if (isClasspathResource)
- {
- // Avoid naming collision
- id += "_" + cl.getClass() + "_" + cl.hashCode();
- }
- try
- {
- ResourceBundle rb = cache_.get(id);
- if (rb != null)
- {
- return rb;
- }
- }
- catch (Exception ex)
- {
- }
+ // Avoid naming collision
+ id += "_" + cl.getClass() + "_" + System.identityHashCode(cl);
}
// Case 1: ResourceBundle of portlets, standard java API is used
if (isClasspathResource)
{
- ResourceBundle res = ResourceBundleLoader.load(name, locale, cl);
- //Cache classpath resource bundle while running portal in non-dev mode
+ // Cache classpath resource bundle while running portal in non-dev mode
if (isCacheable)
- cache_.put(id, res);
- return res;
+ {
+ ResourceBundleLoaderContext ctx = new ResourceBundleLoaderContext(name, locale, cl);
+ ResourceBundle result = getFutureCache().get(ctx, id);
+ if (ctx.e != null)
+ {
+ // Throw the RuntimeException if it occurs to remain compatible with the old behavior
+ throw ctx.e;
+ }
+ return result;
+ }
+ else
+ {
+ return ResourceBundleLoader.load(name, locale, cl);
+ }
}
// Case 2: ResourceBundle of portal
- try
- {
- ResourceBundle res = null;
- String rootId = name + "_" + localeService_.getDefaultLocaleConfig().getLanguage();
- ResourceBundle parent = getResourceBundleFromDb(rootId, null, locale);
- if (parent != null)
- {
- res = getResourceBundleFromDb(id, parent, locale);
- if (res == null)
- res = parent;
- cache_.put(id, res);
- return res;
- }
- }
- catch (Exception ex)
- {
- log_.error("Error: " + id, ex);
- }
- return null;
+ return getFutureCache().get(new GetResourceBundleFromDbContext(name, locale), id);
}
public ResourceBundle getResourceBundle(String[] name, Locale locale, ClassLoader cl)
@@ -458,34 +453,165 @@
idBuf.append(n).append("_");
idBuf.append(locale);
String id = idBuf.toString();
- try
+ return getFutureCache().get(new GetResourceBundleContext(name, locale, cl), id);
+ }
+
+ protected FutureCache<String, ResourceBundle, ResourceBundleContext> getFutureCache()
+ {
+ if (futureCache_ == null)
{
- ResourceBundle res = cache_.get(id);
- if (res != null)
- return res;
- MapResourceBundle outputBundled = new MapResourceBundle(locale);
- for (int i = 0; i < name.length; i++)
+ synchronized(this)
{
- ResourceBundle temp = getResourceBundle(name[i], locale, cl);
- if (temp != null)
+ if (futureCache_ == null)
{
- outputBundled.merge(temp);
- continue;
+ futureCache_ = new FutureExoCache<String, ResourceBundle, ResourceBundleContext>(loader_, cache_);
}
- log_.warn("Cannot load and merge the bundle: " + name[i]);
}
- outputBundled.resolveDependencies();
- cache_.put(id, outputBundled);
- return outputBundled;
}
- catch (Exception ex)
+ return futureCache_;
+ }
+
+ abstract protected ResourceBundle getResourceBundleFromDb(String id, ResourceBundle parent, Locale locale)
+ throws Exception;
+
+ /**
+ * Generic class defining a context needed to get a ResourceBundle
+ */
+ private static abstract class ResourceBundleContext
+ {
+ /**
+ * Get the resource bundle corresponding to the context
+ */
+ abstract ResourceBundle get(String id);
+ }
+
+ /**
+ * The class defining the context required to load a ResourceBundle thanks to the method
+ * <code>ResourceBundleLoader.load(String name, Locale locale, ClassLoader cl)</code>
+ */
+ private static class ResourceBundleLoaderContext extends ResourceBundleContext
+ {
+ private final String name;
+
+ private final Locale locale;
+
+ private final ClassLoader cl;
+
+ private RuntimeException e;
+
+ public ResourceBundleLoaderContext(String name, Locale locale, ClassLoader cl)
{
- log_.error("Cannot load and merge the bundle: " + id, ex);
+ this.name = name;
+ this.locale = locale;
+ this.cl = cl;
}
- return null;
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ ResourceBundle get(String id)
+ {
+ try
+ {
+ return ResourceBundleLoader.load(name, locale, cl);
+ }
+ catch (RuntimeException e)
+ {
+ this.e = e;
+ }
+ return null;
+ }
}
- abstract protected ResourceBundle getResourceBundleFromDb(String id, ResourceBundle parent, Locale locale)
- throws Exception;
+ /**
+ * The class defining the context required to load a ResourceBundle thanks to the method
+ * <code>getResourceBundleFromDb(String id, ResourceBundle parent, Locale locale)</code>
+ */
+ private class GetResourceBundleFromDbContext extends ResourceBundleContext
+ {
+ private final String name;
-}
+ private final Locale locale;
+
+ public GetResourceBundleFromDbContext(String name, Locale locale)
+ {
+ this.name = name;
+ this.locale = locale;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ ResourceBundle get(String id)
+ {
+ ResourceBundle res = null;
+ try
+ {
+ String rootId = name + "_" + localeService_.getDefaultLocaleConfig().getLanguage();
+ ResourceBundle parent = getResourceBundleFromDb(rootId, null, locale);
+ if (parent != null)
+ {
+ res = getResourceBundleFromDb(id, parent, locale);
+ if (res == null)
+ res = parent;
+ }
+ }
+ catch (Exception ex)
+ {
+ log_.error("Error: " + id, ex);
+ }
+ return res;
+ }
+ }
+
+ /**
+ * The class defining the context required to load a ResourceBundle thanks to the method
+ * <code>getResourceBundle(String[] name, Locale locale, ClassLoader cl)</code>
+ */
+ private class GetResourceBundleContext extends ResourceBundleContext
+ {
+ private final String[] name;
+
+ private final Locale locale;
+
+ private final ClassLoader cl;
+
+ public GetResourceBundleContext(String[] name, Locale locale, ClassLoader cl)
+ {
+ this.name = name;
+ this.locale = locale;
+ this.cl = cl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ ResourceBundle get(String id)
+ {
+ MapResourceBundle outputBundled = null;
+ try
+ {
+ outputBundled = new MapResourceBundle(locale);
+ for (int i = 0; i < name.length; i++)
+ {
+ ResourceBundle temp = getResourceBundle(name[i], locale, cl);
+ if (temp != null)
+ {
+ outputBundled.merge(temp);
+ continue;
+ }
+ log_.warn("Cannot load and merge the bundle: " + name[i]);
+ }
+ outputBundled.resolveDependencies();
+ }
+ catch (Exception ex)
+ {
+ log_.error("Cannot load and merge the bundle: " + id, ex);
+ }
+ return outputBundled;
+ }
+ }
+}
\ No newline at end of file
Modified: portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java
===================================================================
--- portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/component/resources/src/test/java/org/exoplatform/services/resources/test/TestResourceBundleService.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -211,5 +211,11 @@
{
return "MyClassLoader";
}
+
+ @Override
+ public int hashCode()
+ {
+ return 0;
+ }
}
}
Modified: portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/web.xml 2011-01-27 03:56:42 UTC (rev 5821)
@@ -141,9 +141,6 @@
<listener-class>org.exoplatform.web.GenericHttpListener</listener-class>
</listener>
<listener>
- <listener-class>org.exoplatform.portal.application.PortalSessionListener</listener-class>
- </listener>
- <listener>
<listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
</listener>
<!-- ================================================================== -->
Deleted: portal/trunk/gadgets/core/src/main/java/containers/default/container.js
===================================================================
--- portal/trunk/gadgets/core/src/main/java/containers/default/container.js 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/gadgets/core/src/main/java/containers/default/container.js 2011-01-27 03:56:42 UTC (rev 5821)
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-// Default container configuration. To change the configuration, you have two options:
-//
-// A. If you run the Java server: Create your own "myContainer.js" file and
-// modify the value in web.xml.
-//
-// B. If you run the PHP server: Create a myContainer.js, copy the contents of container.js to it,
-// change
-// {"gadgets.container" : ["default"],
-// to
-// {"gadgets.container" : ["myContainer"],
-// And make your changes that you need to myContainer.js.
-// Just make sure on the iframe URL you specify &container=myContainer
-// for it to use that config.
-//
-// All configurations will automatically inherit values from this
-// config, so you only need to provide configuration for items
-// that you require explicit special casing for.
-//
-// Please namespace your attributes using the same conventions
-// as you would for javascript objects, e.g. gadgets.features
-// rather than "features".
-
-// NOTE: Please _don't_ leave trailing commas because the php json parser
-// errors out on this.
-
-// Container must be an array; this allows multiple containers
-// to share configuration.
-{"gadgets.container" : ["default"],
-
-// Set of regular expressions to validate the parent parameter. This is
-// necessary to support situations where you want a single container to support
-// multiple possible host names (such as for localized domains, such as
-// <language>.example.org. If left as null, the parent parameter will be
-// ignored; otherwise, any requests that do not include a parent
-// value matching this set will return a 404 error.
-"gadgets.parent" : null,
-
-// Should all gadgets be forced on to a locked domain?
-"gadgets.lockedDomainRequired" : false,
-
-// DNS domain on which gadgets should render.
-"gadgets.lockedDomainSuffix" : "-a.example.com:8080",
-
-// Various urls generated throughout the code base.
-// iframeBaseUri will automatically have the host inserted
-// if locked domain is enabled and the implementation supports it.
-// query parameters will be added.
-"gadgets.iframeBaseUri" : "/eXoGadgetServer/gadgets/ifr",
-
-// jsUriTemplate will have %host% and %js% substituted.
-// No locked domain special cases, but jsUriTemplate must
-// never conflict with a lockedDomainSuffix.
-"gadgets.jsUriTemplate" : "http://%host%/eXoGadgetServer/gadgets/js/%js%",
-
-// Callback URL. Scheme relative URL for easy switch between https/http.
-"gadgets.oauthGadgetCallbackTemplate" : "//%host%/eXoGadgetServer/gadgets/oauthcallback",
-
-// Use an insecure security token by default
-"gadgets.securityTokenType" : "secure",
-"gadgets.securityTokenKeyFile" : "key.txt",
-
-"gadgets.signingKeyFile" : "oauthkey.pem",
-"gadgets.signingKeyName" : "mytestkey",
-
-"gadgets.signedFetchDomain" : "eXo",
-// Config param to load Opensocial data for social
-// preloads in data pipelining. %host% will be
-// substituted with the current host.
-"gadgets.osDataUri" : "http://%host%/social/rpc",
-
-// Uncomment these to switch to a secure version
-//
-//"gadgets.securityTokenType" : "secure",
-//"gadgets.securityTokenKeyFile" : "/path/to/key/file.txt",
-
-"gadgets.content-rewrite" : {
- "include-urls": ".*",
- "exclude-urls": "",
- "include-tags": ["link", "script", "embed", "img", "style"],
- "expires": "86400",
- "proxy-url": "/eXoGadgetServer/gadgets/proxy?url=",
- "concat-url": "/eXoGadgetServer/gadgets/concat?"
-},
-
-// This config data will be passed down to javascript. Please
-// configure your object using the feature name rather than
-// the javascript name.
-
-// Only configuration for required features will be used.
-// See individual feature.xml files for configuration details.
-"gadgets.features" : {
- "core.io" : {
- // Note: /proxy is an open proxy. Be careful how you expose this!
- "proxyUrl" : "http://%host%/eXoGadgetServer/gadgets/proxy?refresh=%refresh%&url=%url%",
- "jsonProxyUrl" : "http://%host%/eXoGadgetServer/gadgets/makeRequest"
- },
- "views" : {
- "home" : {
- "isOnlyVisible" : false,
- "urlTemplate" : "http://%host%/eXoGadgetServer/gadgets/home?{var}",
- "aliases": ["DASHBOARD", "default"]
- },
- "canvas" : {
- "isOnlyVisible" : true,
- "urlTemplate" : "http://%host%/eXoGadgetServer/gadgets/canvas?{var}",
- "aliases" : ["FULL_PAGE"]
- }
- },
- "rpc" : {
- // Path to the relay file. Automatically appended to the parent
- /// parameter if it passes input validation and is not null.
- // This should never be on the same host in a production environment!
- // Only use this for TESTING!
- "parentRelayUrl" : "/eXoGadgetServer/gadgets/files/container/rpc_relay.html",
-
- // If true, this will use the legacy ifpc wire format when making rpc
- // requests.
- "useLegacyProtocol" : false
- },
- // Skin defaults
- "skins" : {
- "properties" : {
- "BG_COLOR": "",
- "BG_IMAGE": "",
- "BG_POSITION": "",
- "BG_REPEAT": "",
- "FONT_COLOR": "",
- "ANCHOR_COLOR": ""
- }
- },
- "opensocial-0.8" : {
- // Path to fetch opensocial data from
- // Must be on the same domain as the gadget rendering server
- "path" : "http://%host%/social",
- "domain" : "shindig",
- "enableCaja" : false,
- "supportedFields" : {
- "person" : ["id", {"name" : ["familyName", "givenName", "unstructured"]}, "thumbnailUrl", "profileUrl"],
- "activity" : ["id", "title"]
- }
- },
- "osapi.services" : {
- // Specifying a binding to "container.listMethods" instructs osapi to dynamicaly introspect the services
- // provided by the container and delay the gadget onLoad handler until that introspection is
- // complete.
- // Alternatively a container can directly configure services here rather than having them
- // introspected. Simply list out the available servies and omit "container.listMethods" to
- // avoid the initialization delay caused by gadgets.rpc
- // E.g. "gadgets.rpc" : ["activities.requestCreate", "messages.requestSend", "requestShareApp", "requestPermission"]
- "gadgets.rpc" : ["container.listMethods"]
- },
-// "osapi" : {
-// // The endpoints to query for available JSONRPC/REST services
-// "endPoints" : [ "http://%host%/social/rpc", "http://%host%/gadgets/api/rpc" ]
-// },
- "osml": {
- // OSML library resource. Can be set to null or the empty string to disable OSML
- // for a container.
- "library": ""
- }
-}}
Modified: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ExoContainerConfig.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -27,7 +27,6 @@
import org.apache.shindig.auth.BlobCrypterSecurityTokenDecoder;
import org.apache.shindig.config.ContainerConfigException;
-import org.apache.shindig.config.JsonContainerConfig;
import org.apache.shindig.expressions.Expressions;
import org.exoplatform.commons.utils.Safe;
import org.exoplatform.container.monitor.jvm.J2EEServerInfo;
@@ -62,7 +61,7 @@
@Singleton
public class
- ExoContainerConfig extends JsonContainerConfig
+ ExoContainerConfig extends GateInJsonContainerConfig
{
/** . */
Copied: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInContainerConfigLoader.java (from rev 5820, portal/branches/branch-GTNPORTAL-1745/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInContainerConfigLoader.java)
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInContainerConfigLoader.java (rev 0)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInContainerConfigLoader.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -0,0 +1,18 @@
+package org.exoplatform.portal.gadget.core;
+
+import javax.servlet.ServletContext;
+import java.io.IOException;
+
+/**
+ * A generic loader, used to load gadget server configuration files. We abuse the ThreadLocal here, as there is no way
+ * to associate Guice components with Kernel 's configuration loader component (ConfigurationManager)
+ *
+ * User: Minh Hoang TO - hoang281283(a)gmail.com
+ * Date: 1/12/11
+ * Time: 3:31 PM
+ */
+public abstract class GateInContainerConfigLoader {
+
+ public abstract String loadContentAsString(String path, String encoding) throws IOException;
+
+}
Copied: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java (from rev 5820, portal/branches/branch-GTNPORTAL-1745/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java)
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java (rev 0)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInGuiceServletContextListener.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -0,0 +1,77 @@
+package org.exoplatform.portal.gadget.core;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.shindig.common.servlet.GuiceServletContextListener;
+
+import javax.servlet.ServletContext;
+import javax.servlet.ServletContextEvent;
+import java.io.IOException;
+import java.io.InputStream;
+
+/**
+ *
+ * Extending the GuiceServletContextListener to setup a ThreadLocal<GateInContainerConfigLoader> variable wrapping
+ * the ServletContext. That makes the ServletContext accessible within the scope of thread executing the method
+ * contextInitialized
+ *
+ *
+ * User: Minh Hoang TO - hoang281283(a)gmail.com
+ * Date: 1/12/11
+ * Time: 3:50 PM
+ */
+public class GateInGuiceServletContextListener extends GuiceServletContextListener {
+
+ private static ThreadLocal<GateInContainerConfigLoader> currentLoader = new ThreadLocal<GateInContainerConfigLoader>();
+
+ @Override
+ public void contextInitialized(ServletContextEvent event) {
+
+ final ServletContext scontext = event.getServletContext();
+
+ GateInContainerConfigLoader loader = new GateInContainerConfigLoader() {
+ @Override
+ public String loadContentAsString(String path, String encoding) throws IOException{
+
+ //To make sure that the path begins with a slash, as required in the javadoc of method
+ // getResourceAsStream in ServletContext
+ //The leading slash is required on certain application servers such as JBoss, WebSphere
+ if('/' != path.charAt(0))
+ {
+ path = '/' + path;
+ }
+
+ InputStream is = scontext.getResourceAsStream(path);
+
+ if(is == null)
+ {
+ throw new NullPointerException("There is no file specified by path : " + path);
+ }
+ return IOUtils.toString(is, encoding);
+ }
+ };
+
+ //Setup the threadlocal loader
+ currentLoader.set(loader);
+
+ try
+ {
+ //Setup the Guice objects, the threadlocal loader is accessible for the moment
+ super.contextInitialized(event);
+ }
+ catch(Exception ex)
+ {
+ ex.printStackTrace();
+ }
+ finally
+ {
+ //Reset the threadlocal loader to null
+ currentLoader.set(null);
+ }
+
+ }
+
+ public static GateInContainerConfigLoader getCurrentLoader()
+ {
+ return currentLoader.get();
+ }
+}
Copied: portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInJsonContainerConfig.java (from rev 5820, portal/branches/branch-GTNPORTAL-1745/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInJsonContainerConfig.java)
===================================================================
--- portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInJsonContainerConfig.java (rev 0)
+++ portal/trunk/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/GateInJsonContainerConfig.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -0,0 +1,404 @@
+/**
+ * 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.
+ */
+
+
+package org.exoplatform.portal.gadget.core;
+
+import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.shindig.common.JsonSerializer;
+import org.apache.shindig.common.util.ResourceLoader;
+import org.apache.shindig.config.AbstractContainerConfig;
+import org.apache.shindig.config.ContainerConfigELResolver;
+import org.apache.shindig.config.ContainerConfigException;
+import org.apache.shindig.config.DynamicConfigProperty;
+import org.apache.shindig.expressions.Expressions;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+import com.google.inject.Inject;
+import com.google.inject.Singleton;
+import com.google.inject.name.Named;
+
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ValueExpression;
+
+/**
+ * A fork of the class JsonContainerConfig, designed to override the loading of container.js
+ *
+ * User: Minh Hoang TO - hoang281283(a)gmail.com
+ * Date: 1/10/11
+ * Time: 2:12 PM
+ */
+@Singleton
+public class GateInJsonContainerConfig extends AbstractContainerConfig {
+
+ private static final Logger LOG = Logger.getLogger(GateInJsonContainerConfig.class.getName());
+ public static final char FILE_SEPARATOR = ',';
+ public static final String PARENT_KEY = "parent";
+ // TODO: Rename this to simply "container", gadgets.container is unnecessary.
+ public static final String CONTAINER_KEY = "gadgets.container";
+
+ private final Map<String, Map<String, Object>> config;
+ private final Expressions expressions;
+
+ /**
+ * Creates a new configuration from files.
+ * @throws ContainerConfigException
+ */
+ @Inject
+ public GateInJsonContainerConfig(@Named("shindig.containers.default") String containers, Expressions expressions)
+ throws ContainerConfigException {
+ this.expressions = expressions;
+ config = createContainers(loadContainers(containers));
+ init();
+ }
+
+ /**
+ * Creates a new configuration from a JSON Object, for use in testing.
+ */
+ public GateInJsonContainerConfig(JSONObject json, Expressions expressions) {
+ this.expressions = expressions;
+ config = createContainers(json);
+ init();
+ }
+
+ /**
+ * Initializes the configuration. Called during construction.
+ */
+ protected void init() {
+ for (Map.Entry<String, Map<String, Object>> configEntry : config.entrySet()) {
+ @SuppressWarnings("unchecked")
+ Map<String, Object> value = (Map<String, Object>) evaluateAll(configEntry.getValue());
+ configEntry.setValue(value);
+ }
+ }
+
+ @Override
+ public Collection<String> getContainers() {
+ return Collections.unmodifiableSet(config.keySet());
+ }
+
+ @Override
+ public Map<String, Object> getProperties(String container) {
+ return config.get(container);
+ }
+
+ @Override
+ public Object getProperty(String container, String property) {
+ if (property.startsWith("${")) {
+ // An expression!
+ try {
+ ValueExpression expression = expressions.parse(property, Object.class);
+ return expression.getValue(createExpressionContext(container));
+ } catch (ELException e) {
+ return null;
+ }
+ }
+
+ Map<String, Object> containerData = config.get(container);
+ if (containerData == null) {
+ return null;
+ }
+ return containerData.get(property);
+ }
+
+ /**
+ * Initialize each container's configuration.
+ */
+ private Map<String, Map<String, Object>> createContainers(JSONObject json) {
+ Map<String, Map<String, Object>> map = Maps.newHashMap();
+ for (String container : JSONObject.getNames(json)) {
+ ELContext context = createExpressionContext(container);
+ map.put(container, jsonToMap(json.optJSONObject(container), expressions, context));
+ }
+
+ return map;
+ }
+
+ /**
+ * Make Expressions available to subclasses so they can create ELContexts
+ */
+ protected Expressions getExpressions() {
+ return expressions;
+ }
+
+ /**
+ * Protected to allow overriding.
+ */
+ protected ELContext createExpressionContext(String container) {
+ return getExpressions().newELContext(new ContainerConfigELResolver(this, container));
+ }
+
+ /**
+ * Convert a JSON value to a configuration value.
+ */
+ private static Object jsonToConfig(Object json, Expressions expressions, ELContext context) {
+ if (JSONObject.NULL.equals(json)) {
+ return null;
+ } else if (json instanceof CharSequence) {
+ return new DynamicConfigProperty(json.toString(), expressions, context);
+ } else if (json instanceof JSONArray) {
+ JSONArray jsonArray = (JSONArray) json;
+ List<Object> values = new ArrayList<Object>(jsonArray.length());
+ for (int i = 0, j = jsonArray.length(); i < j; ++i) {
+ values.add(jsonToConfig(jsonArray.opt(i), expressions, context));
+ }
+ return Collections.unmodifiableList(values);
+ } else if (json instanceof JSONObject) {
+ return jsonToMap((JSONObject) json, expressions, context);
+ }
+
+ // A (boxed) primitive.
+ return json;
+ }
+
+ private static Map<String, Object> jsonToMap(JSONObject json, Expressions expressions, ELContext context) {
+ Map<String, Object> values = new HashMap<String, Object>(json.length(), 1);
+ for (String key : JSONObject.getNames(json)) {
+ Object val = jsonToConfig(json.opt(key), expressions, context);
+ if (val != null) {
+ values.put(key, val);
+ }
+ }
+ return Collections.unmodifiableMap(values);
+ }
+
+ /**
+ * Loads containers from directories recursively.
+ *
+ * Only files with a .js or .json extension will be loaded.
+ *
+ * @param files The files to examine.
+ * @throws ContainerConfigException
+ */
+ private void loadFiles(File[] files, JSONObject all) throws ContainerConfigException {
+ try {
+ for (File file : files) {
+ LOG.info("Reading container config: " + file.getName());
+ if (file.isDirectory()) {
+ loadFiles(file.listFiles(), all);
+ } else if (file.getName().toLowerCase(Locale.ENGLISH).endsWith(".js") ||
+ file.getName().toLowerCase(Locale.ENGLISH).endsWith(".json")) {
+ if (!file.exists()) {
+ throw new ContainerConfigException(
+ "The file '" + file.getAbsolutePath() + "' doesn't exist.");
+ }
+ loadFromString(ResourceLoader.getContent(file), all);
+ } else {
+ if (LOG.isLoggable(Level.FINEST))
+ LOG.finest(file.getAbsolutePath() + " doesn't seem to be a JS or JSON file.");
+ }
+ }
+ } catch (IOException e) {
+ throw new ContainerConfigException(e);
+ }
+ }
+
+ /**
+ * Loads resources recursively.
+ * @param files The base paths to look for container.xml
+ * @throws ContainerConfigException
+ */
+ private void loadResources(String[] files, JSONObject all) throws ContainerConfigException {
+ try {
+ for (String entry : files) {
+ LOG.info("Reading container config: " + entry);
+ //final ClassLoader contextCl = Thread.currentThread().getContextClassLoader();
+ //InputStream resourceInputStream = contextCl.getResourceAsStream(entry);
+ //String content = IOUtils.toString(resourceInputStream, "UTF-8");
+
+ GateInContainerConfigLoader currentLoader = GateInGuiceServletContextListener.getCurrentLoader();
+ String content = currentLoader.loadContentAsString(entry, "UTF-8");
+ loadFromString(content, all);
+ }
+ } catch (IOException e) {
+ throw new ContainerConfigException(e);
+ }
+ }
+
+ /**
+ * Merges two JSON objects together (recursively), with values from "merge"
+ * replacing values in "base" to produce a new object.
+ *
+ * @param base The base object that values will be replaced into.
+ * @param merge The object to merge values from.
+ *
+ * @throws JSONException if the two objects can't be merged for some reason.
+ */
+ private JSONObject mergeObjects(JSONObject base, JSONObject merge)
+ throws JSONException {
+ // Clone the initial object (JSONObject doesn't support "clone").
+
+ JSONObject clone = new JSONObject(base, JSONObject.getNames(base));
+ // Walk parameter list for the merged object and merge recursively.
+ String[] fields = JSONObject.getNames(merge);
+ for (String field : fields) {
+ Object existing = clone.opt(field);
+ Object update = merge.get(field);
+ if (JSONObject.NULL.equals(existing) || JSONObject.NULL.equals(update)) {
+ // It's new custom config, not referenced in the prototype, or
+ // it's removing a pre-configured value.
+ clone.put(field, update);
+ } else {
+ // Merge if object type is JSONObject.
+ if (update instanceof JSONObject &&
+ existing instanceof JSONObject) {
+ clone.put(field, mergeObjects((JSONObject)existing,
+ (JSONObject)update));
+ } else {
+ // Otherwise we just overwrite it.
+ clone.put(field, update);
+ }
+ }
+ }
+ return clone;
+ }
+
+ /**
+ * Recursively merge values from parent objects in the prototype chain.
+ *
+ * @return The object merged with all parents.
+ *
+ * @throws ContainerConfigException If there is an invalid parent parameter
+ * in the prototype chain.
+ */
+ private JSONObject mergeParents(String container, JSONObject all)
+ throws ContainerConfigException, JSONException {
+ JSONObject base = all.getJSONObject(container);
+ if (DEFAULT_CONTAINER.equals(container)) {
+ return base;
+ }
+
+ String parent = base.optString(PARENT_KEY, DEFAULT_CONTAINER);
+ if (!all.has(parent)) {
+ throw new ContainerConfigException(
+ "Unable to locate parent '" + parent + "' required by "
+ + base.getString(CONTAINER_KEY));
+ }
+ return mergeObjects(mergeParents(parent, all), base);
+ }
+
+ /**
+ * Processes a container file.
+ *
+ * @param json
+ * @throws ContainerConfigException
+ */
+ protected void loadFromString(String json, JSONObject all) throws ContainerConfigException {
+ try {
+ JSONObject contents = new JSONObject(json);
+ JSONArray containers = contents.getJSONArray(CONTAINER_KEY);
+
+ for (int i = 0, j = containers.length(); i < j; ++i) {
+ // Copy the default object and produce a new one.
+ String container = containers.getString(i);
+ all.put(container, contents);
+ }
+ } catch (JSONException e) {
+ throw new ContainerConfigException(e);
+ }
+ }
+
+ /**
+ * Loads containers from the specified resource. Follows the same rules
+ * as {@code JsFeatureLoader.loadFeatures} for locating resources.
+ *
+ * @param path
+ * @throws ContainerConfigException
+ */
+ private JSONObject loadContainers(String path) throws ContainerConfigException {
+ JSONObject all = new JSONObject();
+ try {
+ for (String location : StringUtils.split(path, FILE_SEPARATOR)) {
+ if (location.startsWith("res://")) {
+ location = location.substring(6);
+ LOG.info("Loading resources from: " + location);
+ if (path.endsWith(".txt")) {
+ loadResources(ResourceLoader.getContent(location).split("[\r\n]+"), all);
+ } else {
+ loadResources(new String[]{location}, all);
+ }
+ } else {
+ LOG.info("Loading files from: " + location);
+ File file = new File(location);
+ loadFiles(new File[]{file}, all);
+ }
+ }
+
+ // Now that all containers are loaded, we go back through them and merge
+ // recursively. This is done at startup to simplify lookups.
+ for (String container : JSONObject.getNames(all)) {
+ all.put(container, mergeParents(container, all));
+ }
+
+ return all;
+ } catch (IOException e) {
+ throw new ContainerConfigException(e);
+ } catch (JSONException e) {
+ throw new ContainerConfigException(e);
+ }
+ }
+
+ @Override
+ public String toString() {
+ return JsonSerializer.serialize(config);
+ }
+
+ private Object evaluateAll(Object value) {
+ if (value instanceof CharSequence) {
+ return value.toString();
+ } else if (value instanceof Map) {
+ ImmutableMap.Builder<Object, Object> newMap = ImmutableMap.builder();
+ for (Map.Entry<?, ?> entry : ((Map<?, ?>) value).entrySet()) {
+ newMap.put(entry.getKey(), evaluateAll(entry.getValue()));
+ }
+
+ return newMap.build();
+ } else if (value instanceof List) {
+ ImmutableList.Builder<Object> newList = ImmutableList.builder();
+ for (Object entry : (List<?>) value){
+ newList.add(evaluateAll(entry));
+ }
+
+ return newList.build();
+ } else {
+ return value;
+ }
+ }
+}
\ No newline at end of file
Modified: portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/gadgets/server/src/main/webapp/WEB-INF/web.xml 2011-01-27 03:56:42 UTC (rev 5821)
@@ -79,7 +79,8 @@
</filter-mapping>
<listener>
- <listener-class>org.apache.shindig.common.servlet.GuiceServletContextListener</listener-class>
+ <!--<listener-class>org.apache.shindig.common.servlet.GuiceServletContextListener</listener-class>-->
+ <listener-class>org.exoplatform.portal.gadget.core.GateInGuiceServletContextListener</listener-class>
</listener>
<!-- Render a Gadget -->
Copied: portal/trunk/gadgets/server/src/main/webapp/containers (from rev 5820, portal/branches/branch-GTNPORTAL-1745/gadgets/server/src/main/webapp/containers)
Copied: portal/trunk/gadgets/server/src/main/webapp/containers/default (from rev 5820, portal/branches/branch-GTNPORTAL-1745/gadgets/server/src/main/webapp/containers/default)
Deleted: portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js
===================================================================
--- portal/branches/branch-GTNPORTAL-1745/gadgets/server/src/main/webapp/containers/default/container.js 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js 2011-01-27 03:56:42 UTC (rev 5821)
@@ -1,180 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-// Default container configuration. To change the configuration, you have two options:
-//
-// A. If you run the Java server: Create your own "myContainer.js" file and
-// modify the value in web.xml.
-//
-// B. If you run the PHP server: Create a myContainer.js, copy the contents of container.js to it,
-// change
-// {"gadgets.container" : ["default"],
-// to
-// {"gadgets.container" : ["myContainer"],
-// And make your changes that you need to myContainer.js.
-// Just make sure on the iframe URL you specify &container=myContainer
-// for it to use that config.
-//
-// All configurations will automatically inherit values from this
-// config, so you only need to provide configuration for items
-// that you require explicit special casing for.
-//
-// Please namespace your attributes using the same conventions
-// as you would for javascript objects, e.g. gadgets.features
-// rather than "features".
-
-// NOTE: Please _don't_ leave trailing commas because the php json parser
-// errors out on this.
-
-// Container must be an array; this allows multiple containers
-// to share configuration.
-{"gadgets.container" : ["default"],
-
-// Set of regular expressions to validate the parent parameter. This is
-// necessary to support situations where you want a single container to support
-// multiple possible host names (such as for localized domains, such as
-// <language>.example.org. If left as null, the parent parameter will be
-// ignored; otherwise, any requests that do not include a parent
-// value matching this set will return a 404 error.
-"gadgets.parent" : null,
-
-// Should all gadgets be forced on to a locked domain?
-"gadgets.lockedDomainRequired" : false,
-
-// DNS domain on which gadgets should render.
-"gadgets.lockedDomainSuffix" : "-a.example.com:8080",
-
-// Various urls generated throughout the code base.
-// iframeBaseUri will automatically have the host inserted
-// if locked domain is enabled and the implementation supports it.
-// query parameters will be added.
-"gadgets.iframeBaseUri" : "/eXoGadgetServer/gadgets/ifr",
-
-// jsUriTemplate will have %host% and %js% substituted.
-// No locked domain special cases, but jsUriTemplate must
-// never conflict with a lockedDomainSuffix.
-"gadgets.jsUriTemplate" : "http://%host%/eXoGadgetServer/gadgets/js/%js%",
-
-// Callback URL. Scheme relative URL for easy switch between https/http.
-"gadgets.oauthGadgetCallbackTemplate" : "//%host%/eXoGadgetServer/gadgets/oauthcallback",
-
-// Use an insecure security token by default
-"gadgets.securityTokenType" : "secure",
-"gadgets.securityTokenKeyFile" : "key.txt",
-
-"gadgets.signingKeyFile" : "oauthkey.pem",
-"gadgets.signingKeyName" : "mytestkey",
-
-"gadgets.signedFetchDomain" : "eXo",
-// Config param to load Opensocial data for social
-// preloads in data pipelining. %host% will be
-// substituted with the current host.
-"gadgets.osDataUri" : "http://%host%/social/rpc",
-
-// Uncomment these to switch to a secure version
-//
-//"gadgets.securityTokenType" : "secure",
-//"gadgets.securityTokenKeyFile" : "/path/to/key/file.txt",
-
-"gadgets.content-rewrite" : {
- "include-urls": ".*",
- "exclude-urls": "",
- "include-tags": ["link", "script", "embed", "img", "style"],
- "expires": "86400",
- "proxy-url": "/eXoGadgetServer/gadgets/proxy?url=",
- "concat-url": "/eXoGadgetServer/gadgets/concat?"
-},
-
-// This config data will be passed down to javascript. Please
-// configure your object using the feature name rather than
-// the javascript name.
-
-// Only configuration for required features will be used.
-// See individual feature.xml files for configuration details.
-"gadgets.features" : {
- "core.io" : {
- // Note: /proxy is an open proxy. Be careful how you expose this!
- "proxyUrl" : "http://%host%/eXoGadgetServer/gadgets/proxy?refresh=%refresh%&url=%url%",
- "jsonProxyUrl" : "http://%host%/eXoGadgetServer/gadgets/makeRequest"
- },
- "views" : {
- "home" : {
- "isOnlyVisible" : false,
- "urlTemplate" : "http://%host%/eXoGadgetServer/gadgets/home?{var}",
- "aliases": ["DASHBOARD", "default"]
- },
- "canvas" : {
- "isOnlyVisible" : true,
- "urlTemplate" : "http://%host%/eXoGadgetServer/gadgets/canvas?{var}",
- "aliases" : ["FULL_PAGE"]
- }
- },
- "rpc" : {
- // Path to the relay file. Automatically appended to the parent
- /// parameter if it passes input validation and is not null.
- // This should never be on the same host in a production environment!
- // Only use this for TESTING!
- "parentRelayUrl" : "/eXoGadgetServer/gadgets/files/container/rpc_relay.html",
-
- // If true, this will use the legacy ifpc wire format when making rpc
- // requests.
- "useLegacyProtocol" : false
- },
- // Skin defaults
- "skins" : {
- "properties" : {
- "BG_COLOR": "",
- "BG_IMAGE": "",
- "BG_POSITION": "",
- "BG_REPEAT": "",
- "FONT_COLOR": "",
- "ANCHOR_COLOR": ""
- }
- },
- "opensocial-0.8" : {
- // Path to fetch opensocial data from
- // Must be on the same domain as the gadget rendering server
- "path" : "http://%host%/social",
- "domain" : "shindig",
- "enableCaja" : false,
- "supportedFields" : {
- "person" : ["id", {"name" : ["familyName", "givenName", "unstructured"]}, "thumbnailUrl", "profileUrl"],
- "activity" : ["id", "title"]
- }
- },
- "osapi.services" : {
- // Specifying a binding to "container.listMethods" instructs osapi to dynamicaly introspect the services
- // provided by the container and delay the gadget onLoad handler until that introspection is
- // complete.
- // Alternatively a container can directly configure services here rather than having them
- // introspected. Simply list out the available servies and omit "container.listMethods" to
- // avoid the initialization delay caused by gadgets.rpc
- // E.g. "gadgets.rpc" : ["activities.requestCreate", "messages.requestSend", "requestShareApp", "requestPermission"]
- "gadgets.rpc" : ["container.listMethods"]
- },
-// "osapi" : {
-// // The endpoints to query for available JSONRPC/REST services
-// "endPoints" : [ "http://%host%/social/rpc", "http://%host%/gadgets/api/rpc" ]
-// },
- "osml": {
- // OSML library resource. Can be set to null or the empty string to disable OSML
- // for a container.
- "library": ""
- }
-}}
Copied: portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js (from rev 5820, portal/branches/branch-GTNPORTAL-1745/gadgets/server/src/main/webapp/containers/default/container.js)
===================================================================
--- portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js (rev 0)
+++ portal/trunk/gadgets/server/src/main/webapp/containers/default/container.js 2011-01-27 03:56:42 UTC (rev 5821)
@@ -0,0 +1,180 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+// Default container configuration. To change the configuration, you have two options:
+//
+// A. If you run the Java server: Create your own "myContainer.js" file and
+// modify the value in web.xml.
+//
+// B. If you run the PHP server: Create a myContainer.js, copy the contents of container.js to it,
+// change
+// {"gadgets.container" : ["default"],
+// to
+// {"gadgets.container" : ["myContainer"],
+// And make your changes that you need to myContainer.js.
+// Just make sure on the iframe URL you specify &container=myContainer
+// for it to use that config.
+//
+// All configurations will automatically inherit values from this
+// config, so you only need to provide configuration for items
+// that you require explicit special casing for.
+//
+// Please namespace your attributes using the same conventions
+// as you would for javascript objects, e.g. gadgets.features
+// rather than "features".
+
+// NOTE: Please _don't_ leave trailing commas because the php json parser
+// errors out on this.
+
+// Container must be an array; this allows multiple containers
+// to share configuration.
+{"gadgets.container" : ["default"],
+
+// Set of regular expressions to validate the parent parameter. This is
+// necessary to support situations where you want a single container to support
+// multiple possible host names (such as for localized domains, such as
+// <language>.example.org. If left as null, the parent parameter will be
+// ignored; otherwise, any requests that do not include a parent
+// value matching this set will return a 404 error.
+"gadgets.parent" : null,
+
+// Should all gadgets be forced on to a locked domain?
+"gadgets.lockedDomainRequired" : false,
+
+// DNS domain on which gadgets should render.
+"gadgets.lockedDomainSuffix" : "-a.example.com:8080",
+
+// Various urls generated throughout the code base.
+// iframeBaseUri will automatically have the host inserted
+// if locked domain is enabled and the implementation supports it.
+// query parameters will be added.
+"gadgets.iframeBaseUri" : "/eXoGadgetServer/gadgets/ifr",
+
+// jsUriTemplate will have %host% and %js% substituted.
+// No locked domain special cases, but jsUriTemplate must
+// never conflict with a lockedDomainSuffix.
+"gadgets.jsUriTemplate" : "http://%host%/eXoGadgetServer/gadgets/js/%js%",
+
+// Callback URL. Scheme relative URL for easy switch between https/http.
+"gadgets.oauthGadgetCallbackTemplate" : "//%host%/eXoGadgetServer/gadgets/oauthcallback",
+
+// Use an insecure security token by default
+"gadgets.securityTokenType" : "secure",
+"gadgets.securityTokenKeyFile" : "key.txt",
+
+"gadgets.signingKeyFile" : "oauthkey.pem",
+"gadgets.signingKeyName" : "mytestkey",
+
+"gadgets.signedFetchDomain" : "eXo",
+// Config param to load Opensocial data for social
+// preloads in data pipelining. %host% will be
+// substituted with the current host.
+"gadgets.osDataUri" : "http://%host%/social/rpc",
+
+// Uncomment these to switch to a secure version
+//
+//"gadgets.securityTokenType" : "secure",
+//"gadgets.securityTokenKeyFile" : "/path/to/key/file.txt",
+
+"gadgets.content-rewrite" : {
+ "include-urls": ".*",
+ "exclude-urls": "",
+ "include-tags": ["link", "script", "embed", "img", "style"],
+ "expires": "86400",
+ "proxy-url": "/eXoGadgetServer/gadgets/proxy?url=",
+ "concat-url": "/eXoGadgetServer/gadgets/concat?"
+},
+
+// This config data will be passed down to javascript. Please
+// configure your object using the feature name rather than
+// the javascript name.
+
+// Only configuration for required features will be used.
+// See individual feature.xml files for configuration details.
+"gadgets.features" : {
+ "core.io" : {
+ // Note: /proxy is an open proxy. Be careful how you expose this!
+ "proxyUrl" : "http://%host%/eXoGadgetServer/gadgets/proxy?refresh=%refresh%&url=%url%",
+ "jsonProxyUrl" : "http://%host%/eXoGadgetServer/gadgets/makeRequest"
+ },
+ "views" : {
+ "home" : {
+ "isOnlyVisible" : false,
+ "urlTemplate" : "http://%host%/eXoGadgetServer/gadgets/home?{var}",
+ "aliases": ["DASHBOARD", "default"]
+ },
+ "canvas" : {
+ "isOnlyVisible" : true,
+ "urlTemplate" : "http://%host%/eXoGadgetServer/gadgets/canvas?{var}",
+ "aliases" : ["FULL_PAGE"]
+ }
+ },
+ "rpc" : {
+ // Path to the relay file. Automatically appended to the parent
+ /// parameter if it passes input validation and is not null.
+ // This should never be on the same host in a production environment!
+ // Only use this for TESTING!
+ "parentRelayUrl" : "/eXoGadgetServer/gadgets/files/container/rpc_relay.html",
+
+ // If true, this will use the legacy ifpc wire format when making rpc
+ // requests.
+ "useLegacyProtocol" : false
+ },
+ // Skin defaults
+ "skins" : {
+ "properties" : {
+ "BG_COLOR": "",
+ "BG_IMAGE": "",
+ "BG_POSITION": "",
+ "BG_REPEAT": "",
+ "FONT_COLOR": "",
+ "ANCHOR_COLOR": ""
+ }
+ },
+ "opensocial-0.8" : {
+ // Path to fetch opensocial data from
+ // Must be on the same domain as the gadget rendering server
+ "path" : "http://%host%/social",
+ "domain" : "shindig",
+ "enableCaja" : false,
+ "supportedFields" : {
+ "person" : ["id", {"name" : ["familyName", "givenName", "unstructured"]}, "thumbnailUrl", "profileUrl"],
+ "activity" : ["id", "title"]
+ }
+ },
+ "osapi.services" : {
+ // Specifying a binding to "container.listMethods" instructs osapi to dynamicaly introspect the services
+ // provided by the container and delay the gadget onLoad handler until that introspection is
+ // complete.
+ // Alternatively a container can directly configure services here rather than having them
+ // introspected. Simply list out the available servies and omit "container.listMethods" to
+ // avoid the initialization delay caused by gadgets.rpc
+ // E.g. "gadgets.rpc" : ["activities.requestCreate", "messages.requestSend", "requestShareApp", "requestPermission"]
+ "gadgets.rpc" : ["container.listMethods"]
+ },
+// "osapi" : {
+// // The endpoints to query for available JSONRPC/REST services
+// "endPoints" : [ "http://%host%/social/rpc", "http://%host%/gadgets/api/rpc" ]
+// },
+ "osml": {
+ // OSML library resource. Can be set to null or the empty string to disable OSML
+ // for a container.
+ "library": ""
+ }
+}}
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-01-27 03:56:42 UTC (rev 5821)
@@ -1407,6 +1407,7 @@
UIGadget.tooltip.Unmaximize=Restore Down
UIGadget.tooltip.editGadget=Edit Gadget
UIGadget.tooltip.deleteGadget=Delete Gadget
+UIGadget.message.isLossData=This gadget may be deleted from database or there is database error that prevent to read content of gadget
UIListPermissionSelectorPopup.title.ListPermissionSelector=Select Permission
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-01-27 03:56:42 UTC (rev 5821)
@@ -1342,6 +1342,7 @@
UIGadget.tooltip.Unmaximize=Thu nhỏ cửa sổ
UIGadget.tooltip.editGadget=Sửa Gadget
UIGadget.tooltip.deleteGadget=Xóa Gadget
+UIGadget.message.isLossData=Gadget này có thể đã bị xóa khỏi cơ sở dữ liệu hoặc việc đọc gadget từ cơ sở dữ liệu xảy ra lỗi
UIListPermissionSelectorPopup.title.ListPermissionSelector=Lựa chọn quyền
UIUserToolBarDashboard.page.ClickAndType=Nhấp chuột và điền tên trang
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/web.xml 2011-01-27 03:56:42 UTC (rev 5821)
@@ -182,9 +182,6 @@
<listener-class>org.exoplatform.web.GenericHttpListener</listener-class>
</listener>
<listener>
- <listener-class>org.exoplatform.portal.application.PortalSessionListener</listener-class>
- </listener>
- <listener>
<listener-class>org.exoplatform.services.security.web.JAASConversationStateListener</listener-class>
</listener>
<!-- ================================================================== -->
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/application/UIGadget.gtmpl 2011-01-27 03:56:42 UTC (rev 5821)
@@ -2,25 +2,32 @@
import org.exoplatform.web.application.JavascriptManager;
import org.exoplatform.portal.webui.application.GadgetUtil;
- def rcontext = _ctx.getRequestContext();
- JavascriptManager jsmanager = rcontext.getJavascriptManager();
- def hostName = GadgetUtil.getRelGadgetServerUrl();
- def url = uicomponent.getUrl();
- def metadata = uicomponent.getMetadata();
- def posX = uicomponent.getProperties().getIntValue("locationX") + "px";
- def posY = uicomponent.getProperties().getIntValue("locationY") + "px";
- def zIndex = uicomponent.getProperties().getIntValue("zIndex");
- def id = uicomponent.getId();
- def isDev = uicomponent.isGadgetDeveloper();
- def noCache = uicomponent.isNoCache();
- def isDebug = uicomponent.isDebug();
- def view = uicomponent.getView();
- def userPref = uicomponent.getUserPref();
- jsmanager.importJavascript("eXo.gadget.UIGadget");
- rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget = '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget") + "';");
- jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','content-$id', $metadata, $userPref, '$view', '$hostName', " + (isDev ? 1 : 0)
- + ", " + (isDebug ? 1 : 0) + ", " + (noCache ? 1 : 0) + ");");
-
+ def rcontext = _ctx.getRequestContext();
+ JavascriptManager jsmanager = rcontext.getJavascriptManager();
+ def hostName = GadgetUtil.getRelGadgetServerUrl();
+ def url = null;
+ def metadata = "";
+ def posX = uicomponent.getProperties().getIntValue("locationX") + "px";
+ def posY = uicomponent.getProperties().getIntValue("locationY") + "px";
+ def zIndex = uicomponent.getProperties().getIntValue("zIndex");
+ def id = uicomponent.getId() != null ? uicomponent.getId() : "UIGadget";
+ def isDev = uicomponent.isGadgetDeveloper();
+ def noCache = uicomponent.isNoCache();
+ def isDebug = uicomponent.isDebug();
+ def view = uicomponent.getView();
+ def userPref = null;
+
+ def isLossData = uicomponent.isLossData();
+ if(!isLossData) {
+ url = uicomponent.getUrl();
+ metadata = uicomponent.getMetadata();
+ userPref = uicomponent.getUserPref();
+ jsmanager.importJavascript("eXo.gadget.UIGadget");
+ rcontext.getJavascriptManager().addCustomizedOnLoadScript("eXo.gadget.UIGadget.confirmDeleteGadget = '" + _ctx.appRes("UIGadgetContainerManagement.confirm.DeleteGadget") + "';");
+ jsmanager.addCustomizedOnLoadScript("eXo.gadget.UIGadget.createGadget('$url','content-$id', $metadata, $userPref, '$view', '$hostName', " + (isDev ? 1 : 0)
+ + ", " + (isDebug ? 1 : 0) + ", " + (noCache ? 1 : 0) + ");");
+ }
+
boolean isMini = Boolean.parseBoolean(uicomponent.getProperties().get("minimized"));
String miniTitle = _ctx.appRes("UIGadget.tooltip.Minimize");
String unminiTitle = _ctx.appRes("UIGadget.tooltip.Unminimize");
@@ -43,7 +50,7 @@
<div class="EditGadget IconControl" onclick="eXo.gadget.UIGadget.editGadget('$id')" onmousedown="event.cancelBubble=true;" title="<%=_ctx.appRes("UIGadget.tooltip.editGadget")%>"><span></span></div>
<% } %>
<div class="GadgetDragHandleArea"><span></span></div>
- <div class="GadgetTitle" style="display: none; float: none; width: auto; margin-right: 75px"><%= uicomponent.getApplicationName() %></div>
+ <div class="GadgetTitle" style="display: <%=isLossData ? "block" : "none"; %> ; float: none; width: auto; margin-right: 75px"><%= uicomponent.getApplicationName() %></div>
</div>
</div>
</div>
@@ -57,8 +64,12 @@
</div>
<div class="MLGadget">
<div class="MRGadget">
- <div id="content-$id" class="MCGadget"></div>
- </div>
+ <% if(isLossData) {%>
+ <div id="content-$id" class="MCGadget"><%=_ctx.appRes("UIGadget.message.isLossData")%></div>
+ <% } else {%>
+ <div id="content-$id" class="MCGadget"></div>
+ <% } %>
+ </div>
</div>
<div class="BLGadget">
<div class="BRGadget">
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UILanguageSelector.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UILanguageSelector.gtmpl 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/portal/UILanguageSelector.gtmpl 2011-01-27 03:56:42 UTC (rev 5821)
@@ -48,7 +48,14 @@
<%
for(opt in options) {
String itemSelected = "NormalItem";
- if (opt.isSelected()) itemSelected = "SelectedItem";
+ if (opt.isSelected()) {
+ def setSelected = "eXo.webui.UIItemSelector.SelectedItem = new Object();";
+ setSelected += "eXo.webui.UIItemSelector.SelectedItem.component = '$selector.name';";
+ setSelected += "eXo.webui.UIItemSelector.SelectedItem.option = '$opt.value';";
+
+ rcontext.getJavascriptManager().addCustomizedOnLoadScript(setSelected);
+ itemSelected = "SelectedItem";
+ }
String onclickOption = "eXo.webui.UIItemSelector.onClickOption(this, '$uicomponent.name', '$selector.name', '$opt.value')";
%>
<div class="$itemSelected" onclick="$onclickOption">
@@ -102,4 +109,4 @@
</div>
</div>
</div>
-</div>
\ No newline at end of file
+</div>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -167,34 +167,34 @@
UIForm uiForm = getAncestorOfType(UIForm.class);
for (UIComponent inputEntry : getChildren())
{
- if (inputEntry.isRendered())
+ if (inputEntry instanceof UIFormInputBase)
{
- String label;
- try
+ if (inputEntry.isRendered())
{
- label = uiForm.getLabel(res, inputEntry.getId());
- if (inputEntry instanceof UIFormInputBase)
- ((UIFormInputBase)inputEntry).setLabel(label);
+ UIFormInputBase formInputBase = (UIFormInputBase) inputEntry;
+ String label;
+ if (formInputBase.getLabel() != null)
+ {
+ label = uiForm.getLabel(res, formInputBase.getLabel());
+ }
+ else
+ {
+ label = uiForm.getLabel(res, formInputBase.getId());
+ }
+ w.write("<tr>");
+ w.write("<td class=\"FieldLabel\">");
+
+ // if missing resource and the label hasn't been set before, don't print out the label.
+ if (formInputBase.getLabel() != null || (label != formInputBase.getId()))
+ {
+ w.write(label);
+ }
+ w.write("</td>");
+ w.write("<td class=\"FieldComponent\">");
+ renderUIComponent(formInputBase);
+ w.write("</td>");
+ w.write("</tr>");
}
- catch (MissingResourceException ex)
- {
- //label = " " ;
- label = inputEntry.getName();
- System.err.println("\n " + uiForm.getId() + ".label." + inputEntry.getId() + " not found value");
- }
- w.write("<tr>");
- w.write("<td class=\"FieldLabel\">");
-
- // if missing resource, don't print out the label.
- if(!label.equals(inputEntry.getName()))
- {
- w.write(label);
- }
- w.write("</td>");
- w.write("<td class=\"FieldComponent\">");
- renderUIComponent(inputEntry);
- w.write("</td>");
- w.write("</tr>");
}
}
w.write("</table>");
Modified: portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java
===================================================================
--- portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UIAddGadgetForm.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -97,14 +97,12 @@
//TODO make sure it's an rss feed
// TODO make sure that we did not add it already
uiGadget = uiForm.createUIComponent(context, UIGadget.class, null, null);
- uiGadget.setState(new TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>(gadget.getName()));
- String params = "{'rssurl':'" + url + "'}";
+ org.exoplatform.portal.pom.spi.gadget.Gadget contentState = new org.exoplatform.portal.pom.spi.gadget.Gadget();
+ contentState.addUserPref("{'rssurl':'" + url + "'}");
+ TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget> applicationState = new TransientApplicationState<org.exoplatform.portal.pom.spi.gadget.Gadget>(gadget.getName(), contentState);
- // Julien : I commented those 2 lines
- // we need to save the same way it is done in the UIGadget clas
- // UserGadgetStorage userGadgetStorage = uiForm.getApplicationComponent(UserGadgetStorage.class);
- // userGadgetStorage.save(Util.getPortalRequestContext().getRemoteUser(), gadget.getName(), "" + url.hashCode(), UIGadget.PREF_KEY, params);
+ uiGadget.setState(applicationState);
}
uiContainer.addUIGadget(uiGadget, 0, 0);
Modified: portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Param.java
===================================================================
--- portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Param.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/config/Param.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -64,36 +64,41 @@
public Object getMapXMLObject(WebuiRequestContext context) throws Exception
{
- if (object != null)
- return object;
- ResourceResolver resolver = context.getResourceResolver(value);
- InputStream is = resolver.getInputStream(value);
- object = XMLObject.getObject(is);
- is.close();
+ if(object == null)
+ {
+ synchronized (this)
+ {
+ if(object == null)
+ {
+ ResourceResolver resolver = context.getResourceResolver(value);
+ InputStream is = resolver.getInputStream(value);
+ object = XMLObject.getObject(is);
+ is.close();
+ }
+ }
+ }
return object;
}
@SuppressWarnings("unchecked")
public Object getMapGroovyObject(WebuiRequestContext context) throws Exception
{
- try
+ if(object == null)
{
- if (object != null)
- return object;
- ResourceResolver resolver = context.getResourceResolver(value);
- InputStream is = resolver.getInputStream(value);
- //TODO if is == null throw an exception saying the it's impossible to find the file
- Binding binding = new Binding();
- GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
- object = shell.evaluate(is);
- is.close();
- return object;
+ synchronized (this)
+ {
+ if(object == null)
+ {
+ ResourceResolver resolver = context.getResourceResolver(value);
+ InputStream is = resolver.getInputStream(value);
+ Binding binding = new Binding();
+ GroovyShell shell = new GroovyShell(Thread.currentThread().getContextClassLoader(), binding);
+ object = shell.evaluate(is);
+ is.close();
+ }
+ }
}
- catch (Exception e)
- {
- log.error("A problem in the groovy script : " + value, e);
- throw e;
- }
+ return object;
}
public Object getFreshObject(WebuiRequestContext context) throws Exception
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -161,7 +161,8 @@
cacheLevel_ = cache;
}
- requestURI_ = URLDecoder.decode(req.getRequestURI(), "UTF-8");
+ requestURI_ = req.getRequestURI();
+ String decodedURI = URLDecoder.decode(requestURI_, "UTF-8");
// req.getPathInfo will already have the encoding set from the server.
// We need to use the UTF-8 value since this is how we store the portal name.
@@ -170,7 +171,7 @@
String contextPath = URLDecoder.decode(req.getContextPath(), "UTF-8");
String pathInfo = "/";
if (requestURI_.length() > servletPath.length() + contextPath.length())
- pathInfo = requestURI_.substring(servletPath.length() + contextPath.length());
+ pathInfo = decodedURI.substring(servletPath.length() + contextPath.length());
int colonIndex = pathInfo.indexOf("/", 1);
if (colonIndex < 0)
@@ -180,13 +181,13 @@
portalOwner_ = pathInfo.substring(1, colonIndex);
nodePath_ = pathInfo.substring(colonIndex, pathInfo.length());
- portalURI = requestURI_.substring(0, requestURI_.lastIndexOf(nodePath_)) + "/";
+ portalURI = decodedURI.substring(0, decodedURI.lastIndexOf(nodePath_)) + "/";
- if (requestURI_.indexOf("/public/") >= 0)
+ if (decodedURI.indexOf("/public/") >= 0)
{
accessPath = PUBLIC_ACCESS;
}
- else if (requestURI_.indexOf("/private/") >= 0)
+ else if (decodedURI.indexOf("/private/") >= 0)
{
accessPath = PRIVATE_ACCESS;
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalSessionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalSessionListener.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalSessionListener.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -19,31 +19,36 @@
package org.exoplatform.portal.application;
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.web.AbstractHttpSessionListener;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
-import org.exoplatform.web.WebAppController;
import javax.servlet.http.HttpSessionEvent;
+import javax.servlet.http.HttpSessionListener;
/**
+ * This session listener was created for purpose of expiring the portal session stored in the StateManager
+ * and removes the WindowInfos object from the WindowInfosContainer container
+ * <p>
* Created by The eXo Platform SAS
* Date: Jan 25, 2003
* Time: 5:25:52 PM
+ *
+ * @deprecated Currently we do not store anything outside of the session,
+ * that's why we do not need to clean anything when a session is destroyed.
*/
-public class PortalSessionListener extends AbstractHttpSessionListener
+@Deprecated
+public class PortalSessionListener implements HttpSessionListener
{
- protected static Log log = ExoLogger.getLogger("portal:PortalSessionListener");
+ protected static Log log = ExoLogger.getLogger("portal.PortalSessionListener");
public PortalSessionListener()
{
+ log.debug("This session listener is not useful anymore and it is left empty for now to be compatible with older versions");
}
@Override
- protected void onSessionDestroyed(ExoContainer container, HttpSessionEvent event)
+ public void sessionCreated(HttpSessionEvent se)
{
}
@@ -63,29 +68,7 @@
*
*/
@Override
- protected void onSessionCreated(ExoContainer container, HttpSessionEvent event)
+ public void sessionDestroyed(HttpSessionEvent se)
{
- try
- {
- if (log.isInfoEnabled())
- log.info("Destroy session from '" + container == null ? "unknown" : ((PortalContainer)container).getName()
- + "' portal");
- WebAppController controller = (WebAppController)container.getComponentInstanceOfType(WebAppController.class);
- PortalApplication portalApp = controller.getApplication(PortalApplication.PORTAL_APPLICATION_ID);
- portalApp.getStateManager().expire(event.getSession().getId(), portalApp);
- }
- catch (Exception ex)
- {
- log.error("Error while destroying a portal session", ex);
- }
}
-
- /**
- * @see org.exoplatform.container.web.AbstractHttpSessionListener#requirePortalEnvironment()
- */
- @Override
- protected boolean requirePortalEnvironment()
- {
- return true;
- }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -260,25 +260,6 @@
}
}
- @Override
- public boolean isRendered()
- {
- try
- {
- DataStorage service = getApplicationComponent(DataStorage.class);
- service.load(state, ApplicationType.GADGET);
- if (getApplication() == null)
- {
- throw new Exception();
- }
- }
- catch (Exception e)
- {
- return false;
- }
- return super.isRendered();
- }
-
public boolean isLossData()
{
try
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletForm.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -22,8 +22,8 @@
import org.exoplatform.commons.utils.ExceptionUtil;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.pc.ExoPortletState;
-import org.exoplatform.portal.pom.spi.portlet.Preference;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
+import org.exoplatform.portal.pom.spi.portlet.Preference;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.exoplatform.portal.pom.spi.wsrp.WSRPPortletStateType;
import org.exoplatform.portal.portlet.PortletExceptionHandleService;
@@ -45,22 +45,15 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.form.UIFormCheckBoxInput;
-import org.exoplatform.webui.form.UIFormInputIconSelector;
-import org.exoplatform.webui.form.UIFormInputInfo;
-import org.exoplatform.webui.form.UIFormInputSet;
-import org.exoplatform.webui.form.UIFormStringInput;
-import org.exoplatform.webui.form.UIFormTabPane;
-import org.exoplatform.webui.form.UIFormTextAreaInput;
+import org.exoplatform.webui.form.*;
import org.exoplatform.webui.form.validator.ExpressionValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
import org.exoplatform.webui.form.validator.StringLengthValidator;
import org.exoplatform.webui.organization.UIListPermissionSelector;
import org.exoplatform.webui.organization.UIListPermissionSelector.EmptyIteratorValidator;
import org.gatein.pc.api.Mode;
-import org.gatein.pc.api.PortletContext;
-import org.gatein.pc.api.PortletInvoker;
import org.gatein.pc.api.StatefulPortletContext;
+import org.gatein.pc.api.info.PreferenceInfo;
import org.gatein.pc.api.invocation.RenderInvocation;
import org.gatein.pc.api.invocation.response.ErrorResponse;
import org.gatein.pc.api.invocation.response.FragmentResponse;
@@ -68,23 +61,12 @@
import org.gatein.pc.api.spi.InstanceContext;
import org.gatein.pc.api.state.AccessMode;
import org.gatein.pc.api.state.PropertyChange;
-import org.gatein.pc.portlet.impl.spi.AbstractClientContext;
-import org.gatein.pc.portlet.impl.spi.AbstractPortalContext;
-import org.gatein.pc.portlet.impl.spi.AbstractSecurityContext;
-import org.gatein.pc.portlet.impl.spi.AbstractServerContext;
-import org.gatein.pc.portlet.impl.spi.AbstractUserContext;
-import org.gatein.pc.portlet.impl.spi.AbstractWindowContext;
+import org.gatein.pc.portlet.impl.spi.*;
import javax.portlet.PortletMode;
import javax.servlet.http.Cookie;
+import java.util.*;
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.List;
-import java.util.ResourceBundle;
-
/** Author : Nhu Dinh Thuan nhudinhthuan(a)yahoo.com Jun 8, 2006 */
@ComponentConfigs({
@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/portal/webui/portal/UIPortletForm.gtmpl", events = {
@@ -115,7 +97,7 @@
addValidator(MandatoryValidator.class).setEditable(false)).
addUIFormInput(new UIFormStringInput("windowId", "windowId", null).setEditable(false)).*/
addUIFormInput(new UIFormInputInfo("displayName", "displayName", null)).addUIFormInput(
- new UIFormStringInput("title", "title", null).addValidator(StringLengthValidator.class, 3, 60).addValidator(ExpressionValidator.class, "[^\\<\\>]*",
+ new UIFormStringInput("title", "title", null).addValidator(StringLengthValidator.class, 3, 60).addValidator(ExpressionValidator.class, "[^\\<\\>]*",
"UIPortletForm.msg.InvalidPortletTitle"))
.addUIFormInput(
new UIFormStringInput("width", "width", null).addValidator(ExpressionValidator.class, "(^([1-9]\\d*)px$)?",
@@ -226,7 +208,7 @@
{
content = fragmentResponse.getContent();
}
-
+
}
else
{
@@ -262,7 +244,7 @@
}
portletContent.setLength(0);
-
+
portletContent.append(content);
}
catch (Throwable ex)
@@ -288,40 +270,59 @@
getChild(UIFormInputIconSelector.class).setSelectedIcon(icon);
getChild(UIFormInputThemeSelector.class).getChild(UIItemThemeSelector.class).setSelectedTheme(
uiPortlet.getSuitedTheme(null));
- WebuiRequestContext contextres = WebuiRequestContext.getCurrentInstance();
- ResourceBundle res = contextres.getApplicationResourceBundle();
if (hasEditMode())
{
uiPortlet.setCurrentPortletMode(PortletMode.EDIT);
}
else
{
+ Map<String, String> portletPreferenceMaps = new HashMap<String, String>();
+ org.gatein.pc.api.Portlet portlet = uiPortlet.getProducedOfferedPortlet();
+ Set<String> keySet = portlet.getInfo().getPreferences().getKeys();
- //
+ for (String key : keySet)
+ {
+ PreferenceInfo preferenceInfo = portlet.getInfo().getPreferences().getPreference(key);
+ if (!preferenceInfo.isReadOnly())
+ {
+ String ppValue = (preferenceInfo.getDefaultValue().size() > 0) ? preferenceInfo.getDefaultValue().get
+ (0) : "";
+ portletPreferenceMaps.put(key, ppValue);
+ }
+ }
+
Portlet pp = uiPortlet.getPreferences();
if (pp != null)
{
- UIFormInputSet uiPortletPrefSet = getChildById(FIELD_PORTLET_PREF);
- uiPortletPrefSet.getChildren().clear();
for (Preference pref : pp)
{
if (!pref.isReadOnly())
{
- UIFormStringInput templateStringInput =
- new UIFormStringInput(pref.getName(), null, pref.getValues().get(0));
- templateStringInput.setLabel(res.getString("UIPortletForm.tab.label.Template"));
- templateStringInput.addValidator(MandatoryValidator.class);
- uiPortletPrefSet.addUIFormInput(templateStringInput);
+ portletPreferenceMaps.put(pref.getName(), (pref.getValues().size() > 0) ? pref.getValues().get(0) :
+ "");
}
-
}
- if (uiPortletPrefSet.getChildren().size() > 0)
+ }
+
+ if (portletPreferenceMaps.size() > 0)
+ {
+ Set<String> ppKeySet = portletPreferenceMaps.keySet();
+ UIFormInputSet uiPortletPrefSet = getChildById(FIELD_PORTLET_PREF);
+ uiPortletPrefSet.getChildren().clear();
+ for (String ppKey : ppKeySet)
{
- uiPortletPrefSet.setRendered(true);
- setSelectedTab(FIELD_PORTLET_PREF);
- return;
+ String ppValue = portletPreferenceMaps.get(ppKey);
+ UIFormStringInput preferenceStringInput = new UIFormStringInput(ppKey, null, ppValue);
+ preferenceStringInput.setLabel(ppKey);
+ preferenceStringInput.addValidator(MandatoryValidator.class);
+ uiPortletPrefSet.addUIFormInput(preferenceStringInput);
}
+
+ uiPortletPrefSet.setRendered(true);
+ setSelectedTab(FIELD_PORTLET_PREF);
+ return;
}
+
setSelectedTab("PortletSetting");
}
}
@@ -336,12 +337,6 @@
return;
}
- //
- PortletInvoker portletInvoker = getApplicationComponent(PortletInvoker.class);
- PortletContext portletContext = uiPortlet_.getPortletContext();
-
- //
-
PropertyChange[] propertyChanges = new PropertyChange[uiFormInputs.size()];
for (int i = 0; i < uiFormInputs.size(); i++)
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -414,7 +414,7 @@
if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
return;
ResourceBundle res =
- i18nManager.getNavigationResourceBundle(locale.getLanguage(), nav.getOwnerType(), nav.getOwnerId());
+ i18nManager.getNavigationResourceBundle(locale.toString(), nav.getOwnerType(), nav.getOwnerId());
for (PageNode node : nav.getNodes())
{
resolveLabel(res, node);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UINavigationNodeSelector.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -150,8 +150,9 @@
*/
public void initTreeData() throws Exception
{
- WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
- localizeNavigation(requestContext.getLocale());
+// Move this to processRender method because of GTNPORTAL-1739
+// WebuiRequestContext requestContext = WebuiRequestContext.getCurrentInstance();
+// localizeNavigation(requestContext.getLocale());
initEdittedTreeNodeData();
}
@@ -294,6 +295,8 @@
public void processRender(WebuiRequestContext context) throws Exception
{
+ localizeNavigation(context.getLocale());
+
UIRightClickPopupMenu uiPopupMenu = getChild(UIRightClickPopupMenu.class);
if (uiPopupMenu != null)
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -21,12 +21,16 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.portal.Constants;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.webui.workspace.UIMaskWorkspace;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
+import org.exoplatform.services.organization.OrganizationService;
+import org.exoplatform.services.organization.UserProfile;
import org.exoplatform.services.resources.LocaleConfig;
import org.exoplatform.services.resources.LocaleConfigService;
+import org.exoplatform.services.resources.LocaleContextInfo;
import org.exoplatform.services.resources.ResourceBundleService;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -163,24 +167,54 @@
public void execute(Event<UILanguageSelector> event) throws Exception
{
String language = event.getRequestContext().getRequestParameter("language");
+ PortalRequestContext prqCtx = PortalRequestContext.getCurrentInstance();
UIPortalApplication uiApp = Util.getUIPortalApplication();
UIMaskWorkspace uiMaskWS = uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.setUIComponent(null);
// event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS) ;
- Util.getPortalRequestContext().ignoreAJAXUpdateOnPortlets(false);
- if (language == null || language.trim().length() < 1)
+ prqCtx.ignoreAJAXUpdateOnPortlets(false);
+
+ if (language == null || language.trim().equals(prqCtx.getLocale().getLanguage()))
+ {
+ //LocalizationLifecycle will save userProfile if locale is changed
+ //We need to handle case : locale is not changed, but user's locale setting has not been initialized
+ if (prqCtx.getRemoteUser() != null)
+ {
+ saveLocaleToUserProfile(prqCtx);
+ }
return;
+ }
// if(!uiPortal.isModifiable()) return;
LocaleConfigService localeConfigService = event.getSource().getApplicationComponent(LocaleConfigService.class);
LocaleConfig localeConfig = localeConfigService.getLocaleConfig(language);
if (localeConfig == null)
localeConfig = localeConfigService.getDefaultLocaleConfig();
- PortalRequestContext prqCtx = PortalRequestContext.getCurrentInstance();
prqCtx.setLocale(localeConfig.getLocale());
//uiApp.setOrientation(localeConfig.getOrientation());
//uiApp.localizeNavigations();
}
+
+ private void saveLocaleToUserProfile(PortalRequestContext context) throws Exception
+ {
+ ExoContainer container = context.getApplication().getApplicationServiceContainer();
+ OrganizationService svc = (OrganizationService)
+ container.getComponentInstanceOfType(OrganizationService.class);
+
+ // Don't rely on UserProfileLifecycle loaded UserProfile when doing
+ // an update to avoid a potential overwrite of other changes
+ UserProfile userProfile = svc.getUserProfileHandler().findUserProfileByName(context.getRemoteUser());
+ if (userProfile != null && userProfile.getUserInfoMap() != null)
+ {
+ //Only save if user's locale has not been set
+ String currLocale = userProfile.getUserInfoMap().get(Constants.USER_LANGUAGE);
+ if (currLocale == null || currLocale.trim().equals(""))
+ {
+ userProfile.getUserInfoMap().put(Constants.USER_LANGUAGE, LocaleContextInfo.getLocaleAsString(context.getLocale()));
+ svc.getUserProfileHandler().saveUserProfile(userProfile, false);
+ }
+ }
+ }
}
private String capitalizeFirstLetter(String word)
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-01-26 11:48:32 UTC (rev 5820)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-01-27 03:56:42 UTC (rev 5821)
@@ -382,7 +382,7 @@
ResourceBundleManager mgr = getApplicationComponent(ResourceBundleManager.class);
if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
return;
- ResourceBundle res = mgr.getNavigationResourceBundle(locale.getLanguage(), nav.getOwnerType(), nav.getOwnerId());
+ ResourceBundle res = mgr.getNavigationResourceBundle(locale.toString(), nav.getOwnerType(), nav.getOwnerId());
for (PageNode node : nav.getNodes())
{
resolveLabel(res, node);
13 years, 11 months
gatein SVN: r5820 - in components/wsrp/trunk/producer/src: test/java/org/gatein/wsrp/producer/config and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-01-26 06:48:32 -0500 (Wed, 26 Jan 2011)
New Revision: 5820
Modified:
components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java
Log:
- GTNWSRP-198: Fixed improper check to see if we need to reload the RegistrationPolicy. Added related tests.
Modified: components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java
===================================================================
--- components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2011-01-26 11:47:35 UTC (rev 5819)
+++ components/wsrp/trunk/producer/src/main/java/org/gatein/wsrp/producer/config/impl/ProducerRegistrationRequirementsImpl.java 2011-01-26 11:48:32 UTC (rev 5820)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -358,12 +358,8 @@
{
// only reload if we don't already have a policy or if the requested policy/validator classes are different
// from the ones we already have
- if (
- policy == null ||
- (
- ParameterValidation.isOldAndNewDifferent(this.policyClassName, policyClassName) &&
- ParameterValidation.isOldAndNewDifferent(this.validatorClassName, validatorClassName)
- )
+ if (policy == null || ParameterValidation.isOldAndNewDifferent(this.policyClassName, policyClassName) ||
+ (DEFAULT_POLICY_CLASS_NAME.equals(policyClassName) && ParameterValidation.isOldAndNewDifferent(this.validatorClassName, validatorClassName))
)
{
if (policyClassName != null && !DEFAULT_POLICY_CLASS_NAME.equals(policyClassName))
Modified: components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java
===================================================================
--- components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java 2011-01-26 11:47:35 UTC (rev 5819)
+++ components/wsrp/trunk/producer/src/test/java/org/gatein/wsrp/producer/config/ProducerRegistrationRequirementsTestCase.java 2011-01-26 11:48:32 UTC (rev 5820)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -27,6 +27,8 @@
import org.gatein.registration.RegistrationPolicy;
import org.gatein.registration.RegistrationPolicyChangeListener;
import org.gatein.registration.RegistrationPropertyChangeListener;
+import org.gatein.registration.policies.DefaultRegistrationPolicy;
+import org.gatein.registration.policies.RegistrationPolicyWrapper;
import org.gatein.wsrp.WSRPConstants;
import org.gatein.wsrp.producer.config.impl.ProducerRegistrationRequirementsImpl;
import org.gatein.wsrp.registration.PropertyDescription;
@@ -68,6 +70,20 @@
assertTrue(requirements.getLastModified() > lastModified);
}
+ public void testChangeRegistrationPolicy()
+ {
+ ProducerRegistrationRequirements requirements = new ProducerRegistrationRequirementsImpl();
+ requirements.setRegistrationRequired(true); // so that we load the policy
+ assertTrue(requirements.getPolicy() instanceof DefaultRegistrationPolicy);
+
+ requirements.reloadPolicyFrom("org.gatein.wsrp.producer.config.TestRegistrationPolicy", ProducerRegistrationRequirements.DEFAULT_VALIDATOR_CLASS_NAME);
+
+ RegistrationPolicy policy = requirements.getPolicy();
+ assertTrue(policy instanceof RegistrationPolicyWrapper);
+ RegistrationPolicyWrapper wrapper = (RegistrationPolicyWrapper)policy;
+ assertTrue(wrapper.getDelegate() instanceof TestRegistrationPolicy);
+ }
+
public void testSetUnchangedRegistrationProperties()
{
ProducerRegistrationRequirements requirements = new ProducerRegistrationRequirementsImpl();
13 years, 11 months