Author: chris.laprun(a)jboss.com
Date: 2009-12-14 17:48:01 -0500 (Mon, 14 Dec 2009)
New Revision: 1011
Added:
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/application-registry-configuration.xml
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml
Removed:
portal/branches/wsrp-integration/component/application-registry/src/main/java/conf/portal/
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/portal/
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml
portal/branches/wsrp-integration/component/web/src/main/java/conf/configuration.xml
Modified:
portal/branches/wsrp-integration/component/application-registry/pom.xml
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java
portal/branches/wsrp-integration/component/portal/pom.xml
portal/branches/wsrp-integration/component/portal/src/test/java/conf/test-configuration.xml
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
portal/branches/wsrp-integration/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/CustomService.java
portal/branches/wsrp-integration/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java
portal/branches/wsrp-integration/pom.xml
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
- Merged trunk changes from revision 992 to 1010.
Modified: portal/branches/wsrp-integration/component/application-registry/pom.xml
===================================================================
--- portal/branches/wsrp-integration/component/application-registry/pom.xml 2009-12-14
21:14:23 UTC (rev 1010)
+++ portal/branches/wsrp-integration/component/application-registry/pom.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -31,10 +31,6 @@
<name>GateIn Portal Component Application Registry</name>
<packaging>jar</packaging>
- <properties>
- <maven.test.skip>true</maven.test.skip>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.exoplatform.jcr</groupId>
@@ -61,6 +57,52 @@
</dependency>
<dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.core</artifactId>
+ <version>3.0.0-Beta04-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.jcr</artifactId>
+ <version>3.0.0-Beta04-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.test.organization</artifactId>
+ <version>3.0.0-Beta04-SNAPSHOT</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.portal</artifactId>
+ <version>3.0.0-Beta04-SNAPSHOT</version>
+ <type>test-jar</type>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.chromattic</groupId>
+ <artifactId>chromattic.core</artifactId>
+ <version>${version.chromattic}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <!--
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.portal</artifactId>
+ <version>3.0.0-Beta04-SNAPSHOT</version>
+ <classifier>testconf</classifier>
+ <scope>test</scope>
+ </dependency>
+-->
+
+ <dependency>
<groupId>org.gatein.pc</groupId>
<artifactId>pc-api</artifactId>
<version>${org.gatein.pc.version}</version>
Copied:
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/application-registry-configuration.xml
(from rev 1010,
portal/trunk/component/application-registry/src/test/java/conf/application-registry-configuration.xml)
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/application-registry-configuration.xml
(rev 0)
+++
portal/branches/wsrp-integration/component/application-registry/src/test/java/conf/application-registry-configuration.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -0,0 +1,593 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+
+<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+
<key>org.exoplatform.application.registry.ApplicationRegistryService</key>
+
<type>org.exoplatform.application.registry.impl.ApplicationRegistryServiceImpl</type>
+ <!--
+ <component-plugins>
+ <component-plugin>
+ <name>new.portal.portlets.registry</name>
+ <set-method>initListener</set-method>
+
<type>org.exoplatform.application.registry.ApplicationCategoriesPlugins</type>
+ <description>this listener init the portlets are registered in
PortletRegister</description>
+ <init-params>
+ <object-param>
+ <name>administration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.application.registry.ApplicationCategory">
+ <field
name="name"><string>administration</string></field>
+ <field
name="displayName"><string>Administration</string></field>
+ <field name="description"><string>application for
administration</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+
<value><string>*:/platform/administrators</string></value>
+
<value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="applicationName"><string>ApplicationRegistryPortlet</string></field>
+ <field
name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>Application
Registry</string></field>
+ <field name="description"><string>Application
Registry</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+
<value><string>*:/platform/administrators</string></value>
+
<value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="applicationName"><string>OrganizationPortlet</string></field>
+ <field
name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>Organization
Management</string></field>
+ <field name="description"><string>Organization
Management</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="applicationName"><string>AccountPortlet</string></field>
+ <field
name="categoryName"><string>administration</string></field>
+ <field name="displayName"><string>New
Account</string></field>
+ <field name="description"><string>New
Account</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>exoadmin</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/administrators</string></value>
+ <value><string>*:/organization/management/executive-board</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>web</name>
+ <description>description</description>
+ <object
type="org.exoplatform.application.registry.ApplicationCategory">
+ <field
name="name"><string>web</string></field>
+ <field
name="displayName"><string>web</string></field>
+ <field
name="description"><string>BasicPortlets</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>web</string></field>
+ <field
name="applicationName"><string>IFramePortlet</string></field>
+ <field
name="displayName"><string>IFrame</string></field>
+ <field
name="description"><string>IFrame</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>web</string></field>
+ <field
name="applicationName"><string>SiteMapPortlet</string></field>
+ <field
name="displayName"><string>SiteMap</string></field>
+ <field
name="description"><string>SiteMap</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>web</string></field>
+ <field
name="applicationName"><string>BrowserPortlet</string></field>
+ <field name="displayName"><string>Web
Explorer</string></field>
+ <field name="description"><string>Web
Explorer</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>web</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+
+ <object-param>
+ <name>dashboard</name>
+ <description>description</description>
+ <object
type="org.exoplatform.application.registry.ApplicationCategory">
+ <field
name="name"><string>dashboard</string></field>
+ <field
name="displayName"><string>Dashboard</string></field>
+ <field
name="description"><string>Dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ <field name="applications">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>dashboard</string></field>
+ <field
name="applicationName"><string>DashboardPortlet</string></field>
+ <field name="displayName"><string>Dashboard
Portlet</string></field>
+ <field name="description"><string>Dashboard
Portlet</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.application.registry.Application">
+ <field
name="categoryName"><string>dashboard</string></field>
+ <field
name="applicationName"><string>GadgetPortlet</string></field>
+ <field name="displayName"><string>Gadget Wrapper
Portlet</string></field>
+ <field name="description"><string>Gadget Wrapper
Portlet</string></field>
+ <field
name="applicationType"><string>portlet</string></field>
+ <field
name="applicationGroup"><string>dashboard</string></field>
+ <field name="accessPermissions">
+ <collection type="java.util.ArrayList"
item-type="java.lang.String">
+ <value><string>*:/platform/users</string></value>
+ </collection>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+-->
+ </component>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
+ <component-plugin>
+ <name>chromattic</name>
+ <set-method>addLifeCycle</set-method>
+
<type>org.exoplatform.application.registry.impl.ApplicationRegistryChromatticLifeCycle</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>app</value>
+ </value-param>
+ <value-param>
+ <name>workspace-name</name>
+ <value>portal-test</value>
+ </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.ntdef.NTFile</value>
+ <value>org.chromattic.ntdef.NTFolder</value>
+ <value>org.chromattic.ntdef.NTResource</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
+ <component-plugin>
+ <name>add.namespaces</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>namespaces</name>
+ <property name="app"
value="http://www.gatein.org/jcr/application-registry/1.0/"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>add.nodeType</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
+ <init-params>
+ <values-param>
+ <name>autoCreatedInNewRepository</name>
+ <description>Node types configuration file</description>
+ <value>jar:/conf/application-nodetypes.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
+ <component-plugin>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal configuration</description>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or
not</description>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>initializing.failure.ignore</name>
+ <description>In the run method, use try catch or not (value is
true/false)</description>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ <value>
+ <string>test</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>platform/administrators</string>
+ </value>
+ <value>
+ <string>platform/users</string>
+ </value>
+ <value>
+ <string>platform/guests</string>
+ </value>
+ <value>
+ <string>platform/test/legacy</string>
+ </value>
+ <value>
+ <string>platform/test/normalized</string>
+ </value>
+ <value>
+ <string>organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>root</string>
+ </value>
+ <value>
+ <string>john</string>
+ </value>
+ <value>
+ <string>mary</string>
+ </value>
+ <value>
+ <string>demo</string>
+ </value>
+ <value>
+ <string>overwritelayout</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>user</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>page.templates</name>
+ <description>List of page templates</description>
+ <object
type="org.exoplatform.portal.config.PageTemplateConfig">
+ <field name="templates">
+ <collection type="java.util.ArrayList"></collection>
+ </field>
+ <field name="location">
+ <string>classpath:/portal/template/pages</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
+ <description>this listener populate organization data for the first
launch</description>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <description>check database</description>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <description>Print information init database</description>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig">
+ <field name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field
name="type"><string>member</string></field>
+ <field name="description"><string>member
membership type</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field
name="type"><string>MembershipType_1</string></field>
+ <field
name="description"><string>MembershipType_1 membership
type</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field
name="type"><string>MembershipType_2</string></field>
+ <field
name="description"><string>MembershipType_2 membership
type</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>platform</string></field>
+ <field
name="parentId"><string></string></field>
+ <field name="description"><string>the
/platform group</string></field>
+ <field
name="label"><string>Platform</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>users</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/users group</string></field>
+ <field
name="label"><string>Users</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>Group1</string></field>
+ <field
name="parentId"><string>/platform/users</string></field>
+ <field name="description"><string>the
/platform/users/Group1 group</string></field>
+ <field
name="label"><string>Group1</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>Group2</string></field>
+ <field
name="parentId"><string>/platform/users</string></field>
+ <field name="description"><string>the
/platform/users/Group2 group</string></field>
+ <field
name="label"><string>Group2</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>demo</string></field>
+ <field
name="password"><string>gtn</string></field>
+ <field
name="firstName"><string>Demo</string></field>
+ <field
name="lastName"><string>gtn</string></field>
+ <field
name="email"><string>demo@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>userName_1</string></field>
+ <field
name="password"><string>default</string></field>
+ <field
name="firstName"><string>default</string></field>
+ <field
name="lastName"><string>default</string></field>
+ <field
name="email"><string>exo(a)exoportal.org</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>userName_2</string></field>
+ <field
name="password"><string>default</string></field>
+ <field
name="firstName"><string>default</string></field>
+ <field
name="lastName"><string>default</string></field>
+ <field
name="email"><string>exo(a)exoportal.org</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+
+ <!--
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>root</string></field>
+ <field
name="password"><string>gtn</string></field>
+ <field
name="firstName"><string>Root</string></field>
+ <field
name="lastName"><string>Root</string></field>
+ <field
name="email"><string>root@localhost</string></field>
+ <field name="groups">
+ <string>
+ manager:/platform/administrators,member:/platform/users,
+ member:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>john</string></field>
+ <field
name="password"><string>gtn</string></field>
+ <field
name="firstName"><string>John</string></field>
+ <field
name="lastName"><string>Anthony</string></field>
+ <field
name="email"><string>john@localhost</string></field>
+ <field name="groups">
+ <string>
+ member:/platform/administrators,member:/platform/users,
+ manager:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>mary</string></field>
+ <field
name="password"><string>gtn</string></field>
+ <field
name="firstName"><string>Mary</string></field>
+ <field
name="lastName"><string>Kelly</string></field>
+ <field
name="email"><string>mary@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field
name="userName"><string>overwritelayout</string></field>
+ <field
name="password"><string>whatever</string></field>
+ <field
name="firstName"><string>whatever</string></field>
+ <field
name="lastName"><string>whatever</string></field>
+ <field
name="email"><string>whatever@localhost</string></field>
+ <field name="groups">
+ <string>member:/platform/guests</string>
+ </field>
+ </object>
+ </value>
+-->
+
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
Copied:
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
(from rev 1010,
portal/trunk/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java)
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
(rev 0)
+++
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.exoplatform.application;
+
+import org.exoplatform.component.test.AbstractGateInTest;
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/jcr/jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/organization/organization-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/application-registry-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/portal/portal-configuration.xml")
+})
+public abstract class AbstractApplicationRegistryTest extends AbstractGateInTest
+{
+
+/*
+ public void testFoo() throws Exception
+ {
+ PortalContainer container = PortalContainer.getInstance();
+ ApplicationRegistryService registry =
(ApplicationRegistryService)container.getComponentInstanceOfType(ApplicationRegistryService.class);
+ registry.getAllApplications();
+ }
+*/
+
+}
Modified:
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestGadgetRegistryService.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -25,12 +25,14 @@
import java.util.List;
/**
+ * todo julien : to fix
+ *
* Created by The eXo Platform SAS
* Author : Pham Thanh Tung
* thanhtungty(a)gmail.com
* Jul 11, 2008
*/
-public class TestGadgetRegistryService extends BasicTestCase
+public abstract class TestGadgetRegistryService extends BasicTestCase
{
private GadgetRegistryService service_;
Modified:
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/gadget/TestSourceStorageService.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -21,7 +21,9 @@
import org.exoplatform.test.BasicTestCase;
-/*
+/**
+ * todo julien : fix or remove
+ *
* Thu, May 15, 2004 @
* @author: Tuan Nguyen
* @version: $Id: TestResourceBundleService.java 5799 2006-05-28 17:55:42Z geaz $
Modified:
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java
===================================================================
---
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/application-registry/src/test/java/org/exoplatform/application/registry/TestApplicationRegistryService.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -19,14 +19,14 @@
package org.exoplatform.application.registry;
+import org.exoplatform.application.AbstractApplicationRegistryTest;
+import org.exoplatform.commons.chromattic.ChromatticManager;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.MembershipType;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
-import org.exoplatform.services.organization.UserProfile;
-import org.exoplatform.test.BasicTestCase;
import java.util.ArrayList;
import java.util.List;
@@ -37,7 +37,7 @@
* thanhtungty(a)gmail.com
* Nov 27, 2007
*/
-public class TestApplicationRegistryService extends BasicTestCase
+public class TestApplicationRegistryService extends AbstractApplicationRegistryTest
{
protected static String demo = "demo";
@@ -62,31 +62,30 @@
protected ApplicationRegistryService service_;
+ protected OrganizationService orgService;
+
+/*
protected int initialCats;
protected int initialApps;
+*/
- public TestApplicationRegistryService(String name)
- {
- super(name);
- }
+ protected ChromatticManager chromatticManager;
@Override
protected void setUp() throws Exception
{
- super.setUp();
PortalContainer portalContainer = PortalContainer.getInstance();
- service_ =
-
(ApplicationRegistryService)portalContainer.getComponentInstanceOfType(ApplicationRegistryService.class);
- initialCats = service_.getApplicationCategories().size();
- initialApps = service_.getAllApplications().size();
+ chromatticManager =
(ChromatticManager)portalContainer.getComponentInstanceOfType(ChromatticManager.class);
+ chromatticManager.beginRequest();
+ service_ =
(ApplicationRegistryService)portalContainer.getComponentInstanceOfType(ApplicationRegistryService.class);
+ orgService =
(OrganizationService)portalContainer.getComponentInstanceOfType(OrganizationService.class);
}
- public void testInitializeService() throws Exception
+ @Override
+ protected void tearDown() throws Exception
{
- assertNotNull(service_);
- assertEquals(3, initialCats);
- assertEquals(8, initialApps);
+ chromatticManager.endRequest(false);
}
public void testApplicationCategory() throws Exception
@@ -98,7 +97,7 @@
service_.save(category1);
int numberOfCats = service_.getApplicationCategories().size();
- assertEquals(initialCats + 1, numberOfCats);
+ assertEquals(1, numberOfCats);
ApplicationCategory returnedCategory1 =
service_.getApplicationCategory(categoryName);
assertNotNull(returnedCategory1);
@@ -111,64 +110,59 @@
service_.save(category1);
numberOfCats = service_.getApplicationCategories().size();
- assertEquals(initialCats + 1, numberOfCats);
+ assertEquals(1, numberOfCats);
returnedCategory1 = service_.getApplicationCategory(categoryName);
assertEquals(newDescription, returnedCategory1.getDescription());
//Remove the ApplicationRegistry
service_.remove(category1);
numberOfCats = service_.getApplicationCategories().size();
- assertEquals(initialCats, numberOfCats);
+ assertEquals(0, numberOfCats);
returnedCategory1 = service_.getApplicationCategory(categoryName);
assertNull(returnedCategory1);
}
- void assertAppCategoryGetByAccessUser(ApplicationRegistryService service) throws
Exception
+ public void testAppCategoryGetByAccessUser() throws Exception
{
- PortalContainer portalContainer = PortalContainer.getInstance();
- OrganizationService orgService =
-
(OrganizationService)portalContainer.getComponentInstanceOfType(OrganizationService.class);
- assertNotNull(orgService);
- prepareOrganizationData(orgService);
-
String officeCategoryName = "Office";
ApplicationCategory officeCategory = createAppCategory(officeCategoryName,
"None");
- service.save(officeCategory);
+ service_.save(officeCategory);
String[] officeApps = {"MSOffice", "OpenOffice"};
- Application msApp = createApplication(officeApps[0], "TestType",
officeCategoryName);
+ Application msApp = createApplication(officeApps[0], officeCategoryName);
ArrayList<String> pers = new ArrayList<String>();
pers.add("member:/users");
msApp.setAccessPermissions(pers);
- service.save(officeCategory, msApp);
- Application openApp = createApplication(officeApps[1], "TestType",
officeCategoryName);
- service.save(officeCategory, openApp);
+ service_.save(officeCategory, msApp);
+ Application openApp = createApplication(officeApps[1], officeCategoryName);
+ service_.save(officeCategory, openApp);
String gameCategoryName = "Game";
ApplicationCategory gameCategory = createAppCategory(gameCategoryName,
"None");
- service.save(gameCategory);
+ service_.save(gameCategory);
String[] gameApps = {"HaftLife", "Chess"};
- Application haftlifeApp = createApplication(gameApps[0], "TestType",
gameCategoryName);
+ Application haftlifeApp = createApplication(gameApps[0], gameCategoryName);
pers = new ArrayList<String>();
pers.add("member:/portal/admin");
haftlifeApp.setAccessPermissions(pers);
- service.save(gameCategory, haftlifeApp);
- Application chessApp = createApplication(gameApps[1], "TestType",
gameCategoryName);
+ service_.save(gameCategory, haftlifeApp);
+ Application chessApp = createApplication(gameApps[1], gameCategoryName);
chessApp.setAccessPermissions(pers);
- service.save(gameCategory, chessApp);
+ service_.save(gameCategory, chessApp);
- List<ApplicationCategory> returnCategorys =
service.getApplicationCategories(username1);
+ List<ApplicationCategory> returnCategorys =
service_.getApplicationCategories(username1);
for (ApplicationCategory cate : returnCategorys)
{
System.out.println("\n\n\ncateName: " + cate.getName());
- List<Application> apps = service.getApplications(cate);
+ List<Application> apps = service_.getApplications(cate);
for (Application app : apps)
{
System.out.println("\nappName: " + app.getApplicationName() +
"---" + app.getAccessPermissions());
}
}
- assertEquals(1, returnCategorys.size());
+ assertEquals(2, returnCategorys.size());
}
+/*
void assertApplicationOperation(ApplicationRegistryService service) throws Exception
{
@@ -309,7 +303,7 @@
assertEquals(0, apps2.size());
// service.clearAllRegistries() ;
}
-
+*/
private ApplicationCategory createAppCategory(String categoryName, String
categoryDes)
{
ApplicationCategory category = new ApplicationCategory();
@@ -318,18 +312,18 @@
category.setDescription(categoryDes);
return category;
}
-
- private Application createApplication(String appName, String appType, String
appGroup)
+ private Application createApplication(String appName, String appGroup)
{
Application app = new Application();
+ app.setContentId(appName);
app.setApplicationName(appName);
app.setDisplayName(appName);
- app.setType(ApplicationType.getType(appType));
-// app.setApplicationGroup(appGroup);
+ app.setType(ApplicationType.PORTLET);
return app;
}
- private void prepareOrganizationData(OrganizationService orgService) throws Exception
+/*
+ private void prepareOrganizationData() throws Exception
{
groupDefault =
orgService.getGroupHandler().findGroupById("/platform/users");
if (group1 == null)
@@ -412,4 +406,5 @@
orgService.getUserProfileHandler().saveUserProfile(up, true);
return u;
}
+*/
}
Modified:
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java
===================================================================
---
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/identity/src/main/java/org/exoplatform/services/organization/idm/PicketLinkIDMOrganizationServiceImpl.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -27,6 +27,9 @@
import org.exoplatform.services.organization.BaseOrganizationService;
import org.picocontainer.Startable;
+import java.util.LinkedList;
+import java.util.concurrent.atomic.AtomicInteger;
+
public class PicketLinkIDMOrganizationServiceImpl extends BaseOrganizationService
implements Startable,
ComponentRequestLifecycle
{
@@ -129,28 +132,49 @@
//toto
}
- public void startRequest(ExoContainer container)
+ /**
+ * Used to allow nested requests (as done by the authenticator during unit tests) and
avoid
+ * to commit two times the same transaction.
+ */
+ private ThreadLocal<AtomicInteger> currentRequestCount = new
ThreadLocal<AtomicInteger>()
{
- try
+ @Override
+ protected AtomicInteger initialValue()
{
- idmService_.getIdentitySession().beginTransaction();
+ return new AtomicInteger();
}
- catch (Exception e)
+ };
+
+ public void startRequest(ExoContainer container)
+ {
+ AtomicInteger count = currentRequestCount.get();
+ if (count.getAndIncrement() == 0)
{
- e.printStackTrace();
+ try
+ {
+ idmService_.getIdentitySession().beginTransaction();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
}
}
public void endRequest(ExoContainer container)
{
- try
+ AtomicInteger count = currentRequestCount.get();
+ if (count.decrementAndGet() == 0)
{
- idmService_.getIdentitySession().getTransaction().commit();
+ try
+ {
+ idmService_.getIdentitySession().getTransaction().commit();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
}
- catch (Exception e)
- {
- e.printStackTrace();
- }
}
public String getGtnGroupType()
Modified: portal/branches/wsrp-integration/component/portal/pom.xml
===================================================================
--- portal/branches/wsrp-integration/component/portal/pom.xml 2009-12-14 21:14:23 UTC (rev
1010)
+++ portal/branches/wsrp-integration/component/portal/pom.xml 2009-12-14 22:48:01 UTC (rev
1011)
@@ -150,6 +150,20 @@
</execution>
</executions>
</plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</build>
</project>
Copied: portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal (from
rev 1010, portal/trunk/component/portal/src/test/java/conf/portal)
Deleted:
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/java/conf/portal/portal-configuration.xml 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -1,230 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-
-<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field
name="name"><string>default</string></field>
- <field name="maxSize"><int>300</int></field>
- <field
name="liveTime"><long>6000</long></field>
- <field
name="distributed"><boolean>false</boolean></field>
- <field
name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.security.Authenticator</key>
-
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.listener.ListenerService</key>
- <type>org.exoplatform.services.listener.ListenerService</type>
- </component>
-
- <component>
- <key>org.exoplatform.commons.chromattic.ChromatticManager</key>
- <type>org.exoplatform.commons.chromattic.ChromatticManager</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
- <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.pom.data.ModelDataStorage</key>
- <type>org.exoplatform.portal.pom.config.POMDataStorage</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.DataStorage</key>
- <type>org.exoplatform.portal.config.DataStorageImpl</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>
- <value-param>
- <name>super.user</name>
- <description>administrator</description>
- <value>root</value>
- </value-param>
- <value-param>
- <name>guests.group</name>
- <description>guests group</description>
- <value>/platform/guests</value>
- </value-param>
- <value-param>
- <name>navigation.creator.membership.type</name>
- <description>specific membership type have full permission with group
navigation</description>
- <value>manager</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserPortalConfigService</key>
- <type>org.exoplatform.portal.config.UserPortalConfigService</type>
- </component>
-
- <external-component-plugins>
-
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
- <component-plugin>
- <name>add.namespaces</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
- <init-params>
- <properties-param>
- <name>namespaces</name>
- <property name="mop"
value="http://www.gatein.org/jcr/mop/1.0/"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>add.nodeType</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
- <init-params>
- <values-param>
- <name>autoCreatedInNewRepository</name>
- <description>Node types configuration file</description>
- <value>jar:/conf/mop-nodetypes.xml</value>
- <value>jar:/conf/content-nodetypes.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <external-component-plugins>
-
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
- <component-plugin>
- <name>chromattic</name>
- <set-method>addLifeCycle</set-method>
- <type>org.exoplatform.portal.pom.config.MOPChromatticLifeCycle</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>mop</value>
- </value-param>
- <value-param>
- <name>workspace-name</name>
- <value>portal-test</value>
- </value-param>
- <values-param>
- <name>entities</name>
- <value>org.gatein.mop.core.api.workspace.WorkspaceImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIContainerImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIWindowImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIBodyImpl</value>
- <value>org.gatein.mop.core.api.workspace.PageImpl</value>
- <value>org.gatein.mop.core.api.workspace.PageContainer</value>
- <value>org.gatein.mop.core.api.workspace.NavigationImpl</value>
-
<value>org.gatein.mop.core.api.workspace.NavigationContainer</value>
- <value>org.gatein.mop.core.api.workspace.PageLinkImpl</value>
- <value>org.gatein.mop.core.api.workspace.URLLinkImpl</value>
-
<value>org.gatein.mop.core.api.workspace.PortalSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.PortalSite</value>
-
<value>org.gatein.mop.core.api.workspace.GroupSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.GroupSite</value>
- <value>org.gatein.mop.core.api.workspace.UserSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.UserSite</value>
-
<value>org.gatein.mop.core.api.workspace.content.CustomizationContainer</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextTypeContainer</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextType</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextSpecialization</value>
-
<value>org.gatein.mop.core.api.workspace.content.WorkspaceClone</value>
-
<value>org.gatein.mop.core.api.workspace.content.WorkspaceSpecialization</value>
- <value>org.exoplatform.portal.pom.spi.portlet.PortletState</value>
-
<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>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <external-component-plugins>
-
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
- <component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
-
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created
user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field
name="groupId"><string>/platform/users</string></field>
- <field
name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
- <value><string>root</string></value>
- <value><string>john</string></value>
- <value><string>mary</string></value>
- <value><string>demo</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>user.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
- </component-plugin>
- <component-plugin>
- <name>group.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
Copied:
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml
(from rev 1010,
portal/trunk/component/portal/src/test/java/conf/portal/portal-configuration.xml)
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml
(rev 0)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/conf/portal/portal-configuration.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -0,0 +1,230 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ 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.
+
+-->
+
+<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field
name="name"><string>default</string></field>
+ <field name="maxSize"><int>300</int></field>
+ <field
name="liveTime"><long>6000</long></field>
+ <field
name="distributed"><boolean>false</boolean></field>
+ <field
name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.security.Authenticator</key>
+
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.listener.ListenerService</key>
+ <type>org.exoplatform.services.listener.ListenerService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.commons.chromattic.ChromatticManager</key>
+ <type>org.exoplatform.commons.chromattic.ChromatticManager</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
+ <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.pom.data.ModelDataStorage</key>
+ <type>org.exoplatform.portal.pom.config.POMDataStorage</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.DataStorage</key>
+ <type>org.exoplatform.portal.config.DataStorageImpl</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>
+ <value-param>
+ <name>super.user</name>
+ <description>administrator</description>
+ <value>root</value>
+ </value-param>
+ <value-param>
+ <name>guests.group</name>
+ <description>guests group</description>
+ <value>/platform/guests</value>
+ </value-param>
+ <value-param>
+ <name>navigation.creator.membership.type</name>
+ <description>specific membership type have full permission with group
navigation</description>
+ <value>manager</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserPortalConfigService</key>
+ <type>org.exoplatform.portal.config.UserPortalConfigService</type>
+ </component>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
+ <component-plugin>
+ <name>add.namespaces</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>namespaces</name>
+ <property name="mop"
value="http://www.gatein.org/jcr/mop/1.0/"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>add.nodeType</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
+ <init-params>
+ <values-param>
+ <name>autoCreatedInNewRepository</name>
+ <description>Node types configuration file</description>
+ <value>jar:/conf/mop-nodetypes.xml</value>
+ <value>jar:/conf/content-nodetypes.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
+ <component-plugin>
+ <name>chromattic</name>
+ <set-method>addLifeCycle</set-method>
+ <type>org.exoplatform.portal.pom.config.MOPChromatticLifeCycle</type>
+ <init-params>
+ <value-param>
+ <name>name</name>
+ <value>mop</value>
+ </value-param>
+ <value-param>
+ <name>workspace-name</name>
+ <value>portal-test</value>
+ </value-param>
+ <values-param>
+ <name>entities</name>
+ <value>org.gatein.mop.core.api.workspace.WorkspaceImpl</value>
+ <value>org.gatein.mop.core.api.workspace.UIContainerImpl</value>
+ <value>org.gatein.mop.core.api.workspace.UIWindowImpl</value>
+ <value>org.gatein.mop.core.api.workspace.UIBodyImpl</value>
+ <value>org.gatein.mop.core.api.workspace.PageImpl</value>
+ <value>org.gatein.mop.core.api.workspace.PageContainer</value>
+ <value>org.gatein.mop.core.api.workspace.NavigationImpl</value>
+
<value>org.gatein.mop.core.api.workspace.NavigationContainer</value>
+ <value>org.gatein.mop.core.api.workspace.PageLinkImpl</value>
+ <value>org.gatein.mop.core.api.workspace.URLLinkImpl</value>
+
<value>org.gatein.mop.core.api.workspace.PortalSiteContainer</value>
+ <value>org.gatein.mop.core.api.workspace.PortalSite</value>
+
<value>org.gatein.mop.core.api.workspace.GroupSiteContainer</value>
+ <value>org.gatein.mop.core.api.workspace.GroupSite</value>
+ <value>org.gatein.mop.core.api.workspace.UserSiteContainer</value>
+ <value>org.gatein.mop.core.api.workspace.UserSite</value>
+
<value>org.gatein.mop.core.api.workspace.content.CustomizationContainer</value>
+
<value>org.gatein.mop.core.api.workspace.content.ContextTypeContainer</value>
+
<value>org.gatein.mop.core.api.workspace.content.ContextType</value>
+
<value>org.gatein.mop.core.api.workspace.content.ContextSpecialization</value>
+
<value>org.gatein.mop.core.api.workspace.content.WorkspaceClone</value>
+
<value>org.gatein.mop.core.api.workspace.content.WorkspaceSpecialization</value>
+ <value>org.exoplatform.portal.pom.spi.portlet.PortletState</value>
+
<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>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+
<target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+ <component-plugin>
+ <name>new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
+ <description>this listener assign group and membership to a new created
user</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object
type="org.exoplatform.services.organization.impl.NewUserConfig">
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object
type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
+ <field
name="groupId"><string>/platform/users</string></field>
+ <field
name="membership"><string>member</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="ignoredUser">
+ <collection type="java.util.HashSet">
+ <value><string>root</string></value>
+ <value><string>john</string></value>
+ <value><string>mary</string></value>
+ <value><string>demo</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>user.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
+ </component-plugin>
+ <component-plugin>
+ <name>group.portal.config.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/conf/test-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/conf/test-configuration.xml 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/conf/test-configuration.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -24,278 +24,123 @@
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
- <component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field
name="name"><string>default</string></field>
- <field name="maxSize"><int>300</int></field>
- <field
name="liveTime"><long>6000</long></field>
- <field
name="distributed"><boolean>false</boolean></field>
- <field
name="implementation"><string>org.exoplatform.services.cache.concurrent.ConcurrentFIFOExoCache</string></field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.security.Authenticator</key>
-
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.listener.ListenerService</key>
- <type>org.exoplatform.services.listener.ListenerService</type>
- </component>
-
- <component>
- <key>org.exoplatform.commons.chromattic.ChromatticManager</key>
- <type>org.exoplatform.commons.chromattic.ChromatticManager</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
- <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.pom.data.ModelDataStorage</key>
- <type>org.exoplatform.portal.pom.config.POMDataStorage</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.DataStorage</key>
- <type>org.exoplatform.portal.config.DataStorageImpl</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>
- <value-param>
- <name>super.user</name>
- <description>administrator</description>
- <value>root</value>
- </value-param>
- <value-param>
- <name>guests.group</name>
- <description>guests group</description>
- <value>/platform/guests</value>
- </value-param>
- <value-param>
- <name>navigation.creator.membership.type</name>
- <description>specific membership type have full permission with group
navigation</description>
- <value>manager</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserPortalConfigService</key>
- <type>org.exoplatform.portal.config.UserPortalConfigService</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.config.user.listener</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal
configuration</description>
- <init-params>
- <value-param>
- <name>default.portal</name>
- <description>The default portal for checking db is empty or
not</description>
- <value>classic</value>
- </value-param>
- <value-param>
- <name>initializing.failure.ignore</name>
- <description>In the run method, use try catch or not (value is
true/false)</description>
- <value>true</value>
- </value-param>
- <object-param>
- <name>portal.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>classic</string>
- </value>
- <value>
- <string>test</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>portal</string>
- </field>
- <field name="templateLocation">
- <string>classpath:/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>group.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>platform/administrators</string>
- </value>
- <value>
- <string>platform/users</string>
- </value>
- <value>
- <string>platform/guests</string>
- </value>
- <value>
- <string>platform/test/legacy</string>
- </value>
- <value>
- <string>platform/test/normalized</string>
- </value>
- <value>
- <string>organization/management/executive-board</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>group</string>
- </field>
- <field name="templateLocation">
- <string>classpath:/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>user.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>root</string>
- </value>
- <value>
- <string>john</string>
- </value>
- <value>
- <string>mary</string>
- </value>
- <value>
- <string>demo</string>
- </value>
- <value>
- <string>overwritelayout</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>user</string>
- </field>
- <field name="templateLocation">
- <string>classpath:/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>page.templates</name>
- <description>List of page templates</description>
- <object
type="org.exoplatform.portal.config.PageTemplateConfig">
- <field name="templates">
- <collection
type="java.util.ArrayList"></collection>
- </field>
- <field name="location">
- <string>classpath:/portal/template/pages</string>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
<external-component-plugins>
-
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
- <component-plugin>
- <name>add.namespaces</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
- <init-params>
- <properties-param>
- <name>namespaces</name>
- <property name="mop"
value="http://www.gatein.org/jcr/mop/1.0/"/>
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>add.nodeType</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
- <init-params>
- <values-param>
- <name>autoCreatedInNewRepository</name>
- <description>Node types configuration file</description>
- <value>jar:/conf/mop-nodetypes.xml</value>
- <value>jar:/conf/content-nodetypes.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <external-component-plugins>
-
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
+
<target-component>org.exoplatform.portal.config.UserPortalConfigService</target-component>
<component-plugin>
- <name>chromattic</name>
- <set-method>addLifeCycle</set-method>
- <type>org.exoplatform.portal.pom.config.MOPChromatticLifeCycle</type>
+ <name>new.portal.config.user.listener</name>
+ <set-method>initListener</set-method>
+ <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
+ <description>this listener init the portal configuration</description>
<init-params>
<value-param>
- <name>name</name>
- <value>mop</value>
+ <name>default.portal</name>
+ <description>The default portal for checking db is empty or
not</description>
+ <value>classic</value>
</value-param>
<value-param>
- <name>workspace-name</name>
- <value>portal-test</value>
+ <name>initializing.failure.ignore</name>
+ <description>In the run method, use try catch or not (value is
true/false)</description>
+ <value>true</value>
</value-param>
- <values-param>
- <name>entities</name>
- <value>org.gatein.mop.core.api.workspace.WorkspaceImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIContainerImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIWindowImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIBodyImpl</value>
- <value>org.gatein.mop.core.api.workspace.PageImpl</value>
- <value>org.gatein.mop.core.api.workspace.PageContainer</value>
- <value>org.gatein.mop.core.api.workspace.NavigationImpl</value>
-
<value>org.gatein.mop.core.api.workspace.NavigationContainer</value>
- <value>org.gatein.mop.core.api.workspace.PageLinkImpl</value>
- <value>org.gatein.mop.core.api.workspace.URLLinkImpl</value>
-
<value>org.gatein.mop.core.api.workspace.PortalSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.PortalSite</value>
-
<value>org.gatein.mop.core.api.workspace.GroupSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.GroupSite</value>
- <value>org.gatein.mop.core.api.workspace.UserSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.UserSite</value>
-
<value>org.gatein.mop.core.api.workspace.content.CustomizationContainer</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextTypeContainer</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextType</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextSpecialization</value>
-
<value>org.gatein.mop.core.api.workspace.content.WorkspaceClone</value>
-
<value>org.gatein.mop.core.api.workspace.content.WorkspaceSpecialization</value>
- <value>org.exoplatform.portal.pom.spi.portlet.PortletState</value>
-
<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>
- </values-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ <value>
+ <string>test</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>platform/administrators</string>
+ </value>
+ <value>
+ <string>platform/users</string>
+ </value>
+ <value>
+ <string>platform/guests</string>
+ </value>
+ <value>
+ <string>platform/test/legacy</string>
+ </value>
+ <value>
+ <string>platform/test/normalized</string>
+ </value>
+ <value>
+ <string>organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>root</string>
+ </value>
+ <value>
+ <string>john</string>
+ </value>
+ <value>
+ <string>mary</string>
+ </value>
+ <value>
+ <string>demo</string>
+ </value>
+ <value>
+ <string>overwritelayout</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>user</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/portal</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>page.templates</name>
+ <description>List of page templates</description>
+ <object
type="org.exoplatform.portal.config.PageTemplateConfig">
+ <field name="templates">
+ <collection type="java.util.ArrayList"></collection>
+ </field>
+ <field name="location">
+ <string>classpath:/portal/template/pages</string>
+ </field>
+ </object>
+ </object-param>
</init-params>
</component-plugin>
</external-component-plugins>
@@ -556,369 +401,6 @@
</init-params>
</component-plugin>
- <component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
-
<type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created
user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field
name="groupId"><string>/platform/users</string></field>
- <field
name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
- <value><string>root</string></value>
- <value><string>john</string></value>
- <value><string>mary</string></value>
- <value><string>demo</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>user.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.UserPortalConfigListener</type>
- </component-plugin>
-
- <component-plugin>
- <name>group.portal.config.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.portal.config.GroupPortalConfigListener</type>
- </component-plugin>
-
</external-component-plugins>
- <!--
-
- <component>
- <key>org.exoplatform.portal.config.UserACL</key>
- <type>org.exoplatform.portal.config.UserACL</type>
- <init-params>
- <value-param>
- <name>super.user</name>
- <description>administrator</description>
- <value>root</value>
- </value-param>
- <value-param>
- <name>guests.group</name>
- <description>guests group</description>
- <value>/platform/guests</value>
- </value-param>
- <value-param>
- <name>navigation.creator.membership.type</name>
- <description>specific membership type have full permission with group
navigation</description>
- <value>manager</value>
- </value-param>
- </init-params>
- </component>
- <component>
-
<key>org.exoplatform.services.portletcontainer.bundle.ResourceBundleDelegate</key>
-
<type>org.exoplatform.portal.application.ResourceBundleDelegateImpl</type>
- </component>
- <component>
- <key>org.exoplatform.portal.config.UserPortalConfigService</key>
- <type>org.exoplatform.portal.config.UserPortalConfigService</type>
- <component-plugins>
- <component-plugin>
- <name>new.portal.config.user.listener</name>
- <set-method>initListener</set-method>
- <type>org.exoplatform.portal.config.NewPortalConfigListener</type>
- <description>this listener init the portal
configuration</description>
- <init-params>
- <value-param>
- <name>default.portal</name>
- <description>The default portal for checking db is empty or
not</description>
- <value>classic</value>
- </value-param>
- <value-param>
- <name>initializing.failure.ignore</name>
- <description>In the run method, use try catch or not (value is
true/false)</description>
- <value>true</value>
- </value-param>
- <object-param>
- <name>portal.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>classic</string>
- </value>
- <value>
- <string>test</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>portal</string>
- </field>
- <field name="templateLocation">
- <string>classpath:/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>group.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>platform/administrators</string>
- </value>
- <value>
- <string>platform/users</string>
- </value>
- <value>
- <string>platform/guests</string>
- </value>
- <value>
- <string>platform/test/legacy</string>
- </value>
- <value>
- <string>platform/test/normalized</string>
- </value>
- <value>
- <string>organization/management/executive-board</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>group</string>
- </field>
- <field name="templateLocation">
- <string>classpath:/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>user.configuration</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.NewPortalConfig">
- <field name="predefinedOwner">
- <collection type="java.util.HashSet">
- <value>
- <string>root</string>
- </value>
- <value>
- <string>john</string>
- </value>
- <value>
- <string>mary</string>
- </value>
- <value>
- <string>demo</string>
- </value>
- <value>
- <string>overwritelayout</string>
- </value>
- </collection>
- </field>
- <field name="ownerType">
- <string>user</string>
- </field>
- <field name="templateLocation">
- <string>classpath:/portal</string>
- </field>
- </object>
- </object-param>
- <object-param>
- <name>page.templates</name>
- <description>List of page templates</description>
- <object
type="org.exoplatform.portal.config.PageTemplateConfig">
- <field name="templates">
- <collection
type="java.util.ArrayList"></collection>
- </field>
- <field name="location">
- <string>classpath:/portal/template/pages</string>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
- <component>
-
<key>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</key>
-
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl</type>
- </component>
-
- <external-component-plugins>
-
<target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
- <component-plugin>
- <name>chromattic</name>
- <set-method>addLifeCycle</set-method>
- <type>org.exoplatform.portal.pom.config.MOPChromatticLifeCycle</type>
- <init-params>
- <value-param>
- <name>name</name>
- <value>mop</value>
- </value-param>
- <value-param>
- <name>workspace-name</name>
- <value>portal-system</value>
- </value-param>
- <values-param>
- <name>entities</name>
- <value>org.gatein.mop.core.api.workspace.WorkspaceImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIContainerImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIWindowImpl</value>
- <value>org.gatein.mop.core.api.workspace.UIBodyImpl</value>
- <value>org.gatein.mop.core.api.workspace.PageImpl</value>
- <value>org.gatein.mop.core.api.workspace.PageContainer</value>
- <value>org.gatein.mop.core.api.workspace.NavigationImpl</value>
-
<value>org.gatein.mop.core.api.workspace.NavigationContainer</value>
- <value>org.gatein.mop.core.api.workspace.PageLinkImpl</value>
- <value>org.gatein.mop.core.api.workspace.URLLinkImpl</value>
-
<value>org.gatein.mop.core.api.workspace.PortalSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.PortalSite</value>
-
<value>org.gatein.mop.core.api.workspace.GroupSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.GroupSite</value>
- <value>org.gatein.mop.core.api.workspace.UserSiteContainer</value>
- <value>org.gatein.mop.core.api.workspace.UserSite</value>
-
<value>org.gatein.mop.core.api.workspace.content.CustomizationContainer</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextTypeContainer</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextType</value>
-
<value>org.gatein.mop.core.api.workspace.content.ContextSpecialization</value>
-
<value>org.gatein.mop.core.api.workspace.content.WorkspaceClone</value>
-
<value>org.gatein.mop.core.api.workspace.content.WorkspaceSpecialization</value>
- <value>org.exoplatform.portal.pom.spi.portlet.PortletState</value>
-
<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>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <external-component-plugins>
-
<target-component>org.exoplatform.services.jcr.RepositoryService</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcexo</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName"
value="org.hsqldb.jdbcDriver" />
- <property name="url"
value="jdbc:hsqldb:file:target/temp/data/portal" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
- <external-component-plugins>
-
<target-component>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</target-component>
- <component-plugin>
- <name>addPaths</name>
- <set-method>addPlugin</set-method>
-
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.AddPathPlugin</type>
- <init-params>
- <object-param>
- <name>cms.configuration</name>
- <description>configuration for the cms path</description>
- <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig">
- <field name="repository">
- <string>repository</string>
- </field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value>
- <string>portal-system</string>
- </value>
- </collection>
- </field>
- <field name="jcrPaths">
- <collection type="java.util.ArrayList">
- <value>
- <object
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$JcrPath">
- <field name="alias">
- <string>usersPath</string>
- </field>
- <field name="path">
- <string>/Users</string>
- </field>
- <field name="permissions">
- <collection type="java.util.ArrayList">
- <value>
- <object
-
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity">
- <string>*:/platform/administrators</string>
- </field>
- <field name="read">
- <string>true</string>
- </field>
- <field name="addNode">
- <string>true</string>
- </field>
- <field name="setProperty">
- <string>true</string>
- </field>
- <field name="remove">
- <string>true</string>
- </field>
- </object>
- </value>
- <value>
- <object
-
type="org.exoplatform.services.jcr.ext.hierarchy.impl.HierarchyConfig$Permission">
- <field name="identity">
- <string>*:/platform/users</string>
- </field>
- <field name="read">
- <string>true</string>
- </field>
- <field name="addNode">
- <string>false</string>
- </field>
- <field name="setProperty">
- <string>true</string>
- </field>
- <field name="remove">
- <string>false</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
--->
</configuration>
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -30,6 +30,7 @@
@ConfiguredBy({
@ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/jcr/jcr-configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/organization/organization-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/portal/portal-configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/test-configuration.xml")
})
public abstract class AbstractPortalTest extends AbstractGateInTest
Modified:
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
---
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -43,12 +43,8 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.services.organization.UserHandler;
-import org.exoplatform.services.organization.idm.PicketLinkIDMService;
import org.exoplatform.services.security.Authenticator;
import org.exoplatform.services.security.ConversationState;
-import org.exoplatform.test.BasicTestCase;
-import org.picketlink.idm.api.IdentitySession;
-import org.picketlink.idm.common.exception.IdentityException;
import java.util.Arrays;
import java.util.Collections;
@@ -76,9 +72,6 @@
private DataStorage storage_;
/** . */
- private PicketLinkIDMService idmService;
-
- /** . */
private POMSessionManager mgr;
/** . */
@@ -122,7 +115,6 @@
userPortalConfigSer_ =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
orgService_ =
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- idmService =
(PicketLinkIDMService)container.getComponentInstanceOfType(PicketLinkIDMService.class);
mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
authenticator =
(Authenticator)container.getComponentInstanceOfType(Authenticator.class);
listenerService =
(ListenerService)container.getComponentInstanceOfType(ListenerService.class);
@@ -857,17 +849,6 @@
//
if (failure == null)
{
- IdentitySession session = null;
- try
- {
- session = idmService.getIdentitySession();
- session.beginTransaction();
- }
- catch (Exception e)
- {
- failure = e;
- }
-
// Clear cache
// mgr.clearCache();
@@ -891,17 +872,6 @@
ConversationState.setCurrent(null);
mopSession.close();
mopSession = null;
- try
- {
- session.close();
- }
- catch (IdentityException e)
- {
- if (failure == null)
- {
- failure = e;
- }
- }
}
}
}
Modified:
portal/branches/wsrp-integration/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java
===================================================================
---
portal/branches/wsrp-integration/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/test/core/src/main/java/org/exoplatform/component/test/AbstractGateInTest.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -18,10 +18,16 @@
*/
package org.exoplatform.component.test;
+import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import java.util.ArrayList;
+import java.util.Collections;
import java.util.EnumMap;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
/**
@@ -72,15 +78,59 @@
}
//
+ PortalContainer container = null;
+ List<ComponentRequestLifecycle> componentRLFs = Collections.emptyList();
+ List<Throwable> failures = new ArrayList<Throwable>();
+
+ //
try
{
ClassLoader testClassLoader = new GateInTestClassLoader(realClassLoader,
rootConfigPaths, portalConfigPaths);
Thread.currentThread().setContextClassLoader(testClassLoader);
+
+ // Boot the container
+ container = PortalContainer.getInstance();
+
+ // Honours the request life cycle
+ componentRLFs =
(List<ComponentRequestLifecycle>)container.getComponentInstancesOfType(ComponentRequestLifecycle.class);
+
+ //
+ for (ComponentRequestLifecycle componentRLF : componentRLFs)
+ {
+ componentRLF.startRequest(container);
+ }
+
+ // Execute test
super.runBare();
}
finally
{
+ if (container != null)
+ {
+ for (ComponentRequestLifecycle componentRLF : componentRLFs)
+ {
+ try
+ {
+ componentRLF.endRequest(container);
+ }
+ catch (Throwable e)
+ {
+ failures.add(e);
+ }
+ }
+ }
+
+ //
Thread.currentThread().setContextClassLoader(realClassLoader);
}
+
+ //
+ if (failures.size() > 0)
+ {
+ Throwable failure = failures.get(0);
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(failure);
+ throw afe;
+ }
}
}
Modified:
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java
===================================================================
---
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -36,10 +36,11 @@
public class BootstrapTestCase extends AbstractGateInTest
{
- public void testBoot()
+ public void testRequestLifeCycle()
{
PortalContainer container = PortalContainer.getInstance();
CustomService testService =
(CustomService)container.getComponentInstanceOfType(CustomService.class);
+ assertSame(container, testService.currentContainer);
assertNotNull(testService);
}
Modified:
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/CustomService.java
===================================================================
---
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/CustomService.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/test/core/src/test/java/org/exoplatform/component/test/CustomService.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -18,10 +18,26 @@
*/
package org.exoplatform.component.test;
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class CustomService
+public class CustomService implements ComponentRequestLifecycle
{
+
+ /** . */
+ ExoContainer currentContainer;
+
+ public void startRequest(ExoContainer container)
+ {
+ currentContainer = container;
+ }
+
+ public void endRequest(ExoContainer container)
+ {
+ currentContainer = null;
+ }
}
Modified:
portal/branches/wsrp-integration/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java
===================================================================
---
portal/branches/wsrp-integration/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/test/organization/src/test/java/org/exoplatform/component/test/organization/BootstrapTestCase.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -28,7 +28,6 @@
import org.exoplatform.component.test.ConfiguredBy;
import org.exoplatform.component.test.ContainerScope;
import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.component.ComponentRequestLifecycle;
import org.exoplatform.services.database.HibernateService;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
@@ -52,7 +51,6 @@
PortalContainer container = PortalContainer.getInstance();
OrganizationService organization =
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
assertNotNull(organization);
- ((ComponentRequestLifecycle)organization).startRequest(container);
User test = new UserImpl("testUser");
organization.getUserHandler().createUser(test, false);
@@ -61,10 +59,6 @@
assertNull(test);
test = organization.getUserHandler().findUserByName("testUser");
assertNotNull(test);
-
- ((ComponentRequestLifecycle)organization).endRequest(container);
-
-
}
}
\ No newline at end of file
Deleted:
portal/branches/wsrp-integration/component/web/src/main/java/conf/configuration.xml
===================================================================
---
portal/branches/wsrp-integration/component/web/src/main/java/conf/configuration.xml 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/component/web/src/main/java/conf/configuration.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-<!--
-
- 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.
-
--->
-
-<configuration
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd
http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
-
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
-</configuration>
Modified: portal/branches/wsrp-integration/pom.xml
===================================================================
--- portal/branches/wsrp-integration/pom.xml 2009-12-14 21:14:23 UTC (rev 1010)
+++ portal/branches/wsrp-integration/pom.xml 2009-12-14 22:48:01 UTC (rev 1011)
@@ -175,10 +175,6 @@
<configuration>
<systemProperties>
<property>
- <name>mock.portal.dir</name>
-
<value>${gatein.checkout.dir}/web/portal/src/main/webapp</value>
- </property>
- <property>
<name>org.apache.commons.logging.Log</name>
<value>org.apache.commons.logging.impl.SimpleLog</value>
</property>
@@ -206,33 +202,6 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>check-environment-ready</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>gatein.checkout.dir</property>
- <message>"You must define the property
gatein.checkout.dir to give the path of the root of your working
area"</message>
- </requireProperty>
- <requireFilesExist>
- <files>
-
<file>${gatein.checkout.dir}/web/portal/src/main/webapp</file>
- </files>
- <message>"The following directory doesn't exist
: ${gatein.checkout.dir}/web/portal/src/main/webapp"</message>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
Modified:
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
---
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2009-12-14
22:48:01 UTC (rev 1011)
@@ -106,4 +106,14 @@
<key>org.exoplatform.commons.chromattic.ChromatticManager</key>
<type>org.exoplatform.commons.chromattic.ChromatticManager</type>
</component>
+
+ <component>
+ <type>org.exoplatform.portal.resource.SkinService</type>
+ </component>
+
+ <component>
+
<key>org.exoplatform.services.portletcontainer.bundle.ResourceBundleDelegate</key>
+
<type>org.exoplatform.portal.application.ResourceBundleDelegateImpl</type>
+ </component>
+
</configuration>
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -86,7 +86,7 @@
private boolean isCollapse = false;
private boolean isShowControl = true;
-
+
public UIPortalComposer() throws Exception
{
UITabPane uiTabPane = addChild(UITabPane.class, "UIPortalComposerTab",
null);
@@ -159,19 +159,28 @@
UIEditInlineWorkspace uiEditWS =
uiWorkingWS.getChild(UIEditInlineWorkspace.class);
UIPortal editPortal = (UIPortal)uiEditWS.getUIComponent();
UIPortal uiPortal = Util.getUIPortal();
+ String remoteUser = prContext.getRemoteUser();
+ String ownerUser = prContext.getPortalOwner();
+ String portalOwner = null;
+ if (editPortal.getOwnerType().equals(PortalConfig.PORTAL_TYPE))
+ {
+ portalOwner = editPortal.getOwner();
+ }
+ else
+ {
+ portalOwner = Util.getPortalRequestContext().getPortalOwner();
+ }
+
PortalConfig portalConfig =
(PortalConfig)PortalDataMapper.buildModelObject(editPortal);
UserPortalConfigService configService =
getApplicationComponent(UserPortalConfigService.class);
-
- List<String> allPortalNames = configService.getAllPortalNames();
- if(allPortalNames.contains(portalConfig.getName()))
+
+ if (configService.getUserPortalConfig(portalOwner, remoteUser) != null)
{
configService.update(portalConfig);
- }
-
+ }
+
uiPortalApp.getUserPortalConfig().setPortal(portalConfig);
- String remoteUser = prContext.getRemoteUser();
- String ownerUser = prContext.getPortalOwner();
UserPortalConfig userPortalConfig = configService.getUserPortalConfig(ownerUser,
remoteUser);
if (userPortalConfig != null)
{
@@ -328,8 +337,8 @@
uiEditWS.getComposer().setEditted(false);
uiEditWS.setRendered(false);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
-
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
+
UIPortal uiPortal = uiWorkingWS.getBackupUIPortal();
siteBody.setUIComponent(uiPortal);
Modified:
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
---
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-12-14
21:14:23 UTC (rev 1010)
+++
portal/branches/wsrp-integration/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2009-12-14
22:48:01 UTC (rev 1011)
@@ -29,6 +29,7 @@
import org.exoplatform.portal.resource.SkinService;
import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
+import org.exoplatform.portal.webui.workspace.UIEditInlineWorkspace;
import org.exoplatform.portal.webui.workspace.UIMaskWorkspace;
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
@@ -268,6 +269,14 @@
UserPortalConfigService configService =
uiForm.getApplicationComponent(UserPortalConfigService.class);
configService.update(portalConfig);
}
+ else
+ {
+ UIWorkingWorkspace uiWorkingWS =
uiPortalApp.findFirstComponentOfType(UIWorkingWorkspace.class);
+ UIEditInlineWorkspace uiEditWS =
uiWorkingWS.getChild(UIEditInlineWorkspace.class);
+ UIPortal editPortal = (UIPortal)uiEditWS.getUIComponent();
+ uiForm.invokeSetBindingBean(editPortal);
+ }
+
UIMaskWorkspace uiMaskWorkspace = uiForm.getParent();
uiMaskWorkspace.setUIComponent(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWorkspace);