Author: theute
Date: 2011-07-18 10:06:00 -0400 (Mon, 18 Jul 2011)
New Revision: 6880
Added:
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/GlobalPortletMetaData.java
epp/portal/branches/EPP_5_2_Branch/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/portlet.xml
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationMonitoringFilter.java
Removed:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jboss.properties
epp/portal/branches/EPP_5_2_Branch/component/pc/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/assemble.xml
epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/DashboardPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/TabbedDashboardPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/gadget/GadgetPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AccountPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AdminToolbarPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/ApplicationRegistryPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/GroupNavigationPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/OrganizationPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PageManagementPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PortalNavigationPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/RegisterPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/StarToolbarPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserInfoPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarDashboardPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarGroupPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarSitePortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BannerPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BreadcumbsPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FCKEditorPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FooterPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/HomePagePortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/IFramePortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LoginPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LogoPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/NavigationPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/PortalNavigationPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/SitemapPortlet/webui/configuration.xml
epp/portal/branches/EPP_5_2_Branch/settings-all.xml
Log:
JBEPP-937: EPP52-EID_105: Global portlet.xml
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6452,6573
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6437,6440,6452,6573
Modified:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jboss.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jboss.properties 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jboss.properties 2011-07-18
14:06:00 UTC (rev 6880)
@@ -17,7 +17,8 @@
# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
#
-# Data
+#
+gatein.conf.dir=${jboss.server.home.dir}/conf/gatein
gatein.data.dir=${jboss.server.data.dir}/gatein
# DB
@@ -50,3 +51,5 @@
gatein.email.smtp.socketFactory.port=465
gatein.email.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
+# Global portlet.xml
+gatein.portlet.config=${gatein.conf.dir}/portlet.xml
Deleted:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties 2011-07-18
14:06:00 UTC (rev 6880)
@@ -1,62 +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.
-#
-
-# 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=gatein-jcr
-gatein.jcr.datasource.dialect=auto
-gatein.jcr.datasource.driver=org.hsqldb.jdbcDriver
-gatein.jcr.datasource.url=jdbc:hsqldb:file:${gatein.db.data.dir}/data/gatein-jcr_${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: epp/portal/branches/EPP_5_2_Branch/component/pc/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/pc/pom.xml 2011-07-18 13:04:18 UTC (rev
6879)
+++ epp/portal/branches/EPP_5_2_Branch/component/pc/pom.xml 2011-07-18 14:06:00 UTC (rev
6880)
@@ -38,6 +38,10 @@
<artifactId>exo.portal.component.resources</artifactId>
</dependency>
<dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.common</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.gatein.common</groupId>
<artifactId>common-common</artifactId>
</dependency>
Modified:
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/ExoPortletApplicationDeployer.java 2011-07-18
14:06:00 UTC (rev 6880)
@@ -19,20 +19,31 @@
package org.exoplatform.portal.pc;
+import org.exoplatform.commons.utils.PropertyManager;
+import org.exoplatform.commons.utils.Safe;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
import org.gatein.pc.mc.PortletApplicationDeployer;
import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
import org.gatein.wci.WebApp;
+import org.jboss.xb.binding.JBossXBException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
/**
- * Extends the {@link org.gatein.pc.mc.PortletApplicationDeployer} to configure the
resource bundle factory
- * of deployed portlet applications. The resource bundle factory used is
- * {@link org.exoplatform.portal.pc.ExoResourceBundleFactory}.
+ * Extends the {@link org.gatein.pc.mc.PortletApplicationDeployer} to inject
configuration metadata
+ * from global portlet.xml and to configure the resource bundle factory of deployed
portlet
+ * applications. The resource bundle factory used is {@link
org.exoplatform.portal.pc.ExoResourceBundleFactory}.
*
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
public class ExoPortletApplicationDeployer extends PortletApplicationDeployer
{
+ private final Logger log =
LoggerFactory.getLogger(ExoPortletApplicationDeployer.class);
@Override
protected PortletApplication10MetaData buildPortletApplicationMetaData(WebApp webApp)
@@ -41,7 +52,58 @@
if (md != null)
{
md.setResourceBundleFactoryName(ExoResourceBundleFactory.class.getName());
+
+ String globalPortletLocation =
PropertyManager.getProperty("gatein.portlet.config");
+ if (globalPortletLocation != null)
+ {
+ try
+ {
+ GlobalPortletMetaData globalPortletMetaData =
loadGlobalMetadata(globalPortletLocation);
+ globalPortletMetaData.mergeTo(md);
+ if (log.isDebugEnabled())
+ {
+ log.debug("Complete merging global portlet metadata to portlet
application "
+ + webApp.getServletContext().getServletContextName());
+ }
+ }
+ catch (Exception ex)
+ {
+ if (log.isErrorEnabled())
+ {
+ log.error("Error during merge global portlet metadata to portlet
application "
+ + webApp.getServletContext().getServletContextName(), ex);
+ }
+ }
+ }
+ else
+ {
+ log.warn("The global portlet metadata is not configured");
+ }
+
}
return md;
}
+
+ /**
+ * This method is invoked for each portlet application deployment. That is necessary
for the moment
+ * to ensure independence between portlet applications
+ *
+ * @return
+ * @throws FileNotFoundException
+ * @throws JBossXBException
+ */
+ private GlobalPortletMetaData loadGlobalMetadata(String globalPortletLocation) throws
FileNotFoundException,
+ JBossXBException
+ {
+ //TODO: Avoid using File
+ InputStream in = new FileInputStream(new File(globalPortletLocation));
+ try
+ {
+ return GlobalPortletMetaData.unmarshalling(in);
+ }
+ finally
+ {
+ Safe.close(in);
+ }
+ }
}
Copied:
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/GlobalPortletMetaData.java
(from rev 6437,
portal/trunk/component/pc/src/main/java/org/exoplatform/portal/pc/GlobalPortletMetaData.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/GlobalPortletMetaData.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/component/pc/src/main/java/org/exoplatform/portal/pc/GlobalPortletMetaData.java 2011-07-18
14:06:00 UTC (rev 6880)
@@ -0,0 +1,151 @@
+/*
+ * Copyright (C) 2011 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.pc;
+
+import org.gatein.pc.mc.metadata.factory.PortletApplicationModelFactory;
+import org.gatein.pc.mc.metadata.impl.ValueTrimmingFilter;
+import org.gatein.pc.portlet.impl.metadata.PortletApplication10MetaData;
+import org.gatein.pc.portlet.impl.metadata.PortletApplication20MetaData;
+import org.gatein.pc.portlet.impl.metadata.filter.FilterMappingMetaData;
+import org.gatein.pc.portlet.impl.metadata.filter.FilterMetaData;
+import org.jboss.xb.binding.JBossXBException;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="hoang281283(a)gmail.com">Minh Hoang TO</a>
+ * @date 3/31/11
+ */
+public class GlobalPortletMetaData
+{
+ private PortletApplication10MetaData wrappedMetaData;
+
+ public GlobalPortletMetaData(PortletApplication10MetaData _wrappedMetaData)
+ {
+ this.wrappedMetaData = _wrappedMetaData;
+ }
+
+ public PortletApplication10MetaData mergeTo(PortletApplication10MetaData
tobeMergedMetaData)
+ {
+ if(wrappedMetaData.getCustomPortletModes() != null)
+ {
+
tobeMergedMetaData.getCustomPortletModes().putAll(wrappedMetaData.getCustomPortletModes());
+ }
+
+ if(wrappedMetaData.getCustomWindowStates() != null)
+ {
+
tobeMergedMetaData.getCustomWindowStates().putAll(wrappedMetaData.getCustomWindowStates());
+ }
+
+ if(tobeMergedMetaData instanceof PortletApplication20MetaData &&
wrappedMetaData instanceof PortletApplication20MetaData)
+ {
+ return merge20MetData((PortletApplication20MetaData)wrappedMetaData,
(PortletApplication20MetaData)tobeMergedMetaData);
+ }
+
+ return tobeMergedMetaData;
+
+ }
+
+ public PortletApplication10MetaData merge20MetData(PortletApplication20MetaData
globalMetaData, PortletApplication20MetaData tobeMergedMetaData)
+ {
+ mergeFilterMetaData(globalMetaData, tobeMergedMetaData);
+ mergeFilterMapping(globalMetaData, tobeMergedMetaData);
+ mergePublicRenderParameters(globalMetaData, tobeMergedMetaData);
+
+ return tobeMergedMetaData;
+ }
+
+ private void mergeFilterMetaData(PortletApplication20MetaData globalMetaData,
PortletApplication20MetaData tobeMergedMetaData)
+ {
+ Map<String, FilterMetaData> globalFilters = globalMetaData.getFilters();
+ Map<String, FilterMetaData> applicationFilters =
tobeMergedMetaData.getFilters();
+
+ if(globalFilters != null)
+ {
+ if(applicationFilters == null)
+ {
+ tobeMergedMetaData.setFilters(globalFilters);
+ return;
+ }
+
+ applicationFilters.putAll(globalFilters);
+ tobeMergedMetaData.setFilters(applicationFilters);
+ }
+ }
+
+
+ private void mergeFilterMapping(PortletApplication20MetaData globalMetaData,
PortletApplication20MetaData tobeMergedMetaData)
+ {
+ List<FilterMappingMetaData> applicationFilterMappings =
tobeMergedMetaData.getFilterMapping();
+ if(applicationFilterMappings == null)
+ {
+ applicationFilterMappings = new ArrayList<FilterMappingMetaData>(3);
+ }
+
+ Map<String, FilterMetaData> globalFilters = globalMetaData.getFilters();
+ if(globalFilters == null)
+ {
+ return;
+ }
+ else
+ {
+ //TODO: Ensure there is no duplicated filter mapping
+ for(String filterName : globalFilters.keySet())
+ {
+ FilterMappingMetaData filterMapping = new FilterMappingMetaData();
+ filterMapping.setName(filterName);
+
+ //TODO: Use this list, examine if there is a bug in PC on the instantiation
of filter mappings
+ //List<String> portletsApplyingThisGlobalFilter =
findPortletsApplyingGlobalFilter(globalFilters.get(filterName), tobeMergedMetaData);
+
+ List<String> portletsApplyingThisGlobalFilter = new
ArrayList<String>(3);
+ portletsApplyingThisGlobalFilter.add("*");
+ filterMapping.setPortletNames(portletsApplyingThisGlobalFilter);
+ applicationFilterMappings.add(filterMapping);
+ }
+
+ tobeMergedMetaData.setFilterMapping(applicationFilterMappings);
+ }
+
+ }
+
+ private void mergePublicRenderParameters(PortletApplication20MetaData globalMetaData,
PortletApplication20MetaData tobeMergedMetaData)
+ {
+ //TODO: Wait for the spec of merging public render parameters
+ }
+
+ public static GlobalPortletMetaData unmarshalling(InputStream in) throws
JBossXBException
+ {
+ Unmarshaller unmarshaller = UnmarshallerFactory.newInstance().newUnmarshaller();
+ unmarshaller.setNamespaceAware(true);
+ unmarshaller.setSchemaValidation(false);
+ unmarshaller.setValidation(false);
+
+ PortletApplicationModelFactory factory = new PortletApplicationModelFactory();
+
+ PortletApplication10MetaData application10MetaData =
(PortletApplication10MetaData)unmarshaller.unmarshal(in, new ValueTrimmingFilter(factory),
null);
+
+ return new GlobalPortletMetaData(application10MetaData);
+ }
+}
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/assemble.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/assemble.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/assemble.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -28,6 +28,10 @@
<directory>src/main/resources/deploy</directory>
<outputDirectory>deploy</outputDirectory>
</fileSet>
+ <fileSet>
+ <directory>src/main/resources/conf</directory>
+ <outputDirectory>conf</outputDirectory>
+ </fileSet>
</fileSets>
<moduleSets>
@@ -69,4 +73,4 @@
</dependencySets>
-</assembly>
\ No newline at end of file
+</assembly>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml 2011-07-18 13:04:18 UTC (rev
6879)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/pom.xml 2011-07-18 14:06:00 UTC (rev
6880)
@@ -15,7 +15,7 @@
<name>Distribution</name>
<properties>
- <eap.version>5.1.1.ER2</eap.version>
+ <eap.version>5.1.1.CR1</eap.version>
<eap.groupId>org.jboss.jbossas</eap.groupId>
<eap.dir>jboss-eap-5.1</eap.dir>
<epp.dir>jboss-epp-5.2</epp.dir>
@@ -45,4 +45,4 @@
</modules>
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>
Copied:
epp/portal/branches/EPP_5_2_Branch/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/portlet.xml
(from rev 6452,
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/portlet.xml)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/portlet.xml
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/portlet.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ 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.
+
+-->
+<portlet-app version="1.0"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
+
+ <!-- This filter collects runtime request statistics -->
+ <filter>
+
<filter-name>org.exoplatform.portal.application.ApplicationMonitoringFilter</filter-name>
+
<filter-class>org.exoplatform.portal.application.ApplicationMonitoringFilter</filter-class>
+ <lifecycle>ACTION_PHASE</lifecycle>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ <lifecycle>EVENT_PHASE</lifecycle>
+ <lifecycle>RESOURCE_PHASE</lifecycle>
+ </filter>
+
+</portlet-app>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/DashboardPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/DashboardPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/DashboardPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.dashboard.webui.component.UIDashboardPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/TabbedDashboardPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/TabbedDashboardPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/dashboard/TabbedDashboardPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.dashboard.webui.component.UITabbedDashboardPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/gadget/GadgetPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/gadget/GadgetPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/dashboard/src/main/webapp/WEB-INF/conf/portlet/gadget/GadgetPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.gadget.webui.component.UIGadgetPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AccountPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AccountPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AccountPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.account.webui.component.UIAccountPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AdminToolbarPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AdminToolbarPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/AdminToolbarPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIAdminToolbarPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/ApplicationRegistryPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/ApplicationRegistryPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/ApplicationRegistryPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.applicationregistry.webui.component.UIApplicationRegistryPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/GroupNavigationPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/GroupNavigationPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/GroupNavigationPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.navigation.webui.component.UIGroupNavigationPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/OrganizationPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/OrganizationPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/OrganizationPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.organization.webui.component.UIOrganizationPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PageManagementPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PageManagementPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PageManagementPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.navigation.webui.component.UIPageManagementPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PortalNavigationPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PortalNavigationPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/PortalNavigationPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.navigation.webui.component.UIPortalNavigationPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/RegisterPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/RegisterPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/RegisterPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.account.webui.component.UIRegisterPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/StarToolbarPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/StarToolbarPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/StarToolbarPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIStarToolbarPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserInfoPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserInfoPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserInfoPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIUserInfoPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarDashboardPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarDashboardPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarDashboardPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIUserToolBarDashboardPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarGroupPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarGroupPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarGroupPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIUserToolBarGroupPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIUserToolBarPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarSitePortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarSitePortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/WEB-INF/conf/portlet/exoadmin/UserToolbarSitePortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.toolbar.webui.component.UIUserToolBarSitePortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BannerPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BannerPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BannerPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -30,7 +30,6 @@
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
- </application-lifecycle-listeners>
+ </application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BreadcumbsPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BreadcumbsPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/BreadcumbsPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.component.UIBreadcumbsPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FCKEditorPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FCKEditorPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FCKEditorPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.fck.webui.component.UIFCKEditorPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FooterPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FooterPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/FooterPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -29,7 +29,6 @@
<ui-component-root>org.exoplatform.portal.webui.application.UIGroovyPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/HomePagePortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/HomePagePortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/HomePagePortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.application.UIGroovyPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/IFramePortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/IFramePortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/IFramePortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.component.UIIFramePortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LoginPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LoginPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LoginPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -27,7 +27,6 @@
<ui-component-root>org.exoplatform.groovy.webui.component.UILoginPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LogoPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LogoPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/LogoPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.component.UILogoPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/NavigationPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/NavigationPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/NavigationPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.component.UINavigationPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/PortalNavigationPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/PortalNavigationPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/PortalNavigationPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.component.UIPortalNavigationPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/SitemapPortlet/webui/configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/SitemapPortlet/webui/configuration.xml 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/WEB-INF/conf/portlet/web/SitemapPortlet/webui/configuration.xml 2011-07-18
14:06:00 UTC (rev 6880)
@@ -24,7 +24,6 @@
<ui-component-root>org.exoplatform.portal.webui.component.UISitemapPortlet</ui-component-root>
<state-manager>org.exoplatform.webui.application.portlet.ParentAppStateManager</state-manager>
<application-lifecycle-listeners>
-
<listener>org.exoplatform.portal.application.PortletStatisticLifecycle</listener>
</application-lifecycle-listeners>
</application>
</webui-configuration>
Modified: epp/portal/branches/EPP_5_2_Branch/settings-all.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/settings-all.xml 2011-07-18 13:04:18 UTC (rev
6879)
+++ epp/portal/branches/EPP_5_2_Branch/settings-all.xml 2011-07-18 14:06:00 UTC (rev
6880)
@@ -16,8 +16,9 @@
<!--pluginGroups>
<pluginGroup>org.codehaus.mojo</pluginGroup>
</pluginGroups-->
+<!--
<localRepository>${env.HOME}/.m2_EPP</localRepository>
-
+-->
<profiles>
<profile>
<id>my-jboss-maven2</id>
Copied:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationMonitoringFilter.java
(from rev 6437,
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationMonitoringFilter.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationMonitoringFilter.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationMonitoringFilter.java 2011-07-18
14:06:00 UTC (rev 6880)
@@ -0,0 +1,120 @@
+package org.exoplatform.portal.application;
+
+import org.exoplatform.container.PortalContainer;
+
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import javax.portlet.EventRequest;
+import javax.portlet.EventResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletException;
+import javax.portlet.PortletRequest;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
+import javax.portlet.filter.ActionFilter;
+import javax.portlet.filter.EventFilter;
+import javax.portlet.filter.FilterChain;
+import javax.portlet.filter.FilterConfig;
+import javax.portlet.filter.RenderFilter;
+import javax.portlet.filter.ResourceFilter;
+import java.io.IOException;
+
+/**
+ * @author <a href="hoang281283(a)gmail.com">Minh Hoang TO</a>
+ * @date 4/5/11
+ */
+public class ApplicationMonitoringFilter implements ActionFilter, RenderFilter,
EventFilter, ResourceFilter
+{
+
+ public void init(FilterConfig cfg) throws PortletException
+ {
+ }
+
+ public void destroy()
+ {
+ }
+
+ public void doFilter(ActionRequest req, ActionResponse resp, FilterChain chain) throws
IOException, PortletException
+ {
+ ApplicationStatistic stat = get(req);
+ if (stat != null)
+ {
+ long t = -System.currentTimeMillis();
+ chain.doFilter(req, resp);
+ t += System.currentTimeMillis();
+ stat.logTime(t);
+ }
+ else
+ {
+ chain.doFilter(req, resp);
+ }
+ }
+
+ public void doFilter(EventRequest req, EventResponse resp, FilterChain chain) throws
IOException, PortletException
+ {
+ ApplicationStatistic stat = get(req);
+ if (stat != null)
+ {
+ long t = -System.currentTimeMillis();
+ chain.doFilter(req, resp);
+ t += System.currentTimeMillis();
+ stat.logTime(t);
+ }
+ else
+ {
+ chain.doFilter(req, resp);
+ }
+ }
+
+ public void doFilter(RenderRequest req, RenderResponse resp, FilterChain chain) throws
IOException, PortletException
+ {
+ ApplicationStatistic stat = get(req);
+ if (stat != null)
+ {
+ long t = -System.currentTimeMillis();
+ chain.doFilter(req, resp);
+ t += System.currentTimeMillis();
+ stat.logTime(t);
+ }
+ else
+ {
+ chain.doFilter(req, resp);
+ }
+ }
+
+ public void doFilter(ResourceRequest req, ResourceResponse resp, FilterChain chain)
throws IOException, PortletException
+ {
+ ApplicationStatistic stat = get(req);
+ if (stat != null)
+ {
+ long t = -System.currentTimeMillis();
+ chain.doFilter(req, resp);
+ t += System.currentTimeMillis();
+ stat.logTime(t);
+ }
+ else
+ {
+ chain.doFilter(req, resp);
+ }
+ }
+
+ private ApplicationStatistic get(PortletRequest req) throws IOException,
PortletException
+ {
+ PortalContainer container = PortalContainer.getInstance();
+ ApplicationStatisticService service =
(ApplicationStatisticService)container.getComponentInstance(ApplicationStatisticService.class);
+ if (service != null)
+ {
+ PortletConfig portletConfig =
(PortletConfig)req.getAttribute("javax.portlet.config");
+ String portletName = portletConfig.getPortletName();
+ String phase = (String)req.getAttribute(PortletRequest.LIFECYCLE_PHASE);
+ String applicationId = portletName + "/" + phase;
+ return service.getApplicationStatistic(applicationId);
+ }
+ else
+ {
+ return null;
+ }
+ }
+}
Deleted:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java 2011-07-18
13:04:18 UTC (rev 6879)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/application/PortletStatisticLifecycle.java 2011-07-18
14:06:00 UTC (rev 6880)
@@ -1,67 +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.portal.application;
-
-import org.exoplatform.web.application.Application;
-import org.exoplatform.web.application.ApplicationLifecycle;
-import org.exoplatform.web.application.RequestFailure;
-import org.exoplatform.webui.application.WebuiRequestContext;
-
-public class PortletStatisticLifecycle implements
ApplicationLifecycle<WebuiRequestContext>
-{
-
- private static final String ATTRIBUTE_NAME = "AppStatistic";
-
- @SuppressWarnings("unused")
- public void onInit(Application app)
- {
-
- }
-
- @SuppressWarnings("unused")
- public void onStartRequest(Application app, WebuiRequestContext context) throws
Exception
- {
- app.setAttribute(ATTRIBUTE_NAME, System.currentTimeMillis());
- }
-
- @SuppressWarnings("unused")
- public void onFailRequest(Application app, WebuiRequestContext context, RequestFailure
failureType) throws Exception
- {
-
- }
-
- @SuppressWarnings("unused")
- public void onEndRequest(Application app, WebuiRequestContext context) throws
Exception
- {
- ApplicationStatisticService service =
-
(ApplicationStatisticService)app.getApplicationServiceContainer().getComponentInstanceOfType(
- ApplicationStatisticService.class);
- ApplicationStatistic appStatistic =
service.getApplicationStatistic(app.getApplicationId());
- long startTime = Long.valueOf(app.getAttribute(ATTRIBUTE_NAME).toString());
- appStatistic.logTime(System.currentTimeMillis() - startTime);
- }
-
- @SuppressWarnings("unused")
- public void onDestroy(Application app)
- {
-
- }
-
-}
\ No newline at end of file