Author: hfnukal
Date: 2011-06-28 08:48:20 -0400 (Tue, 28 Jun 2011)
New Revision: 6770
Added:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticManager.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Page.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSerialization.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/portal/portal/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
epp/portal/branches/EPP_5_2_Branch/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
epp/portal/branches/EPP_5_2_Branch/packaging/profiles.xml
epp/portal/branches/EPP_5_2_Branch/pom.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/GroupManagement.java
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/skin/organization/webui/component/UIOrganizationPortlet/DefaultStylesheet.css
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl
epp/portal/branches/EPP_5_2_Branch/settings.xml
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPageBrowser/Stylesheet.css
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl
epp/portal/branches/EPP_5_2_Branch/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java
Log:
JBEPP-970 Cumulative update and merge
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,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/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,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/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206
Copied:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties
(from rev 5822,
portal/trunk/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
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/conf/configuration-jetty.properties 2011-06-28
12:48:20 UTC (rev 6770)
@@ -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:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureExoCache.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -41,6 +41,16 @@
this.cache = cache;
}
+ public void clear()
+ {
+ cache.clearCache();
+ }
+
+ public void remove(K key)
+ {
+ cache.remove(key);
+ }
+
@Override
protected V get(K key)
{
Modified:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticLifeCycle.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -150,7 +150,7 @@
{
return manager;
}
-
+
AbstractContext getLoginContext()
{
Synchronization sync = manager.getSynchronization();
@@ -164,7 +164,7 @@
//
return currentContext.get();
}
-
+
/**
* Returns <code>#getContext(false)</code>.
*
Modified:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticManager.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticManager.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/exoplatform/commons/chromattic/ChromatticManager.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -50,6 +50,10 @@
this.lifeCycleToWorkspaceMap = new HashMap<String, String>();
}
+ public Synchronization getCurrentSynchronization() {
+ return currentSynchronization.get();
+ }
+
public ChromatticLifeCycle getLifeCycle(String lifeCycleName)
{
return lifeCycles.get(lifeCycleName);
Copied:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd
(from rev 6756, portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-06-28
12:48:20 UTC (rev 6770)
@@ -0,0 +1,228 @@
+<?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.
+ -->
+
+<!--
+ DISCLAIMER :
+ - THIS FILE IS NOT YET FINAL AND IS SUBJECT TO CHANGES
+ - IT WILL BE CONSIDERED AS AN API (I.E FINAL) WHEN GATEIN 3.2 WILL BE RELEASED
+ -->
+
+<xs:schema
+
targetNamespace="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- A top page element -->
+ <xs:element name="page" type="pageType"/>
+
+ <!-- A top page-set element -->
+ <xs:element name="page-set" type="pageSetType"/>
+
+ <!-- A top portal-config element -->
+ <xs:element name="portal-config" type="portalConfigType"/>
+
+ <!-- A top container element -->
+ <xs:element name="container" type="containerType"/>
+
+ <!-- A top node-navigation element -->
+ <xs:element name="node-navigation"
type="nodeNavigationType"/>
+
+ <!-- The type of a top navigation node -->
+ <xs:complexType name="nodeNavigationType">
+ <xs:sequence>
+ <xs:element name="priority"
type="xs:positiveInteger"/>
+ <xs:element name="page-nodes" minOccurs="0"
maxOccurs="1">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="node" type="nodeType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The type of a navigation node -->
+ <xs:complexType name="nodeType">
+ <xs:sequence>
+ <xs:element name="uri" type="xs:string"/>
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="label" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="start-publication-date"
type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="end-publication-date" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="visibility" type="visibility"
default="DISPLAYED" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="page-reference" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="node" type="nodeType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:simpleType name="visibility">
+ <xs:restriction base='xs:string'>
+ <xs:enumeration value="DISPLAYED"/>
+ <xs:enumeration value="HIDDEN"/>
+ <xs:enumeration value="TEMPORAL"/>
+ <xs:enumeration value="SYSTEM"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="pageSetType">
+ <xs:sequence>
+ <xs:element name="page" type="pageType"
minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portalConfigType">
+ <xs:sequence>
+ <xs:element name="portal-name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="label" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="description" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="locale" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="edit-permission" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="skin" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="properties" type="propertiesType"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="portal-layout" minOccurs="1"
maxOccurs="1">
+ <xs:complexType>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="propertiesType">
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="entry" type="propertiesEntryType"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="propertiesEntryType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="key" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:group name="containerChildrenGroup">
+ <xs:sequence>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portlet-application"
type="portletApplicationType" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="gadget-application"
type="gadgetApplicationType" minOccurs="1"
maxOccurs="1"/>
+ <xs:element name="container" type="containerType"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="page-body" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="site-body" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ </xs:choice>
+ </xs:sequence>
+ </xs:group>
+
+ <xs:complexType name="pageType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="factory-id" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="edit-permission" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-max-window" type="xs:boolean"
minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="containerType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="factory-id" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="description" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:group ref="containerChildrenGroup"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string"/>
+ <xs:attribute name="template" type="xs:string"/>
+ <xs:attribute name="attribute" type="xs:string"/>
+ <xs:attribute name="width" type="xs:string"/>
+ <xs:attribute name="height" type="xs:string"/>
+ </xs:complexType>
+
+ <xs:complexType name="portletApplicationType">
+ <xs:sequence>
+ <xs:choice>
+ <xs:element name="portlet" type="portletType"/>
+ <xs:element name="wsrp" type="xs:string"/>
+ </xs:choice>
+ <xs:element name="title" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-info-bar" type="xs:boolean"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-application-state"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-application-mode"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="description" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="width" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="height" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="gadgetApplicationType">
+ <xs:sequence>
+ <xs:element name="gadget" type="gadgetType"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="theme" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="title" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="access-permissions" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-info-bar" type="xs:boolean"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="show-application-state"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="show-application-mode"
type="xs:boolean" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="description" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="icon" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="width" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ <xs:element name="height" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletType">
+ <xs:sequence>
+ <xs:element name="application-ref" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="portlet-ref" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="preferences"
type="portletPreferencesType" minOccurs="0"
maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="gadgetType">
+ <xs:sequence>
+ <xs:element name="gadget-ref" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletPreferencesType">
+ <xs:sequence>
+ <xs:element name="preference"
type="portletPreferenceType" minOccurs="0"
maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="portletPreferenceType">
+ <xs:sequence>
+ <xs:element name="name" type="xs:string"
minOccurs="1" maxOccurs="1"/>
+ <xs:element name="value" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="read-only" type="xs:string"
minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -36,6 +36,10 @@
private String templateName;
private String location;
+
+ private String label;
+
+ private String description;
/**
* @deprecated use the location instead
@@ -52,10 +56,12 @@
this.ownerType = cfg.ownerType;
this.templateLocation = cfg.templateLocation;
this.location = cfg.location;
+ this.label = cfg.label;
+ this.description = cfg.description;
this.templateName = cfg.templateName;
this.predefinedOwner = new HashSet<String>(cfg.predefinedOwner);
}
-
+
public NewPortalConfig(String path)
{
this.location = path;
@@ -126,10 +132,30 @@
this.ownerType = ownerType;
}
+ public String getLabel()
+ {
+ return label;
+ }
+
+ public void setLabel(String label)
+ {
+ this.label = label;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
@Override
public String toString()
{
- return "PortalConfig[predefinedOwner=" + predefinedOwner +
",ownerType=" + ownerType + ",templateName=" + templateName +
- "location=" + location + "]";
+ return "PortalConfig[predefinedOwner=" + predefinedOwner +
",ownerType=" + ownerType + ",templateName="
+ + templateName + ",label=" + label + ",description=" +
description + ",location=" + location + "]";
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Page.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Page.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Page.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -50,6 +50,13 @@
{
}
+ public Page(String ownerType, String ownerId, String name)
+ {
+ this.ownerType = ownerType;
+ this.ownerId = ownerId;
+ this.name = name;
+ }
+
public Page(PageData data)
{
super(data);
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -50,6 +50,10 @@
private String locale;
+ private String label;
+
+ private String description;
+
private String[] accessPermissions;
private String editPermission;
@@ -95,6 +99,8 @@
this.name = data.getName();
this.type = data.getType();
this.locale = data.getLocale();
+ this.label = data.getLabel();
+ this.description = data.getDescription();
this.accessPermissions = data.getAccessPermissions().toArray(new
String[data.getAccessPermissions().size()]);
this.editPermission = data.getEditPermission();
this.properties = new Properties(data.getProperties());
@@ -238,6 +244,26 @@
setProperty(PortalProperties.SESSION_ALIVE, type);
}
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setLabel(String label)
+ {
+ this.label = label;
+ }
+
+ public String getLabel()
+ {
+ return label;
+ }
+
static public class PortalConfigSet
{
private ArrayList<PortalConfig> portalConfigs;
@@ -281,6 +307,8 @@
name,
type,
locale,
+ label,
+ description,
accessPermissions,
editPermission,
properties,
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -55,6 +55,16 @@
this.localKey = localKey;
}
+ public String getRepositoryId()
+ {
+ return repositoryId;
+ }
+
+ public Serializable getLocalKey()
+ {
+ return localKey;
+ }
+
@Override
public int hashCode()
{
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -41,6 +41,7 @@
import org.gatein.mop.core.api.workspace.PageImpl;
import javax.jcr.RepositoryException;
+import javax.jcr.Session;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.HashMap;
@@ -55,7 +56,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class POMSession
+public final class POMSession
{
/** . */
@@ -159,7 +160,9 @@
}
try
{
- modified = getSession().getJCRSession().hasPendingChanges();
+ ChromatticSession session = getSession();
+ Session jcrSession = session.getJCRSession();
+ modified = jcrSession.hasPendingChanges();
}
catch (RepositoryException e)
{
@@ -239,6 +242,11 @@
return prefs;
}
+ public POMSessionManager getManager()
+ {
+ return mgr;
+ }
+
private static final BaseEncodingObjectFormatter formatter = new
BaseEncodingObjectFormatter();
public <O extends WorkspaceObject> Iterator<O>
findObjects(ObjectType<O> type, ObjectType<? extends Site> siteType,
@@ -252,7 +260,7 @@
ownerId = ownerId.trim();
if (!ownerId.isEmpty())
{
- ownerIdChunk = formatter.encodeNodeName(null, ownerId);
+ ownerIdChunk = "mop:" + formatter.encodeNodeName(null, ownerId);
}
}
@@ -324,7 +332,7 @@
"jcr:path LIKE '" + workspaceChunk + "/" +
ownerTypeChunk + "/" + ownerIdChunk
+ "/mop:rootpage/mop:children/mop:pages/mop:children/%' AND
" +
"(" +
- "LOWER(gtn:name) LIKE '%" + title.toLowerCase() +
"%' ESCAPE '\\')";
+ "LOWER(gtn:name) LIKE '%" + title.trim().toLowerCase()
+ "%' ESCAPE '\\')";
}
else
{
@@ -371,20 +379,40 @@
}
public void afterSynchronization(SynchronizationStatus status)
{
- if (status == SynchronizationStatus.SAVED && staleKeys != null)
+ if (status == SynchronizationStatus.SAVED)
{
- if (log.isTraceEnabled())
- {
- log.trace("Session commit about to evict entries " +
staleKeys);
- }
- for (Serializable key : staleKeys)
- {
- mgr.cacheRemove(key);
- }
+ reset();
+ }
+ }
+ };
+
+ /**
+ * Reset the session and set its state like it was a newly created session.
+ */
+ private void reset()
+ {
+ // Evict entries from the shared cache if any
+ if (staleKeys != null && staleKeys.size() > 0)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace("About to evict entries " + staleKeys);
}
+ for (Serializable key : staleKeys)
+ {
+ mgr.cacheRemove(key);
+ }
+ staleKeys.clear();
}
- };
+ // Reset modified flag
+ if (log.isTraceEnabled())
+ {
+ log.trace("Setting modified flag to false");
+ }
+ modified = false;
+ }
+
public <V> V execute(POMTask<V> task) throws Exception
{
if (isInTask)
@@ -414,7 +442,11 @@
{
if (!markedForRollback)
{
+ // Trigger persistent save
model.save();
+
+ // Reset modified state
+ reset();
}
else
{
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -24,8 +24,12 @@
import org.exoplatform.commons.chromattic.SessionContext;
import org.exoplatform.portal.pom.config.cache.DataCache;
import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
+import org.exoplatform.portal.pom.data.OwnerKey;
+import org.exoplatform.portal.pom.data.PortalKey;
import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.CachedObjectSelector;
import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ObjectCacheInfo;
import org.exoplatform.services.jcr.RepositoryService;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
@@ -106,7 +110,7 @@
public void cacheRemove(Serializable key)
{
- GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+ final GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
//
if (log.isTraceEnabled())
@@ -115,7 +119,47 @@
}
//
- cache.remove(globalKey);
+ if (key instanceof PortalKey)
+ {
+ // This code seems complex but actually it tries to find all objects in cache
that have the same
+ // owner key than the portal key, for instance if we remove (portal,classic)
then all pages
+ // related to (portal,classic) are also evicted
+ final PortalKey portalKey = (PortalKey)key;
+ try
+ {
+ cache.select(new CachedObjectSelector<GlobalKey, Object>()
+ {
+ public boolean select(GlobalKey selectedGlobalKey,
ObjectCacheInfo<?> ocinfo)
+ {
+ if
(globalKey.getRepositoryId().equals(selectedGlobalKey.getRepositoryId()))
+ {
+ Serializable selectedLocalKey = selectedGlobalKey.getLocalKey();
+ if (selectedLocalKey instanceof OwnerKey)
+ {
+ OwnerKey selectedOwnerKey = (OwnerKey)selectedLocalKey;
+ if (selectedOwnerKey.getType().equals(portalKey.getType())
&& selectedOwnerKey.getId().equals(portalKey.getId()))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ public void onSelect(ExoCache<? extends GlobalKey, ?> exoCache,
GlobalKey key, ObjectCacheInfo<?> ocinfo) throws Exception
+ {
+ cache.remove(key);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.error("Unexpected error when clearing pom cache", e);
+ }
+ }
+ else
+ {
+ cache.remove(globalKey);
+ }
}
public void start()
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.pom.data;
+import javassist.runtime.Desc;
+
import org.exoplatform.portal.config.NoSuchDataException;
import org.exoplatform.portal.config.StaleModelException;
import org.exoplatform.portal.config.UserACL;
@@ -312,6 +314,8 @@
accessPermissions = pr.getAccessPermissions();
editPermission = pr.getEditPermission();
}
+
+ Described described = src.adapt(Described.class);
//
return new PortalData(
@@ -319,6 +323,8 @@
src.getName(),
type,
attrs.getValue(MappedAttributes.LOCALE),
+ described.getName(),
+ described.getDescription(),
accessPermissions,
editPermission,
Collections.unmodifiableMap(properties),
@@ -348,6 +354,10 @@
ProtectedResource pr = dst.adapt(ProtectedResource.class);
pr.setAccessPermissions(src.getAccessPermissions());
pr.setEditPermission(src.getEditPermission());
+
+ Described described = dst.adapt(Described.class);
+ described.setName(src.getLabel());
+ described.setDescription(src.getDescription());
//
org.gatein.mop.api.workspace.Page templates =
dst.getRootPage().getChild("templates");
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/pom/data/PortalData.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -48,12 +48,18 @@
/** . */
private final ContainerData portalLayout;
-
+
+ private final String label;
+
+ private final String description;
+
public PortalData(
String storageId,
String name,
String type,
String locale,
+ String label,
+ String description,
List<String> accessPermissions,
String editPermission,
Map<String, String> properties,
@@ -65,6 +71,8 @@
//
this.key = new PortalKey(type, name);
this.locale = locale;
+ this.label = label;
+ this.description = description;
this.accessPermissions = accessPermissions;
this.editPermission = editPermission;
this.properties = properties;
@@ -116,4 +124,14 @@
{
return portalLayout;
}
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public String getLabel()
+ {
+ return label;
+ }
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml 2011-06-28
12:48:20 UTC (rev 6770)
@@ -104,7 +104,9 @@
<mapping name="portal-config"
class="org.exoplatform.portal.config.model.PortalConfig"
ordered="false">
<value name="portal-name" field="name"/>
- <value name="locale" field="locale"/>
+ <value name="label" field="label" default="" />
+ <value name="description" field="description"
default="" />
+ <value name="locale" field="locale" />
<value name="access-permissions" field="accessPermissions"
usage="optional"/>
<value name="edit-permission" field="editPermission"
usage="optional"/>
<value name="skin" field="skin"
usage="optional"/>
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -34,7 +34,7 @@
private void assertHash(String expected, String resourcePath) throws Exception
{
InputStream in =
Thread.currentThread().getContextClassLoader().getResourceAsStream(resourcePath);
- assertNotNull(in);
+ assertNotNull("For path " + resourcePath, in);
byte[] bytes = IOTools.getBytes(in);
java.security.MessageDigest digester =
java.security.MessageDigest.getInstance("MD5");
digester.update(bytes);
@@ -55,9 +55,10 @@
assertEquals(expected, sb.toString());
}
- public void testGateInResources1_0() throws Exception
+ public void testGateInResources1_x() throws Exception
{
assertHash("d0591b0a022a0c2929e1aed8979857cd",
"gatein_objects_1_0.xsd");
assertHash("99ae24c9bbfe1b59e066756a29ab6c79",
"gatein_objects_1_1.xsd");
+ assertHash("9a031c15ce0e2b4dd1e283458f590581",
"gatein_objects_1_2.xsd");
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -20,9 +20,9 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
-
import java.util.concurrent.atomic.AtomicBoolean;
/**
@@ -128,4 +128,48 @@
//
end();
}
+
+ public void testGetPageFromRemovedPortal() throws Exception
+ {
+ // Create what we need for the test
+ begin();
+ session = mgr.openSession();
+ PortalConfig portalConfig = new PortalConfig("portal",
"testGetPageFromRemovedPortal");
+ storage_.create(portalConfig);
+ storage_.create(new Page("portal",
"testGetPageFromRemovedPortal", "home"));
+ end(true);
+
+ // Clear cache
+ mgr.clearCache();
+
+ // The first transaction
+ begin();
+ session = mgr.openSession();
+
+ // Get page from JCR and it should be stored in cache
+ Page page =
storage_.getPage("portal::testGetPageFromRemovedPortal::home");
+ assertNotNull(page);
+
+ // Now remove the portal
+ PortalConfig portal = storage_.getPortalConfig("portal",
"testGetPageFromRemovedPortal");
+ storage_.remove(portal);
+
+ // Terminate the first transaction
+ end(true);
+
+ // The second transaction
+ begin();
+ session = mgr.openSession();
+
+ // The portal should be null
+ portal = storage_.getPortalConfig("portal",
"testGetPageFromRemovedPortal");
+ assertNull(portal);
+
+ // The portal home page should also be null
+ page = storage_.getPage("portal::testGetPageFromRemovedPortal::home");
+ assertNull(page);
+
+ // End second transaction
+ end(true);
+ }
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -21,6 +21,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.test.BasicTestCase;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -19,24 +19,14 @@
package org.exoplatform.portal.config;
-import org.exoplatform.portal.pom.config.POMSession;
import static org.exoplatform.portal.pom.config.Utils.split;
-import junit.framework.AssertionFailedError;
+import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.application.PortletPreferences;
import org.exoplatform.portal.application.Preference;
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationState;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.Dashboard;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.config.model.*;
+import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.pom.spi.gadget.Gadget;
@@ -46,15 +36,12 @@
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.LinkedList;
-import java.util.List;
+import java.util.*;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.atomic.AtomicReference;
+import junit.framework.AssertionFailedError;
+
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
@@ -63,9 +50,12 @@
{
/** . */
- private final String testPage = "portal::classic::testPage";
+ private static final String CLASSIC_HOME = "portal::classic::homepage";
/** . */
+ private static final String CLASSIC_TEST = "portal::classic::testPage";
+
+ /** . */
private final String testPortletPreferences =
"portal#classic:/web/BannerPortlet/testPortletPreferences";
/** . */
@@ -75,6 +65,9 @@
private POMSessionManager mgr;
/** . */
+ private POMSession session;
+
+ /** . */
private EventQueue events;
/** . */
@@ -88,10 +81,11 @@
public void setUp() throws Exception
{
super.setUp();
+ begin();
PortalContainer container = PortalContainer.getInstance();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- POMSession session = mgr.openSession();
+ session = mgr.openSession();
listenerService =
(ListenerService)container.getComponentInstanceOfType(ListenerService.class);
//
@@ -112,23 +106,25 @@
{
events.clear();
}
-
- //
- begin();
}
protected void tearDown() throws Exception
{
+ session.close();
end();
super.tearDown();
}
public void testCreatePortal() throws Exception
{
+ String label = "portal_foo";
+ String description = "This is new portal for testing";
PortalConfig portal = new PortalConfig();
portal.setType("portal");
portal.setName("foo");
portal.setLocale("en");
+ portal.setLabel(label);
+ portal.setDescription(description);
portal.setAccessPermissions(new String[]{UserACL.EVERYONE});
//
@@ -139,6 +135,8 @@
assertNotNull(portal);
assertEquals("portal", portal.getType());
assertEquals("foo", portal.getName());
+ assertEquals(label, portal.getLabel());
+ assertEquals(description, portal.getDescription());
}
public void testPortalConfigSave() throws Exception
@@ -321,7 +319,7 @@
events.assertSize(1);
//
- page = storage_.getPage(testPage);
+ page = storage_.getPage(CLASSIC_TEST);
assertNull(page);
}
@@ -896,7 +894,22 @@
gadgetApp = (Application<Gadget>)row0.getChildren().get(0);
assertEquals("foo", storage_.getId(gadgetApp.getState()));
}
+
+ public void testRemoveAndFindPage() throws Exception
+ {
+ Page page = storage_.getPage(CLASSIC_HOME);
+ assertNotNull(page);
+ storage_.remove(page);
+ // This will trigger a save
+ Query<Page> query = new Query<Page>(null, null, null, null,
Page.class);
+ LazyPageList<Page> list = storage_.find(query);
+ assertNotNull(list);
+
+ // We check is now seen as removed
+ assertNull(storage_.getPage(CLASSIC_HOME));
+ }
+
public void testGetAllPortalNames() throws Exception
{
final List<String> names = storage_.getAllPortalNames();
@@ -946,10 +959,12 @@
}
// Now commit tx
+ session.close(true);
end(true);
// We test we observe the change
begin();
+ session = mgr.openSession();
List<String> afterNames = storage_.getAllPortalNames();
assertTrue(afterNames.containsAll(names));
afterNames.removeAll(names);
@@ -1000,10 +1015,12 @@
}
//
+ session.close(true);
end(true);
// Now test it is still removed
begin();
+ session = mgr.openSession();
afterNames = storage_.getAllPortalNames();
assertEquals(new HashSet<String>(names), new
HashSet<String>(afterNames));
}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSerialization.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSerialization.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSerialization.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -159,6 +159,8 @@
"foo02",
"foo03",
"foo04",
+ "foo10",
+ "foo11",
Arrays.asList("foo05"),
"foo06",
Collections.singletonMap("foo07", "foo08"),
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml 2011-06-28
12:48:20 UTC (rev 6770)
@@ -74,11 +74,16 @@
</component>
<component>
-
<key>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</key>
-
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl</type>
+
<key>org.exoplatform.services.jcr.ext.distribution.DataDistributionManager</key>
+
<type>org.exoplatform.services.jcr.ext.distribution.impl.DataDistributionManagerImpl</type>
</component>
<component>
+
<key>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</key>
+
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl</type>
+ </component>
+
+ <component>
<key>org.exoplatform.portal.config.UserACL</key>
<type>org.exoplatform.portal.config.UserACL</type>
<init-params>
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/portal/portal/classic/portal.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/portal/portal/classic/portal.xml 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/portal/portal/classic/portal.xml 2011-06-28
12:48:20 UTC (rev 6770)
@@ -25,6 +25,8 @@
<locale>en</locale>
<access-permissions>Everyone</access-permissions>
<edit-permission>*:/platform/administrators</edit-permission>
+ <label>Classic</label>
+ <description>This is classic portal for testing</description>
<portal-layout>
<application>
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -95,32 +95,36 @@
}
/**
- * This methods will add the new application if and only if it hasn't yet been
registered
- * @param app the {@link Application} to add
- * @return the given application if no application with the same id has been added
- * otherwise the application already registered
+ * Add application (portlet, gadget) to the global application map if and only if it
has
+ * not been registered yet.
+ *
+ * @param <T>
+ * @param app
+ * @return
*/
- @SuppressWarnings("unchecked")
public <T extends Application> T addApplication(T app)
{
Application result = getApplication(app.getApplicationId());
- if (result == null)
+
+ //Double-check block
+ if(result == null)
{
- synchronized (this)
+ synchronized(this)
{
result = getApplication(app.getApplicationId());
- if (result == null)
+ if(result == null)
{
- HashMap<String, Application> applications = new HashMap<String,
Application>(applications_);
- applications.put(app.getApplicationId(), app);
- this.applications_ = applications;
+ HashMap<String, Application> temporalApplicationsMap = new
HashMap<String, Application>(applications_);
+ temporalApplicationsMap.put(app.getApplicationId(), app);
+ this.applications_ = temporalApplicationsMap;
result = app;
}
}
}
+
return (T)result;
}
-
+
public void register(WebRequestHandler handler) throws Exception
{
for (String path : handler.getPath())
@@ -166,4 +170,4 @@
}
}
}
-}
\ No newline at end of file
+}
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/application/ResourceRequestFilter.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -94,8 +94,7 @@
httpResponse.setStatus(HttpServletResponse.SC_NOT_MODIFIED);
return;
}
- response.setContentType("text/css; charset=UTF-8");
-
+
final OutputStream out = response.getOutputStream();
final BinaryOutput output = new BinaryOutput()
{
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.resource;
+import org.exoplatform.commons.cache.future.FutureExoCache;
+import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.commons.utils.BinaryOutput;
import org.exoplatform.commons.utils.ByteArrayOutput;
import org.exoplatform.commons.utils.PropertyManager;
@@ -34,6 +36,7 @@
import org.exoplatform.management.rest.annotations.RESTEndpoint;
import org.exoplatform.portal.resource.compressor.ResourceCompressor;
import org.exoplatform.portal.resource.compressor.ResourceType;
+import org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.resources.Orientation;
@@ -56,14 +59,15 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.ServletContext;
@Managed
-@NameTemplate({@Property(key = "view", value = "portal"),
@Property(key = "service", value = "management"),
+@NameTemplate({
+ @Property(key = "view", value = "portal"),
+ @Property(key = "service", value = "management"),
@Property(key = "type", value = "skin")})
@ManagedDescription("Skin service")
@RESTEndpoint(path = "skinservice")
@@ -118,9 +122,9 @@
private final HashSet<String> availableSkins_;
- private final Map<String, CachedStylesheet> ltCache;
+ private final FutureExoCache<String, CachedStylesheet, Orientation> ltCache;
- private final Map<String, CachedStylesheet> rtCache;
+ private final FutureExoCache<String, CachedStylesheet, Orientation> rtCache;
private final Map<String, Set<String>> portletThemes_;
@@ -143,12 +147,41 @@
public SkinService(ExoContainerContext context, ResourceCompressor compressor)
{
+ Loader<String, CachedStylesheet, Orientation> loader = new Loader<String,
CachedStylesheet, Orientation>()
+ {
+ public CachedStylesheet retrieve(Orientation context, String key) throws
Exception
+ {
+ StringBuffer sb = new StringBuffer();
+ processCSS(sb, key, context, true);
+ String css;
+ try
+ {
+ StringWriter output = new StringWriter();
+ SkinService.this.compressor.compress(new StringReader(sb.toString()),
output, ResourceType.STYLESHEET);
+ css = output.toString();
+ }
+ catch (Exception e)
+ {
+ log.warn("Error when compressing CSS " + key + " for
orientation " + context + " will use normal CSS instead", e);
+ css = sb.toString();
+ }
+
+ return new CachedStylesheet(css);
+ }
+ };
+
+ //
+ FutureExoCache<String, CachedStylesheet, Orientation> ltCache = new
FutureExoCache<String, CachedStylesheet, Orientation>(loader, new
ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
+ FutureExoCache<String, CachedStylesheet, Orientation> rtCache = new
FutureExoCache<String, CachedStylesheet, Orientation>(loader, new
ConcurrentFIFOExoCache<String, CachedStylesheet>(200));
+
+
+ //
this.compressor = compressor;
portalSkins_ = new LinkedHashMap<SkinKey, SkinConfig>();
skinConfigs_ = new LinkedHashMap<SkinKey, SkinConfig>(20);
availableSkins_ = new HashSet<String>(5);
- ltCache = new ConcurrentHashMap<String, CachedStylesheet>();
- rtCache = new ConcurrentHashMap<String, CachedStylesheet>();
+ this.ltCache = ltCache;
+ this.rtCache = rtCache;
portletThemes_ = new HashMap<String, Set<String>>();
portalContainerName = context.getPortalContainerName();
mainResolver = new MainResourceResolver(portalContainerName, skinConfigs_);
@@ -242,18 +275,10 @@
log.debug("Adding Portal skin : Bind " + key + " to " +
skinConfig);
}
}
- try
- {
- StringWriter output = new StringWriter();
- compressor.compress(new StringReader(cssData), output,
ResourceType.STYLESHEET);
- cssData = output.toString();
- }
- catch (Exception e)
- {
- log.debug("Error when compressing CSS, will use normal CSS instead",
e);
- }
- ltCache.put(cssPath, new CachedStylesheet(cssData));
- rtCache.put(cssPath, new CachedStylesheet(cssData));
+
+ //
+ ltCache.remove(cssPath);
+ rtCache.remove(cssPath);
}
@@ -329,17 +354,12 @@
/**
*
- * Register the Skin for available portal Skins. Do not replace existed Skin
+ * Register the Skin for available portal Skins. Do not replace existing skin.
*
- * @param module
- * skin module identifier
- * @param skinName
- * skin name
- * @param cssPath
- * path uri to the css file. This is relative to the root context,
- * use leading '/'
- * @param scontext
- * the webapp's {@link javax.servlet.ServletContext}
+ * @param module skin module identifier
+ * @param skinName skin name
+ * @param cssPath path uri to the css file. This is relative to the root context, use
leading '/'
+ * @param cssData the data
*/
public void addSkin(String module, String skinName, String cssPath, String cssData)
{
@@ -350,8 +370,10 @@
{
skinConfigs_.put(key, new SimpleSkin(this, module, skinName, cssPath));
}
- ltCache.put(cssPath, new CachedStylesheet(cssData));
- rtCache.put(cssPath, new CachedStylesheet(cssData));
+
+ // Evict
+ ltCache.remove(cssPath);
+ rtCache.remove(cssPath);
}
/**
@@ -441,28 +463,8 @@
if (!PropertyManager.isDevelopping())
{
//
- Map<String, CachedStylesheet> cache = orientation == Orientation.LT ?
ltCache : rtCache;
- CachedStylesheet cachedCss = cache.get(path);
- if (cachedCss == null)
- {
- StringBuffer sb = new StringBuffer();
- processCSS(sb, path, orientation, true);
- String css;
- try
- {
- StringWriter output = new StringWriter();
- compressor.compress(new StringReader(sb.toString()), output,
ResourceType.STYLESHEET);
- css = output.toString();
- }
- catch (Exception e)
- {
- log.debug("Error when compressing CSS, will use normal CSS
instead", e);
- css = sb.toString();
- }
-
- cachedCss = new CachedStylesheet(css);
- cache.put(path, cachedCss);
- }
+ FutureExoCache<String, CachedStylesheet, Orientation> cache = orientation
== Orientation.LT ? ltCache : rtCache;
+ CachedStylesheet cachedCss = cache.get(orientation, path);
if (path.startsWith("/" + portalContainerName +
"/resource"))
{
@@ -492,7 +494,7 @@
*/
public String getMergedCSS(String cssPath)
{
- CachedStylesheet stylesheet = ltCache.get(cssPath);
+ CachedStylesheet stylesheet = ltCache.get(null, cssPath);
return stylesheet != null ? stylesheet.getText() : null;
}
@@ -561,7 +563,7 @@
throw new IllegalArgumentException("path must not be null");
}
- Map<String, CachedStylesheet> cache = ltCache;
+ FutureExoCache<String, CachedStylesheet, Orientation> cache = ltCache;
Orientation orientation = Orientation.LT;
if (path.endsWith("-lt.css"))
{
@@ -573,7 +575,7 @@
orientation = Orientation.RT;
}
- CachedStylesheet cachedCSS = cache.get(path);
+ CachedStylesheet cachedCSS = cache.get(orientation, path);
if (cachedCSS == null)
{
return Long.MAX_VALUE;
@@ -814,7 +816,7 @@
/**
* Get Suffix of Orientation
- * @param orientation
+ * @param orientation the orientation
* @return Suffix of Orientation
*/
String getSuffix(Orientation orientation)
Copied:
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
(from rev 5822,
portal/trunk/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java)
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java
(rev 0)
+++
epp/portal/branches/EPP_5_2_Branch/component/web/security/src/main/java/org/exoplatform/web/security/PortalLoginController.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -0,0 +1,85 @@
+/*
+* 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();
+ 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))
+ {
+ 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());
+ resp.addCookie(cookie);
+ }
+ }
+
+ //
+ resp.sendRedirect(uri);
+ }
+}
Modified:
epp/portal/branches/EPP_5_2_Branch/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/examples/extension/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -1,98 +1,98 @@
-<%
- String initialURI =
_ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() +
"/private/" +
_ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
-%>
-<div class="UIHomePagePortlet" id="$uicomponent.id">
- <div class="TRContainer">
- <div class="PortletDecoration">
- <div class="GuideText">GateIn is the new generation of Open Source
portal, jointly led by Red Hat and eXo Platform who partner to gather the best portal
experts and communities around a robust and intuitive portal that brings rich
administration functionalities to IT systems. <br /> This is the Home Page of the
"sample-ext" (skin has changed, new pages, customized resource bundles)
:</div>
- <a class="VersionIcon"
href="http://www.jboss.org/gatein/"
target="_blank"></a>
- <div class="DotLine"><span></span></div>
- <div
class="GuideText"><%=_ctx.appRes("UIHomePagePortlet.Label.GuideText")%></div>
- <a class="ContactIcon"
href="http://community.jboss.org/en/gatein?view=discussions"
target="_blank"></a>
-
- </div>
- </div>
- <div class="TLContainer">
- <div class="PortletDecoration">
-
- <div class="HomePortletAdBackround">
- <div class="AdImageLeft">
- <div class="AdImageRight">
- <div
class="EmptyBlock"><%=_ctx.appRes("UIHomePagePortlet.Label.Slogan")%></div>
- </div>
- </div>
- </div>
-
- <div class="HomePortletContent">
- <div class="LeftAccountsContainer">
- <div class="RightAccountsContainer">
- <div class="MiddleAccountsContainer">
- <div
class="InstructionTitle"><%=_ctx.appRes("UIHomePagePortlet.Label.Title")%></div>
- <div class="AccountsContainerDeco">
- <div class="AccountBlock AdministratorUser">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="SeparatorLine"><span></span></div>
- <div class="AccountBlock ManagerUser">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="SeparatorLine"><span></span></div>
- <div class="AccountBlock NormalUser">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="SeparatorLine"><span></span></div>
- <div class="AccountBlock DemoUser" style="margin-right:
0px;">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- <div class="ClearBoth"><span></span></div>
-</div>
-
+<%
+ String initialURI =
_ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() +
"/private/" +
_ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+%>
+<div class="UIHomePagePortlet" id="$uicomponent.id">
+ <div class="TRContainer">
+ <div class="PortletDecoration">
+ <div class="GuideText">GateIn is the new generation of Open Source
portal, jointly led by Red Hat and eXo Platform who partner to gather the best portal
experts and communities around a robust and intuitive portal that brings rich
administration functionalities to IT systems. <br /> This is the Home Page of the
"sample-ext" (skin has changed, new pages, customized resource bundles)
:</div>
+ <a class="VersionIcon"
href="http://www.jboss.org/gatein/"
target="_blank"></a>
+ <div class="DotLine"><span></span></div>
+ <div
class="GuideText"><%=_ctx.appRes("UIHomePagePortlet.Label.GuideText")%></div>
+ <a class="ContactIcon"
href="http://community.jboss.org/en/gatein?view=discussions"
target="_blank"></a>
+
+ </div>
+ </div>
+ <div class="TLContainer">
+ <div class="PortletDecoration">
+
+ <div class="HomePortletAdBackround">
+ <div class="AdImageLeft">
+ <div class="AdImageRight">
+ <div
class="EmptyBlock"><%=_ctx.appRes("UIHomePagePortlet.Label.Slogan")%></div>
+ </div>
+ </div>
+ </div>
+
+ <div class="HomePortletContent">
+ <div class="LeftAccountsContainer">
+ <div class="RightAccountsContainer">
+ <div class="MiddleAccountsContainer">
+ <div
class="InstructionTitle"><%=_ctx.appRes("UIHomePagePortlet.Label.Title")%></div>
+ <div class="AccountsContainerDeco">
+ <div class="AccountBlock AdministratorUser">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="SeparatorLine"><span></span></div>
+ <div class="AccountBlock ManagerUser">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="SeparatorLine"><span></span></div>
+ <div class="AccountBlock NormalUser">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="SeparatorLine"><span></span></div>
+ <div class="AccountBlock DemoUser" style="margin-right:
0px;">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div class="ClearBoth"><span></span></div>
+</div>
+
Modified:
epp/portal/branches/EPP_5_2_Branch/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/examples/portal/war/src/main/webapp/templates/groovy/webui/component/UIHomePagePortlet.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -1,109 +1,109 @@
-<%
- String initialURI =
_ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() +
"/private/" +
_ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
-%>
-<div class="UIHomePagePortlet" id="$uicomponent.id">
- <div class="TRContainer">
- <div class="PortletDecoration">
- <div class="GuideText">This is the Home Page of the
"sample-portal" contained in gatein-sample-extension.ear/war, as you can see the
skin has changed, we added new pages, we use our customized resource bundles as you can
see below:
- <ul>
- <li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleKey")%></b></li>
- <li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleRB.SampleKey")%></b></li>
- </ul>
- </div>
- <a class="VersionIcon"
href="http://www.jboss.org/gatein/"
target="_blank"></a>
- <div class="DotLine"><span></span></div>
- <div
class="GuideText"><%=_ctx.appRes("UIHomePagePortlet.Label.GuideText")%></div>
- <a class="ContactIcon"
href="http://community.jboss.org/en/gatein?view=discussions"
target="_blank"></a>
-
- </div>
- </div>
- <div class="TLContainer">
- <div class="PortletDecoration">
-
- <div class="HomePortletAdBackround">
- <div class="AdImageLeft">
- <div class="AdImageRight">
- <div
class="EmptyBlock"><%=_ctx.appRes("UIHomePagePortlet.Label.Slogan")%></div>
- </div>
- </div>
- </div>
-
- <div class="HomePortletContent">
- <div class="LeftAccountsContainer">
- <div class="RightAccountsContainer">
- <div class="MiddleAccountsContainer">
- <div
class="InstructionTitle"><%=_ctx.appRes("UIHomePagePortlet.Label.Title")%></div>
- <div class="AccountsContainerDeco">
- <div class="AccountBlock AdministratorUser">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="SeparatorLine"><span></span></div>
- <div class="AccountBlock ManagerUser">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="SeparatorLine"><span></span></div>
- <div class="AccountBlock NormalUser">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="SeparatorLine"><span></span></div>
- <div class="AccountBlock DemoUser" style="margin-right:
0px;">
- <div class="AccountInfos">
- <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
- <div class="Username">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- <div class="Passwords">
- <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- <div class="ClearBoth"><span></span></div>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
- <div class="ClearBoth"><span></span></div>
-</div>
-<div class="BottomDecoratorHome">
- <div class="BottomDecoratorLeft">
- <div class="BottomDecoratorRight">
- <div
class="BottomDecoratorMiddle"><span></span></div>
- </div>
- </div>
-</div>
+<%
+ String initialURI =
_ctx.getRequestContext().getParentAppRequestContext().getRequestContextPath() +
"/private/" +
_ctx.getRequestContext().getParentAppRequestContext().getPortalOwner();
+%>
+<div class="UIHomePagePortlet" id="$uicomponent.id">
+ <div class="TRContainer">
+ <div class="PortletDecoration">
+ <div class="GuideText">This is the Home Page of the
"sample-portal" contained in gatein-sample-extension.ear/war, as you can see the
skin has changed, we added new pages, we use our customized resource bundles as you can
see below:
+ <ul>
+ <li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleKey")%></b></li>
+ <li><b><%=_ctx.appRes("UIHomePagePortlet.Label.SampleRB.SampleKey")%></b></li>
+ </ul>
+ </div>
+ <a class="VersionIcon"
href="http://www.jboss.org/gatein/"
target="_blank"></a>
+ <div class="DotLine"><span></span></div>
+ <div
class="GuideText"><%=_ctx.appRes("UIHomePagePortlet.Label.GuideText")%></div>
+ <a class="ContactIcon"
href="http://community.jboss.org/en/gatein?view=discussions"
target="_blank"></a>
+
+ </div>
+ </div>
+ <div class="TLContainer">
+ <div class="PortletDecoration">
+
+ <div class="HomePortletAdBackround">
+ <div class="AdImageLeft">
+ <div class="AdImageRight">
+ <div
class="EmptyBlock"><%=_ctx.appRes("UIHomePagePortlet.Label.Slogan")%></div>
+ </div>
+ </div>
+ </div>
+
+ <div class="HomePortletContent">
+ <div class="LeftAccountsContainer">
+ <div class="RightAccountsContainer">
+ <div class="MiddleAccountsContainer">
+ <div
class="InstructionTitle"><%=_ctx.appRes("UIHomePagePortlet.Label.Title")%></div>
+ <div class="AccountsContainerDeco">
+ <div class="AccountBlock AdministratorUser">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=root&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Administrator")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>root</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="SeparatorLine"><span></span></div>
+ <div class="AccountBlock ManagerUser">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=john&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Manager")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>john</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="SeparatorLine"><span></span></div>
+ <div class="AccountBlock NormalUser">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=mary&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.User")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>mary</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="SeparatorLine"><span></span></div>
+ <div class="AccountBlock DemoUser" style="margin-right:
0px;">
+ <div class="AccountInfos">
+ <div class="AccountTitle"><a
href="${_ctx.getPortalContextPath()}/login?username=demo&password=gtn&initialURI=<%=initialURI%>"><%=_ctx.appRes("UIHomePagePortlet.Label.Demo")%></a></div>
+ <div class="Username">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Username")%></div><span>demo</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ <div class="Passwords">
+ <div
class="Lable"><%=_ctx.appRes("UIHomePagePortlet.Label.Password")%></div><span>gtn</span>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ <div class="ClearBoth"><span></span></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <div class="ClearBoth"><span></span></div>
+</div>
+<div class="BottomDecoratorHome">
+ <div class="BottomDecoratorLeft">
+ <div class="BottomDecoratorRight">
+ <div
class="BottomDecoratorMiddle"><span></span></div>
+ </div>
+ </div>
+</div>
Modified:
epp/portal/branches/EPP_5_2_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2011-06-28
12:48:20 UTC (rev 6770)
@@ -43,7 +43,7 @@
if (isNaN(B)) {
return "an indeterminate amount of time ago"
}
- time = (new Date().getTime() - B) / 1000;
+ time = (new Date().getTime()*1000 - B) / 1000;
if (time < 60) {
return "less than a minute ago"
} else {
Modified: epp/portal/branches/EPP_5_2_Branch/packaging/profiles.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/packaging/profiles.xml 2011-06-28 08:00:46 UTC (rev
6769)
+++ epp/portal/branches/EPP_5_2_Branch/packaging/profiles.xml 2011-06-28 12:48:20 UTC (rev
6770)
@@ -48,6 +48,10 @@
<!--
Replace with the name of the directory containing Jetty 6
-->
+
<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
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-06-28 08:00:46 UTC (rev 6769)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-06-28 12:48:20 UTC (rev 6770)
@@ -10,9 +10,9 @@
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.
+ Lesser General Public License for more detail
- You should have received a copy of the GNU Lesser General Public
+ 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.
@@ -950,6 +950,15 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.2</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
</plugins>
</build>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/GroupManagement.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/GroupManagement.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/GroupManagement.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -33,7 +33,7 @@
* Created by The eXo Platform SAS
* Author : Huu-Dung Kieu
* kieuhdung(a)gmail.com
- * 22 d�c. 08
+ * 22 d�c. 08
*/
public class GroupManagement
{
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -55,7 +55,7 @@
{
if (navigation.getOwnerType().equals(PortalConfig.GROUP_TYPE))
{
- navigations.add(PageNavigationUtils.filter(navigation, remoteUser));
+ navigations.add(PageNavigationUtils.filterNavigation(navigation, remoteUser,
false, true));
}
}
return navigations;
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -19,6 +19,7 @@
package org.exoplatform.toolbar.webui.component;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
@@ -52,6 +53,19 @@
UserPortalConfigService dataStorage =
getApplicationComponent(UserPortalConfigService.class);
return dataStorage.getAllPortalNames();
}
+
+ public String getPortalLabel(String portalName) throws Exception
+ {
+ DataStorage storage_ = getApplicationComponent(DataStorage.class);
+ PortalConfig portalConfig = storage_.getPortalConfig(portalName);
+ String label = portalConfig.getLabel();
+ if (label != null && label.trim().length() > 0)
+ {
+ return label;
+ }
+
+ return portalName;
+ }
public String getCurrentPortal()
{
@@ -68,7 +82,7 @@
{
PageNavigation navi = getPageNavigation(PortalConfig.PORTAL_TYPE + "::" +
getCurrentPortal());
String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- return PageNavigationUtils.filter(navi, remoteUser);
+ return PageNavigationUtils.filterNavigation(navi, remoteUser, false, true);
}
private PageNavigation getPageNavigation(String owner) throws Exception
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/admintoolbar/webui/component/UIUserToolBarSitePortlet.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -35,12 +35,13 @@
if(isCurrent && nodes.size() > 0) clazz =
"class='ArrowIcon'";
else clazz = "";
href = uicomponent.getPortalURI(portal);
+ label = uicomponent.getPortalLabel(portal);
EntityEncoder entityEncoder = EntityEncoder.FULL;
portal = entityEncoder.encode(portal);
print """
<div class="MenuItem">
<div $clazz>
- <a href="$href" class="ItemIcon
SiteIcon">$portal</a>
+ <a href="$href" class="ItemIcon
SiteIcon">$label</a>
</div>
""";
if(isCurrent) {
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/applicationregistry/webui/component/UIGadgetInfo.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -11,6 +11,9 @@
if(gadgetThumbnail == null || gadgetThumbnail.length() == 0){
gadgetThumbnail = srcBGError ;
}
+ def viewURL = uicomponent.getViewUrl();
+ def editURL = uicomponent.getEditUrl();
+ def refURL = gadget.getReferenceUrl();
%>
<div class="UIGadgetInfo" id="$uicomponent.id">
<div class="UIBreadcumb">
@@ -41,12 +44,12 @@
<table>
<tr>
<td
class="LeftLabel"><%=_ctx.appRes("UIGadgetInfo.label.viewUrl")%></td>
- <td class="RightLabel" title=" <%= uicomponent.getViewUrl()
%> "><%= uicomponent.getViewUrl() %></td>
+ <td class="RightLabel" title=" <%=viewURL %>
"><a href="<%=viewURL %>"
target="_blank">$viewURL</a></td>
</tr>
<% if(gadget.isLocal()) {%>
<tr>
<td
class="LeftLabel"><%=_ctx.appRes("UIGadgetInfo.label.editUrl")%></td>
- <td class="RightLabel"><%= uicomponent.getEditUrl()
%></td>
+ <td class="RightLabel"><a href="<%=editURL %>"
target="_blank">$editURL</a></td>
</tr>
<% } %>
</table>
@@ -54,7 +57,7 @@
<tr>
<td
class="LeftLabel"><%=_ctx.appRes("UIGadgetInfo.label.reference")%></td>
<td class="RightLabel">
- <%= gadget.getReferenceUrl() %>
+ <a href="<%=refURL %>"
target="_blank">$refURL</a>
</td>
</tr>
</table>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -19,9 +19,20 @@
<tr>
<td class="Image"><img
src="/exoadmin/skin/navigation/webui/component/background/PlImg.gif"
alt=""/></td>
<td class="Content">
- <div
class="Label"><%=uicomponent.getFieldValue(portalConfig, 'name')
%></div>
-
- </td>
+ <div
class="Label"><%=uicomponent.getFieldValue(portalConfig, 'name')
%></div>
+ <%
+ def siteLabel = uicomponent.getFieldValue(portalConfig,
'label');
+ def siteDescription = uicomponent.getFieldValue(portalConfig,
'description');
+ if (siteLabel != null && siteLabel.trim().length()
> 0)
+ {
+ print
"""<div>$siteLabel</div>""";
+ }
+ if (siteDescription != null &&
siteDescription.trim().length() > 0)
+ {
+ print
"""<div>$siteDescription</div>""";
+ }
+ %>
+ </td>
<td class="ActionBlock">
<a href="<%=uicomponent.event("EditPortalLayout",
portalConfig.getName());%>"
class="EditLayoutIcon"><%=_ctx.appRes("UISiteManagement.label.editLayout")%></a>
<a href="<%=uicomponent.event("EditNavigation",
portalConfig.getName());%>"
class="EditNavIcon"><%=_ctx.appRes("UISiteManagement.label.editNav")%></a>
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/skin/organization/webui/component/UIOrganizationPortlet/DefaultStylesheet.css
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/skin/organization/webui/component/UIOrganizationPortlet/DefaultStylesheet.css 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/webapp/skin/organization/webui/component/UIOrganizationPortlet/DefaultStylesheet.css 2011-06-28
12:48:20 UTC (rev 6770)
@@ -150,6 +150,7 @@
float: left; /* orientation=lt */
float: right; /* orientation=rt */
height: auto;
+ width: 100%;
}
.UIOrganizationPortlet .UISearch .UISearchForm .QuickSet {
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIPortalNavigation.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -95,7 +95,7 @@
<div class="MenuItem $tabStyleNavigation">
<div class="$arrowIcon" title="$title">
<div class="ItemIcon $icon">
- <a href="$pageURI">$label</a>
+ <a href="#">$label</a>
</div>
</div>
""";
Modified: epp/portal/branches/EPP_5_2_Branch/settings.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/settings.xml 2011-06-28 08:00:46 UTC (rev 6769)
+++ epp/portal/branches/EPP_5_2_Branch/settings.xml 2011-06-28 12:48:20 UTC (rev 6770)
@@ -1,14 +1,80 @@
-<?xml version="1.0"?>
-<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ User-specific configuration for maven. Includes things that should not
+ be distributed with the pom.xml file, such as developer identity, along with
+ local settings, like proxy information. The default location for the
+ settings file is ~/.m2/settings.xml
+-->
+<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
+ <!--proxies>
+ <proxy>
+ <host>my.proxy.host</host>
+ </proxy>
+ </proxies-->
+
+ <!--pluginGroups>
+ <pluginGroup>org.codehaus.mojo</pluginGroup>
+ </pluginGroups-->
+<localRepository>${env.HOME}/.m2_EPP</localRepository>
- <localRepository>${env.HOME}/.m2_EPP</localRepository>
-
- <mirrors>
- <mirror>
- <id>internal-repository</id>
- <name>Maven Repository Manager running on repo.mycompany.com</name>
-
<
url>http://download.devel.redhat.com/brewroot/repos/jboss-epp-5-build/...
- <mirrorOf>*</mirrorOf>
- </mirror>
- </mirrors>
+ <profiles>
+ <profile>
+ <id>my-jboss-maven2</id>
+ <repositories>
+ <repository>
+ <id>jboss-maven2-brew</id>
+ <name>JBoss Maven 2 Brew Repository</name>
+
<
url>http://download.devel.redhat.com/brewroot/repos/jboss-epp-5-build/...
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>jboss-maven2-nexus</id>
+ <name>JBoss Maven 2 nexus Repository</name>
+
<
url>https://repository.jboss.org/nexus/content/groups/public</url>
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>jboss-maven2-deprecated</id>
+ <name>JBoss Maven 2 deprecated Repository</name>
+
<
url>https://repository.jboss.org/nexus/content/repositories/deprecated...
+ <layout>default</layout>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>never</updatePolicy>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ </profile>
+
+ </profiles>
+ <activeProfiles>
+ <activeProfile>my-jboss-maven2</activeProfile>
+ </activeProfiles>
+<!-- <mirrors>
+ <mirror>
+ <id>internal-repository</id>
+ <name>Maven Repository Manager running on
repo.mycompany.com</name>
+
<
url>http://download.devel.redhat.com/brewroot/repos/jboss-epp-5-build/...
+
<
url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <mirrorOf>*</mirrorOf>
+ </mirror>
+ </mirrors>-->
</settings>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPageBrowser/Stylesheet.css
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPageBrowser/Stylesheet.css 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/customization/UIPageBrowser/Stylesheet.css 2011-06-28
12:48:20 UTC (rev 6770)
@@ -11,7 +11,7 @@
.UIPageBrowser .UIGrid {
width: 99.7%;
!width: 98%;
- margin: auto;
+ margin: 0px;
}
.UIPageBrowser .UIGrid .Text {
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-06-28
12:48:20 UTC (rev 6770)
@@ -355,6 +355,8 @@
UIPortalForm.msg.sameName=This portal name already exists.
UIPortalForm.msg.notExistAnymore=This portal is not existed or may be deleted.
UIPortalForm.label.name=Portal Name :
+UIPortalForm.label.label=Label :
+UIPortalForm.label.description=Description :
UIPortalForm.label.locale=#{word.locale} :
UIPortalForm.label.date=#{word.date} :
UIPortalForm.label.factoryId=Portal Types
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/jcr/jcr-configuration.xml 2011-06-28
12:48:20 UTC (rev 6770)
@@ -49,6 +49,11 @@
</component>
<component>
+
<key>org.exoplatform.services.jcr.ext.distribution.DataDistributionManager</key>
+
<type>org.exoplatform.services.jcr.ext.distribution.impl.DataDistributionManagerImpl</type>
+ </component>
+
+ <component>
<key>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</key>
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl</type>
</component>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/application-registry-configuration.xml 2011-06-28
12:48:20 UTC (rev 6770)
@@ -526,11 +526,11 @@
<component-plugin>
<name>chromattic</name>
<set-method>addLifeCycle</set-method>
-
<type>org.exoplatform.application.registry.impl.ApplicationRegistryChromatticLifeCycle</type>
+
<type>org.exoplatform.application.registry.mop.ApplicationRegistryChromatticLifeCycle</type>
<init-params>
<value-param>
- <name>domain-name</name>
- <value>app</value>
+ <name>name</name>
+ <value>registry</value>
</value-param>
<value-param>
<name>workspace-name</name>
@@ -538,24 +538,13 @@
</value-param>
<values-param>
<name>entities</name>
-
<value>org.exoplatform.application.registry.impl.ContentRegistry</value>
-
<value>org.exoplatform.application.registry.impl.CategoryDefinition</value>
-
<value>org.exoplatform.application.registry.impl.ContentDefinition</value>
-
<value>org.exoplatform.application.gadget.impl.GadgetRegistry</value>
-
<value>org.exoplatform.application.gadget.impl.GadgetDefinition</value>
-
<value>org.exoplatform.application.gadget.impl.LocalGadgetData</value>
-
<value>org.exoplatform.application.gadget.impl.RemoteGadgetData</value>
- <value>org.chromattic.ext.ntdef.NTFile</value>
- <value>org.chromattic.ext.ntdef.NTFolder</value>
- <value>org.chromattic.ext.ntdef.NTResource</value>
+
<value>org.exoplatform.application.registry.mop.ContentRegistry</value>
+
<value>org.exoplatform.application.registry.mop.CategoryDefinition</value>
+
<value>org.exoplatform.application.registry.mop.ContentDefinition</value>
</values-param>
- <properties-param>
- <name>options</name>
- <property name="org.chromattic.api.Option.root_node.path"
value="/production"/>
- <property name="org.chromattic.api.Option.root_node.create"
value="true"/>
- </properties-param>
</init-params>
</component-plugin>
</external-component-plugins>
-</configuration>
\ No newline at end of file
+
+</configuration>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-06-28
12:48:20 UTC (rev 6770)
@@ -262,9 +262,6 @@
<value>org.exoplatform.portal.pom.spi.portlet.PreferenceState</value>
<value>org.exoplatform.portal.pom.spi.gadget.GadgetState</value>
<value>org.exoplatform.portal.pom.spi.wsrp.WSRPState</value>
- <value>org.exoplatform.portal.mop.ProtectedResource</value>
- <value>org.exoplatform.portal.mop.Described</value>
- <value>org.exoplatform.portal.mop.Visible</value>
</values-param>
<properties-param>
<name>options</name>
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/UILoginForm.gtmpl 2011-06-28
12:48:20 UTC (rev 6770)
@@ -7,7 +7,7 @@
jsmanager.addCustomizedOnLoadScript('document.getElementById("UIPortalComponentLogin").username.focus();');
HttpSession session = rcontext.getRequest().getSession();
String requestPath = rcontext.getRequestContextPath() + "/private/" +
rcontext.getPortalOwner();
- session.setAttribute("initialURI", requestPath);
+ //session.setAttribute("initialURI", requestPath);
%>
<div class="UILoginForm">
<div class="LoginDecorator">
@@ -25,7 +25,7 @@
<% uiform.begin(); %>
<!--<form class="UIForm" id="$uicomponent.id"
name="loginForm" action="<%= rcontext.getRequestContextPath() +
"/login"%>" method="post" style="margin: 0px;">
<input type="hidden" name="<%= uiform.ACTION %>"
value=""/>-->
- <input type="hidden" name="initialURI"
value="<%=session.getAttribute("initialURI"); %>"/>
+ <input type="hidden" name="initialURI"
value="<%=requestPath %>"/>
<div class="VerticalLayout">
<table class="UIFormGrid">
<tr class="UserNameField">
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -412,7 +412,9 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service =
uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -423,17 +425,23 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
- uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service =
uiSelectUserForm.getApplicationComponent(OrganizationService.class);
+
+ PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- PageList users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- uiSelectUserForm.uiIterator_.setPageList(users);
+ if (service.getGroupHandler().findGroupById(groupId) != null)
+ {
+ users =
uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ }
}
else
{
-
uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new
Query()));
+ users = service.getUserHandler().findUsers(new Query());
}
+ users.setPageSize(10);
+ uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -48,14 +48,22 @@
return uicomponent_;
}
- public void setUIComponent(UIComponent uicomponent)
+ public UIComponent setUIComponent(UIComponent uicomponent)
{
+ UIComponent oldOne = uicomponent_;
if (uicomponent_ != null)
- uicomponent_.setRendered(false);
+ uicomponent_.setParent(null);
uicomponent_ = uicomponent;
- if (uicomponent_ == null)
- return;
- uicomponent_.setParent(this);
+ if (uicomponent_ != null)
+ {
+ UIComponent oldParent = uicomponent_.getParent();
+ if (oldParent != null && oldParent != this && oldParent
instanceof UIComponentDecorator)
+ {
+ ((UIComponentDecorator)oldParent).setUIComponent(null);
+ }
+ uicomponent_.setParent(this);
+ }
+ return oldOne;
}
@SuppressWarnings("unchecked")
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletActionListener.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -854,8 +854,7 @@
{
public void execute(Event<UIPortlet> event) throws Exception
{
- UIPortal uiPortal = Util.getUIPortal();
- UIPortalApplication uiApp =
uiPortal.getAncestorOfType(UIPortalApplication.class);
+ UIPortalApplication uiApp = Util.getUIPortalApplication();
UIMaskWorkspace uiMaskWS =
uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
uiMaskWS.setUpdated(true);
UIPortlet uiPortlet = event.getSource();
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerActionListener.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -39,8 +39,7 @@
{
UIContainer uiContainer = event.getSource();
- UIPortal uiPortal = Util.getUIPortal();
- UIPortalApplication uiApp =
uiPortal.getAncestorOfType(UIPortalApplication.class);
+ UIPortalApplication uiApp = Util.getUIPortalApplication();
UIMaskWorkspace uiMaskWS =
uiApp.getChildById(UIPortalApplication.UI_MASK_WS_ID);
UIContainerForm containerForm =
uiMaskWS.createUIComponent(UIContainerForm.class, null, null);
containerForm.setValues(uiContainer);
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/container/UIContainerForm.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -141,7 +141,7 @@
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);
- UIPortalApplication uiPortalApp =
uiForm.getAncestorOfType(UIPortalApplication.class);
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
pcontext.setFullRender(true);
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -367,6 +367,12 @@
}
PageNode cloneStartNode = startNode.clone();
+
+ // Check if page reference isn't existing, page reference value of node is
setted null too.
+ if (pageReference != null && userService.getPage(pageReference) == null)
+ {
+ cloneStartNode.setPageReference(null);
+ }
ArrayList<PageNode> filteredChildren = new ArrayList<PageNode>();
List<PageNode> children = startNode.getChildren();
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -113,7 +113,7 @@
if (context.getRemoteUser() != null)
{
- result.add(PageNavigationUtils.filter(getSelectedNavigation(),
context.getRemoteUser()));
+ result.add(PageNavigationUtils.filterNavigation(getSelectedNavigation(),
context.getRemoteUser(), false, true));
}
else
{
@@ -121,7 +121,7 @@
{
if (!showUserNavigation &&
nav.getOwnerType().equals("user"))
continue;
- result.add(PageNavigationUtils.filter(nav, null));
+ result.add(PageNavigationUtils.filterNavigation(nav, null, false, true));
}
}
return result;
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -59,7 +59,7 @@
public void execute(Event<UIPortal> event) throws Exception
{
UIPortal showedUIPortal = event.getSource();
- UIPortalApplication uiPortalApp =
showedUIPortal.getAncestorOfType(UIPortalApplication.class);
+ UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
//This code snippet is to make sure that Javascript/Skin is fully loaded at the
first request
UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -309,6 +309,12 @@
if(page.getOwnerType().equals(PortalConfig.USER_TYPE)){
removePageNode(page, event);
}
+
+ UIWorkingWorkspace uiWorkingWorkspace =
uiPortalApp.getChild(UIWorkingWorkspace.class);
+ uiWorkingWorkspace.updatePortletsByName("UserToolbarSitePortlet");
+ uiWorkingWorkspace.updatePortletsByName("UserToolbarGroupPortlet");
+
uiWorkingWorkspace.updatePortletsByName("UserToolbarDashboardPortlet");
+ uiWorkingWorkspace.updatePortletsByName("NavigationPortlet");
}
/**
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -89,6 +89,10 @@
private String ownerType;
private String locale;
+
+ private String label;
+
+ private String description;
private String editPermission;
@@ -378,6 +382,26 @@
setProperty(PortalProperties.SESSION_ALIVE, type);
}
+ public String getLabel()
+ {
+ return label;
+ }
+
+ public void setLabel(String label)
+ {
+ this.label = label;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public void setDescription(String description)
+ {
+ this.description = description;
+ }
+
private void localizePageNavigation(PageNavigation nav,Locale locale)
{
ResourceBundleManager mgr = getApplicationComponent(ResourceBundleManager.class);
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -96,6 +96,10 @@
private static final String FIELD_LOCALE = "locale";
private static final String FIELD_SESSION_ALIVE = "sessionAlive";
+
+ private static final String FIELD_LABEL = "label";
+
+ private static final String FIELD_DESCRIPTION = "description";
private String portalOwner_;
@@ -181,7 +185,6 @@
setActions(new String[]{"Save", "Close"});
}
- @SuppressWarnings("unchecked")
private class LanguagesComparator implements Comparator<SelectItemOption>
{
public int compare(SelectItemOption o1, SelectItemOption o2)
@@ -237,7 +240,10 @@
StringLengthValidator.class, 3,
30).addValidator(IdentifierValidator.class).setEditable(false))
.addUIFormInput(
new UIFormSelectBox(FIELD_LOCALE, FIELD_LOCALE,
languages).addValidator(MandatoryValidator.class));
-
+
+ uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_LABEL, FIELD_LABEL,
null));
+ uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_DESCRIPTION,
FIELD_DESCRIPTION, null));
+
List<SelectItemOption<String>> listSkin = new
ArrayList<SelectItemOption<String>>();
SkinService skinService = getApplicationComponent(SkinService.class);
for (String skin : skinService.getAvailableSkinNames())
@@ -317,6 +323,11 @@
dataService.save(portalConfig);
prContext.setAttribute(UserPortalConfig.class,
service.getUserPortalConfig(uiForm.getPortalOwner(), prContext.getRemoteUser()));
uiPortalApp.reloadSkinPortal(prContext);
+
+ // We should use IPC to update some portlets in the future instead of
+ UIWorkingWorkspace uiWorkingWS =
uiPortalApp.getChild(UIWorkingWorkspace.class);
+ uiWorkingWS.updatePortletsByName("PortalNavigationPortlet");
+ uiWorkingWS.updatePortletsByName("UserToolbarSitePortlet");
}
else
{
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -197,6 +197,8 @@
PortalConfig model = new PortalConfig(uiPortal.getOwnerType(), uiPortal.getName(),
uiPortal.getStorageId());
model.setAccessPermissions(uiPortal.getAccessPermissions());
model.setEditPermission(uiPortal.getEditPermission());
+ model.setLabel(uiPortal.getLabel());
+ model.setDescription(uiPortal.getDescription());
model.setLocale(uiPortal.getLocale());
model.setSkin(uiPortal.getSkin());
model.setModifiable(uiPortal.isModifiable());
@@ -346,6 +348,8 @@
uiPortal.setOwner(model.getName());
uiPortal.setModifiable(model.isModifiable());
+ uiPortal.setLabel(model.getLabel());
+ uiPortal.setDescription(model.getDescription());
uiPortal.setLocale(model.getLocale());
uiPortal.setSkin(model.getSkin());
uiPortal.setAccessPermissions(model.getAccessPermissions());
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMaskWorkspace.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -93,10 +93,11 @@
return createUIComponent(clazz, null, null);
}
- public void setUIComponent(UIComponent uicomponent)
+ public UIComponent setUIComponent(UIComponent uicomponent)
{
- super.setUIComponent(uicomponent);
+ UIComponent oldOne = super.setUIComponent(uicomponent);
setShow(uicomponent != null);
+ return oldOne;
}
static public class CloseActionListener extends EventListener<UIComponent>
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java 2011-06-28
08:00:46 UTC (rev 6769)
+++
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplicationLifecycle.java 2011-06-28
12:48:20 UTC (rev 6770)
@@ -44,7 +44,12 @@
return;
UIComponent uiTarget = uicomponent.findComponentById(componentId);
if (uiTarget == null)
+ {
+
context.addUIComponentToUpdateByAjax(uicomponent.<UIComponent>getChildById(UIPortalApplication.UI_WORKING_WS_ID));
+
context.addUIComponentToUpdateByAjax(uicomponent.getChild(UIMaskWorkspace.class));
+ ((PortalRequestContext)context).setFullRender(true);
return;
+ }
if (uiTarget == uicomponent)
super.processDecode(uicomponent, context);
uiTarget.processDecode(context);