Author: ndkhoiits
Date: 2011-07-21 23:13:14 -0400 (Thu, 21 Jul 2011)
New Revision: 6912
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
portal/trunk/component/portal/src/test/resources/jibx/fragment-navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml
Removed:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml
portal/trunk/component/portal/src/test/resources/portal/
Modified:
portal/trunk/component/portal/pom.xml
portal/trunk/component/portal/src/main/java/conf/gatein-nodetypes.xml
portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
portal/trunk/component/portal/src/main/resources/binding.xml
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
portal/trunk/component/portal/src/test/resources/conf/test-mop-nodetypes.xml
Log:
GTNPORTAL-1962 The navigation import should be configurable some modes for particular
requirement
- Improve testcase initial data on each
Modified: portal/trunk/component/portal/pom.xml
===================================================================
--- portal/trunk/component/portal/pom.xml 2011-07-22 02:50:13 UTC (rev 6911)
+++ portal/trunk/component/portal/pom.xml 2011-07-22 03:13:14 UTC (rev 6912)
@@ -109,14 +109,29 @@
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.test.organization</artifactId>
+ <artifactId>exo.portal.component.identity</artifactId>
+ <type>test-jar</type>
<scope>test</scope>
</dependency>
</dependencies>
<build>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <forkMode>always</forkMode>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
<plugins>
+
<plugin>
<groupId>org.jibx</groupId>
<artifactId>maven-jibx-plugin</artifactId>
Modified: portal/trunk/component/portal/src/main/java/conf/gatein-nodetypes.xml
===================================================================
--- portal/trunk/component/portal/src/main/java/conf/gatein-nodetypes.xml 2011-07-22
02:50:13 UTC (rev 6911)
+++ portal/trunk/component/portal/src/main/java/conf/gatein-nodetypes.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -18,6 +18,20 @@
-->
<nodeTypes
xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0">
+ <nodeType name="gtn:imported" isMixin="true"
hasOrderableChildNodes="false">
+ <supertypes>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="gtn:creationdate"
requiredType="Date" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ <propertyDefinition name="gtn:lastmodificationdate"
requiredType="Date" autoCreated="false" mandatory="false"
onParentVersion="COPY" protected="false"
multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ <childNodeDefinitions/>
+ </nodeType>
+
<nodeType name="gtn:language" isMixin="false"
hasOrderableChildNodes="false">
<supertypes>
<supertype>nt:base</supertype>
Modified: portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd
===================================================================
--- portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-07-22 02:50:13
UTC (rev 6911)
+++ portal/trunk/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-07-22 03:13:14
UTC (rev 6912)
@@ -60,9 +60,10 @@
<xs:complexType name="nodeNavigationType">
<xs:sequence>
<xs:element name="priority"
type="xs:positiveInteger"/>
- <xs:element name="page-nodes" minOccurs="0"
maxOccurs="1">
+ <xs:element name="page-nodes" minOccurs="0"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
+ <xs:element name="parent-uri" type="xs:string"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="node" type="nodeType"
minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -41,6 +41,8 @@
private String description;
+ private String importMode;
+
/**
* @deprecated use the location instead
*/
@@ -60,6 +62,7 @@
this.description = cfg.description;
this.templateName = cfg.templateName;
this.predefinedOwner = new HashSet<String>(cfg.predefinedOwner);
+ this.importMode = cfg.importMode;
}
public NewPortalConfig(String path)
@@ -152,6 +155,16 @@
this.description = description;
}
+ public String getImportMode()
+ {
+ return importMode;
+ }
+
+ public void setImportMode(String importMode)
+ {
+ this.importMode = importMode;
+ }
+
@Override
public String toString()
{
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -28,8 +28,10 @@
import org.exoplatform.container.xml.ValueParam;
import org.exoplatform.portal.application.PortletPreferences;
import org.exoplatform.portal.application.PortletPreferences.PortletPreferencesSet;
-import org.exoplatform.portal.config.importer.ImportMode;
-import org.exoplatform.portal.config.importer.NavigationImporter;
+import org.exoplatform.portal.config.model.NavigationFragment;
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.importer.Imported;
+import org.exoplatform.portal.mop.importer.NavigationImporter;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.ModelUnmarshaller;
import org.exoplatform.portal.config.model.Page;
@@ -41,15 +43,18 @@
import org.exoplatform.portal.config.model.Version;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
-import org.jibx.runtime.JiBXException;
+import org.gatein.mop.api.workspace.Workspace;
+import org.jibx.runtime.*;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
@@ -93,7 +98,7 @@
/**
* If true the portal clear portal metadata from data storage and replace
- * it with new data created from .xml files
+ * it with new data created from .xml files.
*/
private boolean overrideExistingData;
@@ -171,21 +176,66 @@
this.pomMgr = pomMgr;
}
- public void run() throws Exception
+ private void touchImport()
{
- //DANGEROUS! If the user delete the defaultPortal (ie: classic), the next time he
restarts
- //the server. Data of predefined owners would be overriden
RequestLifeCycle.begin(PortalContainer.getInstance());
try
{
- if (dataStorage_.getPortalConfig(defaultPortal) != null &&
!overrideExistingData)
- return;
+ POMSession session = pomMgr.getSession();
+ Workspace workspace = session.getWorkspace();
+ Imported imported = workspace.adapt(Imported.class);
+ imported.setLastModificationDate(new Date());
+ session.save();
}
finally
{
RequestLifeCycle.end();
}
+ }
+ private boolean performImport()
+ {
+ RequestLifeCycle.begin(PortalContainer.getInstance());
+ try
+ {
+ if (overrideExistingData)
+ {
+ return true;
+ }
+ else
+ {
+ POMSession session = pomMgr.getSession();
+
+ // Obtain the status
+ Workspace workspace = session.getWorkspace();
+ boolean perform = !workspace.isAdapted(Imported.class);
+
+ // We mark it
+ if (perform)
+ {
+ Imported imported = workspace.adapt(Imported.class);
+ imported.setCreationDate(new Date());
+ session.save();
+ }
+
+ //
+ return perform;
+ }
+ }
+ finally
+ {
+ RequestLifeCycle.end();
+ }
+ }
+
+ public void run() throws Exception
+ {
+ if (!performImport())
+ {
+ return;
+ }
+
+ //
if (isUseTryCatch)
{
RequestLifeCycle.begin(PortalContainer.getInstance());
@@ -260,6 +310,8 @@
}
}
+ //
+ touchImport();
}
else
{
@@ -299,6 +351,9 @@
{
ele.getPredefinedOwner().clear();
}
+
+ //
+ touchImport();
}
}
@@ -483,10 +538,20 @@
//
PageNavigation navigation = obj.getObject();
- ImportMode importMode = overrideExistingData ? ImportMode.REIMPORT :
ImportMode.MERGE;
boolean extendedNavigation = obj.getVersion() == Version.V_1_2;
//
+ ImportMode importMode;
+ if (config.getImportMode() != null)
+ {
+ importMode = ImportMode.valueOf(config.getImportMode().trim().toUpperCase());
+ }
+ else
+ {
+ importMode = ImportMode.CONSERVE;
+ }
+
+ //
Locale locale;
PortalConfig portalConfig = dataStorage_.getPortalConfig(config.getOwnerType(),
owner);
if (portalConfig != null && portalConfig.getLocale() != null)
@@ -499,7 +564,7 @@
}
//
- NavigationImporter merge = new NavigationImporter(locale, importMode,
extendedNavigation, navigation, navigationService_, descriptionService_);
+ NavigationImporter merge = new NavigationImporter(locale, importMode, navigation,
navigationService_, descriptionService_);
//
merge.perform();
@@ -761,12 +826,28 @@
private static void fixOwnerName(PageNavigation pageNav)
{
pageNav.setOwnerId(fixOwnerName(pageNav.getOwnerType(), pageNav.getOwnerId()));
- for (PageNode pageNode : pageNav.getNodes())
+ ArrayList<NavigationFragment> fragments = pageNav.getFragments();
+ if (fragments != null)
{
- fixOwnerName(pageNode);
+ for (NavigationFragment fragment : fragments)
+ {
+ fixOwnerName(fragment);
+ }
}
}
+ private static void fixOwnerName(NavigationFragment fragment)
+ {
+ ArrayList<PageNode> nodes = fragment.getNodes();
+ if (nodes != null)
+ {
+ for (PageNode pageNode : nodes)
+ {
+ fixOwnerName(pageNode);
+ }
+ }
+ }
+
private static void fixOwnerName(PageNode pageNode)
{
if (pageNode.getPageReference() != null)
Deleted:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,45 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config.importer;
-
-/**
- * The import mode.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- */
-public enum ImportMode
-{
-
- /**
- * Import data when it does not exist, otherwise do nothing.
- */
- CONSERVE,
-
- /**
- * Import data when it does not exist, otherwise try a merge strategy that adds new
data but ignore other modifications.
- */
- MERGE,
-
- /**
- * Reimport data whatsoever.
- */
- REIMPORT
-
-}
Deleted:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,384 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config.importer;
-
-import org.exoplatform.portal.config.model.LocalizedValue;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
-import org.exoplatform.portal.config.model.PageNodeContainer;
-import org.exoplatform.portal.mop.Described;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.description.DescriptionService;
-import org.exoplatform.portal.mop.navigation.NavigationContext;
-import org.exoplatform.portal.mop.navigation.NavigationService;
-import org.exoplatform.portal.mop.navigation.NavigationState;
-import org.exoplatform.portal.mop.navigation.NodeChangeListener;
-import org.exoplatform.portal.mop.navigation.NodeChangeQueue;
-import org.exoplatform.portal.mop.navigation.NodeContext;
-import org.exoplatform.portal.mop.navigation.NodeModel;
-import org.exoplatform.portal.mop.navigation.NodeState;
-import org.exoplatform.portal.mop.navigation.Scope;
-import org.exoplatform.portal.tree.diff.Adapters;
-import org.exoplatform.portal.tree.diff.ListAdapter;
-import org.exoplatform.portal.tree.diff.ListChangeIterator;
-import org.exoplatform.portal.tree.diff.ListChangeType;
-import org.exoplatform.portal.tree.diff.ListDiff;
-import org.gatein.common.i18n.LocaleFormat;
-
-import java.util.Collections;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- */
-public class NavigationImporter
-{
-
- private static final ListAdapter<PageNodeContainer, String>
PAGE_NODE_CONTAINER_ADAPTER = new ListAdapter<PageNodeContainer, String>()
- {
- public int size(PageNodeContainer list)
- {
- List<PageNode> nodes = list.getNodes();
- if (nodes == null)
- {
- return 0;
- }
- else
- {
- return nodes.size();
- }
- }
-
- public Iterator<String> iterator(PageNodeContainer list, boolean reverse)
- {
- List<PageNode> nodes = list.getNodes();
- if (nodes == null)
- {
- return Collections.<String>emptyList().iterator();
- }
- else {
- String[] names = new String[nodes.size()];
- int index = 0;
- for (PageNode child : nodes)
- {
- names[index++] = child.getName();
- }
- return Adapters.<String>list().iterator(names, reverse);
- }
- }
- };
-
- private static final ListAdapter<NodeContext<?>, String> NODE_ADAPTER =
new ListAdapter<NodeContext<?>, String>()
- {
- public int size(NodeContext<?> list)
- {
- return list.getNodeCount();
- }
-
- public Iterator<String> iterator(NodeContext<?> list, boolean reverse)
- {
- int size = list.getNodeCount();
- String[] names = new String[size];
- int index = 0;
- for (NodeContext<?> child = list.getFirst();child != null;child =
child.getNext())
- {
- names[index++] = child.getName();
- }
- return Adapters.<String>list().iterator(names, reverse);
- }
- };
-
- /** . */
- private final Locale portalLocale;
-
- /** . */
- private final boolean extendedNavigation;
-
- /** . */
- private final PageNavigation src;
-
- /** . */
- private final NavigationService service;
-
- /** . */
- private final ImportMode mode;
-
- /** . */
- private final DescriptionService descriptionService;
-
- public NavigationImporter(
- Locale portalLocale,
- ImportMode mode,
- boolean extendedNavigation,
- PageNavigation src,
- NavigationService service,
- DescriptionService descriptionService)
- {
- this.portalLocale = portalLocale;
- this.extendedNavigation = extendedNavigation;
- this.mode = mode;
- this.src = src;
- this.service = service;
- this.descriptionService = descriptionService;
- }
-
- public void perform()
- {
-
- //
- SiteKey key = new SiteKey(src.getOwnerType(), src.getOwnerId());
-
- //
- NavigationContext dst = service.loadNavigation(key);
-
- //
- switch (mode)
- {
- case CONSERVE:
- if (dst == null)
- {
- dst = new NavigationContext(key, new NavigationState(src.getPriority()));
- service.saveNavigation(dst);
- }
- else
- {
- dst = null;
- }
- break;
- case MERGE:
- if (dst == null)
- {
- dst = new NavigationContext(key, new NavigationState(src.getPriority()));
- service.saveNavigation(dst);
- }
- break;
- case REIMPORT:
- if (dst != null)
- {
- service.destroyNavigation(dst);
- }
- else
- {
- dst = new NavigationContext(key, new NavigationState(src.getPriority()));
- }
- service.saveNavigation(dst);
- break;
- }
-
- //
- if (dst != null)
- {
- NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, dst,
Scope.SINGLE, null).getNode();
-
- // Collect labels
- Map<NodeContext<?>, Map<Locale, Described.State>> labelMap =
new HashMap<NodeContext<?>, Map<Locale, Described.State>>();
-
- // Perform save
- perform(src, node, labelMap);
-
- // Save the node
- service.saveNode(node, null);
-
- //
- for (Map.Entry<NodeContext<?>, Map<Locale, Described.State>>
entry : labelMap.entrySet())
- {
- String id = entry.getKey().getId();
- descriptionService.setDescriptions(id, entry.getValue());
- }
- }
- }
-
- private void perform(PageNodeContainer src, final NodeContext<?> dst, final
Map<NodeContext<?>, Map<Locale, Described.State>> labelMap)
- {
- service.rebaseNode(dst, Scope.CHILDREN, null);
-
- //
- ListDiff<PageNodeContainer, NodeContext<?>, String> diff = new
ListDiff<PageNodeContainer, NodeContext<?>, String>(
- PAGE_NODE_CONTAINER_ADAPTER,
- NODE_ADAPTER);
-
- //
- List<PageNode> srcChildren = src.getNodes();
- ListChangeIterator<PageNodeContainer, NodeContext<?>, String> it =
diff.iterator(src, dst);
- NodeChangeQueue<PageNodeContainer> changes = new
NodeChangeQueue<PageNodeContainer>();
-
- //
- while (it.hasNext())
- {
- ListChangeType changeType = it.next();
- String name = it.getElement();
- PageNode srcChild = src.getNode(name);
- NodeContext<?> dstChild = dst.get(name);
-
- //
- switch (changeType)
- {
- case SAME:
- perform(srcChild, dstChild, labelMap);
- break;
- case REMOVE:
- if (dst.getNode(name) != null)
- {
- // It's a move we do nothing
- }
- else
- {
- // It's an addition
- int index = srcChildren.indexOf(srcChild);
- PageNode previous = index == 0 ? null : srcChildren.get(index - 1);
- changes.onAdd(srcChild, src, previous);
- }
- break;
- case ADD:
- if (src.getNode(name) != null)
- {
- // It's a move
- int index = srcChildren.indexOf(srcChild);
- PageNode previous = index == 0 ? null : srcChildren.get(index - 1);
- changes.onMove(srcChild, src, src, previous);
- }
- else
- {
- // It's a removal we do nothing
- }
- break;
- }
- }
-
- //
- changes.broadcast(new NodeChangeListener.Base<PageNodeContainer>()
- {
- @Override
- public void onAdd(PageNodeContainer target, PageNodeContainer parent,
PageNodeContainer previous)
- {
- add((PageNode)target, (PageNode)previous, dst);
- }
-
- private void add(PageNode target, PageNode previous, NodeContext<?> dst)
- {
-
- //
- LocalizedValue unqualifiedLabel = null;
- List<LocalizedValue> labels = target.getLabels();
- Map<Locale, Described.State> description = null;
- if (labels.size() > 0)
- {
- for (LocalizedValue label : labels)
- {
- Locale lang = label.getLang();
- if (lang != null)
- {
- if (description == null)
- {
- description = new HashMap<Locale,
Described.State>(labels.size());
- }
- description.put(lang, new Described.State(label.getValue(), null));
- }
- else
- {
- unqualifiedLabel = label;
- }
- }
- }
-
- //
- String label;
- if (extendedNavigation)
- {
- if (description == null)
- {
- description = new HashMap<Locale, Described.State>();
- }
- if (!description.containsKey(portalLocale))
- {
- if (unqualifiedLabel != null)
- {
- description.put(portalLocale, new
Described.State(unqualifiedLabel.getValue(), null));
- }
- }
-
- //
- label = null;
- }
- else
- {
- if (unqualifiedLabel != null)
- {
- label = unqualifiedLabel.getValue();
- }
- else if (description != null &&
description.containsKey(portalLocale))
- {
- label = description.get(portalLocale).getName();
- }
- else
- {
- label = null;
- }
-
- //
- description = null;
- }
-
- //
- String name = target.getName();
- int index = 0;
- if (previous != null)
- {
- index = dst.get((previous).getName()).getIndex() + 1;
- }
- NodeContext<?> child = dst.add(index, name);
- Date start = target.getStartPublicationDate();
- Date end = target.getEndPublicationDate();
- NodeState state = new NodeState(
- label,
- target.getIcon(),
- start == null ? -1 : start.getTime(),
- end == null ? -1 : end.getTime(),
- target.getVisibility(),
- target.getPageReference()
- );
- child.setState(state);
-
- //
- if (description != null)
- {
- labelMap.put(child, description);
- }
-
- //
- List<PageNode> targetChildren = target.getNodes();
- if (targetChildren != null)
- {
- PageNode targetPrevious = null;
- for (PageNode targetChild : targetChildren)
- {
- add(targetChild, targetPrevious, child);
- targetPrevious = targetChild;
- }
- }
- }
- });
- }
-}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config.model;
+
+import java.util.Collection;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class I18NString extends I18NValue<String, LocalizedString>
+{
+
+ public static I18NString create()
+ {
+ return new I18NString();
+ }
+
+ public I18NString()
+ {
+ }
+
+ public I18NString(Collection<? extends LocalizedString> c)
+ {
+ super(c);
+ }
+
+ public I18NString(LocalizedString... c)
+ {
+ super(c);
+ }
+}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,132 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config.model;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class I18NValue<V, L extends LocalizedValue<V>> extends
ArrayList<L>
+{
+
+ public static I18NValue create()
+ {
+ return new I18NValue();
+ }
+
+ public I18NValue()
+ {
+ }
+
+ public I18NValue(Collection<? extends L> c)
+ {
+ super(c);
+ }
+
+ public I18NValue(L... c)
+ {
+ super(Arrays.asList(c));
+ }
+
+ /**
+ * Returns true when the collection contains exactly one localized value and this
value does not have
+ * a locale associated with it.
+ *
+ * @return true if the value is simple
+ */
+ public boolean isSimple()
+ {
+ return size() == 1 && get(0).getLang() == null;
+ }
+
+ /**
+ * Returns true if the collection extended which means that it is not empty and it is
not simple.
+ *
+ * @return true if the value is extended
+ */
+ public boolean isExtended()
+ {
+ return !isEmpty() && !isSimple();
+ }
+
+ /**
+ * Returns the simple value or null if the collection is empty or extended.
+ *
+ * @return the simple value
+ */
+ public V getSimple()
+ {
+ if (isSimple())
+ {
+ return get(0).getValue();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * Returns a map of the values or null if the collection is empty. The
<code>defaultLocale</code> argument
+ * is used as a key when an unqualified value is found, otherwise it is not used
+ *
+ * @param defaultLocale the default locale
+ * @return the extended value map
+ */
+ public Map<Locale, V> getExtended(Locale defaultLocale)
+ {
+ Map<Locale, V> map = Collections.emptyMap();
+ L unqualifiedLocalizedValue = null;
+ for (L localizedValue : this)
+ {
+ if (localizedValue.getLang() != null)
+ {
+ if (map.isEmpty())
+ {
+ map = new HashMap<Locale, V>();
+ }
+ map.put(localizedValue.getLang(), localizedValue.getValue());
+ }
+ else
+ {
+ unqualifiedLocalizedValue = localizedValue;
+ }
+ }
+ if (map.isEmpty())
+ {
+ return null;
+ }
+ else
+ {
+ if (unqualifiedLocalizedValue != null &&
!map.containsKey(defaultLocale))
+ {
+ map.put(defaultLocale, unqualifiedLocalizedValue.getValue());
+ }
+ return map;
+ }
+ }
+}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config.model;
+
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class LocalizedString extends LocalizedValue<String>
+{
+
+ public LocalizedString()
+ {
+ }
+
+ public LocalizedString(String value)
+ {
+ super(value);
+ }
+
+ public LocalizedString(String value, Locale lang)
+ {
+ super(value, lang);
+ }
+}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -24,11 +24,11 @@
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
*/
-public class LocalizedValue
+public class LocalizedValue<V>
{
/** . */
- private String value;
+ private V value;
/** . */
private Locale lang;
@@ -37,34 +37,40 @@
{
}
- public LocalizedValue(String value)
+ public LocalizedValue(V value)
{
this.value = value;
}
- public LocalizedValue(String value, Locale lang)
+ public LocalizedValue(V value, Locale lang)
{
this.value = value;
this.lang = lang;
}
- public String getValue()
+ public final V getValue()
{
return value;
}
- public void setValue(String value)
+ public final void setValue(V value)
{
this.value = value;
}
- public Locale getLang()
+ public final Locale getLang()
{
return lang;
}
- public void setLang(Locale lang)
+ public final void setLang(Locale lang)
{
this.lang = lang;
}
+
+ @Override
+ public String toString()
+ {
+ return getClass().getSimpleName() + "[value=" + value +
",lang=" + lang + "]";
+ }
}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config.model;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class NavigationFragment extends PageNodeContainer
+{
+
+ /** . */
+ private String parentURI;
+
+ public String getParentURI()
+ {
+ return parentURI;
+ }
+
+ public void setParentURI(String parentURI)
+ {
+ this.parentURI = parentURI;
+ }
+}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -21,7 +21,7 @@
import java.util.ArrayList;
-public class PageNavigation extends PageNodeContainer
+public class PageNavigation
{
/** . */
@@ -31,16 +31,23 @@
private String ownerId;
/** . */
- private ArrayList<PageNode> pageNodes;
+ private int priority = 1;
/** . */
- private int priority = 1;
+ private ArrayList<NavigationFragment> fragments;
public PageNavigation()
{
- this.pageNodes = new ArrayList<PageNode>();
+ this(null, null);
}
+ public PageNavigation(String ownerType, String ownerId)
+ {
+ this.ownerType = ownerType;
+ this.ownerId = ownerId;
+ this.fragments = new ArrayList<NavigationFragment>();
+ }
+
public String getOwnerId()
{
return ownerId;
@@ -71,16 +78,26 @@
priority = i;
}
- public ArrayList<PageNode> getNodes()
+ public ArrayList<NavigationFragment> getFragments()
{
- return pageNodes;
+ return fragments;
}
- public void setNodes(ArrayList<PageNode> nodes)
+ public NavigationFragment getFragment()
{
- pageNodes = nodes;
+ return fragments != null && fragments.size() > 0 ? fragments.get(0) :
null;
}
+ public PageNavigation addFragment(NavigationFragment fragment)
+ {
+ if (fragments == null)
+ {
+ fragments = new ArrayList<NavigationFragment>();
+ }
+ fragments.add(fragment);
+ return this;
+ }
+
@Override
public String toString()
{
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -20,28 +20,19 @@
package org.exoplatform.portal.config.model;
import org.exoplatform.portal.mop.Visibility;
+import org.exoplatform.portal.mop.navigation.NodeState;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Date;
-import java.util.HashMap;
import java.util.List;
-import java.util.Locale;
-import java.util.Map;
public class PageNode extends PageNodeContainer
{
/** . */
- private ArrayList<PageNode> children;
+ private I18NString labels;
/** . */
- private String uri;
-
- /** . */
- private ArrayList<LocalizedValue> labels;
-
- /** . */
private String icon;
/** . */
@@ -61,59 +52,25 @@
public PageNode()
{
- this.children = new ArrayList<PageNode>();
}
public String getUri()
{
- return uri;
+ return null;
}
public void setUri(String s)
{
- uri = s;
+ // No op for back war compatibility during unmarshalling
}
- public ArrayList<LocalizedValue> getLabels()
+ public I18NString getLabels()
{
return labels;
}
- public Map<Locale, String> getLocalizedLabel(Locale defaultLocale)
+ public void setLabels(I18NString labels)
{
- Map<Locale, String> map = Collections.emptyMap();
- LocalizedValue portalLocaleLabel = null;
- for (LocalizedValue label : labels)
- {
- if (label.getLang() != null)
- {
- if (map.isEmpty())
- {
- map = new HashMap<Locale, String>();
- }
- map.put(label.getLang(), label.getValue());
- }
- else
- {
- portalLocaleLabel = label;
- }
- }
- if (map.isEmpty())
- {
- return null;
- }
- else
- {
- if (portalLocaleLabel != null && !map.containsKey(defaultLocale))
- {
- map.put(defaultLocale, portalLocaleLabel.getValue());
- }
- return map;
- }
- }
-
- public void setLabels(ArrayList<LocalizedValue> labels)
- {
this.labels = labels;
}
@@ -121,7 +78,7 @@
{
if (labels != null)
{
- for (LocalizedValue label : labels)
+ for (LocalizedString label : labels)
{
if (label.getLang() == null)
{
@@ -136,13 +93,13 @@
{
if (labels == null)
{
- labels = new ArrayList<LocalizedValue>();
+ labels = new I18NString();
}
else
{
labels.clear();
}
- labels.add(new LocalizedValue(s));
+ labels.add(new LocalizedString(s));
}
public String getIcon()
@@ -177,12 +134,12 @@
public List<PageNode> getChildren()
{
- return children;
+ return getNodes();
}
- public void setChildren(ArrayList<PageNode> list)
+ public void setChildren(ArrayList<PageNode> children)
{
- children = list;
+ setNodes(children);
}
public Date getStartPublicationDate()
@@ -217,19 +174,19 @@
public PageNode getChild(String name)
{
- if (children == null)
- return null;
- for (PageNode node : children)
- {
- if (node.getName().equals(name))
- return node;
- }
- return null;
+ return getNode(name);
}
- public List<PageNode> getNodes()
+ public NodeState getState()
{
- return children;
+ return new NodeState(
+ labels.getSimple(),
+ icon,
+ startPublicationDate == null ? -1 : startPublicationDate.getTime(),
+ endPublicationDate == null ? -1 : endPublicationDate.getTime(),
+ visibility,
+ pageReference
+ );
}
@Override
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -19,7 +19,7 @@
package org.exoplatform.portal.config.model;
-import java.util.List;
+import java.util.ArrayList;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
@@ -28,18 +28,35 @@
public abstract class PageNodeContainer
{
+ /** . */
+ private ArrayList<PageNode> nodes;
+
public PageNodeContainer()
{
+ this.nodes = new ArrayList<PageNode>();
}
- public abstract List<PageNode> getNodes();
+ public ArrayList<PageNode> getNodes()
+ {
+ return nodes;
+ }
+ public void setNodes(ArrayList<PageNode> nodes)
+ {
+ this.nodes = nodes;
+ }
+
public PageNode getNode(String name)
{
- for (PageNode node : getNodes())
+ if (nodes != null)
{
- if (node.getName().equals(name))
- return node;
+ for (PageNode node : getNodes())
+ {
+ if (node.getName().equals(name))
+ {
+ return node;
+ }
+ }
}
return null;
}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -19,9 +19,7 @@
package org.exoplatform.portal.config.serialize;
-import org.exoplatform.portal.config.model.LocalizedValue;
-import org.gatein.common.i18n.LocaleFormat;
-import org.gatein.common.util.ConversionException;
+import org.exoplatform.portal.config.model.LocalizedString;
import org.jibx.runtime.IAliasable;
import org.jibx.runtime.IMarshaller;
import org.jibx.runtime.IMarshallingContext;
@@ -110,7 +108,7 @@
ctx.parsePastStartTag(marshalURI, marshallName);
String value = ctx.getText();
ctx.parsePastEndTag(marshalURI, marshallName);
- return new LocalizedValue(value, lang);
+ return new LocalizedString(value, lang);
}
//
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class ImportConfig
+{
+
+ /** . */
+ final boolean destroyOrphan;
+
+ /** . */
+ final boolean updatedSame;
+
+ /** . */
+ final boolean createMissing;
+
+ public ImportConfig(boolean destroyOrphan, boolean updatedSame, boolean
createMissing)
+ {
+ this.destroyOrphan = destroyOrphan;
+ this.updatedSame = updatedSame;
+ this.createMissing = createMissing;
+ }
+
+ /**
+ * Returns true when an orphan node should be destroyed.
+ *
+ * @return the destroy orphan value
+ */
+ public boolean getDestroyOrphan()
+ {
+ return destroyOrphan;
+ }
+
+ public boolean getUpdatedSame()
+ {
+ return updatedSame;
+ }
+
+ public boolean getCreateMissing()
+ {
+ return createMissing;
+ }
+}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+/**
+ * The import mode.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public enum ImportMode
+{
+
+ /**
+ * Import data when it does not exist, otherwise do nothing.
+ */
+ CONSERVE(new ImportConfig(false, false, true)),
+
+ /**
+ * Import data when it does not exist, otherwise performs a strategy that adds new
data only.
+ */
+ INSERT(new ImportConfig(false, false, true)),
+
+ /**
+ * Import data when it does not exist, update data when it exists.
+ */
+ MERGE(new ImportConfig(false, true, true)),
+
+ /**
+ * Overwrite data whatsoever.
+ */
+ OVERWRITE(new ImportConfig(true, true, true));
+
+ /** . */
+ public final ImportConfig config;
+
+ ImportMode(ImportConfig config)
+ {
+ this.config = config;
+ }
+}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.chromattic.api.annotations.MixinType;
+import org.chromattic.api.annotations.Property;
+
+import java.util.Date;
+
+/**
+ * This mixin denotes the import performed.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+@MixinType(name = "gtn:imported")
+public abstract class Imported
+{
+
+ @Property(name = "gtn:creationdate")
+ public abstract Date getCreationDate();
+
+ public abstract void setCreationDate(Date creationDate);
+
+ @Property(name = "gtn:lastmodificationdate")
+ public abstract Date getLastModificationDate();
+
+ public abstract void setLastModificationDate(Date lastModificationDate);
+
+}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,365 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.I18NString;
+import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.portal.config.model.PageNodeContainer;
+import org.exoplatform.portal.mop.Described;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.description.DescriptionService;
+import org.exoplatform.portal.mop.navigation.GenericScope;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.NodeModel;
+import org.exoplatform.portal.mop.navigation.NodeState;
+import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.tree.diff.Adapters;
+import org.exoplatform.portal.tree.diff.ListAdapter;
+import org.exoplatform.portal.tree.diff.ListChangeIterator;
+import org.exoplatform.portal.tree.diff.ListChangeType;
+import org.exoplatform.portal.tree.diff.ListDiff;
+
+import java.util.Collections;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class NavigationFragmentImporter
+{
+
+ private static final ListAdapter<PageNodeContainer, String>
PAGE_NODE_CONTAINER_ADAPTER = new ListAdapter<PageNodeContainer, String>()
+ {
+ public int size(PageNodeContainer list)
+ {
+ List<PageNode> nodes = list.getNodes();
+ if (nodes == null)
+ {
+ return 0;
+ }
+ else
+ {
+ return nodes.size();
+ }
+ }
+
+ public Iterator<String> iterator(PageNodeContainer list, boolean reverse)
+ {
+ List<PageNode> nodes = list.getNodes();
+ if (nodes == null)
+ {
+ return Collections.<String>emptyList().iterator();
+ }
+ else {
+ String[] names = new String[nodes.size()];
+ int index = 0;
+ for (PageNode child : nodes)
+ {
+ names[index++] = child.getName();
+ }
+ return Adapters.<String>list().iterator(names, reverse);
+ }
+ }
+ };
+
+ private static final ListAdapter<NodeContext<?>, String> NODE_ADAPTER =
new ListAdapter<NodeContext<?>, String>()
+ {
+ public int size(NodeContext<?> list)
+ {
+ return list.getNodeCount();
+ }
+
+ public Iterator<String> iterator(NodeContext<?> list, boolean reverse)
+ {
+ int size = list.getNodeCount();
+ String[] names = new String[size];
+ int index = 0;
+ for (NodeContext<?> child = list.getFirst();child != null;child =
child.getNext())
+ {
+ names[index++] = child.getName();
+ }
+ return Adapters.<String>list().iterator(names, reverse);
+ }
+ };
+
+ /** . */
+ private final String[] path;
+
+ /** . */
+ private final NavigationService navigationService;
+
+ /** . */
+ private final SiteKey navigationKey;
+
+ /** . */
+ private final Locale portalLocale;
+
+ /** . */
+ private final DescriptionService descriptionService;
+
+ /** . */
+ private final PageNodeContainer src;
+
+ /** . */
+ private final ImportConfig config;
+
+ public NavigationFragmentImporter(
+ String[] path,
+ NavigationService navigationService,
+ SiteKey navigationKey,
+ Locale portalLocale,
+ DescriptionService descriptionService,
+ PageNodeContainer src,
+ ImportConfig config)
+ {
+ this.path = path;
+ this.navigationService = navigationService;
+ this.navigationKey = navigationKey;
+ this.portalLocale = portalLocale;
+ this.descriptionService = descriptionService;
+ this.src = src;
+ this.config = config;
+ }
+
+ public ImportConfig getConfig()
+ {
+ return config;
+ }
+
+ public NodeContext<?> perform()
+ {
+ NavigationContext navigationCtx = navigationService.loadNavigation(navigationKey);
+
+ //
+ if (navigationCtx != null)
+ {
+ NodeContext root = navigationService.loadNode(NodeModel.SELF_MODEL,
navigationCtx, GenericScope.branchShape(path), null);
+
+ //
+ NodeContext from = root;
+ for (String name : path)
+ {
+ NodeContext a = from.get(name);
+ if (a != null)
+ {
+ from = a;
+ }
+ else
+ {
+ from = from.add(null, name);
+ }
+ }
+
+ // Collect labels
+ Map<NodeContext<?>, Map<Locale, Described.State>> labelMap =
new HashMap<NodeContext<?>, Map<Locale, Described.State>>();
+
+ // Perform save
+ perform(src, from, labelMap);
+
+ // Save the node
+ navigationService.saveNode(root, null);
+
+ //
+ for (Map.Entry<NodeContext<?>, Map<Locale, Described.State>>
entry : labelMap.entrySet())
+ {
+ String id = entry.getKey().getId();
+ descriptionService.setDescriptions(id, entry.getValue());
+ }
+
+ //
+ return from;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ private void perform(PageNodeContainer src, final NodeContext<?> dst, final
Map<NodeContext<?>, Map<Locale, Described.State>> labelMap)
+ {
+ navigationService.rebaseNode(dst, Scope.CHILDREN, null);
+
+ //
+ ListDiff<PageNodeContainer, NodeContext<?>, String> diff = new
ListDiff<PageNodeContainer,NodeContext<?>, String>(
+ PAGE_NODE_CONTAINER_ADAPTER,
+ NODE_ADAPTER
+ );
+
+ //
+ List<PageNode> srcChildren = src.getNodes();
+ ListChangeIterator<PageNodeContainer, NodeContext<?>, String> it =
diff.iterator(src, dst);
+
+ class Change
+ {
+ final ListChangeType type;
+ final String name;
+ final int index1;
+ final int index2;
+
+ Change(ListChangeType type, String name, int index1, int index2)
+ {
+ this.type = type;
+ this.name = name;
+ this.index1 = index1;
+ this.index2 = index2;
+ }
+ }
+
+ // Buffer the changes in a list
+ LinkedList<Change> foo = new LinkedList<Change>();
+ while (it.hasNext())
+ {
+ ListChangeType type = it.next();
+ foo.add(new Change(type, it.getElement(), it.getIndex1(), it.getIndex2()));
+ }
+
+ // The last encountered child
+ NodeContext<?> previousChild = null;
+
+ // Replay the changes and apply them
+ for (Change change : foo)
+ {
+ PageNode srcChild = src.getNode(change.name);
+ NodeContext<?> dstChild = dst.get(change.name);
+
+ //
+ switch (change.type)
+ {
+ case SAME:
+ // Perform recursively
+ perform(srcChild, dstChild, labelMap);
+
+ //
+ if (config.updatedSame)
+ {
+ dstChild.setState(srcChild.getState());
+ }
+
+ //
+ previousChild = dstChild;
+ break;
+ case REMOVE:
+ if (dst.getNode(change.name) != null)
+ {
+ }
+ else
+ {
+ if (config.createMissing)
+ {
+ previousChild = add(srcChild, previousChild, dst, labelMap);
+ }
+ }
+ break;
+ case ADD:
+ if (src.getNode(change.name) != null)
+ {
+ if (config.updatedSame)
+ {
+ dstChild.setState(srcChild.getState());
+ }
+ previousChild = dstChild;
+ }
+ else
+ {
+ if (config.destroyOrphan)
+ {
+ dstChild.removeNode();
+ }
+ else
+ {
+ previousChild = dstChild;
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ private NodeContext<?> add(
+ PageNode target,
+ NodeContext<?> previous,
+ NodeContext<?> parent,
+ Map<NodeContext<?>, Map<Locale, Described.State>> labelMap)
+ {
+ I18NString labels = target.getLabels();
+
+ //
+ Map<Locale, Described.State> description;
+ if (labels.isSimple())
+ {
+ description = null;
+ }
+ else if (labels.isEmpty())
+ {
+ description = null;
+ }
+ else
+ {
+ description = new HashMap<Locale, Described.State>();
+ for (Map.Entry<Locale, String> entry :
labels.getExtended(portalLocale).entrySet())
+ {
+ description.put(entry.getKey(), new Described.State(entry.getValue(),
null));
+ }
+ }
+
+ //
+ String name = target.getName();
+ int index;
+ if (previous != null)
+ {
+ index = parent.get((previous).getName()).getIndex() + 1;
+ }
+ else
+ {
+ index = 0;
+ }
+ NodeContext<?> child = parent.add(index, name);
+ NodeState state = target.getState();
+ child.setState(state);
+
+ //
+ if (description != null)
+ {
+ labelMap.put(child, description);
+ }
+
+ // We recurse to create the descendants
+ List<PageNode> targetChildren = target.getNodes();
+ if (targetChildren != null)
+ {
+ NodeContext<?> targetPrevious = null;
+ for (PageNode targetChild : targetChildren)
+ {
+ targetPrevious = add(targetChild, targetPrevious, child, labelMap);
+ }
+ }
+
+ //
+ return child;
+ }
+}
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,158 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.NavigationFragment;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.description.DescriptionService;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.navigation.NavigationState;
+import org.exoplatform.portal.pom.config.Utils;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class NavigationImporter
+{
+
+ /** . */
+ private final Locale portalLocale;
+
+ /** . */
+ private final PageNavigation src;
+
+ /** . */
+ private final NavigationService service;
+
+ /** . */
+ private final ImportMode mode;
+
+ /** . */
+ private final DescriptionService descriptionService;
+
+ public NavigationImporter(
+ Locale portalLocale,
+ ImportMode mode,
+ PageNavigation src,
+ NavigationService service,
+ DescriptionService descriptionService)
+ {
+ this.portalLocale = portalLocale;
+ this.mode = mode;
+ this.src = src;
+ this.service = service;
+ this.descriptionService = descriptionService;
+ }
+
+ public void perform()
+ {
+
+ //
+ SiteKey key = new SiteKey(src.getOwnerType(), src.getOwnerId());
+
+ //
+ NavigationContext dst = service.loadNavigation(key);
+
+ //
+ switch (mode)
+ {
+ case CONSERVE:
+ if (dst == null)
+ {
+ dst = new NavigationContext(key, new NavigationState(src.getPriority()));
+ service.saveNavigation(dst);
+ }
+ else
+ {
+ dst = null;
+ }
+ break;
+ case MERGE:
+ case INSERT:
+ if (dst == null)
+ {
+ dst = new NavigationContext(key, new NavigationState(src.getPriority()));
+ service.saveNavigation(dst);
+ }
+ break;
+ case OVERWRITE:
+ if (dst == null)
+ {
+ dst = new NavigationContext(key, new NavigationState(src.getPriority()));
+ service.saveNavigation(dst);
+ }
+ break;
+ default:
+ throw new AssertionError();
+ }
+
+ //
+ if (dst != null)
+ {
+ ArrayList<NavigationFragment> fragments = src.getFragments();
+ if (fragments != null && fragments.size() > 0)
+ {
+ for (NavigationFragment fragment : fragments)
+ {
+ String parentURI = fragment.getParentURI();
+
+ // Find something better than that for building the path
+ List<String> path;
+ if (parentURI != null)
+ {
+ path = new ArrayList<String>();
+ String[] names = Utils.split("/", parentURI);
+ for (String name : names)
+ {
+ if (name.length() > 0)
+ {
+ path.add(name);
+ }
+ }
+ }
+ else
+ {
+ path = Collections.emptyList();
+ }
+
+ //
+ NavigationFragmentImporter fragmentImporter = new
NavigationFragmentImporter(
+ path.toArray(new String[path.size()]),
+ service,
+ dst.getKey(),
+ portalLocale,
+ descriptionService,
+ fragment,
+ mode.config);
+
+ //
+ fragmentImporter.perform();
+ }
+ }
+ }
+ }
+}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -23,24 +23,145 @@
import java.util.List;
/**
-* A flexible scope implementation.
+* Flexible scope implementations.
*/
-public class GenericScope implements Scope
+public class GenericScope
{
- public static Scope branchShape(String[] path)
+ public static abstract class Branch implements Scope
{
- return branchShape(Arrays.asList(path), Scope.CHILDREN);
- }
- public static Scope branchShape(List<String> path)
- {
- return branchShape(path, Scope.CHILDREN);
- }
+ /** . */
+ private final Scope federated;
- public static Scope branchShape(String[] path, Scope federated)
- {
- return branchShape(Arrays.asList(path), federated);
+ /**
+ * Create a new branch scope.
+ *
+ * @param federated the federated scope
+ * @throws NullPointerException if the federated scope is null
+ */
+ public Branch(Scope federated) throws NullPointerException
+ {
+ if (federated == null)
+ {
+ throw new NullPointerException("no null federated scope
accepted");
+ }
+
+ //
+ this.federated = federated;
+ }
+
+ protected abstract int getSize();
+
+ protected abstract String getName(int index);
+
+ public Visitor get()
+ {
+ return new Visitor()
+ {
+ @Override
+ protected int getSize()
+ {
+ return GenericScope.Branch.this.getSize();
+ }
+
+ @Override
+ protected String getName(int index)
+ {
+ return GenericScope.Branch.this.getName(index);
+ }
+
+ @Override
+ protected Scope.Visitor getFederated()
+ {
+ return federated.get();
+ }
+ };
+ }
+
+ public static abstract class Visitor implements Scope.Visitor
+ {
+
+ /** . */
+ private Scope.Visitor visitor;
+
+ protected Visitor()
+ {
+ this.visitor = null;
+ }
+
+ protected abstract int getSize();
+
+ protected abstract String getName(int index);
+
+ protected abstract Scope.Visitor getFederated();
+
+ public VisitMode enter(int depth, String id, String name, NodeState state)
+ {
+ int size = getSize();
+
+ //
+ if (depth < size)
+ {
+ if (depth == 0 || name.equals(getName(depth - 1)))
+ {
+ return VisitMode.ALL_CHILDREN;
+ }
+ else
+ {
+ return VisitMode.NO_CHILDREN;
+ }
+ }
+ else if (depth == size)
+ {
+ if (depth == 0 || name.equals(getName(depth - 1)))
+ {
+ Scope.Visitor visitor = getFederated();
+ VisitMode mode = visitor.enter(0, id, name, state);
+ if (mode == VisitMode.ALL_CHILDREN)
+ {
+ this.visitor = visitor;
+ }
+ return mode;
+ }
+ else
+ {
+ return VisitMode.NO_CHILDREN;
+ }
+ }
+ else
+ {
+ return visitor.enter(depth - size, id, name, state);
+ }
+ }
+
+ public void leave(int depth, String id, String name, NodeState state)
+ {
+ int size = getSize();
+
+ //
+ if (depth < size)
+ {
+ // Do nothing
+ }
+ else if (depth == size)
+ {
+ if (depth == 0 || name.equals(getName(depth - 1)))
+ {
+ visitor.leave(0, id, name, state);
+ visitor = null;
+ }
+ else
+ {
+ // Do nothing
+ }
+ }
+ else
+ {
+ visitor.leave(depth - size, id, name, state);
+ }
+ }
+ }
}
/**
@@ -61,102 +182,125 @@
* @return the branch shape scope
* @throws NullPointerException if any argument is null
*/
- public static Scope branchShape(final List<String> path, final Scope federated)
throws NullPointerException
+ public static Scope branchShape(final List<String> path, Scope federated) throws
NullPointerException
{
if (path == null)
{
- throw new NullPointerException("no null path accepted");
+ throw new NullPointerException("No null path accepted");
}
- if (federated == null)
+ return new Branch(federated)
{
- throw new NullPointerException("no null federated scope accepted");
- }
- return new Scope()
+ @Override
+ protected int getSize()
+ {
+ return path.size();
+ }
+
+ @Override
+ protected String getName(int index)
+ {
+ return path.get(index);
+ }
+ };
+ }
+
+ public static Scope branchShape(final String[] path, Scope federated)
+ {
+ return new Branch(federated)
{
- public Visitor get()
+ @Override
+ protected int getSize()
{
- return new Visitor()
- {
- public VisitMode enter(int depth, String id, String name, NodeState
state)
- {
- if (depth == 0)
- {
- return VisitMode.ALL_CHILDREN;
- }
- else if (depth > 0)
- {
- if (depth < path.size())
- {
- if ((name.equals(path.get(depth - 1))))
- {
- return VisitMode.ALL_CHILDREN;
- }
- else
- {
- return VisitMode.NO_CHILDREN;
- }
- }
- else if (depth == path.size())
- {
- if ((name.equals(path.get(path.size() - 1))))
- {
- return federated.get().enter(0, id, name, state);
- }
- else
- {
- return VisitMode.NO_CHILDREN;
- }
- }
- else
- {
- return federated.get().enter(depth - path.size(), id, name,
state);
- }
- }
- throw new AssertionError();
- }
+ return path.length;
+ }
- public void leave(int depth, String id, String name, NodeState state)
- {
- }
- };
+ @Override
+ protected String getName(int index)
+ {
+ return path[index];
}
};
}
+ public static Scope branchShape(List<String> path)
+ {
+ return branchShape(path, Scope.CHILDREN);
+ }
+ public static Scope branchShape(String[] path)
+ {
+ return branchShape(Arrays.asList(path), Scope.CHILDREN);
+ }
+
/** . */
- private final Visitor visitor;
+ private static final GenericScope.Tree ALL = new Tree(-1);
- /**
- * Creates a new navigation scope. When the height is positive or null, the tree will
be pruned to the specified
- * height, when the height is negative no pruning will occur.
- *
- * @param height the max height of the pruned tree
- */
- public GenericScope(final int height)
+ /** . */
+ private static GenericScope.Tree[] PREDEFINED = {
+ new Tree(0),
+ new Tree(1),
+ new Tree(2),
+ new Tree(3),
+ new Tree(4),
+ new Tree(5),
+ new Tree(6),
+ new Tree(7),
+ new Tree(8),
+ new Tree(9) };
+
+ public static Scope treeShape(int height)
{
- this.visitor = new Visitor()
+ if (height < 0)
{
- public VisitMode enter(int depth, String id, String name, NodeState state)
+ return ALL;
+ }
+ else if (height < PREDEFINED.length)
+ {
+ return PREDEFINED[height];
+ }
+ else
+ {
+ return new Tree(height);
+ }
+ }
+
+ public static class Tree implements Scope
+ {
+
+ /** . */
+ private final Visitor visitor;
+
+ /**
+ * Creates a new navigation scope. When the height is positive or zero, the tree
will be pruned to the specified
+ * height, when the height is negative no pruning will occur.
+ *
+ * @param height the max height of the pruned tree
+ */
+ public Tree(final int height)
+ {
+ this.visitor = new Visitor()
{
- if (height < 0 || depth < height)
+ public VisitMode enter(int depth, String id, String name, NodeState state)
{
- return VisitMode.ALL_CHILDREN;
+ if (height < 0 || depth < height)
+ {
+ return VisitMode.ALL_CHILDREN;
+ }
+ else
+ {
+ return VisitMode.NO_CHILDREN;
+ }
}
- else
+
+ public void leave(int depth, String id, String name, NodeState state)
{
- return VisitMode.NO_CHILDREN;
}
- }
+ };
+ }
- public void leave(int depth, String id, String name, NodeState state)
- {
- }
- };
+ public Visitor get()
+ {
+ return visitor;
+ }
}
-
- public Visitor get()
- {
- return visitor;
- }
}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -135,62 +135,55 @@
}
/**
- * Returns the relative depth of this node with respect to the ancestor argument.
+ * Returns the associated node with this context
*
- * @param ancestor the ancestor
- * @return the depth
- * @throws IllegalArgumentException if the ancestor argument is not an ancestor
- * @throws NullPointerException if the ancestor argument is null
+ * @return the node
*/
- public int getDepth(NodeContext<N> ancestor) throws IllegalArgumentException,
NullPointerException
+ public N getNode()
{
- if (ancestor == null)
- {
- throw new NullPointerException();
- }
- int depth = 0;
- for (NodeContext<N> current = this;current != null;current =
current.getParent())
- {
- if (current == ancestor)
- {
- return depth;
- }
- else
- {
- depth++;
- }
- }
- throw new IllegalArgumentException("Context " + ancestor + " is not
an ancestor of " + this);
+ return node;
}
- public NodeContext<N> getDescendant(String handle) throws NullPointerException
+ /**
+ * Returns the context id or null if the context is not associated with a persistent
navigation node.
+ *
+ * @return the id
+ */
+ public String getId()
{
- if (handle == null)
+ return data != null ? data.getId() : null;
+ }
+
+ /**
+ * Returns the context index among its parent.
+ *
+ * @return the index value
+ */
+ public int getIndex()
+ {
+ int count = 0;
+ for (NodeContext<N> node = getPrevious();node != null;node =
node.getPrevious())
{
- throw new NullPointerException();
+ count++;
}
+ return count;
+ }
- //
- NodeContext<N> found = null;
- if (this.handle.equals(handle))
+ public boolean isExpanded()
+ {
+ return expanded;
+ }
+
+ void expand()
+ {
+ if (!expanded)
{
- found = this;
+ this.expanded = true;
}
else
{
- if (expanded)
- {
- for (NodeContext<N> current = getFirst();current != null;current =
current.getNext())
- {
- found = current.getDescendant(handle);
- if (found != null)
- {
- break;
- }
- }
- }
+ throw new IllegalStateException("Context is already expanded");
}
- return found;
}
/**
@@ -228,63 +221,33 @@
}
}
- /**
- * Applies a filter recursively, the filter will update the hiddent status of the
- * fragment.
- *
- * @param filter the filter to apply
- */
- public void filter(NodeFilter filter)
+ public NodeState getState()
{
- doFilter(0, filter);
- }
-
- private void doFilter(int depth, NodeFilter filter)
- {
- boolean accept = filter.accept(depth, getId(), name, getState());
- setHidden(!accept);
- if (expanded)
+ if (state != null)
{
- for (NodeContext<N> node = getFirst();node != null;node = node.getNext())
- {
- node.doFilter(depth + 1, filter);
- }
+ return state;
}
+ else
+ {
+ return data.getState();
+ }
}
/**
- * Returns the associated node with this context
+ * Update the context state
*
- * @return the node
+ * @param state the new state
+ * @throws NullPointerException if the state is null
*/
- public N getNode()
+ public void setState(NodeState state) throws NullPointerException
{
- return node;
- }
-
- /**
- * Reutrns the context id or null if the context is not associated with a persistent
navigation node.
- *
- * @return the id
- */
- public String getId()
- {
- return data != null ? data.getId() : null;
- }
-
- /**
- * Returns the context index among its parent.
- *
- * @return the index value
- */
- public int getIndex()
- {
- int count = 0;
- for (NodeContext<N> node = getPrevious();node != null;node =
node.getPrevious())
+ if (state == null)
{
- count++;
+ throw new NullPointerException("No null state accepted");
}
- return count;
+
+ //
+ tree.addChange(new NodeChange.Updated<NodeContext<N>>(this, state));
}
public String getName()
@@ -328,200 +291,111 @@
}
}
- public NodeContext<N> get(String name) throws NullPointerException,
IllegalStateException
- {
- if (name == null)
- {
- throw new NullPointerException();
- }
- if (!expanded)
- {
- throw new IllegalStateException("No children relationship");
- }
-
- //
- for (NodeContext<N> node = getFirst();node != null;node = node.getNext())
- {
- if (node.getName().equals(name))
- {
- return node;
- }
- }
-
- //
- return null;
- }
-
/**
- * Returns the total number of nodes.
+ * Applies a filter recursively, the filter will update the hiddent status of the
+ * fragment.
*
- * @return the total number of nodes
+ * @param filter the filter to apply
*/
- public int getNodeSize()
+ public void filter(NodeFilter filter)
{
+ doFilter(0, filter);
+ }
+
+ private void doFilter(int depth, NodeFilter filter)
+ {
+ boolean accept = filter.accept(depth, getId(), name, getState());
+ setHidden(!accept);
if (expanded)
{
- return getSize();
+ for (NodeContext<N> node = getFirst();node != null;node = node.getNext())
+ {
+ node.doFilter(depth + 1, filter);
+ }
}
- else
- {
- return data.children.length;
- }
}
/**
- * Returns the node count defined by:
- * <ul>
- * <li>when the node has a children relationship, the number of non hidden
nodes</li>
- * <li>when the node has not a children relationship, the total number of
nodes</li>
- * </ul>
+ * Returns the relative depth of this node with respect to the ancestor argument.
*
- * @return the node count
+ * @param ancestor the ancestor
+ * @return the depth
+ * @throws IllegalArgumentException if the ancestor argument is not an ancestor
+ * @throws NullPointerException if the ancestor argument is null
*/
- public int getNodeCount()
+ public int getDepth(NodeContext<N> ancestor) throws IllegalArgumentException,
NullPointerException
{
- if (expanded)
+ if (ancestor == null)
{
- return getSize() - hiddenCount;
+ throw new NullPointerException();
}
- else
+ int depth = 0;
+ for (NodeContext<N> current = this;current != null;current =
current.getParent())
{
- return data.children.length;
+ if (current == ancestor)
+ {
+ return depth;
+ }
+ else
+ {
+ depth++;
+ }
}
+ throw new IllegalArgumentException("Context " + ancestor + " is not
an ancestor of " + this);
}
- public NodeState getState()
+ public NodeContext<N> getDescendant(String handle) throws NullPointerException
{
- if (state != null)
+ if (handle == null)
{
- return state;
+ throw new NullPointerException();
}
- else
- {
- return data.getState();
- }
- }
- /**
- * Update the context state
- *
- * @param state the new state
- * @throws NullPointerException if the state is null
- */
- public void setState(NodeState state) throws NullPointerException
- {
- if (state == null)
- {
- throw new NullPointerException("No null state accepted");
- }
-
//
- tree.addChange(new NodeChange.Updated<NodeContext<N>>(this, state));
- }
-
- public N getParentNode()
- {
- NodeContext<N> parent = getParent();
- return parent != null ? parent.node : null;
- }
-
- public N getNode(String name) throws NullPointerException
- {
- NodeContext<N> child = get(name);
- return child != null && !child.hidden ? child.node: null;
- }
-
- public N getNode(int index)
- {
- if (index < 0)
+ NodeContext<N> found = null;
+ if (this.handle.equals(handle))
{
- throw new IndexOutOfBoundsException("Index " + index + " cannot
be negative");
+ found = this;
}
- if (!expanded)
- {
- throw new IllegalStateException("No children relationship");
- }
- NodeContext<N> context = getFirst();
- while (context != null && (context.hidden || index-- > 0))
- {
- context = context.getNext();
- }
- if (context == null)
- {
- throw new IndexOutOfBoundsException("Index " + index + " is out
of bounds");
- }
else
{
- return context.node;
- }
- }
-
- public final Iterator<N> iterator()
- {
- return new Iterator<N>()
- {
- NodeContext<N> next = getFirst();
+ if (expanded)
{
- while (next != null && next.isHidden())
+ for (NodeContext<N> current = getFirst();current != null;current =
current.getNext())
{
- next = next.getNext();
- }
- }
- public boolean hasNext()
- {
- return next != null;
- }
- public N next()
- {
- if (next != null)
- {
- NodeContext<N> tmp = next;
- do
+ found = current.getDescendant(handle);
+ if (found != null)
{
- next = next.getNext();
+ break;
}
- while (next != null && next.isHidden());
- return tmp.getNode();
}
- else
- {
- throw new NoSuchElementException();
- }
}
- public void remove()
- {
- throw new UnsupportedOperationException();
- }
- };
+ }
+ return found;
}
- /** . */
- private Collection<N> nodes;
-
- public Collection<N> getNodes()
+ public NodeContext<N> get(String name) throws NullPointerException,
IllegalStateException
{
- if (expanded)
+ if (name == null)
{
- if (nodes == null)
- {
- nodes = new AbstractCollection<N>()
- {
- public Iterator<N> iterator()
- {
- return NodeContext.this.iterator();
- }
- public int size()
- {
- return getNodeCount();
- }
- };
- }
- return nodes;
+ throw new NullPointerException();
}
- else
+ if (!expanded)
{
- return null;
+ throw new IllegalStateException("No children relationship");
}
+
+ //
+ for (NodeContext<N> node = getFirst();node != null;node = node.getNext())
+ {
+ if (node.getName().equals(name))
+ {
+ return node;
+ }
+ }
+
+ //
+ return null;
}
/**
@@ -670,65 +544,144 @@
}
}
+ // Node related methods
+
/**
- * Remove a specified context.
+ * Returns the total number of nodes.
*
- * @param name the name of the context to remove
- * @return true if the context was removed
- * @throws NullPointerException if the name argument is null
- * @throws IllegalArgumentException if the named context does not exist
- * @throws IllegalStateException if the children relationship does not exist
+ * @return the total number of nodes
*/
- public boolean removeNode(String name) throws NullPointerException,
IllegalArgumentException, IllegalStateException
+ public int getNodeSize()
{
- NodeContext<N> node = get(name);
- if (node == null)
+ if (expanded)
{
- throw new IllegalArgumentException("Cannot remove non existent " +
name + " child");
+ return getSize();
}
+ else
+ {
+ return data.children.length;
+ }
+ }
- //
- if (node.hidden)
+ /**
+ * Returns the node count defined by:
+ * <ul>
+ * <li>when the node has a children relationship, the number of non hidden
nodes</li>
+ * <li>when the node has not a children relationship, the total number of
nodes</li>
+ * </ul>
+ *
+ * @return the node count
+ */
+ public int getNodeCount()
+ {
+ if (expanded)
{
- return false;
+ return getSize() - hiddenCount;
}
else
{
- tree.addChange(new NodeChange.Destroyed<NodeContext<N>>(this,
node));
-
- //
- return true;
+ return data.children.length;
}
}
- public boolean isExpanded()
+ public N getParentNode()
{
- return expanded;
+ NodeContext<N> parent = getParent();
+ return parent != null ? parent.node : null;
}
- void expand()
+ public N getNode(String name) throws NullPointerException
{
+ NodeContext<N> child = get(name);
+ return child != null && !child.hidden ? child.node: null;
+ }
+
+ public N getNode(int index)
+ {
+ if (index < 0)
+ {
+ throw new IndexOutOfBoundsException("Index " + index + " cannot
be negative");
+ }
if (!expanded)
{
- this.expanded = true;
+ throw new IllegalStateException("No children relationship");
}
+ NodeContext<N> context = getFirst();
+ while (context != null && (context.hidden || index-- > 0))
+ {
+ context = context.getNext();
+ }
+ if (context == null)
+ {
+ throw new IndexOutOfBoundsException("Index " + index + " is out
of bounds");
+ }
else
{
- throw new IllegalStateException("Context is already expanded");
+ return context.node;
}
}
- Iterable<NodeContext<N>> getContexts()
+ public final Iterator<N> iterator()
{
- if (expanded)
+ return new Iterator<N>()
{
- return new Iterable<NodeContext<N>>()
+ NodeContext<N> next = getFirst();
{
- public Iterator<NodeContext<N>> iterator()
+ while (next != null && next.isHidden())
{
- return listIterator();
+ next = next.getNext();
}
- };
+ }
+ public boolean hasNext()
+ {
+ return next != null;
+ }
+ public N next()
+ {
+ if (next != null)
+ {
+ NodeContext<N> tmp = next;
+ do
+ {
+ next = next.getNext();
+ }
+ while (next != null && next.isHidden());
+ return tmp.getNode();
+ }
+ else
+ {
+ throw new NoSuchElementException();
+ }
+ }
+ public void remove()
+ {
+ throw new UnsupportedOperationException();
+ }
+ };
+ }
+
+ /** . */
+ private Collection<N> nodes;
+
+ public Collection<N> getNodes()
+ {
+ if (expanded)
+ {
+ if (nodes == null)
+ {
+ nodes = new AbstractCollection<N>()
+ {
+ public Iterator<N> iterator()
+ {
+ return NodeContext.this.iterator();
+ }
+ public int size()
+ {
+ return getNodeCount();
+ }
+ };
+ }
+ return nodes;
}
else
{
@@ -736,6 +689,50 @@
}
}
+ /**
+ * Remove a specified context when it is not hidden.
+ *
+ * @param name the name of the context to remove
+ * @return true if the context was removed
+ * @throws NullPointerException if the name argument is null
+ * @throws IllegalArgumentException if the named context does not exist
+ * @throws IllegalStateException if the children relationship does not exist
+ */
+ public boolean removeNode(String name) throws NullPointerException,
IllegalArgumentException, IllegalStateException
+ {
+ NodeContext<N> node = get(name);
+ if (node == null)
+ {
+ throw new IllegalArgumentException("Cannot remove non existent " +
name + " child");
+ }
+
+ //
+ return node.removeNode();
+ }
+
+ /**
+ * Removes this current context when it is not hidden.
+ *
+ * @return if the context was removed
+ * @throws IllegalStateException if the children relationship does not exist
+ */
+ public boolean removeNode() throws IllegalStateException
+ {
+ if (hidden)
+ {
+ return false;
+ }
+ else
+ {
+ tree.addChange(new NodeChange.Destroyed<NodeContext<N>>(getParent(),
this));
+
+ //
+ return true;
+ }
+ }
+
+ // Callbacks
+
protected void beforeRemove(NodeContext<N> context)
{
if (!expanded)
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -36,22 +36,22 @@
/**
* The node without its children.
*/
- Scope SINGLE = new GenericScope(0);
+ Scope SINGLE = GenericScope.treeShape(0);
/**
* A node and its chidren.
*/
- Scope CHILDREN = new GenericScope(1);
+ Scope CHILDREN = GenericScope.treeShape(1);
/**
* A node, its chidren and grandchildren.
*/
- Scope GRANDCHILDREN = new GenericScope(2);
+ Scope GRANDCHILDREN = GenericScope.treeShape(2);
/**
* The entire hierarchy, to use with care.
*/
- Scope ALL = new GenericScope(-1);
+ Scope ALL = GenericScope.treeShape(-1);
Visitor get();
@@ -61,7 +61,7 @@
public interface Visitor
{
/**
- * Returns the visit mode for the specified node.
+ * Signals a node is ented and returns the visit mode for that node.
*
* @param depth the relative depth to the root of the loading
* @param id the node persistent id
@@ -71,6 +71,14 @@
*/
VisitMode enter(int depth, String id, String name, NodeState state);
+ /**
+ * Signals a node is left.
+ *
+ * @param depth the relative depth to the root of the loading
+ * @param id the node persistent id
+ * @param name the node name
+ * @param state the node state
+ */
void leave(int depth, String id, String name, NodeState state);
}
}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -113,15 +113,19 @@
private void perform(NodeContext<N1> parent)
{
// Compute visit
- VisitMode visit = null;
- N2 d = it.getDestination();
- NodeData data = updateAdapter.getData(d);
+ final N2 d = it.getDestination();
+ final NodeData data = updateAdapter.getData(d);
//
+ final VisitMode visit;
if (data != null)
{
visit = visitor.enter(depth, data.id, data.name, data.state);
}
+ else
+ {
+ visit = null;
+ }
// Cut the recursion if necessary
if (visit != VisitMode.ALL_CHILDREN)
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -48,13 +48,13 @@
final NodeContext<UserNode> context;
/** . */
- private String resolvedLabel;
+ String resolvedLabel;
/** . */
- private String encodedResolvedLabel;
+ String encodedResolvedLabel;
/** . */
- private String uri;
+ String uri;
UserNode(UserNodeContext owner, NodeContext<UserNode> context)
{
@@ -89,6 +89,11 @@
public void setName(String name)
{
context.setName(name);
+
+ //
+ this.uri = null;
+ this.resolvedLabel = null;
+ this.encodedResolvedLabel = null;
}
public String getURI()
@@ -125,11 +130,11 @@
public void setLabel(String label)
{
+ context.setState(new NodeState.Builder(context.getState()).label(label).build());
+
+ //
this.resolvedLabel = null;
this.encodedResolvedLabel = null;
-
- //
- context.setState(new NodeState.Builder(context.getState()).label(label).build());
}
public String getIcon()
@@ -306,11 +311,13 @@
public void addChild(UserNode child)
{
context.add(null, child.context);
+ child.uri = null;
}
public void addChild(int index, UserNode child)
{
context.add(index, child.context);
+ child.uri = null;
}
public UserNode addChild(String childName)
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java
(rev 0)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,115 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.user;
+
+import org.exoplatform.portal.mop.navigation.NodeChangeListener;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.NodeState;
+
+/**
+ * This listener takes care of invalidating the cached state of the UserNode listener
when it is updated against the
+ * navigation service.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+class UserNodeListener implements NodeChangeListener<NodeContext<UserNode>>
+{
+
+ /** . */
+ private NodeChangeListener<UserNode> next;
+
+ UserNodeListener(NodeChangeListener<UserNode> next)
+ {
+ if (next != null)
+ {
+ this.next = next;
+ }
+ }
+
+ public void onAdd(NodeContext<UserNode> target, NodeContext<UserNode>
parent, NodeContext<UserNode> previous)
+ {
+ if (next != null)
+ {
+ next.onAdd(unwrap(target), unwrap(parent), unwrap(previous));
+ }
+ }
+
+ public void onCreate(NodeContext<UserNode> target, NodeContext<UserNode>
parent, NodeContext<UserNode> previous, String name)
+ {
+ if (next != null)
+ {
+ next.onCreate(unwrap(target), unwrap(parent), unwrap(previous), name);
+ }
+ }
+
+ public void onRemove(NodeContext<UserNode> target, NodeContext<UserNode>
parent)
+ {
+ if (next != null)
+ {
+ next.onRemove(unwrap(target), unwrap(parent));
+ }
+ }
+
+ public void onDestroy(NodeContext<UserNode> target, NodeContext<UserNode>
parent)
+ {
+ if (next != null)
+ {
+ next.onDestroy(unwrap(target), unwrap(parent));
+ }
+ }
+
+ public void onRename(NodeContext<UserNode> target, NodeContext<UserNode>
parent, String name)
+ {
+ UserNode unwrappedTarget = unwrap(target);
+ unwrappedTarget.resolvedLabel = null;
+ unwrappedTarget.encodedResolvedLabel = null;
+ unwrappedTarget.uri = null;
+ if (next != null)
+ {
+ next.onRename(unwrappedTarget, unwrap(parent), name);
+ }
+ }
+
+ public void onUpdate(NodeContext<UserNode> target, NodeState state)
+ {
+ UserNode unwrappedTarget = unwrap(target);
+ unwrappedTarget.resolvedLabel = null;
+ unwrappedTarget.encodedResolvedLabel = null;
+ if (next != null)
+ {
+ next.onUpdate(unwrappedTarget, state);
+ }
+ }
+
+ public void onMove(NodeContext<UserNode> target, NodeContext<UserNode>
from, NodeContext<UserNode> to, NodeContext<UserNode> previous)
+ {
+ UserNode unwrappedTarget = unwrap(target);
+ unwrappedTarget.uri = null;
+ if (next != null)
+ {
+ next.onMove(unwrappedTarget, unwrap(from), unwrap(to), unwrap(previous));
+ }
+ }
+
+ private UserNode unwrap(NodeContext<UserNode> context)
+ {
+ return context != null ? context.getNode() : null;
+ }
+}
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -30,11 +30,11 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.SiteType;
+import org.exoplatform.portal.mop.navigation.GenericScope;
import org.exoplatform.portal.mop.navigation.NavigationContext;
import org.exoplatform.portal.mop.navigation.NavigationServiceException;
import org.exoplatform.portal.mop.navigation.NodeChangeListener;
import org.exoplatform.portal.mop.navigation.NodeContext;
-import org.exoplatform.portal.mop.navigation.NodeContextChangeAdapter;
import org.exoplatform.portal.mop.navigation.NodeState;
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.mop.navigation.VisitMode;
@@ -201,7 +201,7 @@
NodeChangeListener<UserNode> listener) throws NullPointerException,
UserPortalException, NavigationServiceException
{
UserNodeContext context = new UserNodeContext(userNavigation, filterConfig);
- NodeContext<UserNode> nodeContext =
service.getNavigationService().loadNode(context, userNavigation.navigation, scope,
NodeContextChangeAdapter.safeWrap(listener));
+ NodeContext<UserNode> nodeContext =
service.getNavigationService().loadNode(context, userNavigation.navigation, scope, new
UserNodeListener(listener));
if (nodeContext != null)
{
return nodeContext.getNode().filter();
@@ -219,7 +219,7 @@
{
throw new NullPointerException("No null node accepted");
}
- service.getNavigationService().updateNode(node.context, scope,
NodeContextChangeAdapter.safeWrap(listener));
+ service.getNavigationService().updateNode(node.context, scope, new
UserNodeListener(listener));
node.filter();
}
@@ -230,7 +230,7 @@
{
throw new NullPointerException("No null node accepted");
}
- service.getNavigationService().rebaseNode(node.context, scope,
NodeContextChangeAdapter.safeWrap(listener));
+ service.getNavigationService().rebaseNode(node.context, scope, new
UserNodeListener(listener));
node.filter();
}
@@ -240,11 +240,14 @@
{
throw new NullPointerException("No null node accepted");
}
- service.getNavigationService().saveNode(node.context,
NodeContextChangeAdapter.safeWrap(listener));
+ service.getNavigationService().saveNode(node.context, new
UserNodeListener(listener));
node.filter();
}
- private class MatchingScope implements Scope
+ /**
+ * Note : the scope implementation is not stateless but we don't care in this
case.
+ */
+ private class MatchingScope extends GenericScope.Branch.Visitor implements Scope
{
final UserNavigation userNavigation;
final UserNodeFilterConfig filterConfig;
@@ -260,6 +263,29 @@
this.match = match;
}
+ public Visitor get()
+ {
+ return this;
+ }
+
+ @Override
+ protected int getSize()
+ {
+ return match.length;
+ }
+
+ @Override
+ protected String getName(int index)
+ {
+ return match[index];
+ }
+
+ @Override
+ protected Visitor getFederated()
+ {
+ return Scope.CHILDREN.get();
+ }
+
void resolve() throws NavigationServiceException
{
UserNodeContext context = new UserNodeContext(userNavigation, filterConfig);
@@ -273,34 +299,23 @@
}
}
- public Visitor get()
+ public VisitMode enter(int depth, String id, String name, NodeState state)
{
- return new Visitor()
+ VisitMode vm = super.enter(depth, id, name, state);
+ if (depth == 0)
{
- public VisitMode enter(int depth, String id, String name, NodeState state)
+ score = 0;
+ MatchingScope.this.id = null;
+ }
+ else
+ {
+ if (vm == VisitMode.ALL_CHILDREN)
{
- if (depth == 0 && "default".equals(name))
- {
- score = 0;
- MatchingScope.this.id = null;
- return VisitMode.ALL_CHILDREN;
- }
- else if (depth <= match.length && name.equals(match[depth -
1]))
- {
- score++;
- MatchingScope.this.id = id;
- return VisitMode.ALL_CHILDREN;
- }
- else
- {
- return VisitMode.NO_CHILDREN;
- }
+ MatchingScope.this.id = id;
+ score++;
}
-
- public void leave(int depth, String id, String name, NodeState state)
- {
- }
- };
+ }
+ return vm;
}
}
@@ -342,7 +357,7 @@
// Find the first navigation available or return null
if (segments == null)
{
- return getDefaultPath(null);
+ return getDefaultPath(filterConfig);
}
// Get navigations
Modified: portal/trunk/component/portal/src/main/resources/binding.xml
===================================================================
--- portal/trunk/component/portal/src/main/resources/binding.xml 2011-07-22 02:50:13 UTC
(rev 6911)
+++ portal/trunk/component/portal/src/main/resources/binding.xml 2011-07-22 03:13:14 UTC
(rev 6912)
@@ -29,7 +29,7 @@
marshaller="org.exoplatform.portal.config.serialize.JibxPropertiesMapper"
unmarshaller="org.exoplatform.portal.config.serialize.JibxPropertiesMapper"/>
- <mapping class="org.exoplatform.portal.config.model.LocalizedValue"
+ <mapping class="org.exoplatform.portal.config.model.LocalizedString"
name="label"
unmarshaller="org.exoplatform.portal.config.serialize.LocalizedValueMapper"
marshaller="org.exoplatform.portal.config.serialize.LocalizedValueMapper">
@@ -105,10 +105,10 @@
</mapping>
<mapping name="node" label="node"
class="org.exoplatform.portal.config.model.PageNode">
- <value name="uri" field="uri" usage="optional"/>
+ <value name="uri" get-method="getUri"
set-method="setUri" usage="optional"/>
<value name="name" field="name"/>
- <collection field="labels" ordered="false">
- <structure map-as="org.exoplatform.portal.config.model.LocalizedValue"
usage="optional"/>
+ <collection field="labels" ordered="false"
factory="org.exoplatform.portal.config.model.I18NString.create">
+ <structure
map-as="org.exoplatform.portal.config.model.LocalizedString"
usage="optional"/>
</collection>
<value name="icon" field="icon"
usage="optional"/>
<value name="start-publication-date"
field="startPublicationDate" usage="optional"/>
@@ -116,7 +116,7 @@
<value name="visibility" field="visibility"
usage="optional" default="DISPLAYED"/>
<value name="page-reference" field="pageReference"
usage="optional"
deserializer="org.exoplatform.portal.config.serialize.JibxStringSerialize.deserializeString"/>
- <collection field="children" usage="optional"
item-type="org.exoplatform.portal.config.model.PageNode"/>
+ <collection get-method="getNodes" set-method="setNodes"
usage="optional"
item-type="org.exoplatform.portal.config.model.PageNode"/>
</mapping>
<mapping name="portal-config"
class="org.exoplatform.portal.config.model.PortalConfig"
ordered="false">
@@ -139,11 +139,18 @@
<value name="owner-type" field="ownerType"
usage="optional"/>
<value name="owner-id" field="ownerId"
usage="optional"/>
<value name="priority" field="priority"
usage="optional"/>
- <collection name="page-nodes" field="pageNodes"
usage="optional"
- item-type="org.exoplatform.portal.config.model.PageNode"/>
+ <collection field="fragments" ordered="false">
+ <structure
map-as="org.exoplatform.portal.config.model.NavigationFragment"
usage="optional"/>
+ </collection>
</mapping>
-
-
+
+ <mapping name="page-nodes"
class="org.exoplatform.portal.config.model.NavigationFragment">
+ <value name="parent-uri" field="parentURI"
usage="optional"/>
+ <collection get-method="getNodes" set-method="setNodes"
ordered="false">
+ <structure map-as="org.exoplatform.portal.config.model.PageNode"
usage="optional"/>
+ </collection>
+ </mapping>
+
<mapping name="portlet-preferences-set"
class="org.exoplatform.portal.application.PortletPreferences$PortletPreferencesSet">
<collection field="portlets"
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.exoplatform.portal;
+
+import org.exoplatform.commons.chromattic.ChromatticManager;
+import org.exoplatform.component.test.*;
+import org.exoplatform.container.PortalContainer;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ * @version $Revision$
+ */
+public abstract class AbstractPortalTest extends AbstractKernelTest
+{
+
+ public AbstractPortalTest()
+ {
+ }
+
+ public AbstractPortalTest(String name)
+ {
+ super(name);
+ }
+
+ @Override
+ protected void end()
+ {
+ end(false);
+ }
+
+ protected void end(boolean save)
+ {
+ PortalContainer container = getContainer();
+ ChromatticManager manager =
(ChromatticManager)container.getComponentInstanceOfType(ChromatticManager.class);
+ manager.getSynchronization().setSaveOnClose(save);
+ super.end();
+ }
+
+ protected final void sync()
+ {
+ end();
+ begin();
+ }
+
+ protected final void sync(boolean save)
+ {
+ end(save);
+ begin();
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ //
+ }
+}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -60,6 +60,6 @@
{
assertHash("d0591b0a022a0c2929e1aed8979857cd",
"gatein_objects_1_0.xsd");
assertHash("99ae24c9bbfe1b59e066756a29ab6c79",
"gatein_objects_1_1.xsd");
- assertHash("e30953182120381d5ffe65056071a270",
"gatein_objects_1_2.xsd");
+ assertHash("852e20df61c51199e3425f0882f2581d",
"gatein_objects_1_2.xsd");
}
}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.portal.AbstractPortalTest;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.identity-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.portal-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"org/exoplatform/portal/config/conf/configuration.xml")
+})
+public abstract class AbstractConfigTest extends AbstractPortalTest
+{
+
+ protected AbstractConfigTest()
+ {
+ }
+
+ protected AbstractConfigTest(String name)
+ {
+ super(name);
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public abstract class AbstractImportFragmentTest extends AbstractImportTest
+{
+
+ @Override
+ protected final String getConfig1()
+ {
+ return "fragment1";
+ }
+
+ @Override
+ protected final String getConfig2()
+ {
+ return "fragment2";
+ }
+
+ protected abstract void assertState(NodeContext<?> root);
+
+ @Override
+ protected final void afterTwoPhasesBoot(NodeContext<?> root)
+ {
+ assertEquals(1, root.getNodeSize());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon", foo.getState().getIcon());
+ assertEquals(0, foo.getNodeSize());
+ }
+
+ @Override
+ protected final void afterTwoPhaseNoOverrideReboot(NodeContext<?> root)
+ {
+ assertEquals(1, root.getNodeSize());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon", foo.getState().getIcon());
+ assertEquals(0, foo.getNodeSize());
+ }
+
+ @Override
+ protected final void afterOnePhaseBoot(NodeContext<?> root)
+ {
+ assertState(root);
+ }
+
+ @Override
+ protected final void afterTwoPhaseOverrideReboot(NodeContext<?> root)
+ {
+ assertState(root);
+ }
+
+ @Override
+ protected final void afterTwoPhaseNoOverrideReconfigure(NodeContext<?> root)
+ {
+ assertState(root);
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,77 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public abstract class AbstractImportNavigationTest extends AbstractImportTest
+{
+
+ @Override
+ protected final String getConfig1()
+ {
+ return "navigation1";
+ }
+
+ @Override
+ protected final String getConfig2()
+ {
+ return "navigation2";
+ }
+
+ protected abstract void assertState(NodeContext<?> root);
+
+ @Override
+ protected final void afterTwoPhasesBoot(NodeContext<?> root)
+ {
+ assertEquals(2, root.getNodeCount());
+ assertNotNull(root.get("foo"));
+ assertNotNull(root.get("daa"));
+ }
+
+ @Override
+ protected final void afterTwoPhaseNoOverrideReboot(NodeContext<?> root)
+ {
+ assertEquals(2, root.getNodeCount());
+ assertNotNull(root.get("foo"));
+ assertNotNull(root.get("daa"));
+ }
+
+ @Override
+ protected final void afterOnePhaseBoot(NodeContext<?> root)
+ {
+ assertState(root);
+ }
+
+ @Override
+ protected final void afterTwoPhaseOverrideReboot(NodeContext<?> root)
+ {
+ assertState(root);
+ }
+
+ @Override
+ protected final void afterTwoPhaseNoOverrideReconfigure(NodeContext<?> root)
+ {
+ assertState(root);
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,180 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.component.test.AbstractGateInTest;
+import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.KernelBootstrap;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.component.RequestLifeCycle;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.importer.Imported;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.navigation.Node;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.NodeModel;
+import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.gatein.mop.api.workspace.Workspace;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public abstract class AbstractImportTest extends AbstractGateInTest
+{
+
+ protected abstract ImportMode getMode();
+
+ protected abstract String getConfig2();
+
+ protected abstract String getConfig1();
+
+ protected abstract void afterOnePhaseBoot(NodeContext<?> root);
+
+ protected abstract void afterTwoPhasesBoot(NodeContext<?> root);
+
+ protected abstract void afterTwoPhaseOverrideReboot(NodeContext<?> root);
+
+ protected abstract void afterTwoPhaseNoOverrideReboot(NodeContext<?> root);
+
+ protected abstract void afterTwoPhaseNoOverrideReconfigure(NodeContext<?>
root);
+
+ public void testOnePhase() throws Exception
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.test.jcr-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.identity-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.portal-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"org/exoplatform/portal/config/TestImport1-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"org/exoplatform/portal/config/TestImport2-configuration.xml");
+
+ //
+ System.setProperty("override.1", "false");
+ System.setProperty("import.mode.1", "conserve");
+ System.setProperty("import.portal.1", getConfig1());
+ System.setProperty("override_2", "false");
+ System.setProperty("import.mode_2", getMode().toString());
+ System.setProperty("import.portal_2", getConfig2());
+
+ //
+ bootstrap.boot();
+ PortalContainer container = bootstrap.getContainer();
+ NavigationService service =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ RequestLifeCycle.begin(container);
+ NavigationContext nav =
service.loadNavigation(SiteKey.portal("classic"));
+ NodeContext<?> root = service.loadNode(Node.MODEL, nav, Scope.ALL, null);
+ afterOnePhaseBoot(root);
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+ }
+
+ public void testTwoPhasesOverride() throws Exception
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.test.jcr-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.identity-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.portal-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"org/exoplatform/portal/config/TestImport1-configuration.xml");
+
+ //
+ System.setProperty("override.1", "true");
+ System.setProperty("import.mode.1", getMode().toString());
+
+ //
+ System.setProperty("import.portal.1", getConfig1());
+ bootstrap.boot();
+ PortalContainer container = bootstrap.getContainer();
+ NavigationService service =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ RequestLifeCycle.begin(container);
+ NavigationContext nav =
service.loadNavigation(SiteKey.portal("classic"));
+ NodeContext<?> root = service.loadNode(Node.MODEL, nav, Scope.ALL, null);
+ afterTwoPhasesBoot(root);
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+
+ //
+ System.setProperty("import.portal.1", getConfig2());
+ bootstrap.boot();
+ container = bootstrap.getContainer();
+ service =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ RequestLifeCycle.begin(container);
+ nav = service.loadNavigation(SiteKey.portal("classic"));
+ root = service.loadNode(NodeModel.SELF_MODEL, nav, Scope.ALL, null);
+ afterTwoPhaseOverrideReboot(root);
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+ }
+
+ public void testTwoPhasesNoOverride() throws Exception
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.test.jcr-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.identity-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.portal-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"org/exoplatform/portal/config/TestImport1-configuration.xml");
+
+ //
+ System.setProperty("override.1", "false");
+ System.setProperty("import.mode.1", getMode().toString());
+
+ //
+ System.setProperty("import.portal.1", getConfig1());
+ bootstrap.boot();
+ PortalContainer container = bootstrap.getContainer();
+ NavigationService service =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ RequestLifeCycle.begin(container);
+ NavigationContext nav =
service.loadNavigation(SiteKey.portal("classic"));
+ NodeContext<?> root = service.loadNode(Node.MODEL, nav, Scope.ALL, null);
+ afterTwoPhasesBoot(root);
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+
+ //
+ System.setProperty("import.portal.1", getConfig2());
+ bootstrap.boot();
+ container = bootstrap.getContainer();
+ service =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ POMSessionManager mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ RequestLifeCycle.begin(container);
+ nav = service.loadNavigation(SiteKey.portal("classic"));
+ root = service.loadNode(NodeModel.SELF_MODEL, nav, Scope.ALL, null);
+ afterTwoPhaseNoOverrideReboot(root);
+ Workspace workspace = mgr.getSession().getWorkspace();
+ assertTrue(workspace.isAdapted(Imported.class));
+ workspace.removeAdapter(Imported.class);
+ assertFalse(workspace.isAdapted(Imported.class));
+ mgr.getSession().save();
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+
+ //
+ bootstrap.boot();
+ container = bootstrap.getContainer();
+ service =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ RequestLifeCycle.begin(container);
+ nav = service.loadNavigation(SiteKey.portal("classic"));
+ root = service.loadNode(NodeModel.SELF_MODEL, nav, Scope.ALL, null);
+ afterTwoPhaseNoOverrideReconfigure(root);
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+ }
+}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.exoplatform.portal.config;
-
-import org.exoplatform.commons.chromattic.ChromatticManager;
-import org.exoplatform.component.test.*;
-import org.exoplatform.container.PortalContainer;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-@ConfiguredBy({
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.test.jcr-configuration.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.test.organization-configuration.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.portal-configuration1.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.portal-configuration2.xml")
-})
-public abstract class AbstractPortalTest extends AbstractKernelTest
-{
-
- public AbstractPortalTest()
- {
- }
-
- public AbstractPortalTest(String name)
- {
- super(name);
- }
-
- @Override
- protected void end()
- {
- end(false);
- }
-
- protected void end(boolean save)
- {
- PortalContainer container = getContainer();
- ChromatticManager manager =
(ChromatticManager)container.getComponentInstanceOfType(ChromatticManager.class);
- manager.getSynchronization().setSaveOnClose(save);
- super.end();
- }
-
- protected final void sync()
- {
- end();
- begin();
- }
-
- protected final void sync(boolean save)
- {
- end(save);
- begin();
- }
-
- @Override
- protected void setUp() throws Exception
- {
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- //
- }
-}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -29,7 +29,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class TestCache extends AbstractPortalTest
+public class TestCache extends AbstractConfigTest
{
/** . */
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -30,7 +30,7 @@
* Nov 10, 2010
*/
-public class TestConcurrencyDataStorage extends AbstractPortalTest
+public class TestConcurrencyDataStorage extends AbstractConfigTest
{
private DataStorage storage_;
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -26,7 +26,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class TestContentRegistry extends AbstractPortalTest
+public class TestContentRegistry extends AbstractConfigTest
{
/** . */
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -32,6 +32,7 @@
import org.exoplatform.portal.config.model.Dashboard;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PersistentApplicationState;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.TransientApplicationState;
import org.exoplatform.portal.mop.EventType;
@@ -47,9 +48,15 @@
import org.exoplatform.portal.pom.spi.gadget.Gadget;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
+import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
+import org.exoplatform.services.organization.Group;
+import org.exoplatform.services.organization.GroupHandler;
+import org.exoplatform.services.organization.OrganizationService;
+import org.exoplatform.services.organization.User;
+import org.exoplatform.services.organization.UserHandler;
import java.util.ArrayList;
import java.util.Arrays;
@@ -64,7 +71,7 @@
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
*/
-public class TestDataStorage extends AbstractPortalTest
+public class TestDataStorage extends AbstractConfigTest
{
/** . */
@@ -82,10 +89,15 @@
/** . */
private POMSessionManager mgr;
+ /** . */
private LinkedList<Event> events;
+ /** . */
private ListenerService listenerService;
+ /** . */
+ private OrganizationService org;
+
public TestDataStorage(String name)
{
super(name);
@@ -110,6 +122,7 @@
navService =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
events = new LinkedList<Event>();
listenerService =
(ListenerService)container.getComponentInstanceOfType(ListenerService.class);
+ org =
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
//
listenerService.addListener(DataStorage.PAGE_CREATED, listener);
@@ -132,6 +145,19 @@
super.tearDown();
}
+ private void assertPageFound(Query<Page> q, String expectedPage) throws
Exception
+ {
+ List<Page> res = storage_.find(q).getAll();
+ assertEquals(1, res.size());
+ assertEquals(expectedPage, res.get(0).getPageId());
+ }
+
+ private void assertPageNotFound(Query<Page> q) throws Exception
+ {
+ List<Page> res = storage_.find(q).getAll();
+ assertEquals(0, res.size());
+ }
+
public void testCreatePortal() throws Exception
{
String label = "portal_foo";
@@ -886,4 +912,263 @@
portletApp.setState(state);
return portletApp;
}
+
+ public void testSearchPage() throws Exception
+ {
+ Page page = new Page();
+ page.setPageId("portal::test::searchedpage");
+ page.setTitle("Juuu Ziii");
+ storage_.create(page);
+
+ //
+ assertPageFound(new Query<Page>(null, null, null, "Juuu Ziii",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "Juuu",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "Ziii",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "juuu ziii",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "juuu",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "ziii",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "juu",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "zii",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "ju",
Page.class), "portal::test::searchedpage");
+ assertPageFound(new Query<Page>(null, null, null, "zi",
Page.class), "portal::test::searchedpage");
+
+ assertPageNotFound(new Query<Page>(null, null, null, "foo",
Page.class));
+ assertPageNotFound(new Query<Page>(null, null, null, "foo bar",
Page.class));
+ assertPageNotFound(new Query<Page>("test", null, null, null,
Page.class));
+ }
+
+ public void testGadget() throws Exception
+ {
+ Gadget gadget = new Gadget();
+ gadget.setUserPref("user_pref");
+ TransientApplicationState<Gadget> state = new
TransientApplicationState<Gadget>("bar", gadget);
+ Application<Gadget> gadgetApplication =
Application.createGadgetApplication();
+ gadgetApplication.setState(state);
+
+ Page container = new Page();
+ container.setPageId("portal::test::gadget_page");
+ container.getChildren().add(gadgetApplication);
+
+ storage_.create(container);
+
+ container = storage_.getPage("portal::test::gadget_page");
+ gadgetApplication = (Application<Gadget>)container.getChildren().get(0);
+
+ gadget = storage_.load(gadgetApplication.getState(), ApplicationType.GADGET);
+ assertNotNull(gadget);
+ assertEquals("user_pref", gadget.getUserPref());
+ }
+
+ public void testSiteScopedPreferences() throws Exception
+ {
+ Page page = storage_.getPage("portal::test::test4");
+ Application<Portlet> app =
(Application<Portlet>)page.getChildren().get(0);
+ PersistentApplicationState<Portlet> state =
(PersistentApplicationState)app.getState();
+
+ //
+ Portlet prefs = storage_.load(state, ApplicationType.PORTLET);
+ assertEquals(new PortletBuilder().add("template",
"par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl")
+ .build(), prefs);
+
+ //
+ prefs.setValue("template", "someanothervalue");
+ storage_.save(state, prefs);
+
+ //
+ prefs = storage_.load(state, ApplicationType.PORTLET);
+ assertNotNull(prefs);
+ assertEquals(new PortletBuilder().add("template",
"someanothervalue").build(), prefs);
+ }
+
+ public void testNullPreferenceValue() throws Exception
+ {
+ Page page = storage_.getPage("portal::test::test4");
+ Application<Portlet> app =
(Application<Portlet>)page.getChildren().get(0);
+ PersistentApplicationState<Portlet> state =
(PersistentApplicationState)app.getState();
+
+ //
+ Portlet prefs = storage_.load(state, ApplicationType.PORTLET);
+
+ //
+ prefs.setValue("template", null);
+ storage_.save(state, prefs);
+
+ //
+ prefs = storage_.load(state, ApplicationType.PORTLET);
+ assertNotNull(prefs);
+ assertEquals(new PortletBuilder().add("template", "").build(),
prefs);
+ }
+
+ public void testAccessMixin() throws Exception
+ {
+ Page page = new Page();
+ page.setTitle("MyTitle");
+ page.setOwnerType(PortalConfig.PORTAL_TYPE);
+ page.setOwnerId("test");
+ page.setName("foo");
+ storage_.save(page);
+
+ //
+ page = storage_.getPage("portal::test::foo");
+ assertNotNull(page);
+ assertEquals("MyTitle", page.getTitle());
+ assertEquals("test", page.getOwnerId());
+ assertEquals("foo", page.getName());
+
+ //
+ SampleMixin sampleMixin = storage_.adapt(page, SampleMixin.class);
+ //Check the default value of sampleProperty property
+ assertEquals("SampleProperty", sampleMixin.getSampleProperty());
+ }
+
+ public void testModifyMixin() throws Exception
+ {
+ Page page = new Page();
+ page.setTitle("MyTitle");
+ page.setOwnerType(PortalConfig.PORTAL_TYPE);
+ page.setOwnerId("test");
+ page.setName("foo");
+ storage_.save(page);
+
+ //
+ page = storage_.getPage("portal::test::foo");
+ assertNotNull(page);
+ assertEquals("MyTitle", page.getTitle());
+ assertEquals("test", page.getOwnerId());
+ assertEquals("foo", page.getName());
+
+ //
+ SampleMixin sampleMixin = storage_.adapt(page, SampleMixin.class);
+ sampleMixin.setSampleProperty("FYM!");
+
+ //
+ page = storage_.getPage("portal::test::foo");
+ assertNotNull(page);
+ SampleMixin sampleMixin2 = storage_.adapt(page, SampleMixin.class);
+ assertEquals("FYM!", sampleMixin2.getSampleProperty());
+ }
+
+ public void testSiteLayout() throws Exception
+ {
+ PortalConfig pConfig = storage_.getPortalConfig(PortalConfig.PORTAL_TYPE,
"classic");
+ assertNotNull(pConfig);
+ assertNotNull("The Group layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
+
+ pConfig = storage_.getPortalConfig(PortalConfig.GROUP_TYPE,
"/platform/administrators");
+ assertNotNull(pConfig);
+ assertNotNull("The Group layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
+ assertTrue(pConfig.getPortalLayout().getChildren() != null &&
pConfig.getPortalLayout().getChildren().size() > 1);
+ pConfig.getPortalLayout().getChildren().clear();
+ storage_.save(pConfig);
+
+ pConfig = storage_.getPortalConfig(PortalConfig.GROUP_TYPE,
"/platform/administrators");
+ assertNotNull(pConfig);
+ assertNotNull("The Group layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
+ assertTrue(pConfig.getPortalLayout().getChildren() != null &&
pConfig.getPortalLayout().getChildren().size() == 0);
+
+ pConfig = storage_.getPortalConfig(PortalConfig.USER_TYPE, "root");
+ assertNotNull(pConfig);
+ assertNotNull("The User layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
+
+ pConfig = storage_.getPortalConfig(PortalConfig.USER_TYPE, "mary");
+ assertNotNull(pConfig);
+ assertNotNull("The User layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
+ }
+
+ public void testGroupLayout() throws Exception
+ {
+ GroupHandler groupHandler = org.getGroupHandler();
+ Group group = groupHandler.findGroupById("groupTest");
+ assertNull(group);
+
+ group = groupHandler.createGroupInstance();
+ group.setGroupName("groupTest");
+ group.setLabel("group label");
+
+ groupHandler.addChild(null, group, true);
+
+ group = groupHandler.findGroupById("/groupTest");
+ assertNotNull(group);
+
+ PortalConfig pConfig = storage_.getPortalConfig(PortalConfig.GROUP_TYPE,
"/groupTest");
+ assertNotNull("the Group's PortalConfig is not null", pConfig);
+ assertTrue(pConfig.getPortalLayout().getChildren() == null ||
pConfig.getPortalLayout().getChildren().size() == 4);
+
+ /**
+ * We need to remove the /groupTest from the groupHandler as the
+ * handler is shared between the tests and can cause other tests
+ * to fail.
+ * TODO: make the tests fully independent
+ */
+ groupHandler.removeGroup(group, false);
+ group = groupHandler.findGroupById("/groupTest");
+ assertNull(group);
+ }
+
+
+
+ public void testGroupNavigation() throws Exception
+ {
+ GroupHandler groupHandler = org.getGroupHandler();
+ Group group = groupHandler.createGroupInstance();
+ group.setGroupName("testGroupNavigation");
+ group.setLabel("testGroupNavigation");
+
+ groupHandler.addChild(null, group, true);
+
+ SiteKey key = SiteKey.group(group.getId());
+ navService.saveNavigation(new NavigationContext(key, new NavigationState(0)));
+ assertNotNull(navService.loadNavigation(key));
+
+ // Remove group
+ groupHandler.removeGroup(group, true);
+
+ // Group navigations is removed after remove group
+ assertNull(navService.loadNavigation(key));
+ }
+
+ public void testUserLayout() throws Exception
+ {
+ UserHandler userHandler = org.getUserHandler();
+ User user = userHandler.findUserByName("testing");
+ assertNull(user);
+
+ user = userHandler.createUserInstance("testing");
+ user.setEmail("testing(a)gmaild.com");
+ user.setFirstName("test firstname");
+ user.setLastName("test lastname");
+ user.setPassword("123456");
+
+ userHandler.createUser(user, true);
+
+ user = userHandler.findUserByName("testing");
+ assertNotNull(user);
+
+ PortalConfig pConfig = storage_.getPortalConfig(PortalConfig.USER_TYPE,
"testing");
+ assertNotNull("the User's PortalConfig is not null", pConfig);
+ }
+
+ public void testWSRP() throws Exception
+ {
+ WSRP wsrp = new WSRP();
+ String id = "portlet id";
+ wsrp.setPortletId(id);
+ TransientApplicationState<WSRP> state = new
TransientApplicationState<WSRP>("test", wsrp);
+ Application<WSRP> wsrpApplication = Application.createWSRPApplication();
+ wsrpApplication.setState(state);
+
+ Page container = new Page();
+ String pageId = "portal::test::wsrp_page";
+ container.setPageId(pageId);
+ container.getChildren().add(wsrpApplication);
+
+ storage_.create(container);
+
+ container = storage_.getPage(pageId);
+ wsrpApplication = (Application<WSRP>)container.getChildren().get(0);
+
+ wsrp = storage_.load(wsrpApplication.getState(), ApplicationType.WSRP_PORTLET);
+ assertNotNull(wsrp);
+ assertEquals(id, wsrp.getPortletId());
+ }
}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,85 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.TransientApplicationState;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.spi.gadget.Gadget;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public class TestGadget extends AbstractPortalTest
-{
-
- /** . */
- private DataStorage storage_;
-
- /** . */
- private POMSessionManager mgr;
-
- /** . */
- private POMSession session;
-
- public void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- session = mgr.openSession();
- }
-
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-
- public void testBilto() throws Exception
- {
- Gadget gadget = new Gadget();
- gadget.setUserPref("user_pref");
- TransientApplicationState<Gadget> state = new
TransientApplicationState<Gadget>("bar", gadget);
- Application<Gadget> gadgetApplication =
Application.createGadgetApplication();
- gadgetApplication.setState(state);
-
- Page container = new Page();
- container.setPageId("portal::test::gadget_page");
- container.getChildren().add(gadgetApplication);
-
- storage_.create(container);
-
- container = storage_.getPage("portal::test::gadget_page");
- gadgetApplication = (Application<Gadget>)container.getChildren().get(0);
-
- gadget = storage_.load(gadgetApplication.getState(), ApplicationType.GADGET);
- assertNotNull(gadget);
- assertEquals("user_pref", gadget.getUserPref());
- }
-}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,107 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.exoplatform.portal.config;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-
-/**
- * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang
TO</a>
- * Aug 25, 2010
- */
-
-public class TestHandleMixin extends AbstractPortalTest
-{
-
- private DataStorage dataStorage;
-
- private POMSessionManager pomMgr;
-
- private POMSession session;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- begin();
-
- PortalContainer container = PortalContainer.getInstance();
- dataStorage =
(DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- POMSessionManager pomMgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- session = pomMgr.getSession();
- }
-
- private void createPage() throws Exception
- {
-
- Page page = new Page();
- page.setTitle("MyTitle");
- page.setOwnerType(PortalConfig.PORTAL_TYPE);
- page.setOwnerId("test");
- page.setName("foo");
-
- dataStorage.create(page);
- }
-
- public void testAccessMixin() throws Exception
- {
- createPage();
- Page page = dataStorage.getPage("portal::test::foo");
-
- assertNotNull(page);
- assertEquals("MyTitle", page.getTitle());
- assertEquals("test", page.getOwnerId());
- assertEquals("foo", page.getName());
-
- SampleMixin sampleMixin = dataStorage.adapt(page, SampleMixin.class);
- //Check the default value of sampleProperty property
- assertEquals("SampleProperty", sampleMixin.getSampleProperty());
- }
-
- public void testModifyMixin() throws Exception
- {
- createPage();
- Page page = dataStorage.getPage("portal::test::foo");
-
- assertNotNull(page);
- assertEquals("MyTitle", page.getTitle());
- assertEquals("test", page.getOwnerId());
- assertEquals("foo", page.getName());
-
- SampleMixin sampleMixin = dataStorage.adapt(page, SampleMixin.class);
- sampleMixin.setSampleProperty("FYM!");
-
- Page page2 = dataStorage.getPage("portal::test::foo");
- assertNotNull(page2);
- SampleMixin sampleMixin2 = dataStorage.adapt(page2, SampleMixin.class);
- assertEquals("FYM!", sampleMixin2.getSampleProperty());
-
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.component.test.AbstractGateInTest;
+import org.exoplatform.component.test.ContainerScope;
+import org.exoplatform.component.test.KernelBootstrap;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.component.RequestLifeCycle;
+import org.exoplatform.portal.mop.importer.Imported;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.gatein.mop.api.workspace.Workspace;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImport extends AbstractGateInTest
+{
+
+ public void testMixin() throws Exception
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.test.jcr-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.identity-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"conf/exo.portal.component.portal-configuration.xml");
+ bootstrap.addConfiguration(ContainerScope.PORTAL,
"org/exoplatform/portal/config/TestImport1-configuration.xml");
+
+ //
+ System.setProperty("override.1", "false");
+ System.setProperty("import.mode.1", "conserve");
+ System.setProperty("import.portal.1", "navigation1");
+
+ //
+ bootstrap.boot();
+ PortalContainer container = bootstrap.getContainer();
+ POMSessionManager mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+
+ //
+ RequestLifeCycle.begin(container);
+ Workspace workspace = mgr.getSession().getWorkspace();
+ assertTrue(workspace.isAdapted(Imported.class));
+ RequestLifeCycle.end();
+ bootstrap.dispose();
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportFragmentConserve extends AbstractImportFragmentTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.CONSERVE;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(1, root.getNodeSize());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon", foo.getState().getIcon());
+ assertEquals(0, foo.getNodeSize());
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportFragmentInsert extends AbstractImportFragmentTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.INSERT;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(1, root.getNodeSize());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon", foo.getState().getIcon());
+ assertEquals(1, foo.getNodeSize());
+ NodeContext<?> bar = foo.get("bar");
+ assertNotNull(bar);
+ assertEquals("bar_icon", bar.getState().getIcon());
+ assertEquals(0, bar.getNodeSize());
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportFragmentOverwrite extends AbstractImportFragmentTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.OVERWRITE;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(1, root.getNodeSize());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon", foo.getState().getIcon());
+ assertEquals(1, foo.getNodeSize());
+ NodeContext<?> bar = foo.get("bar");
+ assertNotNull(bar);
+ assertEquals("bar_icon", bar.getState().getIcon());
+ assertEquals(0, bar.getNodeSize());
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportNavigationConserve extends AbstractImportNavigationTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.CONSERVE;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(2, root.getNodeCount());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon_1", foo.getState().getIcon());
+ assertEquals(1, foo.getNodeCount());
+ NodeContext<?> juu = foo.get("juu");
+ assertNotNull(juu);
+ assertEquals("juu_icon", juu.getState().getIcon());
+ assertEquals(0, juu.getNodeCount());
+ NodeContext<?> daa = root.get("daa");
+ assertNotNull(daa);
+ assertEquals("daa_icon", daa.getState().getIcon());
+ assertEquals(0, daa.getNodeCount());
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportNavigationInsert extends AbstractImportNavigationTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.INSERT;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(3, root.getNodeCount());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon_1", foo.getState().getIcon());
+ assertEquals(1, foo.getNodeCount());
+ NodeContext<?> juu = foo.get("juu");
+ assertNotNull(juu);
+ assertEquals("juu_icon", juu.getState().getIcon());
+ assertEquals(0, juu.getNodeCount());
+ NodeContext<?> bar = root.get("bar");
+ assertNotNull(bar);
+ assertEquals("bar_icon", bar.getState().getIcon());
+ assertEquals(0, bar.getNodeCount());
+ NodeContext<?> daa = root.get("daa");
+ assertNotNull(daa);
+ assertEquals("daa_icon", daa.getState().getIcon());
+ assertEquals(0, daa.getNodeCount());
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportNavigationMerge extends AbstractImportNavigationTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.MERGE;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(3, root.getNodeCount());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon_2", foo.getState().getIcon());
+ assertEquals(1, foo.getNodeCount());
+ NodeContext<?> juu = foo.get("juu");
+ assertNotNull(juu);
+ assertEquals("juu_icon", juu.getState().getIcon());
+ assertEquals(0, juu.getNodeCount());
+ NodeContext<?> bar = root.get("bar");
+ assertNotNull(bar);
+ assertEquals("bar_icon", bar.getState().getIcon());
+ assertEquals(0, bar.getNodeCount());
+ NodeContext<?> daa = root.get("daa");
+ assertNotNull(daa);
+ assertEquals("daa_icon", daa.getState().getIcon());
+ assertEquals(0, daa.getNodeCount());
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestImportNavigationOverwrite extends AbstractImportNavigationTest
+{
+
+ @Override
+ protected ImportMode getMode()
+ {
+ return ImportMode.OVERWRITE;
+ }
+
+ @Override
+ protected void assertState(NodeContext<?> root)
+ {
+ assertEquals(2, root.getNodeCount());
+ NodeContext<?> foo = root.get("foo");
+ assertNotNull(foo);
+ assertEquals("foo_icon_2", foo.getState().getIcon());
+ assertEquals(0, foo.getNodeCount());
+ NodeContext<?> bar = root.get("bar");
+ assertNotNull(bar);
+ assertEquals("bar_icon", bar.getState().getIcon());
+ assertEquals(0, bar.getNodeCount());
+ }
+}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -22,8 +22,9 @@
import org.exoplatform.component.test.AbstractGateInTest;
import org.exoplatform.portal.application.PortletPreferences.PortletPreferencesSet;
import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.LocalizedValue;
+import org.exoplatform.portal.config.model.LocalizedString;
import org.exoplatform.portal.config.model.ModelUnmarshaller;
+import org.exoplatform.portal.config.model.NavigationFragment;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.Page.PageSet;
import org.exoplatform.portal.config.model.PageNavigation;
@@ -70,7 +71,7 @@
IBindingFactory bfact = BindingDirectory.getFactory(PageSet.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
Object obj =
- uctx.unmarshalDocument(new
FileInputStream("src/test/resources/portal/portal/classic/pages.xml"), null);
+ uctx.unmarshalDocument(new
FileInputStream("src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml"),
null);
assertEquals(Page.PageSet.class, obj.getClass());
}
@@ -79,7 +80,7 @@
IBindingFactory bfact = BindingDirectory.getFactory(PortalConfig.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
Object obj =
- uctx.unmarshalDocument(new
FileInputStream("src/test/resources/portal/portal/classic/portal.xml"), null);
+ uctx.unmarshalDocument(new
FileInputStream("src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml"),
null);
assertEquals(PortalConfig.class, obj.getClass());
}
@@ -88,13 +89,11 @@
IBindingFactory bfact = BindingDirectory.getFactory(PageNavigation.class);
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
Object obj =
- uctx.unmarshalDocument(new
FileInputStream("src/test/resources/portal/portal/classic/navigation.xml"),
null);
+ uctx.unmarshalDocument(new
FileInputStream("src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml"),
null);
assertEquals(PageNavigation.class, obj.getClass());
PageNavigation pageNavigation = (PageNavigation)obj;
- assertEquals("portal::classic::homepage",
pageNavigation.getNode("home").getPageReference());
- assertEquals("portal", pageNavigation.getOwnerType());
- assertEquals("classic", pageNavigation.getOwnerId());
+ assertEquals("portal::classic::homepage",
pageNavigation.getFragment().getNode("home").getPageReference());
/*
IMarshallingContext mctx = bfact.createMarshallingContext();
@@ -112,7 +111,7 @@
IUnmarshallingContext uctx = bfact.createUnmarshallingContext();
Object obj =
uctx.unmarshalDocument(
- new
FileInputStream("src/test/resources/portal/portal/classic/portlet-preferences.xml"),
null);
+ new
FileInputStream("src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml"),
null);
assertEquals(PortletPreferencesSet.class, obj.getClass());
IMarshallingContext mctx = bfact.createMarshallingContext();
@@ -142,14 +141,14 @@
assertEquals(Version.V_1_1, obj.getVersion());
//
- PageNode bar = nav.getNode("bar");
+ PageNode bar = nav.getFragment().getNode("bar");
assertEquals("bar_label", bar.getLabel());
- ArrayList<LocalizedValue> barLabels = bar.getLabels();
+ ArrayList<LocalizedString> barLabels = bar.getLabels();
assertNotNull(barLabels);
assertEquals(1, barLabels.size());
assertEquals("bar_label", barLabels.get(0).getValue());
assertEquals(null, barLabels.get(0).getLang());
- assertEquals(null, bar.getLocalizedLabel(Locale.ENGLISH));
+ assertEquals(null, bar.getLabels().getExtended(Locale.ENGLISH));
}
public void testExtendedNavigationMapping() throws Exception
@@ -159,9 +158,9 @@
assertEquals(Version.V_1_2, obj.getVersion());
//
- PageNode foo = nav.getNode("foo");
+ PageNode foo = nav.getFragment().getNode("foo");
assertEquals("foo_label", foo.getLabel());
- ArrayList<LocalizedValue> fooLabels = foo.getLabels();
+ ArrayList<LocalizedString> fooLabels = foo.getLabels();
assertNotNull(fooLabels);
assertEquals(3, fooLabels.size());
assertEquals("foo_label_en", fooLabels.get(0).getValue());
@@ -170,23 +169,23 @@
assertEquals(null, fooLabels.get(1).getLang());
assertEquals("foo_label_fr", fooLabels.get(2).getValue());
assertEquals(Locale.FRENCH, fooLabels.get(2).getLang());
- assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH),
foo.getLocalizedLabel(Locale.ENGLISH).keySet());
- assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH, Locale.GERMAN),
foo.getLocalizedLabel(Locale.GERMAN).keySet());
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH),
foo.getLabels().getExtended(Locale.ENGLISH).keySet());
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH, Locale.GERMAN),
foo.getLabels().getExtended(Locale.GERMAN).keySet());
//
- PageNode bar = nav.getNode("bar");
+ PageNode bar = nav.getFragment().getNode("bar");
assertEquals("bar_label", bar.getLabel());
- ArrayList<LocalizedValue> barLabels = bar.getLabels();
+ ArrayList<LocalizedString> barLabels = bar.getLabels();
assertNotNull(barLabels);
assertEquals(1, barLabels.size());
assertEquals("bar_label", barLabels.get(0).getValue());
assertEquals(null, barLabels.get(0).getLang());
- assertEquals(null, bar.getLocalizedLabel(Locale.ENGLISH));
+ assertEquals(null, bar.getLabels().getExtended(Locale.ENGLISH));
//
- PageNode juu = nav.getNode("juu");
+ PageNode juu = nav.getFragment().getNode("juu");
assertEquals(null, juu.getLabel());
- ArrayList<LocalizedValue> juuLabels = juu.getLabels();
+ ArrayList<LocalizedString> juuLabels = juu.getLabels();
assertNotNull(juuLabels);
assertEquals(3, juuLabels.size());
assertEquals("juu_label_en", juuLabels.get(0).getValue());
@@ -196,4 +195,21 @@
assertEquals("juu_label_fr_FR", juuLabels.get(2).getValue());
assertEquals(Locale.FRANCE, juuLabels.get(2).getLang());
}
+
+ public void testNavigationFragment() throws Exception
+ {
+ UnmarshalledObject<PageNavigation> obj =
ModelUnmarshaller.unmarshall(PageNavigation.class, new
FileInputStream("src/test/resources/jibx/fragment-navigation.xml"));;
+ PageNavigation nav = obj.getObject();
+ assertEquals(Version.V_1_2, obj.getVersion());
+
+ //
+ ArrayList<NavigationFragment> fragments = nav.getFragments();
+ assertNotNull(fragments);
+ assertEquals(1, fragments.size());
+ NavigationFragment fragment = fragments.get(0);
+ assertEquals("foo", fragment.getParentURI());
+ assertEquals(1, fragment.getNodes().size());
+ PageNode bar = fragment.getNode("bar");
+ assertNotNull(bar);
+ }
}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -49,7 +49,7 @@
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
* 13, 2007
*/
-public class TestLoadedPOM extends AbstractPortalTest
+public class TestLoadedPOM extends AbstractConfigTest
{
/** . */
@@ -93,45 +93,45 @@
public void testLegacyGroupWithNormalizedName() throws Exception
{
- SiteKey key = SiteKey.group("/platform/test/legacy");
+ SiteKey key = SiteKey.group("/test/legacy");
NavigationContext nav = navService.loadNavigation(key);
assertNotNull(nav);
NodeContext<?> root = navService.loadNode(NodeModel.SELF_MODEL, nav,
Scope.ALL, null);
NodeContext<?> node = root.get(0);
- assertEquals("group::/platform/test/legacy::register",
node.getState().getPageRef());
+ assertEquals("group::/test/legacy::register",
node.getState().getPageRef());
- Page page = storage.getPage("group::/platform/test/legacy::register");
+ Page page = storage.getPage("group::/test/legacy::register");
assertNotNull(page);
- assertEquals("group::/platform/test/legacy::register",
page.getPageId());
- assertEquals("/platform/test/legacy", page.getOwnerId());
+ assertEquals("group::/test/legacy::register", page.getPageId());
+ assertEquals("/test/legacy", page.getOwnerId());
Application app = (Application)page.getChildren().get(0);
- // assertEquals("group#/platform/test/legacy:/web/IFramePortlet/blog",
app.getInstanceState().getWeakReference());
+ // assertEquals("group#/test/legacy:/web/IFramePortlet/blog",
app.getInstanceState().getWeakReference());
- PortletPreferences prefs =
storage.getPortletPreferences("group#/platform/test/legacy:/web/IFramePortlet/blog");
+ PortletPreferences prefs =
storage.getPortletPreferences("group#/test/legacy:/web/IFramePortlet/blog");
assertNotNull(prefs);
- assertEquals("group#/platform/test/legacy:/web/IFramePortlet/blog",
prefs.getWindowId());
+ assertEquals("group#/test/legacy:/web/IFramePortlet/blog",
prefs.getWindowId());
}
public void testGroupWithNormalizedName() throws Exception
{
- SiteKey key = SiteKey.group("/platform/test/normalized");
+ SiteKey key = SiteKey.group("/test/normalized");
NavigationContext nav = navService.loadNavigation(key);
assertNotNull(nav);
NodeContext<?> root = navService.loadNode(NodeModel.SELF_MODEL, nav,
Scope.ALL, null);
NodeContext<?> node = root.get(0);
- assertEquals("group::/platform/test/normalized::register",
node.getState().getPageRef());
+ assertEquals("group::/test/normalized::register",
node.getState().getPageRef());
- Page page =
storage.getPage("group::/platform/test/normalized::register");
+ Page page = storage.getPage("group::/test/normalized::register");
assertNotNull(page);
- assertEquals("group::/platform/test/normalized::register",
page.getPageId());
- assertEquals("/platform/test/normalized", page.getOwnerId());
+ assertEquals("group::/test/normalized::register", page.getPageId());
+ assertEquals("/test/normalized", page.getOwnerId());
Application app = (Application)page.getChildren().get(0);
- //
assertEquals("group#/platform/test/normalized:/exoadmin/AccountPortlet/Account",
app.getInstanceState().getWeakReference());
+ //
assertEquals("group#/test/normalized:/exoadmin/AccountPortlet/Account",
app.getInstanceState().getWeakReference());
PortletPreferences prefs =
-
storage.getPortletPreferences("group#/platform/test/normalized:/exoadmin/AccountPortlet/Account");
+
storage.getPortletPreferences("group#/test/normalized:/exoadmin/AccountPortlet/Account");
assertNotNull(prefs);
-
assertEquals("group#/platform/test/normalized:/exoadmin/AccountPortlet/Account",
prefs.getWindowId());
+ assertEquals("group#/test/normalized:/exoadmin/AccountPortlet/Account",
prefs.getWindowId());
}
public void testNavigation() throws Exception
@@ -237,8 +237,8 @@
assertEquals("Expected two result instead of " + list, 2, list.size());
Set<String> ids = new
HashSet<String>(Arrays.asList(list.get(0).getPageId(), list.get(1).getPageId()));
HashSet<String> expectedIds =
- new
HashSet<String>(Arrays.asList("group::/platform/test/legacy::register",
- "group::/platform/test/normalized::register"));
+ new
HashSet<String>(Arrays.asList("group::/test/legacy::register",
+ "group::/test/normalized::register"));
assertEquals(expectedIds, ids);
}
*/
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,541 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.config;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.portal.application.PortletPreferences;
+import org.exoplatform.portal.config.model.Application;
+import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.Described;
+import org.exoplatform.portal.mop.ProtectedResource;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.Visibility;
+import org.exoplatform.portal.mop.Visible;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.NodeModel;
+import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.gatein.mop.api.Attributes;
+import org.gatein.mop.api.content.Customization;
+import org.gatein.mop.api.workspace.Navigation;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Site;
+import org.gatein.mop.api.workspace.link.Link;
+import org.gatein.mop.api.workspace.ui.UIComponent;
+import org.gatein.mop.api.workspace.ui.UIContainer;
+import org.gatein.mop.api.workspace.ui.UIWindow;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.GregorianCalendar;
+import java.util.Iterator;
+import java.util.List;
+import java.util.TimeZone;
+
+/**
+ * Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
+ * 13, 2007
+ */
+public class TestMOP extends AbstractConfigTest
+{
+
+ /** . */
+ private UserPortalConfigService portalConfigService;
+
+ /** . */
+ private DataStorage storage;
+
+ /** . */
+ private POMSessionManager mgr;
+
+ /** . */
+ private POMSession session;
+
+ /** . */
+ private NavigationService navService;
+
+ public TestMOP(String name)
+ {
+ super(name);
+ }
+
+ public void setUp() throws Exception
+ {
+ super.setUp();
+ begin();
+ PortalContainer container = getContainer();
+ portalConfigService =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
+ storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
+ mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ navService =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
+ session = mgr.openSession();
+ }
+
+ protected void tearDown() throws Exception
+ {
+ session.close();
+ end();
+ super.tearDown();
+ }
+
+ public void testLoadLegacyGroupWithNormalizedName() throws Exception
+ {
+ SiteKey key = SiteKey.group("/test/legacy");
+ NavigationContext nav = navService.loadNavigation(key);
+ assertNotNull(nav);
+ NodeContext<?> root = navService.loadNode(NodeModel.SELF_MODEL, nav,
Scope.ALL, null);
+ NodeContext<?> node = root.get(0);
+ assertEquals("group::/test/legacy::register",
node.getState().getPageRef());
+
+ Page page = storage.getPage("group::/test/legacy::register");
+ assertNotNull(page);
+ assertEquals("group::/test/legacy::register", page.getPageId());
+ assertEquals("/test/legacy", page.getOwnerId());
+ Application app = (Application)page.getChildren().get(0);
+ // assertEquals("group#/test/legacy:/web/IFramePortlet/blog",
app.getInstanceState().getWeakReference());
+
+ PortletPreferences prefs =
storage.getPortletPreferences("group#/test/legacy:/web/IFramePortlet/blog");
+ assertNotNull(prefs);
+ assertEquals("group#/test/legacy:/web/IFramePortlet/blog",
prefs.getWindowId());
+ }
+
+ public void testLoadGroupWithNormalizedName() throws Exception
+ {
+ SiteKey key = SiteKey.group("/test/normalized");
+ NavigationContext nav = navService.loadNavigation(key);
+ assertNotNull(nav);
+ NodeContext<?> root = navService.loadNode(NodeModel.SELF_MODEL, nav,
Scope.ALL, null);
+ NodeContext<?> node = root.get(0);
+ assertEquals("group::/test/normalized::register",
node.getState().getPageRef());
+
+ Page page = storage.getPage("group::/test/normalized::register");
+ assertNotNull(page);
+ assertEquals("group::/test/normalized::register", page.getPageId());
+ assertEquals("/test/normalized", page.getOwnerId());
+ Application app = (Application)page.getChildren().get(0);
+ //
assertEquals("group#/test/normalized:/exoadmin/AccountPortlet/Account",
app.getInstanceState().getWeakReference());
+
+ PortletPreferences prefs =
+
storage.getPortletPreferences("group#/test/normalized:/exoadmin/AccountPortlet/Account");
+ assertNotNull(prefs);
+ assertEquals("group#/test/normalized:/exoadmin/AccountPortlet/Account",
prefs.getWindowId());
+ }
+
+ public void testLoadNavigation() throws Exception
+ {
+ SiteKey key = SiteKey.portal("test");
+ NavigationContext nav = navService.loadNavigation(key);
+ assertNotNull(nav);
+
+ //
+ assertEquals(1, (int) nav.getState().getPriority());
+
+ //
+ NodeContext<?> root = navService.loadNode(NodeModel.SELF_MODEL, nav,
Scope.ALL, null);
+ assertEquals(5, root.getNodeCount());
+
+ //
+ NodeContext<?> nodeNavigation = root.get(0);
+ assertEquals(0, nodeNavigation.getNodeCount());
+ assertEquals("node_name", nodeNavigation.getName());
+ assertEquals("node_label", nodeNavigation.getState().getLabel());
+ assertEquals("node_icon", nodeNavigation.getState().getIcon());
+ GregorianCalendar start = new GregorianCalendar(2000, 2, 21, 1, 33, 0);
+ start.setTimeZone(TimeZone.getTimeZone("UTC"));
+ assertEquals(start.getTime().getTime(),
nodeNavigation.getState().getStartPublicationTime());
+ GregorianCalendar end = new GregorianCalendar(2009, 2, 21, 1, 33, 0);
+ end.setTimeZone(TimeZone.getTimeZone("UTC"));
+ assertEquals(end.getTime().getTime(),
nodeNavigation.getState().getEndPublicationTime());
+ assertEquals(Visibility.TEMPORAL, nodeNavigation.getState().getVisibility());
+ }
+
+ public void testLoadPortal() throws Exception
+ {
+ PortalConfig portal = storage.getPortalConfig("test");
+ assertNotNull(portal);
+
+ assertEquals("test", portal.getName());
+ assertEquals("en", portal.getLocale());
+ assertTrue(Arrays.equals(new String[]{"test_access_permissions"},
portal.getAccessPermissions()));
+ assertEquals("test_edit_permission", portal.getEditPermission());
+ assertEquals("test_skin", portal.getSkin());
+ assertEquals("test_prop_value",
portal.getProperty("prop_key"));
+ assertNull(portal.getLabel());
+ assertNull(portal.getDescription());
+ }
+
+ public void testLoadPageWithoutPageId() throws Exception
+ {
+ Page page = storage.getPage("portal::test::test2");
+ assertNotNull(page);
+ assertEquals("portal::test::test2", page.getPageId());
+ assertEquals("test", page.getOwnerId());
+ assertEquals("portal", page.getOwnerType());
+ assertEquals("test2", page.getName());
+ }
+
+ public void testLoadPage() throws Exception
+ {
+ Page page = storage.getPage("portal::test::test1");
+ assertNotNull(page);
+
+ //
+ assertEquals("test_title", page.getTitle());
+ assertEquals("test_factory_id", page.getFactoryId());
+ assertTrue(Arrays.equals(new String[]{"test_access_permissions"},
page.getAccessPermissions()));
+ assertEquals("test_edit_permission", page.getEditPermission());
+ assertEquals(true, page.isShowMaxWindow());
+
+ //
+ List<ModelObject> children = page.getChildren();
+ assertEquals(2, children.size());
+
+ //
+ Container container1 = (Container)children.get(0);
+ assertEquals("container_1", container1.getName());
+ assertEquals("container_1_title", container1.getTitle());
+ assertEquals("container_1_icon", container1.getIcon());
+ assertEquals("container_1_template", container1.getTemplate());
+ assertTrue(Arrays.equals(new String[]{"container_1_access_permissions"},
container1.getAccessPermissions()));
+ assertEquals("container_1_factory_id", container1.getFactoryId());
+ assertEquals("container_1_description", container1.getDescription());
+ assertEquals("container_1_width", container1.getWidth());
+ assertEquals("container_1_height", container1.getHeight());
+
+ //
+ Application application1 = (Application)children.get(1);
+ assertEquals("application_1_theme", application1.getTheme());
+ assertEquals("application_1_title", application1.getTitle());
+ assertTrue(Arrays.equals(new
String[]{"application_1_access_permissions"},
application1.getAccessPermissions()));
+ assertEquals(true, application1.getShowInfoBar());
+ assertEquals(true, application1.getShowApplicationState());
+ assertEquals(true, application1.getShowApplicationMode());
+ assertEquals("application_1_description",
application1.getDescription());
+ assertEquals("application_1_icon", application1.getIcon());
+ assertEquals("application_1_width", application1.getWidth());
+ assertEquals("application_1_height", application1.getHeight());
+ assertEquals("application_1_prop_value",
application1.getProperties().get("prop_key"));
+ // assertEquals("portal#test:/web/BannerPortlet/banner",
application1.getInstanceState().getWeakReference());
+ }
+
+/*
+ public void testFindPageByTitle() throws Exception
+ {
+ Query<Page> query = new Query<Page>(null, null, null,
"TestTitle", Page.class);
+ List<Page> list = storage.find(query).getAll();
+ assertEquals("Expected two result instead of " + list, 2, list.size());
+ Set<String> ids = new
HashSet<String>(Arrays.asList(list.get(0).getPageId(), list.get(1).getPageId()));
+ HashSet<String> expectedIds =
+ new
HashSet<String>(Arrays.asList("group::/test/legacy::register",
+ "group::/test/normalized::register"));
+ assertEquals(expectedIds, ids);
+ }
+*/
+
+/*
+ public void testFindPageByName() throws Exception
+ {
+ Query<Page> query = new Query<Page>("portal",
"test", null, null, Page.class);
+ List<Page> list = storage.find(query).getAll();
+ assertEquals("Expected 4 results instead of " + list, 4, list.size());
+ Set<String> names = new HashSet<String>();
+ for (Page page : list)
+ {
+ assertEquals("portal", page.getOwnerType());
+ assertEquals("test", page.getOwnerId());
+ names.add(page.getName());
+ }
+ HashSet<String> expectedNames = new
HashSet<String>(Arrays.asList("test1", "test2",
"test3", "test4"));
+ assertEquals(expectedNames, names);
+ }
+*/
+
+ public void testLoadAnonymousPreferencesSavePage() throws Exception
+ {
+ Page page = storage.getPage("portal::test::test3");
+
+ // Save it again
+ storage.save(page);
+
+ //
+ page = storage.getPage("portal::test::test3");
+
+ //
+ Application app = (Application)page.getChildren().get(0);
+ // String instanceId = app.getInstanceState().getWeakReference();
+
+ // Check instance id
+ // String[] chunks = Mapper.parseWindowId(instanceId);
+ // assertEquals("portal", chunks[0]);
+ // assertEquals("test", chunks[1]);
+ // assertEquals("web", chunks[2]);
+ // assertEquals("BannerPortlet", chunks[3]);
+ // assertEquals("banner2", chunks[4]);
+
+ // Check state
+ // assertNull(storage.getPortletPreferences(instanceId));
+ }
+
+ public void testLoadAnonymousPreference() throws Exception
+ {
+ Page page = storage.getPage("portal::test::test3");
+ Application app = (Application)page.getChildren().get(0);
+ // String instanceId = app.getInstanceState().getWeakReference();
+
+ // Check instance id
+ // String[] chunks = Mapper.parseWindowId(instanceId);
+ // assertEquals("portal", chunks[0]);
+ // assertEquals("test", chunks[1]);
+ // assertEquals("web", chunks[2]);
+ // assertEquals("BannerPortlet", chunks[3]);
+ // assertEquals("banner2", chunks[4]);
+
+ // Check initial state
+ // assertNull(storage.getPortletPreferences(instanceId));
+
+ // Save state
+ // PortletPreferences prefs = new PortletPreferences();
+ // prefs.setWindowId(instanceId);
+ // prefs.setPreferences(new ArrayList<Preference>());
+ // Preference pref = new Preference();
+ // pref.setName("foo");
+ // pref.setValues(new
ArrayList<String>(Arrays.asList("foo1")));
+ // pref.setReadOnly(false);
+ // prefs.getPreferences().add(pref);
+ // storage.save(prefs);
+
+ // Now save the page
+ // storage.save(page);
+
+ // Check we have the same instance id
+ // page = storage.getPage(page.getPageId());
+ // app = (Application)page.getChildren().get(0);
+ // assertEquals(instanceId, app.getInstanceState().getWeakReference());
+
+ // Now check state
+ // prefs =
storage.getPortletPreferences(app.getInstanceState().getWeakReference());
+ // assertEquals(1, prefs.getPreferences().size());
+ // assertEquals("foo", prefs.getPreferences().get(0).getName());
+ // assertEquals(1, prefs.getPreferences().get(0).getValues().size());
+ // assertEquals("foo1",
prefs.getPreferences().get(0).getValues().get(0));
+ }
+
+ public void testLoadSitePreferences() throws Exception
+ {
+ // Page page = storage.getPage("portal::test::test4");
+ // Application app = (Application)page.getChildren().get(0);
+ // String instanceId = app.getInstanceState().getWeakReference();
+
+ // Check instance id
+ // String[] chunks = Mapper.parseWindowId(instanceId);
+ // assertEquals("portal", chunks[0]);
+ // assertEquals("test", chunks[1]);
+ // assertEquals("web", chunks[2]);
+ // assertEquals("BannerPortlet", chunks[3]);
+ // assertEquals("banner", chunks[4]);
+
+ // Check initial state
+ // PortletPreferences prefs = storage.getPortletPreferences(instanceId);
+ // assertEquals(1, prefs.getPreferences().size());
+ // assertEquals("template", prefs.getPreferences().get(0).getName());
+ // assertEquals(1, prefs.getPreferences().get(0).getValues().size());
+ //
assertEquals("par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl",
prefs.getPreferences().get(0).getValues().get(0));
+ //
+ // Save state
+ // prefs.getPreferences().get(0).setValues(new
ArrayList<String>(Arrays.asList("foo")));
+ // storage.save(prefs);
+
+ // Now save the page
+ // storage.save(page);
+
+ // Check we have the same instance id
+ // page = storage.getPage(page.getPageId());
+ // app = (Application)page.getChildren().get(0);
+ // assertEquals(instanceId, app.getInstanceState().getWeakReference());
+
+ // Now check state
+ // prefs = storage.getPortletPreferences(instanceId);
+ // assertEquals(1, prefs.getPreferences().size());
+ // assertEquals("template", prefs.getPreferences().get(0).getName());
+ // assertEquals(1, prefs.getPreferences().get(0).getValues().size());
+ // assertEquals("foo",
prefs.getPreferences().get(0).getValues().get(0));
+ }
+
+ public void testSaveNavigation() throws Exception
+ {
+ Site portal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
+ assertNotNull(portal);
+
+ //
+ Navigation rootNavigation = portal.getRootNavigation();
+ assertNotNull(rootNavigation);
+
+ //
+ Navigation defaultNav = rootNavigation.getChild("default");
+
+ //
+ Attributes defaultAttrs = defaultNav.getAttributes();
+ assertEquals(1, (int)defaultAttrs.getInteger("priority"));
+
+ //
+ Collection<? extends Navigation> childrenNavigations =
defaultNav.getChildren();
+ assertNotNull(childrenNavigations);
+ assertEquals(5, childrenNavigations.size());
+ Iterator<? extends Navigation> i = childrenNavigations.iterator();
+
+ //
+ assertTrue(i.hasNext());
+ Navigation nodeNavigation = i.next();
+ assertNotNull(nodeNavigation);
+ assertEquals(0, nodeNavigation.getChildren().size());
+ assertEquals("node_name", nodeNavigation.getName());
+ Described nodeDescribed = nodeNavigation.adapt(Described.class);
+ assertEquals("node_label", nodeDescribed.getName());
+ Attributes nodeAttrs = nodeNavigation.getAttributes();
+ assertEquals("node_icon", nodeAttrs.getString("icon"));
+
+ //
+ assertTrue(nodeNavigation.isAdapted(Visible.class));
+ Visible visible = nodeNavigation.adapt(Visible.class);
+ GregorianCalendar start = new GregorianCalendar(2000, 2, 21, 1, 33, 0);
+ start.setTimeZone(TimeZone.getTimeZone("UTC"));
+ assertEquals(start.getTime(), visible.getStartPublicationDate());
+ GregorianCalendar end = new GregorianCalendar(2009, 2, 21, 1, 33, 0);
+ end.setTimeZone(TimeZone.getTimeZone("UTC"));
+ assertEquals(end.getTime(), visible.getEndPublicationDate());
+ assertEquals(Visibility.TEMPORAL, visible.getVisibility());
+
+ //
+ Link link = nodeNavigation.getLink();
+ assertNotNull(link);
+ }
+
+ public void testSavePortal() throws Exception
+ {
+ Site portal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
+ assertNotNull(portal);
+
+ //
+ assertTrue(portal.isAdapted(ProtectedResource.class));
+ ProtectedResource pr = portal.adapt(ProtectedResource.class);
+ assertEquals(Arrays.asList("test_access_permissions"),
pr.getAccessPermissions());
+ assertEquals("test_edit_permission", pr.getEditPermission());
+
+ //
+ assertEquals("test", portal.getName());
+ Attributes attrs = portal.getAttributes();
+ assertEquals("en", attrs.getString("locale"));
+ assertEquals("test_skin", attrs.getString("skin"));
+ assertEquals("test_prop_value", attrs.getString("prop_key"));
+
+ //
+ org.gatein.mop.api.workspace.Page layout =
portal.getRootNavigation().getTemplatized().getTemplate();
+ assertNotNull(layout);
+
assertSame(portal.getRootPage().getChild("templates").getChild("default"),
layout);
+ }
+
+ public void testSavePageWithoutPageId() throws Exception
+ {
+ Site testPortal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
+ org.gatein.mop.api.workspace.Page testRootPage = testPortal.getRootPage();
+ org.gatein.mop.api.workspace.Page pages =
testRootPage.getChild("pages");
+ org.gatein.mop.api.workspace.Page testPage = pages.getChild("test2");
+ assertNotNull(testPage);
+ }
+
+ public void testSavePage() throws Exception
+ {
+ Site testPortal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
+ org.gatein.mop.api.workspace.Page testRootPage = testPortal.getRootPage();
+ org.gatein.mop.api.workspace.Page pages =
testRootPage.getChild("pages");
+ org.gatein.mop.api.workspace.Page testPage = pages.getChild("test1");
+ assertNotNull(testPage);
+
+ //
+ assertTrue(testPage.isAdapted(ProtectedResource.class));
+ ProtectedResource pr = testPage.adapt(ProtectedResource.class);
+ assertEquals(Arrays.asList("test_access_permissions"),
pr.getAccessPermissions());
+ assertEquals("test_edit_permission", pr.getEditPermission());
+
+ //
+ Described testPageDescribed = testPage.adapt(Described.class);
+ assertEquals("test_title", testPageDescribed.getName());
+ assertEquals(null, testPageDescribed.getDescription());
+
+ //
+ Attributes testPageAttrs = testPage.getAttributes();
+ assertEquals("test_factory_id",
testPageAttrs.getString("factory-id"));
+ assertEquals(true,
(boolean)testPageAttrs.getBoolean("show-max-window"));
+
+ //
+ UIContainer c = testPage.getRootComponent();
+ assertNotNull(c);
+ assertEquals(2, c.getComponents().size());
+ Iterator<? extends UIComponent> it = c.getComponents().iterator();
+
+ //
+ UIContainer container1 = (UIContainer)it.next();
+ assertTrue(container1.isAdapted(ProtectedResource.class));
+ ProtectedResource container1PR = container1.adapt(ProtectedResource.class);
+ assertEquals(Collections.singletonList("container_1_access_permissions"),
container1PR.getAccessPermissions());
+ Described container1Described = container1.adapt(Described.class);
+ assertEquals("container_1_title", container1Described.getName());
+ assertEquals("container_1_description",
container1Described.getDescription());
+ Attributes container1Attrs = container1.getAttributes();
+ assertEquals("container_1",
container1Attrs.getString("name"));
+ assertEquals("container_1_icon",
container1Attrs.getString("icon"));
+ assertEquals("container_1_template",
container1Attrs.getString("template"));
+ assertEquals("container_1_factory_id",
container1Attrs.getString("factory-id"));
+ assertEquals("container_1_width",
container1Attrs.getString("width"));
+ assertEquals("container_1_height",
container1Attrs.getString("height"));
+
+ //
+ UIWindow application1 = (UIWindow)it.next();
+ assertTrue(application1.isAdapted(ProtectedResource.class));
+ ProtectedResource application1PR = application1.adapt(ProtectedResource.class);
+
assertEquals(Collections.singletonList("application_1_access_permissions"),
application1PR.getAccessPermissions());
+ Described application1Described = application1.adapt(Described.class);
+ assertEquals("application_1_title", application1Described.getName());
+ assertEquals("application_1_description",
application1Described.getDescription());
+ Attributes application1Attrs = application1.getAttributes();
+ assertEquals("application_1_theme",
application1Attrs.getString("theme"));
+ assertEquals(true,
(boolean)application1Attrs.getBoolean("showinfobar"));
+ assertEquals(true, (boolean)application1Attrs.getBoolean("showmode"));
+ assertEquals(true,
(boolean)application1Attrs.getBoolean("showwindowstate"));
+ assertEquals("application_1_icon",
application1Attrs.getString("icon"));
+ assertEquals("application_1_width",
application1Attrs.getString("width"));
+ assertEquals("application_1_height",
application1Attrs.getString("height"));
+ assertEquals("application_1_prop_value",
application1Attrs.getString("prop_key"));
+
+ //
+ Customization<?> customization = application1.getCustomization();
+ assertNotNull(customization);
+ assertEquals("application/portlet",
customization.getType().getMimeType());
+ assertEquals("web/BannerPortlet", customization.getContentId());
+ // assertEquals("banner", customization.getName());
+ }
+}
\ No newline at end of file
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,201 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config;
-
-import java.util.Collection;
-import org.exoplatform.commons.utils.PageList;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.services.organization.Group;
-import org.exoplatform.services.organization.GroupHandler;
-import org.exoplatform.services.organization.OrganizationService;
-import org.exoplatform.services.organization.User;
-import org.exoplatform.services.organization.UserHandler;
-
-/**
- * Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
- * 13, 2007
- */
-public class TestOrganization extends AbstractPortalTest
-{
-
- private static final String GROUP_1 = "testOrganization_group1";
- private static final String GROUP_2 = "testOrganization_group2";
- private static final String GROUP_3 = "testOrganization_group3";
-
- private static final String USER_1 = "testOrganization_user1";
- private static final String USER_2 = "testOrganization_user2";
- private static final String USER_3 = "testOrganization_user3";
- private static final String DEFAULT_PASSWORD = "defaultpassword";
- private static final String DESCRIPTION = " Description";
-
- private OrganizationService organizationService;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- organizationService =
(OrganizationService)container.getComponentInstance(OrganizationService.class);
-
- createGroup(null, GROUP_1);
- createGroup(GROUP_1, GROUP_2);
- createGroup(GROUP_1, GROUP_3);
-
- createUser(USER_1, GROUP_1);
- createUser(USER_2, GROUP_2);
- createUser(USER_3, GROUP_1);
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- deleteGroup(GROUP_1);
- deleteGroup(GROUP_2);
- deleteGroup(GROUP_3);
-
- deleteUser(USER_1);
- deleteUser(USER_2);
- deleteUser(USER_3);
-
- end(false);
- super.tearDown();
- }
-
- public void testFindGroupNotFound() throws Exception {
- GroupHandler groupHander = organizationService.getGroupHandler();
- Group group = groupHander.findGroupById(GROUP_1 + "NOTFOUND");
- assertNull(group);
- }
-
- public void testFindGroupFromRoot() throws Exception
- {
- GroupHandler handler = organizationService.getGroupHandler();
- Collection<Group> allGroups = handler.findGroups(null);
- assertNotNull(allGroups);
- assertTrue(allGroups.size() > 0);
- }
-
- public void testFindGroupById() throws Exception
- {
- GroupHandler groupHandler = organizationService.getGroupHandler();
- Group group = groupHandler.findGroupById(GROUP_1);
- assertNotNull(group);
- assertEquals(GROUP_1, group.getGroupName());
- assertEquals(GROUP_1 + DESCRIPTION, group.getDescription());
-
- group = groupHandler.findGroupById(GROUP_3);
- assertNotNull(group);
- assertEquals(GROUP_3, group.getGroupName());
- }
-
- public void testFindGroupOfUser() {
- GroupHandler groupHandler = organizationService.getGroupHandler();
- try {
- Collection<Group> groups = groupHandler.findGroupsOfUser(USER_1);
- assertNotNull(groups);
- assertTrue(groups.size() >= 1);
- } catch (Exception e) {
- fail();
- }
- }
-
- public void testFindUserByGroup() throws Exception
- {
- GroupHandler groupHandler = organizationService.getGroupHandler();
- Group group = groupHandler.findGroupById(GROUP_1);
- UserHandler uHandler = organizationService.getUserHandler();
- PageList<User> users = uHandler.findUsersByGroup(group.getId());
- assertNotNull(users);
- assertTrue(users.getPageSize() > 0);
- }
-
- public void testChangePassword() throws Exception
- {
- UserHandler uHandler = organizationService.getUserHandler();
- User user = uHandler.findUserByName(USER_1);
- assertNotNull(user);
- assertTrue(uHandler.authenticate(USER_1, DEFAULT_PASSWORD));
-
- // Test changing password
- user.setPassword("newPassword");
- uHandler.saveUser(user, false);
- user = uHandler.findUserByName(USER_1);
- assertNotNull(user);
- assertTrue(uHandler.authenticate(USER_1, "newPassword"));
- }
-
-
- private void createGroup(String parent, String name) {
- GroupHandler groupHandler = organizationService.getGroupHandler();
- try {
- Group parentGroup = null;
- if(parent != null) {
- parentGroup = groupHandler.findGroupById(parent);
- }
- Group newGroup = groupHandler.createGroupInstance();
- newGroup.setGroupName(name);
- newGroup.setDescription(name + DESCRIPTION);
- newGroup.setLabel(name);
- if(parentGroup != null) {
- groupHandler.addChild(parentGroup, newGroup, true);
- }
- groupHandler.saveGroup(newGroup, true);
-
- } catch (Exception e) {
- e.printStackTrace();
- fail("Error on create group [" + name + "] " + e.getMessage());
- }
-
- }
-
- private void deleteGroup(String name) {
- GroupHandler groupHandler = organizationService.getGroupHandler();
- try {
- Group group = groupHandler.findGroupById(name);
- groupHandler.removeGroup(group, true);
- } catch (Exception e) {
-
- }
- }
-
- private void createUser(String username, String... groups) {
- UserHandler userHandler = organizationService.getUserHandler();
- User user = userHandler.createUserInstance(username);
- user.setPassword(DEFAULT_PASSWORD);
- user.setFirstName("default");
- user.setLastName("default");
- user.setEmail("exo(a)exoportal.org");
- user.setOrganizationId(groups[0]);
- try {
- userHandler.createUser(user, true);
- } catch (Exception e) {
- e.printStackTrace();
- fail("Error on create user: " + e.getMessage());
- }
- }
- private void deleteUser(String username) {
- UserHandler userHandler = organizationService.getUserHandler();
- try {
- userHandler.removeUser(username, true);
- } catch (Exception e) {
- }
- }
-}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,183 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.navigation.NavigationContext;
-import org.exoplatform.portal.mop.navigation.NavigationService;
-import org.exoplatform.portal.mop.navigation.NavigationState;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.services.organization.Group;
-import org.exoplatform.services.organization.GroupHandler;
-import org.exoplatform.services.organization.OrganizationService;
-import org.exoplatform.services.organization.User;
-import org.exoplatform.services.organization.UserHandler;
-
-import java.util.Comparator;
-import java.util.List;
-
-/**
- * Author : TrongTT
- */
-public class TestPortalConfig extends AbstractPortalTest
-{
-
- private DataStorage storage;
-
- private POMSessionManager mgr;
-
- private OrganizationService org;
-
- /** . */
- private POMSession session;
-
- /** . */
- private NavigationService navService;
-
- public TestPortalConfig(String name)
- {
- super(name);
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = PortalContainer.getInstance();
- org =
(OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- navService =
(NavigationService)container.getComponentInstanceOfType(NavigationService.class);
- session = mgr.openSession();
- }
-
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-
- public void testSiteLayout() throws Exception
- {
- PortalConfig pConfig = storage.getPortalConfig(PortalConfig.PORTAL_TYPE,
"classic");
- assertNotNull(pConfig);
- assertNotNull("The Group layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
-
- pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE,
"/platform/administrators");
- assertNotNull(pConfig);
- assertNotNull("The Group layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
- assertTrue(pConfig.getPortalLayout().getChildren() != null &&
pConfig.getPortalLayout().getChildren().size() > 1);
- pConfig.getPortalLayout().getChildren().clear();
- storage.save(pConfig);
-
- pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE,
"/platform/administrators");
- assertNotNull(pConfig);
- assertNotNull("The Group layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
- assertTrue(pConfig.getPortalLayout().getChildren() != null &&
pConfig.getPortalLayout().getChildren().size() == 0);
-
- pConfig = storage.getPortalConfig(PortalConfig.USER_TYPE, "root");
- assertNotNull(pConfig);
- assertNotNull("The User layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
-
- pConfig = storage.getPortalConfig(PortalConfig.USER_TYPE, "mary");
- assertNotNull(pConfig);
- assertNotNull("The User layout of " + pConfig.getName() + " is
null", pConfig.getPortalLayout());
- }
-
- public void testGroupLayout() throws Exception
- {
- GroupHandler groupHandler = org.getGroupHandler();
- Group group = groupHandler.findGroupById("groupTest");
- assertNull(group);
-
- group = groupHandler.createGroupInstance();
- group.setGroupName("groupTest");
- group.setLabel("group label");
-
- groupHandler.addChild(null, group, true);
-
- group = groupHandler.findGroupById("/groupTest");
- assertNotNull(group);
-
- PortalConfig pConfig = storage.getPortalConfig(PortalConfig.GROUP_TYPE,
"/groupTest");
- assertNotNull("the Group's PortalConfig is not null", pConfig);
- assertTrue(pConfig.getPortalLayout().getChildren() == null ||
pConfig.getPortalLayout().getChildren().size() == 4);
-
- /**
- * We need to remove the /groupTest from the groupHandler as the
- * handler is shared between the tests and can cause other tests
- * to fail.
- * TODO: make the tests fully independent
- */
- groupHandler.removeGroup(group, false);
- group = groupHandler.findGroupById("/groupTest");
- assertNull(group);
- }
-
-
-
- public void testGroupNavigation() throws Exception
- {
-
-
- GroupHandler groupHandler = org.getGroupHandler();
- Group group = groupHandler.createGroupInstance();
- group.setGroupName("testGroupNavigation");
- group.setLabel("testGroupNavigation");
-
- groupHandler.addChild(null, group, true);
-
- SiteKey key = SiteKey.group(group.getId());
- navService.saveNavigation(new NavigationContext(key, new NavigationState(0)));
- assertNotNull(navService.loadNavigation(key));
-
- // Remove group
- groupHandler.removeGroup(group, true);
-
- // Group navigations is removed after remove group
- assertNull(navService.loadNavigation(key));
- }
-
- public void testUserLayout() throws Exception
- {
- UserHandler userHandler = org.getUserHandler();
- User user = userHandler.findUserByName("testing");
- assertNull(user);
-
- user = userHandler.createUserInstance("testing");
- user.setEmail("testing(a)gmaild.com");
- user.setFirstName("test firstname");
- user.setLastName("test lastname");
- user.setPassword("123456");
-
- userHandler.createUser(user, true);
-
- user = userHandler.findUserByName("testing");
- assertNotNull(user);
-
- PortalConfig pConfig = storage.getPortalConfig(PortalConfig.USER_TYPE,
"testing");
- assertNotNull("the User's PortalConfig is not null", pConfig);
- }
-}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,109 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PersistentApplicationState;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.spi.portlet.Portlet;
-import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public class TestPortletPreferences extends AbstractPortalTest
-{
-
- public TestPortletPreferences(String name)
- {
- super(name);
- }
-
- /** . */
- private DataStorage storage_;
-
- /** . */
- private POMSessionManager mgr;
-
- /** . */
- private POMSession session;
-
- public void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- session = mgr.openSession();
- }
-
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-
- public void testSiteScopedPreferences() throws Exception
- {
- Page page = storage_.getPage("portal::test::test4");
- Application<Portlet> app =
(Application<Portlet>)page.getChildren().get(0);
- PersistentApplicationState<Portlet> state =
(PersistentApplicationState)app.getState();
-
- //
- Portlet prefs = storage_.load(state, ApplicationType.PORTLET);
- assertEquals(new PortletBuilder().add("template",
"par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl")
- .build(), prefs);
-
- //
- prefs.setValue("template", "someanothervalue");
- storage_.save(state, prefs);
-
- //
- prefs = storage_.load(state, ApplicationType.PORTLET);
- assertNotNull(prefs);
- assertEquals(new PortletBuilder().add("template",
"someanothervalue").build(), prefs);
- }
-
- public void testNullPreferenceValue() throws Exception
- {
- Page page = storage_.getPage("portal::test::test4");
- Application<Portlet> app =
(Application<Portlet>)page.getChildren().get(0);
- PersistentApplicationState<Portlet> state =
(PersistentApplicationState)app.getState();
-
- //
- Portlet prefs = storage_.load(state, ApplicationType.PORTLET);
-
- //
- prefs.setValue("template", null);
- storage_.save(state, prefs);
-
- //
- prefs = storage_.load(state, ApplicationType.PORTLET);
- assertNotNull(prefs);
- assertEquals(new PortletBuilder().add("template", "").build(),
prefs);
- }
-}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,234 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.mop.*;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.gatein.mop.api.Attributes;
-import org.gatein.mop.api.content.Customization;
-import org.gatein.mop.api.workspace.Navigation;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Page;
-import org.gatein.mop.api.workspace.Site;
-import org.gatein.mop.api.workspace.link.Link;
-import org.gatein.mop.api.workspace.ui.UIComponent;
-import org.gatein.mop.api.workspace.ui.UIContainer;
-import org.gatein.mop.api.workspace.ui.UIWindow;
-
-import java.util.*;
-
-/**
- * Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
- * 13, 2007
- */
-public class TestSavedPOM extends AbstractPortalTest
-{
-
- /** . */
- private UserPortalConfigService portalConfigService;
-
- /** . */
- private DataStorage storage;
-
- /** . */
- private POMSessionManager mgr;
-
- /** . */
- private POMSession session;
-
- public TestSavedPOM(String name)
- {
- super(name);
- }
-
- public void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- portalConfigService =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
- storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- session = mgr.openSession();
- }
-
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-
- public void testNavigation() throws Exception
- {
- Site portal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
- assertNotNull(portal);
-
- //
- Navigation rootNavigation = portal.getRootNavigation();
- assertNotNull(rootNavigation);
-
- //
- Navigation defaultNav = rootNavigation.getChild("default");
-
- //
- Attributes defaultAttrs = defaultNav.getAttributes();
- assertEquals(1, (int)defaultAttrs.getInteger("priority"));
-
- //
- Collection<? extends Navigation> childrenNavigations =
defaultNav.getChildren();
- assertNotNull(childrenNavigations);
- assertEquals(5, childrenNavigations.size());
- Iterator<? extends Navigation> i = childrenNavigations.iterator();
-
- //
- assertTrue(i.hasNext());
- Navigation nodeNavigation = i.next();
- assertNotNull(nodeNavigation);
- assertEquals(0, nodeNavigation.getChildren().size());
- assertEquals("node_name", nodeNavigation.getName());
- Described nodeDescribed = nodeNavigation.adapt(Described.class);
- assertEquals("node_label", nodeDescribed.getName());
- Attributes nodeAttrs = nodeNavigation.getAttributes();
- assertEquals("node_icon", nodeAttrs.getString("icon"));
-
- //
- assertTrue(nodeNavigation.isAdapted(Visible.class));
- Visible visible = nodeNavigation.adapt(Visible.class);
- GregorianCalendar start = new GregorianCalendar(2000, 2, 21, 1, 33, 0);
- start.setTimeZone(TimeZone.getTimeZone("UTC"));
- assertEquals(start.getTime(), visible.getStartPublicationDate());
- GregorianCalendar end = new GregorianCalendar(2009, 2, 21, 1, 33, 0);
- end.setTimeZone(TimeZone.getTimeZone("UTC"));
- assertEquals(end.getTime(), visible.getEndPublicationDate());
- assertEquals(Visibility.TEMPORAL, visible.getVisibility());
-
- //
- Link link = nodeNavigation.getLink();
- assertNotNull(link);
- }
-
- public void testPortal() throws Exception
- {
- Site portal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
- assertNotNull(portal);
-
- //
- assertTrue(portal.isAdapted(ProtectedResource.class));
- ProtectedResource pr = portal.adapt(ProtectedResource.class);
- assertEquals(Arrays.asList("test_access_permissions"),
pr.getAccessPermissions());
- assertEquals("test_edit_permission", pr.getEditPermission());
-
- //
- assertEquals("test", portal.getName());
- Attributes attrs = portal.getAttributes();
- assertEquals("en", attrs.getString("locale"));
- assertEquals("test_skin", attrs.getString("skin"));
- assertEquals("test_prop_value", attrs.getString("prop_key"));
-
- //
- Page layout = portal.getRootNavigation().getTemplatized().getTemplate();
- assertNotNull(layout);
-
assertSame(portal.getRootPage().getChild("templates").getChild("default"),
layout);
- }
-
- public void testPageWithoutPageId() throws Exception
- {
- Site testPortal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
- Page testRootPage = testPortal.getRootPage();
- Page pages = testRootPage.getChild("pages");
- Page testPage = pages.getChild("test2");
- assertNotNull(testPage);
- }
-
- public void testPage() throws Exception
- {
- Site testPortal = session.getWorkspace().getSite(ObjectType.PORTAL_SITE,
"test");
- Page testRootPage = testPortal.getRootPage();
- Page pages = testRootPage.getChild("pages");
- Page testPage = pages.getChild("test1");
- assertNotNull(testPage);
-
- //
- assertTrue(testPage.isAdapted(ProtectedResource.class));
- ProtectedResource pr = testPage.adapt(ProtectedResource.class);
- assertEquals(Arrays.asList("test_access_permissions"),
pr.getAccessPermissions());
- assertEquals("test_edit_permission", pr.getEditPermission());
-
- //
- Described testPageDescribed = testPage.adapt(Described.class);
- assertEquals("test_title", testPageDescribed.getName());
- assertEquals(null, testPageDescribed.getDescription());
-
- //
- Attributes testPageAttrs = testPage.getAttributes();
- assertEquals("test_factory_id",
testPageAttrs.getString("factory-id"));
- assertEquals(true,
(boolean)testPageAttrs.getBoolean("show-max-window"));
-
- //
- UIContainer c = testPage.getRootComponent();
- assertNotNull(c);
- assertEquals(2, c.getComponents().size());
- Iterator<? extends UIComponent> it = c.getComponents().iterator();
-
- //
- UIContainer container1 = (UIContainer)it.next();
- assertTrue(container1.isAdapted(ProtectedResource.class));
- ProtectedResource container1PR = container1.adapt(ProtectedResource.class);
- assertEquals(Collections.singletonList("container_1_access_permissions"),
container1PR.getAccessPermissions());
- Described container1Described = container1.adapt(Described.class);
- assertEquals("container_1_title", container1Described.getName());
- assertEquals("container_1_description",
container1Described.getDescription());
- Attributes container1Attrs = container1.getAttributes();
- assertEquals("container_1",
container1Attrs.getString("name"));
- assertEquals("container_1_icon",
container1Attrs.getString("icon"));
- assertEquals("container_1_template",
container1Attrs.getString("template"));
- assertEquals("container_1_factory_id",
container1Attrs.getString("factory-id"));
- assertEquals("container_1_width",
container1Attrs.getString("width"));
- assertEquals("container_1_height",
container1Attrs.getString("height"));
-
- //
- UIWindow application1 = (UIWindow)it.next();
- assertTrue(application1.isAdapted(ProtectedResource.class));
- ProtectedResource application1PR = application1.adapt(ProtectedResource.class);
-
assertEquals(Collections.singletonList("application_1_access_permissions"),
application1PR.getAccessPermissions());
- Described application1Described = application1.adapt(Described.class);
- assertEquals("application_1_title", application1Described.getName());
- assertEquals("application_1_description",
application1Described.getDescription());
- Attributes application1Attrs = application1.getAttributes();
- assertEquals("application_1_theme",
application1Attrs.getString("theme"));
- assertEquals(true,
(boolean)application1Attrs.getBoolean("showinfobar"));
- assertEquals(true, (boolean)application1Attrs.getBoolean("showmode"));
- assertEquals(true,
(boolean)application1Attrs.getBoolean("showwindowstate"));
- assertEquals("application_1_icon",
application1Attrs.getString("icon"));
- assertEquals("application_1_width",
application1Attrs.getString("width"));
- assertEquals("application_1_height",
application1Attrs.getString("height"));
- assertEquals("application_1_prop_value",
application1Attrs.getString("prop_key"));
-
- //
- Customization<?> customization = application1.getCustomization();
- assertNotNull(customization);
- assertEquals("application/portlet",
customization.getType().getMimeType());
- assertEquals("web/BannerPortlet", customization.getContentId());
- // assertEquals("banner", customization.getName());
- }
-}
\ No newline at end of file
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -30,7 +30,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class TestSearch extends AbstractPortalTest
+public class TestSearch extends AbstractConfigTest
{
/** . */
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -52,6 +52,7 @@
import org.exoplatform.services.organization.UserHandler;
import org.exoplatform.services.security.Authenticator;
import org.exoplatform.services.security.ConversationState;
+import org.gatein.common.util.Tools;
import java.util.Arrays;
import java.util.Collections;
@@ -66,7 +67,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class TestUserPortalConfigService extends AbstractPortalTest
+public class TestUserPortalConfigService extends AbstractConfigTest
{
/** . */
@@ -198,8 +199,8 @@
assertEquals("expected to have 5 navigations instead of " +
navigations, 5, navigations.size());
assertTrue(navigations.containsKey("portal::classic"));
assertTrue(navigations.containsKey("group::/platform/administrators"));
+ assertTrue(navigations.containsKey("group::/platform/users"));
assertTrue(navigations.containsKey("group::/organization/management/executive-board"));
- assertTrue(navigations.containsKey("group::/platform/users"));
assertTrue(navigations.containsKey("user::root"));
}
}.execute("root");
@@ -223,7 +224,6 @@
assertEquals("expected to have 5 navigations instead of " +
navigations, 5, navigations.size());
assertTrue(navigations.containsKey("portal::classic"));
assertTrue(navigations.containsKey("group::/platform/administrators"));
-
assertTrue(navigations.containsKey("group::/organization/management/executive-board"));
assertTrue(navigations.containsKey("group::/platform/users"));
assertTrue(navigations.containsKey("user::john"));
}
@@ -359,13 +359,14 @@
public void execute() throws Exception
{
Set<String> navigations = new
HashSet<String>(userPortalConfigSer_.getMakableNavigations("root",
false));
- Set<String> expectedNavigations =
- new HashSet<String>(Arrays.asList("/platform/users",
"/organization/management/human-resources",
- "/partners", "/customers",
"/organization/communication",
"/organization/management/executive-board",
- "/organization/management",
"/organization/operations", "/organization", "/platform",
- "/organization/communication/marketing",
"/platform/guests",
- "/organization/communication/press-and-media",
"/platform/administrators",
- "/organization/operations/sales",
"/organization/operations/finances"));
+ Set<String> expectedNavigations = Tools.toSet(
+ "/platform/users",
+ "/platform",
+ "/platform/guests",
+ "/platform/administrators",
+ "/organization",
+ "/organization/management",
+ "/organization/management/executive-board");
assertEquals(expectedNavigations, navigations);
}
}.execute(null);
@@ -378,7 +379,7 @@
public void execute() throws Exception
{
Set<String> navigations = new
HashSet<String>(userPortalConfigSer_.getMakableNavigations("john",
false));
- Set<String> expectedNavigations =
Collections.singleton("/organization/management/executive-board");
+ Set<String> expectedNavigations =
Tools.toSet("/organization/management/executive-board");
assertEquals(expectedNavigations, navigations);
}
}.execute(null);
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,87 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config;
-
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.TransientApplicationState;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.spi.wsrp.WSRP;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- * @version $Revision$
- */
-public class TestWSRP extends AbstractPortalTest
-{
-
- /** . */
- private DataStorage storage_;
-
- /** . */
- private POMSessionManager mgr;
-
- /** . */
- private POMSession session;
-
- public void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr =
(POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
- session = mgr.openSession();
- }
-
- protected void tearDown() throws Exception
- {
- session.close();
- end();
- super.tearDown();
- }
-
- public void testBilto() throws Exception
- {
- WSRP wsrp = new WSRP();
- String id = "portlet id";
- wsrp.setPortletId(id);
- TransientApplicationState<WSRP> state = new
TransientApplicationState<WSRP>("test", wsrp);
- Application<WSRP> wsrpApplication = Application.createWSRPApplication();
- wsrpApplication.setState(state);
-
- Page container = new Page();
- String pageId = "portal::test::wsrp_page";
- container.setPageId(pageId);
- container.getChildren().add(wsrpApplication);
-
- storage_.create(container);
-
- container = storage_.getPage(pageId);
- wsrpApplication = (Application<WSRP>)container.getChildren().get(0);
-
- wsrp = storage_.load(wsrpApplication.getState(), ApplicationType.WSRP_PORTLET);
- assertNotNull(wsrp);
- assertEquals(id, wsrp.getPortletId());
- }
-}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,104 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config.importer;
-
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- */
-public class Builder
-{
-
- /** . */
- private String value;
-
- /** . */
- private List<Builder> nodes;
-
- private Builder(String value)
- {
- this.value = value;
- this.nodes = new ArrayList<Builder>();
- }
-
- public static Builder navigation(String ownerId)
- {
- return new Builder(ownerId);
- }
-
- public static Builder node(String name)
- {
- return new Builder(name);
- }
-
- public Builder add(Builder... nodes)
- {
- for (Builder node : nodes)
- {
- this.nodes.add(node);
- }
- return this;
- }
-
- public Builder get(String value)
- {
- for (Builder node : nodes)
- {
- if (node.value.equals(value))
- {
- return node;
- }
- }
- return null;
- }
-
- private ArrayList<PageNode> buildNodes()
- {
- ArrayList<PageNode> nodes = new ArrayList<PageNode>();
- for (Builder node : this.nodes)
- {
- nodes.add(node.buildNode());
- }
- return nodes;
- }
-
- public PageNavigation build()
- {
- PageNavigation navigation = new PageNavigation();
- navigation.setOwnerType("portal");
- navigation.setOwnerId(value);
- navigation.setNodes(buildNodes());
- return navigation;
- }
-
- private PageNode buildNode()
- {
- PageNode node = new PageNode();
- node.setName(value);
- node.setLabel(value);
- node.setChildren(buildNodes());
- return node;
- }
-}
Deleted:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,362 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.exoplatform.portal.config.importer;
-
-import org.exoplatform.portal.config.model.LocalizedValue;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.mop.Described;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.navigation.*;
-import org.gatein.common.util.Tools;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.core.api.MOPService;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Locale;
-import java.util.Map;
-
-import static org.exoplatform.portal.config.importer.Builder.*;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
- */
-public class TestNavigationImporter extends AbstractTestNavigationService
-{
-
- public void testMergeCreateNavigation()
- {
- testCreate(ImportMode.MERGE);
- }
-
- public void testConserveCreateNavigation()
- {
- testCreate(ImportMode.CONSERVE);
- }
-
- public void testReimportCreateNavigation()
- {
- testCreate(ImportMode.REIMPORT);
- }
-
- private void testCreate(ImportMode mode)
- {
- String name = mode.name() + "_create_navigation";
-
- //
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, name);
- sync(true);
-
- //
- assertNull(service.loadNavigation(SiteKey.portal(name)));
- PageNavigation src = navigation(name).build();
- src.setPriority(2);
- src.setOwnerId(name);
- NavigationImporter merge = new NavigationImporter(Locale.ENGLISH, mode, false, src,
service, descriptionService);
- merge.perform();
-
- //
- NavigationContext ctx = service.loadNavigation(SiteKey.portal(name));
- assertEquals(2, (int)ctx.getState().getPriority());
- }
-
- public void testMergeCreate()
- {
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"merge_create");
- sync(true);
-
- //
- assertNull(service.loadNavigation(SiteKey.portal("merge_create")));
-
- //
- Builder builder = navigation("merge_create").add(node("a"));
-
- //
- PageNavigation src = builder.build();
- src.setOwnerId("merge_create");
- NavigationImporter merge = new NavigationImporter(Locale.ENGLISH, ImportMode.MERGE,
false, src, service, descriptionService);
- merge.perform();
-
- //
- NavigationContext ctx =
service.loadNavigation(SiteKey.portal("merge_create"));
- NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
- NodeContext<?> a = node.get("a");
- assertNotNull(a);
- assertEquals("a", a.getName());
- assertEquals("a", a.getState().getLabel());
- assertEquals(0, a.getNodeCount());
- }
-
- public void testMergeNested()
- {
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"merge_nested");
- sync(true);
-
- //
- assertNull(service.loadNavigation(SiteKey.portal("merge_nested")));
-
- //
- Builder builder =
navigation("merge_nested").add(node("a").add(node("b")));
-
- //
- PageNavigation src = builder.build();
- src.setOwnerId("merge_nested");
- NavigationImporter merge = new NavigationImporter(Locale.ENGLISH, ImportMode.MERGE,
false, src, service, descriptionService);
- merge.perform();
-
- //
- NavigationContext ctx =
service.loadNavigation(SiteKey.portal("merge_nested"));
- NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
- NodeContext<?> a = node.get("a");
- assertNotNull(a);
- assertEquals("a", a.getName());
- assertEquals("a", a.getState().getLabel());
- assertEquals(1, a.getNodeCount());
- }
-
- public void testCreateMerge()
- {
- testMerge(ImportMode.CONSERVE);
- }
-
- public void testMergeMerge()
- {
- testMerge(ImportMode.MERGE);
- }
-
- public void testReimportMerge()
- {
- testMerge(ImportMode.REIMPORT);
- }
-
- private void testMerge(ImportMode importMode)
- {
- String name = importMode.name() + "_merge_merge";
-
- //
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, name);
- sync(true);
-
- //
- assertNull(service.loadNavigation(SiteKey.portal(name)));
-
- //
- Builder builder =
navigation(name).add(node("a").add(node("b")));
-
- //
- PageNavigation src = builder.build();
- src.setOwnerId(name);
- NavigationImporter merge = new NavigationImporter(Locale.ENGLISH,
ImportMode.CONSERVE, false, src, service, descriptionService);
- merge.perform();
-
- //
- NavigationContext ctx = service.loadNavigation(SiteKey.portal(name));
- Node node = service.loadNode(Node.MODEL, ctx, Scope.ALL, null).getNode();
- Node a = node.getChild("a");
- assertNotNull(a);
- assertEquals("a", a.getName());
- assertEquals(1, a.getNodeCount());
- Node b = a.getChild("b");
- assertNotNull(b);
- assertEquals("b", b.getName());
- assertEquals(0, b.getNodeCount());
-
- //
- builder =
navigation(name).add(node("a").add(node("d"))).add(node("c"));
- src = builder.build();
- src.setOwnerId(name);
- merge = new NavigationImporter(Locale.ENGLISH, importMode, false, src, service,
descriptionService);
- merge.perform();
-
- //
- ctx = service.loadNavigation(SiteKey.portal(name));
- node = service.loadNode(Node.MODEL, ctx, Scope.ALL, null).getNode();
- switch (importMode)
- {
- case MERGE:
- {
- assertEquals(2, node.getNodeCount());
- a = node.getChild("a");
- assertNotNull(a);
- assertEquals("a", a.getState().getLabel());
- assertEquals(2, a.getNodeCount());
- b = a.getChild("b");
- assertNotNull(b);
- assertEquals("b", b.getState().getLabel());
- assertEquals(0, b.getNodeCount());
- Node c = node.getChild("c");
- assertNotNull(c);
- assertEquals("c", c.getState().getLabel());
- assertEquals(0, c.getNodeCount());
- Node d = a.getChild("d");
- assertNotNull(d);
- assertEquals("d", d.getName());
- assertEquals(0, d.getNodeCount());
- break;
- }
- case CONSERVE:
- {
- assertEquals(1, node.getNodeCount());
- a = node.getChild("a");
- assertNotNull(a);
- assertEquals(1, a.getNodeCount());
- assertNotNull(b);
- assertEquals("b", b.getState().getLabel());
- assertEquals(0, b.getNodeCount());
- break;
- }
- case REIMPORT:
- {
- assertEquals(2, node.getNodeCount());
- a = node.getChild("a");
- assertNotNull(a);
- assertEquals("a", a.getState().getLabel());
- assertEquals(1, a.getNodeCount());
- Node c = node.getChild("c");
- assertNotNull(c);
- assertEquals("c", c.getState().getLabel());
- assertEquals(0, c.getNodeCount());
- Node d = a.getChild("d");
- assertNotNull(d);
- assertEquals("d", d.getName());
- assertEquals(0, d.getNodeCount());
- break;
- }
- }
- }
-
- public void testMergeOrder()
- {
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"merge_order");
- sync(true);
-
- //
- assertNull(service.loadNavigation(SiteKey.portal("merge_order")));
-
- //
- PageNavigation src = navigation("merge_order").add(node("a"),
node("b"), node("c")).build();
- src.setOwnerId("merge_order");
- NavigationImporter merge = new NavigationImporter(Locale.ENGLISH, ImportMode.MERGE,
false, src, service, descriptionService);
- merge.perform();
-
- //
- NavigationContext ctx =
service.loadNavigation(SiteKey.portal("merge_order"));
- NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
- assertEquals(3, node.getNodeCount());
- assertEquals("a", node.get(0).getName());
- assertEquals("b", node.get(1).getName());
- assertEquals("c", node.get(2).getName());
- }
-
- public void testExtendedLabel()
- {
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"importer_extended_label");
- sync(true);
-
- //
-
assertNull(service.loadNavigation(SiteKey.portal("importer_extended_label")));
-
- //
- PageNavigation src =
navigation("importer_extended_label").add(node("a"),
node("b"), node("c")).build();
- src.getNode("a").setLabels(new
ArrayList<LocalizedValue>(Arrays.asList(new LocalizedValue("a_en",
Locale.ENGLISH), new LocalizedValue("a_fr", Locale.FRENCH))));
- src.getNode("b").setLabels(new
ArrayList<LocalizedValue>(Arrays.asList(new LocalizedValue("b_en"), new
LocalizedValue("b_fr", Locale.FRENCH))));
- src.getNode("c").setLabels(new
ArrayList<LocalizedValue>(Arrays.asList(new LocalizedValue("c_en"))));
- src.setOwnerId("importer_extended_label");
- NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.REIMPORT, true, src, service, descriptionService);
- importer.perform();
-
- //
- NavigationContext ctx =
service.loadNavigation(SiteKey.portal("importer_extended_label"));
- NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
-
- // The fully explicit case
- NodeContext<?> a = (NodeContext<?>)node.getNode("a");
- Map<Locale, Described.State> aDesc =
descriptionService.getDescriptions(a.getId());
- assertNotNull(aDesc);
- assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH), aDesc.keySet());
- assertEquals(new Described.State("a_en", null),
aDesc.get(Locale.ENGLISH));
- assertEquals(new Described.State("a_fr", null),
aDesc.get(Locale.FRENCH));
- assertNull(a.getState().getLabel());
-
- // No explicit language means to use the portal locale
- NodeContext<?> b = (NodeContext<?>)node.getNode("b");
- Map<Locale, Described.State> bDesc =
descriptionService.getDescriptions(b.getId());
- assertNotNull(bDesc);
- assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH), bDesc.keySet());
- assertEquals(new Described.State("b_en", null),
bDesc.get(Locale.ENGLISH));
- assertEquals(new Described.State("b_fr", null),
bDesc.get(Locale.FRENCH));
- assertNull(b.getState().getLabel());
-
- // The simple use case : one single label without the xml:lang attribute
- NodeContext<?> c = (NodeContext<?>)node.getNode("c");
- Map<Locale, Described.State> cDesc =
descriptionService.getDescriptions(c.getId());
- assertNotNull(cDesc);
- assertEquals(Tools.toSet(Locale.ENGLISH), cDesc.keySet());
- assertEquals(new Described.State("c_en", null),
cDesc.get(Locale.ENGLISH));
- assertEquals(null, c.getState().getLabel());
- }
-
- public void testSimpleLabel()
- {
- MOPService mop = mgr.getPOMService();
- mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"importer_simple_label");
- sync(true);
-
- //
-
assertNull(service.loadNavigation(SiteKey.portal("importer_simple_label")));
-
- //
- PageNavigation src =
navigation("importer_simple_label").add(node("a"),
node("b"), node("c")).build();
- src.getNode("a").setLabels(new
ArrayList<LocalizedValue>(Arrays.asList(new LocalizedValue("a_en",
Locale.ENGLISH), new LocalizedValue("a_fr", Locale.FRENCH))));
- src.getNode("b").setLabels(new
ArrayList<LocalizedValue>(Arrays.asList(new LocalizedValue("b_en"), new
LocalizedValue("b_fr", Locale.FRENCH))));
- src.getNode("c").setLabels(new
ArrayList<LocalizedValue>(Arrays.asList(new LocalizedValue("c_en"))));
- src.setOwnerId("importer_simple_label");
- NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.REIMPORT, false, src, service, descriptionService);
- importer.perform();
-
- //
- NavigationContext ctx =
service.loadNavigation(SiteKey.portal("importer_simple_label"));
- NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
-
- // The fully explicit case
- NodeContext<?> a = (NodeContext<?>)node.getNode("a");
- Map<Locale, Described.State> aDesc =
descriptionService.getDescriptions(a.getId());
- assertNull(aDesc);
- assertEquals("a_en", a.getState().getLabel());
-
- // No explicit language means to use the portal locale
- NodeContext<?> b = (NodeContext<?>)node.getNode("b");
- Map<Locale, Described.State> bDesc =
descriptionService.getDescriptions(b.getId());
- assertNull(bDesc);
- assertEquals("b_en", b.getState().getLabel());
-
- // The simple use case : one single label without the xml:lang attribute
- NodeContext<?> c = (NodeContext<?>)node.getNode("c");
- Map<Locale, Described.State> cDesc =
descriptionService.getDescriptions(c.getId());
- assertNull(cDesc);
- assertEquals("c_en", c.getState().getLabel());
- }
-}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -19,8 +19,11 @@
package org.exoplatform.portal.mop.description;
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.AbstractPortalTest;
+import org.exoplatform.portal.AbstractPortalTest;
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.i18n.I18Nized;
import org.exoplatform.portal.mop.navigation.NavigationServiceImpl;
@@ -38,6 +41,11 @@
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
*/
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.identity-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.portal-configuration.xml")
+})
public class TestDescriptionService extends AbstractPortalTest
{
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.portal.config.model.PageNodeContainer;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public abstract class Builder<B extends Builder<B>>
+{
+
+ /** . */
+ protected final String value;
+
+ /** . */
+ protected final List<NodeBuilder> nodes;
+
+ protected Builder(String value)
+ {
+ this.value = value;
+ this.nodes = new ArrayList<NodeBuilder>();
+ }
+
+ public static NodeBuilder node(String name)
+ {
+ return new NodeBuilder(name);
+ }
+
+ public static FragmentBuilder fragment(String... path)
+ {
+ StringBuilder sb = new StringBuilder();
+ for (String name : path)
+ {
+ if (sb.length() > 0)
+ {
+ sb.append('/');
+ }
+ sb.append(name);
+ }
+ return new FragmentBuilder(sb.toString());
+ }
+
+ public B add(NodeBuilder... nodes)
+ {
+ for (NodeBuilder node : nodes)
+ {
+ this.nodes.add(node);
+ }
+ return (B)this;
+ }
+
+ public Builder get(String value)
+ {
+ for (Builder node : nodes)
+ {
+ if (node.value.equals(value))
+ {
+ return node;
+ }
+ }
+ return null;
+ }
+
+ protected final ArrayList<PageNode> buildNodes()
+ {
+ ArrayList<PageNode> nodes = new ArrayList<PageNode>();
+ for (NodeBuilder node : this.nodes)
+ {
+ nodes.add(node.build());
+ }
+ return nodes;
+ }
+
+ public abstract PageNodeContainer build();
+
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.NavigationFragment;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class FragmentBuilder extends Builder<FragmentBuilder>
+{
+ public FragmentBuilder(String parentURI)
+ {
+ super(parentURI);
+ }
+
+ @Override
+ public NavigationFragment build()
+ {
+ NavigationFragment fragment = new NavigationFragment();
+ fragment.setParentURI(value);
+ fragment.setNodes(buildNodes());
+ return fragment;
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class NodeBuilder extends Builder<NodeBuilder>
+{
+ public NodeBuilder(String ownerId)
+ {
+ super(ownerId);
+ }
+
+ @Override
+ public PageNode build()
+ {
+ PageNode node = new PageNode();
+ node.setName(value);
+ node.setLabel(value);
+ node.setChildren(buildNodes());
+ return node;
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.NavigationFragment;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.navigation.AbstractTestNavigationService;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationState;
+import org.exoplatform.portal.mop.navigation.NodeContext;
+import org.exoplatform.portal.mop.navigation.NodeModel;
+import org.exoplatform.portal.mop.navigation.Scope;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.core.api.MOPService;
+
+import java.util.Locale;
+
+import static org.exoplatform.portal.mop.importer.Builder.fragment;
+import static org.exoplatform.portal.mop.importer.Builder.node;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestNavigationFragmentImporter extends AbstractTestNavigationService
+{
+
+ public void testRemoveOrphan()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"remove_orphan");
+ sync(true);
+
+ //
+ NavigationContext ctx = new
NavigationContext(SiteKey.portal("remove_orphan"), new NavigationState(1));
+ service.saveNavigation(ctx);
+ NodeContext root = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null);
+ root.add(0, "foo").add(0, "bar");
+ service.saveNode(root, null);
+
+ //
+ NavigationFragment imported = fragment("foo").build();
+
+ //
+ NavigationFragmentImporter importer = new NavigationFragmentImporter(
+ new String[0],
+ service,
+ SiteKey.portal("remove_orphan"),
+ Locale.ENGLISH,
+ descriptionService,
+ imported,
+ new ImportConfig(true, false, false));
+ NodeContext node = importer.perform();
+ assertEquals(0, node.getNodeSize());
+ }
+
+ public void testCreateMissingPath()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"create_missing_path");
+ sync(true);
+
+ //
+ NavigationContext ctx = new
NavigationContext(SiteKey.portal("create_missing_path"), new
NavigationState(1));
+ service.saveNavigation(ctx);
+ NodeContext root = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null);
+ root.add(0, "foo").add(0, "bar");
+ service.saveNode(root, null);
+
+ //
+ NavigationFragment imported =
fragment("foo").add(node("juu")).build();
+
+ //
+ NavigationFragmentImporter importer = new NavigationFragmentImporter(
+ new String[]{"foo","bar"},
+ service,
+ SiteKey.portal("create_missing_path"),
+ Locale.ENGLISH,
+ descriptionService,
+ imported,
+ ImportMode.INSERT.config);
+ NodeContext node = importer.perform();
+ assertNotNull(node);
+ assertEquals("bar", node.getName());
+ assertNotNull(node.get("juu"));
+
+ //
+ importer = new NavigationFragmentImporter(
+ new String[]{"foo","bar","daa"},
+ service,
+ SiteKey.portal("create_missing_path"),
+ Locale.ENGLISH,
+ descriptionService,
+ imported,
+ ImportMode.INSERT.config);
+ node = importer.perform();
+ assertNotNull(node);
+ assertEquals("daa", node.getName());
+ assertNotNull(node.get("juu"));
+
+ //
+ importer = new NavigationFragmentImporter(
+ new String[]{"foo"},
+ service,
+ SiteKey.portal("create_missing_path"),
+ Locale.ENGLISH,
+ descriptionService,
+ imported,
+ ImportMode.INSERT.config);
+ node = importer.perform();
+ assertEquals("foo", node.getName());
+ assertNotNull(node.get("juu"));
+ }
+}
Added:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
(rev 0)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,380 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.mop.importer;
+
+import org.exoplatform.portal.config.model.I18NString;
+import org.exoplatform.portal.config.model.LocalizedString;
+import org.exoplatform.portal.config.model.NavigationFragment;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.Described;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.navigation.*;
+import org.gatein.common.util.Tools;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.core.api.MOPService;
+
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+
+import static org.exoplatform.portal.mop.importer.Builder.*;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
+ */
+public class TestNavigationImporter extends AbstractTestNavigationService
+{
+
+ public void testInsertCreateNavigation()
+ {
+ testCreate(ImportMode.INSERT);
+ }
+
+ public void testConserveCreateNavigation()
+ {
+ testCreate(ImportMode.CONSERVE);
+ }
+
+ public void testOverwriteCreateNavigation()
+ {
+ testCreate(ImportMode.OVERWRITE);
+ }
+
+ private void testCreate(ImportMode mode)
+ {
+ String name = mode.name() + "_create";
+
+ //
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, name);
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal(name)));
+ PageNavigation src = new PageNavigation("portal", name);
+ src.setPriority(2);
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH, mode, src,
service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx = service.loadNavigation(SiteKey.portal(name));
+ assertEquals(2, (int)ctx.getState().getPriority());
+ }
+
+ public void testInsertNavigation()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"insert_navigation");
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal("insert_navigation")));
+
+ //
+ FragmentBuilder builder = fragment().add(node("a"));
+
+ //
+ PageNavigation src = new PageNavigation("portal",
"insert_navigation").addFragment(builder.build());
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.INSERT, src, service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx =
service.loadNavigation(SiteKey.portal("insert_navigation"));
+ NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
+ NodeContext<?> a = node.get("a");
+ assertNotNull(a);
+ assertEquals("a", a.getName());
+ assertEquals("a", a.getState().getLabel());
+ assertEquals(0, a.getNodeCount());
+ }
+
+ public void testInsertFragment()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"insert_fragment");
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal("insert_fragment")));
+
+ //
+ FragmentBuilder builder =
fragment().add(node("a").add(node("b")));
+
+ //
+ PageNavigation src = new PageNavigation("portal",
"insert_fragment").addFragment(builder.build());
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.INSERT, src, service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx =
service.loadNavigation(SiteKey.portal("insert_fragment"));
+ NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
+ NodeContext<?> a = node.get("a");
+ assertNotNull(a);
+ assertEquals("a", a.getName());
+ assertEquals("a", a.getState().getLabel());
+ assertEquals(1, a.getNodeCount());
+ }
+
+ public void testCreateMerge()
+ {
+ testMerge(ImportMode.CONSERVE);
+ }
+
+ public void testInsertMerge()
+ {
+ testMerge(ImportMode.INSERT);
+ }
+
+ public void testOverwriteMerge()
+ {
+ testMerge(ImportMode.OVERWRITE);
+ }
+
+ private void testMerge(ImportMode importMode)
+ {
+ String name = importMode.name() + "_merge";
+
+ //
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, name);
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal(name)));
+
+ //
+ FragmentBuilder builder =
fragment().add(node("a").add(node("b")));
+
+ //
+ PageNavigation src = new PageNavigation("portal",
name).addFragment(builder.build());
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.CONSERVE, src, service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx = service.loadNavigation(SiteKey.portal(name));
+ Node node = service.loadNode(Node.MODEL, ctx, Scope.ALL, null).getNode();
+ Node a = node.getChild("a");
+ assertNotNull(a);
+ assertEquals("a", a.getName());
+ assertEquals(1, a.getNodeCount());
+ Node b = a.getChild("b");
+ assertNotNull(b);
+ assertEquals("b", b.getName());
+ assertEquals(0, b.getNodeCount());
+
+ //
+ builder =
fragment().add(node("a").add(node("d"))).add(node("c"));
+ src = new PageNavigation("portal", name).addFragment(builder.build());
+ importer = new NavigationImporter(Locale.ENGLISH, importMode, src, service,
descriptionService);
+ importer.perform();
+
+ //
+ ctx = service.loadNavigation(SiteKey.portal(name));
+ node = service.loadNode(Node.MODEL, ctx, Scope.ALL, null).getNode();
+ switch (importMode)
+ {
+ case INSERT:
+ {
+ assertEquals(2, node.getNodeCount());
+ a = node.getChild("a");
+ assertNotNull(a);
+ assertEquals("a", a.getState().getLabel());
+ assertEquals(2, a.getNodeCount());
+ b = a.getChild("b");
+ assertNotNull(b);
+ assertEquals("b", b.getState().getLabel());
+ assertEquals(0, b.getNodeCount());
+ Node c = node.getChild("c");
+ assertNotNull(c);
+ assertEquals("c", c.getState().getLabel());
+ assertEquals(0, c.getNodeCount());
+ Node d = a.getChild("d");
+ assertNotNull(d);
+ assertEquals("d", d.getName());
+ assertEquals(0, d.getNodeCount());
+ break;
+ }
+ case CONSERVE:
+ {
+ assertEquals(1, node.getNodeCount());
+ a = node.getChild("a");
+ assertNotNull(a);
+ assertEquals(1, a.getNodeCount());
+ assertNotNull(b);
+ assertEquals("b", b.getState().getLabel());
+ assertEquals(0, b.getNodeCount());
+ break;
+ }
+ case OVERWRITE:
+ {
+ assertEquals(2, node.getNodeCount());
+ a = node.getChild("a");
+ assertNotNull(a);
+ assertEquals("a", a.getState().getLabel());
+ assertEquals(1, a.getNodeCount());
+ Node c = node.getChild("c");
+ assertNotNull(c);
+ assertEquals("c", c.getState().getLabel());
+ assertEquals(0, c.getNodeCount());
+ Node d = a.getChild("d");
+ assertNotNull(d);
+ assertEquals("d", d.getName());
+ assertEquals(0, d.getNodeCount());
+ break;
+ }
+ }
+ }
+
+ public void testOrder()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE, "order");
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal("order")));
+
+ //
+ PageNavigation src = new PageNavigation("portal",
"order").addFragment(fragment().add(node("a"), node("b"),
node("c")).build());
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.INSERT, src, service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx = service.loadNavigation(SiteKey.portal("order"));
+ NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
+ assertEquals(3, node.getNodeCount());
+ assertEquals("a", node.get(0).getName());
+ assertEquals("b", node.get(1).getName());
+ assertEquals("c", node.get(2).getName());
+
+ //
+ src.getFragment().getNodes().add(0, node("d").build());
+ importer = new NavigationImporter(Locale.ENGLISH, ImportMode.INSERT, src, service,
descriptionService);
+ importer.perform();
+
+ //
+ node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null).getNode();
+ assertEquals(4, node.getNodeCount());
+ assertEquals("d", node.get(0).getName());
+ assertEquals("a", node.get(1).getName());
+ assertEquals("b", node.get(2).getName());
+ assertEquals("c", node.get(3).getName());
+
+ //
+ src.getFragment().getNodes().add(node("e").build());
+ importer = new NavigationImporter(Locale.ENGLISH, ImportMode.INSERT, src, service,
descriptionService);
+ importer.perform();
+
+ //
+ node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null).getNode();
+ assertEquals(5, node.getNodeCount());
+ assertEquals("d", node.get(0).getName());
+ assertEquals("a", node.get(1).getName());
+ assertEquals("b", node.get(2).getName());
+ assertEquals("c", node.get(3).getName());
+ assertEquals("e", node.get(4).getName());
+ }
+
+ public void testExtendedLabel()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"extended_label");
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal("extended_label")));
+
+ //
+ PageNavigation src = new PageNavigation("portal",
"extended_label").addFragment(fragment().add(node("a"),
node("b"), node("c")).build());
+ NavigationFragment fragment = src.getFragment();
+ fragment.getNode("a").setLabels(new I18NString(new
LocalizedString("a_en", Locale.ENGLISH), new LocalizedString("a_fr",
Locale.FRENCH)));
+ fragment.getNode("b").setLabels(new I18NString(new
LocalizedString("b_en"), new LocalizedString("b_fr",
Locale.FRENCH)));
+ fragment.getNode("c").setLabels(new I18NString(new
LocalizedString("c_en")));
+ src.setOwnerId("extended_label");
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.OVERWRITE, src, service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx =
service.loadNavigation(SiteKey.portal("extended_label"));
+ NodeContext<?> node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL,
null).getNode();
+
+ // The fully explicit case
+ NodeContext<?> a = (NodeContext<?>)node.getNode("a");
+ Map<Locale, Described.State> aDesc =
descriptionService.getDescriptions(a.getId());
+ assertNotNull(aDesc);
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH), aDesc.keySet());
+ assertEquals(new Described.State("a_en", null),
aDesc.get(Locale.ENGLISH));
+ assertEquals(new Described.State("a_fr", null),
aDesc.get(Locale.FRENCH));
+ assertNull(a.getState().getLabel());
+
+ // No explicit language means to use the portal locale
+ NodeContext<?> b = (NodeContext<?>)node.getNode("b");
+ Map<Locale, Described.State> bDesc =
descriptionService.getDescriptions(b.getId());
+ assertNotNull(bDesc);
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH), bDesc.keySet());
+ assertEquals(new Described.State("b_en", null),
bDesc.get(Locale.ENGLISH));
+ assertEquals(new Described.State("b_fr", null),
bDesc.get(Locale.FRENCH));
+ assertNull(b.getState().getLabel());
+
+ // The simple use case : one single label without the xml:lang attribute
+ NodeContext<?> c = (NodeContext<?>)node.getNode("c");
+ Map<Locale, Described.State> cDesc =
descriptionService.getDescriptions(c.getId());
+ assertNull(cDesc);
+ assertEquals("c_en", c.getState().getLabel());
+ }
+
+ public void testFullNavigation()
+ {
+ MOPService mop = mgr.getPOMService();
+ mop.getModel().getWorkspace().addSite(ObjectType.PORTAL_SITE,
"full_navigation");
+ sync(true);
+
+ //
+ assertNull(service.loadNavigation(SiteKey.portal("full_navigation")));
+
+ //
+ PageNavigation src = new PageNavigation("portal",
"full_navigation").addFragment(fragment().add(node("a")).build());
+ src.addFragment(fragment().add(node("b"), node("c")).build());
+ src.addFragment(fragment("a").add(node("d")).build());
+
+ //
+ NavigationImporter importer = new NavigationImporter(Locale.ENGLISH,
ImportMode.INSERT, src, service, descriptionService);
+ importer.perform();
+
+ //
+ NavigationContext ctx =
service.loadNavigation(SiteKey.portal("full_navigation"));
+ NodeContext<NodeContext<?>> root =
service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null);
+ assertEquals(3, root.getNodeSize());
+ Iterator<NodeContext<?>> i = root.iterator();
+ NodeContext<?> a = i.next();
+ assertEquals("a", a.getName());
+ assertEquals(1, a.getNodeSize());
+ NodeContext<?> d = a.get("d");
+ assertNotNull(d);
+ assertEquals(0, d.getNodeSize());
+ NodeContext<?> b = i.next();
+ assertEquals("b", b.getName());
+ assertEquals(0, b.getNodeSize());
+ NodeContext<?> c = i.next();
+ assertEquals("c", c.getName());
+ assertEquals(0, c.getNodeSize());
+ assertFalse(i.hasNext());
+ }
+}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -20,8 +20,11 @@
package org.exoplatform.portal.mop.navigation;
import junit.framework.AssertionFailedError;
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.AbstractPortalTest;
+import org.exoplatform.portal.AbstractPortalTest;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.description.DescriptionServiceImpl;
@@ -30,6 +33,12 @@
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
*/
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.identity-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.portal-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"org/exoplatform/portal/mop/navigation/configuration.xml")
+})
public abstract class AbstractTestNavigationService extends AbstractPortalTest
{
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -20,7 +20,6 @@
package org.exoplatform.portal.mop.navigation;
import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.AbstractPortalTest;
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.pom.config.POMSessionManager;
@@ -35,7 +34,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class TestNavigationServiceWrapper extends AbstractPortalTest
+public class TestNavigationServiceWrapper extends AbstractTestNavigationService
{
/** . */
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -19,14 +19,14 @@
package org.exoplatform.portal.mop.navigation;
-import org.exoplatform.component.test.AbstractKernelTest;
+import org.exoplatform.component.test.AbstractGateInTest;
import org.exoplatform.portal.mop.Visibility;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
-public class TestScope extends AbstractKernelTest
+public class TestScope extends AbstractGateInTest
{
public void testBranchShape()
@@ -34,6 +34,17 @@
NodeState nodeState = new NodeState("", null, -1, -1,
Visibility.DISPLAYED, "portal::classic::home");
//
+ Scope scope0 = GenericScope.branchShape(new String[0], Scope.CHILDREN);
+ Scope.Visitor visitor0 = scope0.get();
+ assertEquals(VisitMode.ALL_CHILDREN, visitor0.enter(0, "0", "",
nodeState));
+ assertEquals(VisitMode.NO_CHILDREN, visitor0.enter(1, "1", "a",
nodeState));
+
+ //
+ scope0 = GenericScope.branchShape(new String[0], Scope.SINGLE);
+ visitor0 = scope0.get();
+ assertEquals(VisitMode.NO_CHILDREN, visitor0.enter(0, "0", "",
nodeState));
+
+ //
Scope scope1 = GenericScope.branchShape(new String[]{"a"},
Scope.CHILDREN);
Scope.Visitor visitor1 = scope1.get();
assertEquals(VisitMode.ALL_CHILDREN, visitor1.enter(0, "0", "",
nodeState));
@@ -41,27 +52,27 @@
assertEquals(VisitMode.NO_CHILDREN, visitor1.enter(1, "2", "b",
nodeState));
//
- Scope scope2 = GenericScope.branchShape(new String[]{"a"},
Scope.SINGLE);
+ scope1 = GenericScope.branchShape(new String[]{"a"}, Scope.SINGLE);
+ visitor1 = scope1.get();
+ assertEquals(VisitMode.ALL_CHILDREN, visitor1.enter(0, "0", "",
nodeState));
+ assertEquals(VisitMode.NO_CHILDREN, visitor1.enter(1, "1", "a",
nodeState));
+ assertEquals(VisitMode.NO_CHILDREN, visitor1.enter(1, "2", "b",
nodeState));
+
+ //
+ Scope scope2 = GenericScope.branchShape(new String[]{"a","c"},
Scope.SINGLE);
Scope.Visitor visitor2 = scope2.get();
assertEquals(VisitMode.ALL_CHILDREN, visitor2.enter(0, "0", "",
nodeState));
- assertEquals(VisitMode.NO_CHILDREN, visitor2.enter(1, "1", "a",
nodeState));
+ assertEquals(VisitMode.ALL_CHILDREN, visitor2.enter(1, "1",
"a", nodeState));
assertEquals(VisitMode.NO_CHILDREN, visitor2.enter(1, "2", "b",
nodeState));
+ assertEquals(VisitMode.NO_CHILDREN, visitor2.enter(2, "3", "c",
nodeState));
+ assertEquals(VisitMode.NO_CHILDREN, visitor2.enter(2, "4", "d",
nodeState));
//
- Scope scope3 = GenericScope.branchShape(new String[]{"a","c"},
Scope.SINGLE);
- Scope.Visitor visitor3 = scope3.get();
- assertEquals(VisitMode.ALL_CHILDREN, visitor3.enter(0, "0", "",
nodeState));
- assertEquals(VisitMode.ALL_CHILDREN, visitor3.enter(1, "1",
"a", nodeState));
- assertEquals(VisitMode.NO_CHILDREN, visitor3.enter(1, "2", "b",
nodeState));
- assertEquals(VisitMode.NO_CHILDREN, visitor3.enter(2, "3", "c",
nodeState));
- assertEquals(VisitMode.NO_CHILDREN, visitor3.enter(2, "4", "d",
nodeState));
-
- //
- Scope scope4 = GenericScope.branchShape(new String[]{"a"},
GenericScope.branchShape(new String[]{"b"}, Scope.CHILDREN));
- Scope.Visitor visitor4 = scope4.get();
- assertEquals(VisitMode.ALL_CHILDREN, visitor4.enter(0, "0", "",
nodeState));
- assertEquals(VisitMode.ALL_CHILDREN, visitor4.enter(1, "1",
"a", nodeState));
- assertEquals(VisitMode.ALL_CHILDREN, visitor4.enter(2, "2",
"b", nodeState));
- assertEquals(VisitMode.NO_CHILDREN, visitor4.enter(2, "3", "c",
nodeState));
+ scope2 = GenericScope.branchShape(new String[]{"a"},
GenericScope.branchShape(new String[]{"b"}, Scope.CHILDREN));
+ visitor2 = scope2.get();
+ assertEquals(VisitMode.ALL_CHILDREN, visitor2.enter(0, "0", "",
nodeState));
+ assertEquals(VisitMode.ALL_CHILDREN, visitor2.enter(1, "1",
"a", nodeState));
+ assertEquals(VisitMode.ALL_CHILDREN, visitor2.enter(2, "2",
"b", nodeState));
+ assertEquals(VisitMode.NO_CHILDREN, visitor2.enter(2, "3", "c",
nodeState));
}
}
Modified:
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
===================================================================
---
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-07-22
03:13:14 UTC (rev 6912)
@@ -21,8 +21,11 @@
import junit.framework.AssertionFailedError;
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.AbstractPortalTest;
+import org.exoplatform.portal.AbstractPortalTest;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfig;
import org.exoplatform.portal.config.UserPortalConfigService;
@@ -30,6 +33,7 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.mop.user.UserNodeFilterConfig.Builder;
import org.exoplatform.portal.pom.config.POMDataStorage;
import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.services.listener.Event;
@@ -50,13 +54,18 @@
import java.util.List;
import java.util.Locale;
import java.util.Map;
-import java.util.ResourceBundle;
import java.util.TimeZone;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien
Viet</a>
* @version $Revision$
*/
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.identity-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"conf/exo.portal.component.portal-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path =
"org/exoplatform/portal/mop/user/configuration.xml")
+})
public class TestUserPortal extends AbstractPortalTest
{
@@ -433,6 +442,44 @@
}.execute("root");
}
+ public void testFindBestAvailablePath()
+ {
+ new UnitTest()
+ {
+ public void execute() throws Exception
+ {
+ UserPortalConfig userPortalCfg =
userPortalConfigSer_.getUserPortalConfig("limited", getUserId());
+ UserPortal userPortal = userPortalCfg.getUserPortal();
+
+ // Without authentication
+ UserNode nav = userPortal.resolvePath(null, "/");
+ assertEquals(SiteKey.portal("limited"),
nav.getNavigation().getKey());
+ assertEquals("foo", nav.getName());
+
+ nav = userPortal.resolvePath(null, "/foo");
+ assertEquals(SiteKey.portal("limited"),
nav.getNavigation().getKey());
+ assertEquals("foo", nav.getName());
+
+ // With authentication
+ UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder();
+ builder.withAuthorizationCheck();
+ UserNodeFilterConfig filterConfig = builder.build();
+
+ nav = userPortal.resolvePath(filterConfig, "/");
+ assertEquals(SiteKey.portal("limited"),
nav.getNavigation().getKey());
+ assertEquals("bar", nav.getName());
+
+ nav = userPortal.resolvePath(filterConfig, "/foo");
+ assertEquals(SiteKey.portal("limited"),
nav.getNavigation().getKey());
+ assertEquals("foo", nav.getName());
+
+ nav = userPortal.resolvePath(filterConfig, "/bit");
+ assertEquals(SiteKey.portal("limited"),
nav.getNavigation().getKey());
+ assertEquals("bit", nav.getName());
+ }
+ }.execute("demo");
+ }
+
public void testPathResolutionPerNavigation()
{
new UnitTest()
@@ -659,6 +706,67 @@
}.execute("root");
}
+ public void testInvalidateState()
+ {
+ new UnitTest()
+ {
+ public void execute() throws Exception
+ {
+ storage_.create(new PortalConfig("portal",
"usernode_invalidate_uri"));
+ end(true);
+
+ //
+ begin();
+ Site site =
mgr.getPOMService().getModel().getWorkspace().getSite(ObjectType.PORTAL_SITE,
"usernode_invalidate_uri");
+ site.getRootNavigation().addChild("default");
+ end(true);
+
+ //
+ begin();
+ UserPortalConfig userPortalCfg =
userPortalConfigSer_.getUserPortalConfig("usernode_invalidate_uri",
getUserId());
+ UserPortal userPortal = userPortalCfg.getUserPortal();
+ UserNavigation navigation =
userPortal.getNavigation(SiteKey.portal("usernode_invalidate_uri"));
+ UserNode root = userPortal.getNode(navigation, Scope.ALL, null, null);
+ UserNode foo = root.addChild("foo");
+ UserNode bar = root.addChild("bar");
+ assertEquals("foo", foo.getURI());
+ assertEquals("bar", bar.getURI());
+ userPortal.saveNode(root, null);
+ end(true);
+
+ begin();
+ //Move node --> change URI
+ foo.addChild(bar);
+ assertEquals("foo/bar", bar.getURI());
+
+ //Rename node --> URI should be changed too
+ bar.setName("bar2");
+ assertEquals("foo/bar2", bar.getURI());
+
+ userPortal.saveNode(bar, null);
+ end(true);
+
+ begin();
+ UserNode root2 = userPortal.getNode(navigation, Scope.ALL, null, null);
+ UserNode foo2 = root2.getChild("foo");
+ foo2.setName("foo2");
+
+ UserNode bar2 = foo2.getChild("bar2");
+ root2.addChild(bar2);
+
+ userPortal.saveNode(bar2, null);
+ end(true);
+
+ begin();
+
+ //Changes from other session : foo has been renamed, and bar has been moved
+ userPortal.updateNode(root, Scope.ALL, null);
+ assertEquals("foo2", foo.getURI());
+ assertEquals("bar2", bar.getURI());
+ }
+ }.execute("root");
+ }
+
public void testNodeExtension()
{
new UnitTest()
Added:
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,263 @@
+<?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>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field
name="name"><string>default</string></field>
+ <field
name="maxSize"><int>30000</int></field>
+ <field
name="liveTime"><long>60000</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.distribution.DataDistributionManager</key>
+
<type>org.exoplatform.services.jcr.ext.distribution.impl.DataDistributionManagerImpl</type>
+ </component>
+
+ <component>
+
<key>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</key>
+
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.config.UserACL</key>
+ <type>org.exoplatform.portal.config.UserACL</type>
+ <init-params>
+ <value-param>
+ <name>super.user</name>
+ <value>root</value>
+ </value-param>
+ <value-param>
+ <name>guests.group</name>
+ <value>/platform/guests</value>
+ </value-param>
+ <value-param>
+ <name>navigation.creator.membership.type</name>
+ <value>manager</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.mop.navigation.NavigationService</key>
+
<type>org.exoplatform.portal.mop.navigation.NavigationServiceWrapper</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.portal.mop.description.DescriptionService</key>
+
<type>org.exoplatform.portal.mop.description.DescriptionServiceImpl</type>
+ </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="gtn"
value="http://www.gatein.org/jcr/gatein/1.0/"/>
+ <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>
+ <value>jar:/conf/gatein-nodetypes.xml</value>
+ <value>jar:/conf/mop-nodetypes.xml</value>
+ <value>jar:/conf/content-nodetypes.xml</value>
+ <value>jar:/conf/test-mop-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>domain-name</name>
+ <value>mop</value>
+ </value-param>
+ <value-param>
+ <name>workspace-name</name>
+ <value>portal-test</value>
+ </value-param>
+ <values-param>
+ <name>entities</name>
+
+ <!-- The MOP node types -->
+ <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.TemplatizedImpl</value>
+ <value>org.gatein.mop.core.api.AttributesImpl</value>
+ <value>org.gatein.mop.core.api.Attribute</value>
+ <value>org.gatein.mop.core.api.PathAttribute</value>
+ <value>org.gatein.mop.core.api.StringAttribute</value>
+ <value>org.gatein.mop.core.api.BooleanAttribute</value>
+ <value>org.gatein.mop.core.api.IntegerAttribute</value>
+ <value>org.gatein.mop.core.api.DateAttribute</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>
+
+ <!-- GateIn node types -->
+ <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>
+ <value>org.exoplatform.portal.mop.ProtectedResource</value>
+ <value>org.exoplatform.portal.mop.Described</value>
+ <value>org.exoplatform.portal.mop.Visible</value>
+ <value>org.exoplatform.portal.mop.i18n.I18Nized</value>
+ <value>org.exoplatform.portal.mop.i18n.LanguageSpace</value>
+ <value>org.exoplatform.portal.mop.i18n.Language</value>
+ <value>org.exoplatform.portal.mop.importer.Imported</value>
+
+ <!-- For the unit test purpose -->
+ <value>org.exoplatform.portal.config.SampleMixin</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>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <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>
Deleted:
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,263 +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>30000</int></field>
- <field
name="liveTime"><long>60000</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.distribution.DataDistributionManager</key>
-
<type>org.exoplatform.services.jcr.ext.distribution.impl.DataDistributionManagerImpl</type>
- </component>
-
- <component>
-
<key>org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator</key>
-
<type>org.exoplatform.services.jcr.ext.hierarchy.impl.NodeHierarchyCreatorImpl</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.config.UserACL</key>
- <type>org.exoplatform.portal.config.UserACL</type>
- <init-params>
- <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.mop.navigation.NavigationService</key>
-
<type>org.exoplatform.portal.mop.navigation.NavigationServiceWrapper</type>
- </component>
-
- <component>
- <key>org.exoplatform.portal.mop.description.DescriptionService</key>
-
<type>org.exoplatform.portal.mop.description.DescriptionServiceImpl</type>
- </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="gtn"
value="http://www.gatein.org/jcr/gatein/1.0/"/>
- <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/gatein-nodetypes.xml</value>
- <value>jar:/conf/mop-nodetypes.xml</value>
- <value>jar:/conf/content-nodetypes.xml</value>
- <value>jar:/conf/test-mop-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>domain-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.TemplatizedImpl</value>
- <value>org.gatein.mop.core.api.AttributesImpl</value>
- <value>org.gatein.mop.core.api.Attribute</value>
- <value>org.gatein.mop.core.api.PathAttribute</value>
- <value>org.gatein.mop.core.api.StringAttribute</value>
- <value>org.gatein.mop.core.api.BooleanAttribute</value>
- <value>org.gatein.mop.core.api.IntegerAttribute</value>
- <value>org.gatein.mop.core.api.DateAttribute</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>
- <value>org.exoplatform.portal.mop.ProtectedResource</value>
- <value>org.exoplatform.portal.mop.Described</value>
- <value>org.exoplatform.portal.mop.Visible</value>
- <value>org.exoplatform.portal.config.SampleMixin</value>
- <value>org.exoplatform.portal.mop.i18n.I18Nized</value>
- <value>org.exoplatform.portal.mop.i18n.LanguageSpace</value>
- <value>org.exoplatform.portal.mop.i18n.Language</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>
Deleted:
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,441 +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">
-
- <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>
- <value-param>
- <name>page.templates.location</name>
- <description>the path to the location that contains Page
templates</description>
- <value>classpath:/portal/template/pages</value>
- </value-param>
- <object-param>
- <name>site.templates.location</name>
- <description>description</description>
- <object
type="org.exoplatform.portal.config.SiteConfigTemplates">
- <field name="location">
- <string>classpath:/portal</string>
- </field>
- <field name="portalTemplates">
- <collection type="java.util.HashSet">
- <value>
- <string>classic</string>
- </value>
- <value>
- <string>test</string>
- </value>
- </collection>
- </field>
- <field name="groupTemplates">
- <collection type="java.util.HashSet">
- <value>
- <string>group</string>
- </value>
- </collection>
- </field>
- <field name="userTemplates">
- <collection type="java.util.HashSet">
- <value>
- <string>user</string>
- </value>
- </collection>
- </field>
- </object>
- </object-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>
- <value>
- <string>system</string>
- </value>
- <value>
- <string>large</string>
- </value>
- <value>
- <string>extended</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>
- </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>manager</string></field>
- <field name="description"><string>manager
membership type</string></field>
- </object>
- </value>
- <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>validator</string></field>
- <field name="description"><string>validator
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>administrators</string></field>
- <field
name="parentId"><string>/platform</string></field>
- <field name="description"><string>the
/platform/administrators group</string></field>
- <field
name="label"><string>Administrators</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>guests</string></field>
- <field
name="parentId"><string>/platform</string></field>
- <field name="description"><string>the
/platform/guests group</string></field>
- <field
name="label"><string>Guests</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>organization</string></field>
- <field
name="parentId"><string></string></field>
- <field name="description"><string>the
organization group</string></field>
- <field
name="label"><string>Organization</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>management</string></field>
- <field
name="parentId"><string>/organization</string></field>
- <field name="description"><string>the
/organization/management group</string></field>
- <field
name="label"><string>Management</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>executive-board</string></field>
- <field
name="parentId"><string>/organization/management</string></field>
- <field name="description"><string>the
/organization/management/executive-board group</string></field>
- <field name="label"><string>Executive
Board</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>human-resources</string></field>
- <field
name="parentId"><string>/organization/management</string></field>
- <field name="description"><string>the
/organization/management/human-resource group</string></field>
- <field name="label"><string>Human
Resources</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>communication</string></field>
- <field
name="parentId"><string>/organization</string></field>
- <field name="description"><string>the
/organization/communication group</string></field>
- <field
name="label"><string>Communication</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>marketing</string></field>
- <field
name="parentId"><string>/organization/communication</string></field>
- <field name="description"><string>the
/organization/communication/marketing group</string></field>
- <field
name="label"><string>Marketing</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>press-and-media</string></field>
- <field
name="parentId"><string>/organization/communication</string></field>
- <field name="description"><string>the
/organization/communication/press-and-media group</string></field>
- <field name="label"><string>Press and
Media</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>operations</string></field>
- <field
name="parentId"><string>/organization</string></field>
- <field name="description"><string>the
/organization/operations and media group</string></field>
- <field
name="label"><string>Operations</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>sales</string></field>
- <field
name="parentId"><string>/organization/operations</string></field>
- <field name="description"><string>the
/organization/operations/sales group</string></field>
- <field
name="label"><string>Sales</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>finances</string></field>
- <field
name="parentId"><string>/organization/operations</string></field>
- <field name="description"><string>the
/organization/operations/finances group</string></field>
- <field
name="label"><string>Finances</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>customers</string></field>
- <field
name="parentId"><string></string></field>
- <field name="description"><string>the
/customers group</string></field>
- <field
name="label"><string>Customers</string></field>
- </object>
- </value>
- <value>
- <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field
name="name"><string>partners</string></field>
- <field
name="parentId"><string></string></field>
- <field name="description"><string>the
/partners group</string></field>
- <field
name="label"><string>Partners</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>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>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/guests,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>
Modified: portal/trunk/component/portal/src/test/resources/conf/test-mop-nodetypes.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/conf/test-mop-nodetypes.xml 2011-07-22
02:50:13 UTC (rev 6911)
+++
portal/trunk/component/portal/src/test/resources/conf/test-mop-nodetypes.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -1,5 +1,5 @@
<!--
- ~ Copyright (C) 2009 eXo Platform SAS.
+ ~ Copyright (C) 2011 eXo Platform SAS.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
Added: portal/trunk/component/portal/src/test/resources/jibx/fragment-navigation.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/jibx/fragment-navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/jibx/fragment-navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+ <parent-uri>foo</parent-uri>
+ <node>
+ <name>bar</name>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<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">
+
+ <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>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>override</name>
+ <value>${override.1}</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+
<string>classpath:/org/exoplatform/portal/config/${import.portal.1}-conf</string>
+ </field>
+ <field name="importMode">
+ <string>${import.mode.1}</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<configuration
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd
http://www.exoplaform.org/xml/ns/kernel_1_2.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
+
+ <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>
+ <priority>1</priority>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>override</name>
+ <value>${override_2}</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+
<string>classpath:/org/exoplatform/portal/config/${import.portal_2}-conf</string>
+ </field>
+ <field name="importMode">
+ <string>${import.mode_2}</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<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">
+
+ <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>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>initializing.failure.ignore</name>
+ <value>true</value>
+ </value-param>
+ <value-param>
+ <name>page.templates.location</name>
+
<value>classpath:/org/exoplatform/portal/config/conf/template/pages</value>
+ </value-param>
+ <object-param>
+ <name>site.templates.location</name>
+ <object
type="org.exoplatform.portal.config.SiteConfigTemplates">
+ <field name="location">
+ <string>classpath:/org/exoplatform/portal/config/conf</string>
+ </field>
+ <field name="portalTemplates">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ <value>
+ <string>test</string>
+ </value>
+ </collection>
+ </field>
+ <field name="groupTemplates">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>group</string>
+ </value>
+ </collection>
+ </field>
+ <field name="userTemplates">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>user</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <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>
+ <value>
+ <string>system</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/config/conf</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <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>test/legacy</string>
+ </value>
+ <value>
+ <string>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:/org/exoplatform/portal/config/conf</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>user.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>overwritelayout</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>user</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/config/conf</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>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <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>manager</string></field>
+ <field name="description"><string>manager
membership type</string></field>
+ </object>
+ </value>
+ <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>validator</string></field>
+ <field name="description"><string>validator
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>administrators</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/administrators group</string></field>
+ <field
name="label"><string>Administrators</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>guests</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/guests group</string></field>
+ <field
name="label"><string>Guests</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>organization</string></field>
+ <field
name="parentId"><string></string></field>
+ <field name="description"><string>the
organization group</string></field>
+ <field
name="label"><string>Organization</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>management</string></field>
+ <field
name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the
/organization/management group</string></field>
+ <field
name="label"><string>Management</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>executive-board</string></field>
+ <field
name="parentId"><string>/organization/management</string></field>
+ <field name="description"><string>the
/organization/management/executive-board group</string></field>
+ <field name="label"><string>Executive
Board</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>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>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>organization/management/executive-board</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,50 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>organization/management/executive-board</owner-id>
+ <priority>5</priority>
+
+ <page-nodes>
+ <node>
+ <uri>organization</uri>
+ <name>organization</name>
+ <label>#{organization.title}</label>
+
+ <node>
+ <uri>organization/newStaff</uri>
+ <name>newStaff</name>
+ <label>#{organization.newstaff}</label>
+
<page-reference>group::organization/management/executive-board::newStaff</page-reference>
+ </node>
+
+ <node>
+ <uri>organization/management</uri>
+ <name>management</name>
+ <label>#{organization.management}</label>
+
<page-reference>group::organization/management/executive-board::management</page-reference>
+ </node>
+ </node>
+
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+
<page-id>group::organization/management/executive-board::newStaff</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>organization/management/executive-board</owner-id>
+ <name>newStaff</name>
+ <title>New Staff</title>
+
<access-permissions>*:/organization/management/executive-board</access-permissions>
+
<edit-permission>manager:/organization/management/executive-board</edit-permission>
+
+ <application>
+
<instance-id>group#organization/management/executive-board:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Staff</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ </application>
+ </page>
+
+ <page>
+
<page-id>group::organization/management/executive-board::management</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>organization/management/executive-board</owner-id>
+ <name>management</name>
+ <title>Organization Management</title>
+
<access-permissions>*:/organization/management/executive-board</access-permissions>
+
<edit-permission>manager:/organization/management/executive-board</edit-permission>
+
+ <application>
+
<instance-id>group#organization/management/executive-board:/exoadmin/OrganizationPortlet/Organization</instance-id>
+ <title>Organization Management</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set />
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0
http://www.gatein.org/xml/ns/gatein_objects_1_0"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">
+ <portal-name>platform/administrators</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,70 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <priority>2</priority>
+
+ <page-nodes>
+ <node>
+ <uri>administration</uri>
+ <name>administration</name>
+ <label>#{administration.title}</label>
+
+ <node>
+ <uri>administration/registry</uri>
+ <name>registry</name>
+ <label>#{administration.application-registry}</label>
+ <page-reference>group::platform/administrators::registry</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/newAccount</uri>
+ <name>newAccount</name>
+ <label>#{administration.newAccount}</label>
+
<page-reference>group::platform/administrators::newAccount</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/communityManagement</uri>
+ <name>communityManagement</name>
+ <label>#{administration.community-management}</label>
+
<page-reference>group::platform/administrators::communityManagement</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/pageManagement</uri>
+ <name>i18n</name>
+ <label>#{administration.pageManagement}</label>
+
<page-reference>group::platform/administrators::pageManagement</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/console</uri>
+ <name>console</name>
+ <label>#{administration.console}</label>
+
<page-reference>group::platform/administrators::console</page-reference>
+ </node>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,86 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>group::platform/administrators::newAccount</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>newAccount</name>
+ <title>New Account</title>
+ <access-permissions>MembershipType_1:/Group1</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Account</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/administrators::communityManagement</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>communityManagement</name>
+ <title>Community Management</title>
+
<access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/OrganizationPortlet/Organization</instance-id>
+ <title>Community Management</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/administrators::registry</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>registry</name>
+ <title>Registry</title>
+
<access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/ApplicationRegistryPortlet/ApplicationRegistry</instance-id>
+ <title>Application Registry</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/administrators::pageManagement</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>pageManagement</name>
+ <title>Page Management</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/PageManagementPortlet/PageManagement</instance-id>
+ <title>Page Management</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set />
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>platform/guests</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,52 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <priority>9</priority>
+
+ <page-nodes>
+ <node>
+ <uri>register</uri>
+ <name>register</name>
+ <label>#{platform.guests.register}</label>
+ <page-reference>group::platform/guests::register</page-reference>
+ </node>
+
+ <node>
+ <uri>link</uri>
+ <name>link</name>
+ <label>#{platform.guests.link}</label>
+ <page-reference>group::platform/guests::link</page-reference>
+ </node>
+
+ <node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>#{platform.guests.sitemap}</label>
+ <page-reference>group::platform/guests::sitemap</page-reference>
+ </node>
+
+ </page-nodes>
+
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,73 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>group::platform/guests::register</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <name>register</name>
+ <title>Register</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/guests:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Account</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/guests::sitemap</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <name>sitemap</name>
+ <title>Site Map</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/guests:/web/SiteMapPortlet/sitemapportlet</instance-id>
+ <title>SiteMap</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/guests::link</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <name>link</name>
+ <title>Link</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/guests:/web/IFramePortlet/blog</instance-id>
+ <title>Blog</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+</page-set>
+
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <window-id>group#platform/guests:/web/IFramePortlet/blog</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://blog.exoplatform.org</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>/platform/users</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,70 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <priority>8</priority>
+
+ <page-nodes>
+ <node>
+ <uri>dashboard</uri>
+ <name>dashboard</name>
+ <label>#{platform.users.dashboard}</label>
+ <page-reference>group::/platform/users::dashboard</page-reference>
+ </node>
+
+ <node>
+ <uri>mylink</uri>
+ <name>mylink</name>
+ <label>#{platform.users.mylink}</label>
+
+ <node>
+ <uri>mylink/blog</uri>
+ <name>blog</name>
+ <label>#{platform.users.mylink-blog}</label>
+ <page-reference>group::/platform/users::mylink-blog</page-reference>
+ </node>
+
+ <node>
+ <uri>mylink/google</uri>
+ <name>google</name>
+ <label>#{platform.users.mylink-google}</label>
+ <page-reference>group::/platform/users::mylink-google</page-reference>
+ </node>
+
+ <node>
+ <uri>mylink/facebooks</uri>
+ <name>facebooks</name>
+ <label>#{platform.users.mylink-facebook}</label>
+
<page-reference>group::/platform/users::mylink-facebook</page-reference>
+ </node>
+ </node>
+
+ <node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>#{platform.users.sitemap}</label>
+ <page-reference>group::/platform/users::sitemap</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,121 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>group::/platform/users::dashboard</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>dashboard</name>
+ <title>Dashboard</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/dashboard/DashboardPortlet/Dashboard</instance-id>
+ <title>Dashboard</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::webexplorer</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>webexplorer</name>
+ <title>Web Explorer</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
+ <title>Web Explorer</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::mylink-blog</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>mylink-blog</name>
+ <title>Blog</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/IFramePortlet/blog</instance-id>
+ <title>Blog</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::mylink-google</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>mylink-google</name>
+ <title>Google</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/IFramePortlet/google</instance-id>
+ <title>Google</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::mylink-facebook</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>mylink-facebook</name>
+ <title>FaceBook</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/IFramePortlet/facebook</instance-id>
+ <title>FaceBook</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::sitemap</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>sitemap</name>
+ <title>Site Map</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/SiteMapPortlet/sitemapportlet</instance-id>
+ <title>SiteMap</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+</page-set>
+
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <window-id>group#/platform/users:/web/IFramePortlet/blog</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://blog.exoplatform.org</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <window-id>group#/platform/users:/web/IFramePortlet/google</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://www.google.com</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <window-id>group#/platform/users:/web/IFramePortlet/facebook</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://www.facebook.com</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1
http://www.gatein.org/xml/ns/gatein_objects_1_1"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_1">
+ <portal-name>@owner@</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <properties>
+ <entry key="sessionAlive">onDemand</entry>
+ </properties>
+
+ <portal-layout>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>LogoPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>url</name>
+ <value>/eXoResources/skin/sharedImages/GroupIcon.png</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>NavigationPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>CSSClassName</name>
+ <value>GroupNavigation</value>
+ <read-only>true</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ <page-body>
+ </page-body>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>FooterPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>test/legacy</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <page-body> </page-body>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>test/legacy</owner-id>
+ <priority>9</priority>
+
+ <page-nodes>
+ <node>
+ <uri>register</uri>
+ <name>register</name>
+ <label>#{platform.guests.register}</label>
+ <page-reference>group::test/legacy::register</page-reference>
+ </node>
+
+ </page-nodes>
+
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<page-set>
+
+ <page>
+ <page-id>group::test/legacy::bilto</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>test/legacy</owner-id>
+ <name>register</name>
+ <title>TestTitle</title>
+ <access-permissions>*:/test/legacy</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+ <instance-id>group#test/legacy:/web/IFramePortlet/blog</instance-id>
+ <title>New Account</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
+
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>test/legacy</owner-id>
+ <window-id>group#test/legacy:/web/IFramePortlet/blog</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://blog.exoplatform.org</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>/test/normalized</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <page-body> </page-body>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>/test/normalized</owner-id>
+ <priority>9</priority>
+
+ <page-nodes>
+ <node>
+ <uri>register</uri>
+ <name>register</name>
+ <label>#{platform.guests.register}</label>
+ <page-reference>group::/test/normalized::register</page-reference>
+ </node>
+
+ </page-nodes>
+
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<page-set>
+
+ <page>
+ <page-id>group::/test/normalized::register</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/test/normalized</owner-id>
+ <name>register</name>
+ <title>TestTitle</title>
+ <access-permissions>*:/platform/normalized/legacy</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/test/normalized:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Account</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
+
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/test/normalized</owner-id>
+
<window-id>group#/test/normalized:/exoadmin/AccountPortlet/Account</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://blog.exoplatform.org</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+ <page-reference>
+ portal::classic::homepage
+ </page-reference>
+ </node>
+ <node>
+ <uri>webexplorer</uri>
+ <name>webexplorer</name>
+ <label>#{portal.classic.webexplorer}</label>
+ <page-reference>portal::classic::webexplorer</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,61 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>portal::classic::homepage</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>homepage</name>
+ <title>Home Page</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>portal#classic:/web/HomePagePortlet/homepageportlet</instance-id>
+ <title>Home Page portlet</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>false</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <properties>
+ <entry key="locationX">23432</entry>
+ <entry key="locationY">343534</entry>
+ </properties>
+ </application>
+ </page>
+
+ <page>
+ <page-id>portal::classic::webexplorer</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>webexplorer</name>
+ <title>Web Explorer</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
+ <title>Web Explorer</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>classic</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <label>Classic</label>
+ <description>This is classic portal for testing</description>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,68 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <window-id>portal#classic:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <window-id>portal#classic:/web/FooterPortlet/footer</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <window-id>portal#classic:/web/GroovyPortlet/groovyportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+
<window-id>portal#classic:/web/HomePagePortlet/homepageportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>system</owner-id>
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+ <page-reference>portal::classic::homepage</page-reference>
+ </node>
+ <node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>#{portal.classic.sitemap}</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::sitemap</page-reference>
+ </node>
+ <node>
+ <uri>groupnavigation</uri>
+ <name>groupnavigation</name>
+ <label>#{portal.classic.groupnavigation}</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::classic::groupnavigation</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,22 @@
+<?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.
+ -->
+
+<page-set>
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,31 @@
+<?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.
+ -->
+
+<portal-config>
+ <portal-name>system</portal-name>
+ <locale>en</locale>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <skin>test_skin</skin>
+
+ <portal-layout>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>Home</label>
+ <page-reference>portal::@owner@::sitemap</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,42 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>portal::@owner@::sitemap</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <name>sitemap</name>
+ <title>Site Map</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>portal#@owner@:/web/SiteMapPortlet/sitemapportlet</instance-id>
+ <title>Site Map portlet</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,55 @@
+<?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.
+
+-->
+
+<portal-config>
+ <portal-name>@owner@</portal-name>
+ <locale>en</locale>
+ <!--<factory-id>office</factory-id>-->
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#@owner@:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#@owner@:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#@owner@:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#@owner@:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <window-id>portal#portalclassic:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <window-id>portal#portalclassic:/web/FooterPortlet/footer</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+
<window-id>portal#portalclassic:/web/GroovyPortlet/groovyportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>uri</uri>
+ <name>name</name>
+ <label>label</label>
+ <page-reference>portal::@owner@::index</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,34 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <name>index</name>
+ <application>
+ <instance-id>portal#@owner@:/web/BannerPortlet/banner</instance-id>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,41 @@
+<?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.
+
+-->
+
+<portal-config>
+ <portal-name>@owner@</portal-name>
+ <locale>en</locale>
+ <access-permissions>access_permission</access-permissions>
+ <edit-permission>edit_permission</edit-permission>
+ <skin>skin</skin>
+
+ <properties>
+ <entry key="prop_key">test_prop_value</entry>
+ </properties>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#@owner@:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <page-body> </page-body>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>@owner@</owner-id>
+ <window-id>portal#@owner@:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2000-03-21T01:33:00</start-publication-date>
+ <end-publication-date>2009-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name1</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2000-03-21T01:33:00</start-publication-date>
+ <end-publication-date>2050-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name2</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2050-03-21T01:33:00</start-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name3</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+ <end-publication-date>2050-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name4</name>
+ <label>node_label4</label>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,98 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>portal::test::test1</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test1</name>
+ <title>test_title</title>
+ <factory-id>test_factory_id</factory-id>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <show-max-window>true</show-max-window>
+ <container
+ template="container_1_template"
+ decorator="container_1_decorator"
+ width="container_1_width"
+ height="container_1_height">
+ <name>container_1</name>
+ <title>container_1_title</title>
+ <icon>container_1_icon</icon>
+
<access-permissions>container_1_access_permissions</access-permissions>
+ <factory-id>container_1_factory_id</factory-id>
+ <description>container_1_description</description>
+ </container>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ <application-type>application_1_type</application-type>
+ <theme>application_1_theme</theme>
+ <title>application_1_title</title>
+
<access-permissions>application_1_access_permissions</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ <description>application_1_description</description>
+ <icon>application_1_icon</icon>
+ <width>application_1_width</width>
+ <height>application_1_height</height>
+ <properties>
+ <entry key="prop_key">application_1_prop_value</entry>
+ </properties>
+ </application>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test2</name>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test3</name>
+ <application>
+
<instance-id>portal#notexisting:/web/BannerPortlet/banner2</instance-id>
+ </application>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test4</name>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <container>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <application>
+ <instance-id>portal#test:/web/FooterPortlet/footer</instance-id>
+ </application>
+ </container>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,58 @@
+<?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.
+
+-->
+
+<portal-config>
+ <portal-name>test</portal-name>
+ <locale>en</locale>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <skin>test_skin</skin>
+
+ <properties>
+ <entry key="prop_key">test_prop_value</entry>
+ </properties>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#test:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#test:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#test:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,69 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/FooterPortlet/footer</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/GroovyPortlet/groovyportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/HomePagePortlet/homepageportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<container>
+ <name>rootName</name>
+ <container id="childNode1">
+ <name>childNode</name>
+ </container>
+ <container id="childNode1">
+ <name>childNode</name>
+ </container>
+ <container id="childNode1">
+ <name>childNode</name>
+ </container>
+</container>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,48 @@
+<?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.
+
+-->
+
+<container
template="classpath:groovy/dashboard/webui/component/UIColumnContainer.gtmpl">
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calendar</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calculator</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Todo</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/rssAggregator</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+</container>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,30 @@
+<?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.
+
+-->
+
+<container
template="classpath:groovy/dashboard/webui/component/UIColumnContainer.gtmpl">
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calendar</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+</container>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,42 @@
+<?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.
+
+-->
+
+<container
template="classpath:groovy/dashboard/webui/component/UIColumnContainer.gtmpl">
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calendar</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calculator</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/rssAggregator</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+</container>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+
+<container
template="classpath:groovy/dashboard/webui/component/UIColumnContainer.gtmpl">
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calendar</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+ <container
template="classpath:groovy/dashboard/webui/component/UIContainer.gtmpl">
+ <application>
+ <instance-id>/eXoGadgets/Calculator</instance-id>
+ <application-type>eXoGadget</application-type>
+ </application>
+ </container>
+</container>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <portlet-application>
+ <portlet>
+ <application-ref>dashboard</application-ref>
+ <portlet-ref>DashboardPortlet</portlet-ref>
+ </portlet>
+ <title>Dashboard</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ </portlet-application>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,27 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ <container
template='system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl'>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ </container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ </container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,30 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,34 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template='system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl'>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ </container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <title></title>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <container
template="system:/groovy/portal/webui/container/UITabContainer.gtmpl">
+ <factory-id>TabContainer</factory-id>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ </container>
+ </container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,31 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ </container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,32 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template='system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl'>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+ </container>
+ <container
template='system:/groovy/portal/webui/container/UIContainer.gtmpl'></container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,29 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl"></container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set/>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,55 @@
+<?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.
+
+-->
+
+<page>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <name></name>
+ <title></title>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <container
template="system:/groovy/portal/webui/container/UITabContainer.gtmpl">
+ <factory-id>TabContainer</factory-id>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <portlet-application>
+ <portlet>
+ <application-ref>exoadmin</application-ref>
+ <portlet-ref>AccountPortlet</portlet-ref>
+ </portlet>
+ <title>New Account</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ </portlet-application>
+ </container>
+ <container
template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>SiteMapPortlet</portlet-ref>
+ </portlet>
+ <title>Sitemap Portlet</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ </portlet-application>
+ </container>
+ </container>
+ </container>
+</page>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,45 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+ <portlet-preferences>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <window-id>/exoadmin/AccountPortlet</window-id>
+ <preference>
+ <name>NewAccountPreference</name>
+ <value>Preference value for Account portlet</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type></owner-type>
+ <owner-id></owner-id>
+ <window-id>/web/SiteMapPortlet</window-id>
+ <preference>
+ <name>SitemapPreference</name>
+ <value>Preference value for Sitemap portlet</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+</portlet-preferences-set>
\ No newline at end of file
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>root</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <page-body> </page-body>
+
+ <portlet-application>
+ <portlet>
+ <application-ref>overwrite_application_ref</application-ref>
+ <portlet-ref>overwrite_portlet_ref</portlet-ref>
+ </portlet>
+ </portlet-application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>user</owner-type>
+ <owner-id>@owner@</owner-id>
+ <priority>3</priority>
+
+ <page-nodes />
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<page-set />
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>@owner@</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+
+ <page-body/>
+ <portlet-application>
+ <portlet>
+ <application-ref>foo</application-ref>
+ <portlet-ref>bar</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <show-info-bar>false</show-info-bar>
+ </portlet-application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <name>foo</name>
+ <icon>foo_icon</icon>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+ <parent-uri>foo</parent-uri>
+ <node>
+ <name>bar</name>
+ <icon>bar_icon</icon>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <name>foo</name>
+ <icon>foo_icon_1</icon>
+ <node>
+ <name>juu</name>
+ <icon>juu_icon</icon>
+ </node>
+ </node>
+ <node>
+ <name>daa</name>
+ <icon>daa_icon</icon>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <name>foo</name>
+ <icon>foo_icon_2</icon>
+ </node>
+ <node>
+ <name>bar</name>
+ <icon>bar_icon</icon>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<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">
+
+ <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>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>initializing.failure.ignore</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="predefinedOwner">
+ <collection type="java.util.HashSet">
+ <value>
+ <string>classic</string>
+ </value>
+ <value>
+ <string>large</string>
+ </value>
+ <value>
+ <string>test</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+
<string>classpath:/org/exoplatform/portal/mop/navigation</string>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+</configuration>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+ <page-reference>
+ portal::classic::homepage
+ </page-reference>
+ </node>
+ <node>
+ <uri>webexplorer</uri>
+ <name>webexplorer</name>
+ <label>#{portal.classic.webexplorer}</label>
+ <page-reference>portal::classic::webexplorer</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<page-set>
+
+ <page>
+ <page-id>portal::classic::homepage</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>homepage</name>
+ <title>Home Page</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>portal#classic:/web/HomePagePortlet/homepageportlet</instance-id>
+ <title>Home Page portlet</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>false</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <properties>
+ <entry key="locationX">23432</entry>
+ <entry key="locationY">343534</entry>
+ </properties>
+ </application>
+ </page>
+
+ <page>
+ <page-id>portal::classic::webexplorer</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>webexplorer</name>
+ <title>Web Explorer</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
+ <title>Web Explorer</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>large</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>a</uri>
+ <name>a</name>
+ <label>A</label>
+ <node>
+ <uri>c</uri>
+ <name>c</name>
+ <label>C</label>
+ </node>
+ </node>
+ <node>
+ <uri>b</uri>
+ <name>b</name>
+ <label>B</label>
+ <node>
+ <uri>d</uri>
+ <name>d</name>
+ <label>D</label>
+ <node>
+ <uri>e</uri>
+ <name>e</name>
+ <label>E</label>
+ </node>
+ </node>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2000-03-21T01:33:00</start-publication-date>
+ <end-publication-date>2009-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name1</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2000-03-21T01:33:00</start-publication-date>
+ <end-publication-date>2050-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name2</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2050-03-21T01:33:00</start-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name3</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+ <end-publication-date>2050-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name4</name>
+ <label>node_label4</label>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<page-set>
+
+ <page>
+ <page-id>portal::test::test1</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test1</name>
+ <title>test_title</title>
+ <factory-id>test_factory_id</factory-id>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <show-max-window>true</show-max-window>
+ <container
+ template="container_1_template"
+ decorator="container_1_decorator"
+ width="container_1_width"
+ height="container_1_height">
+ <name>container_1</name>
+ <title>container_1_title</title>
+ <icon>container_1_icon</icon>
+
<access-permissions>container_1_access_permissions</access-permissions>
+ <factory-id>container_1_factory_id</factory-id>
+ <description>container_1_description</description>
+ </container>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ <application-type>application_1_type</application-type>
+ <theme>application_1_theme</theme>
+ <title>application_1_title</title>
+
<access-permissions>application_1_access_permissions</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ <description>application_1_description</description>
+ <icon>application_1_icon</icon>
+ <width>application_1_width</width>
+ <height>application_1_height</height>
+ <properties>
+ <entry key="prop_key">application_1_prop_value</entry>
+ </properties>
+ </application>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test2</name>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test3</name>
+ <application>
+
<instance-id>portal#notexisting:/web/BannerPortlet/banner2</instance-id>
+ </application>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test4</name>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <container>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <application>
+ <instance-id>portal#test:/web/FooterPortlet/footer</instance-id>
+ </application>
+ </container>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<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">
+
+ <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>
+ <init-params>
+ <value-param>
+ <name>default.portal</name>
+ <value>classic</value>
+ </value-param>
+ <value-param>
+ <name>initializing.failure.ignore</name>
+ <value>true</value>
+ </value-param>
+ <value-param>
+ <name>page.templates.location</name>
+ <value>classpath:/portal/template/pages</value>
+ </value-param>
+ <object-param>
+ <name>portal.configuration</name>
+ <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>
+ <value>
+ <string>system</string>
+ </value>
+ <value>
+ <string>extended</string>
+ </value>
+ <value>
+ <string>limited</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>portal</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/mop/user</string>
+ </field>
+ </object>
+ </object-param>
+ <object-param>
+ <name>group.configuration</name>
+ <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>organization/management/executive-board</string>
+ </value>
+ </collection>
+ </field>
+ <field name="ownerType">
+ <string>group</string>
+ </field>
+ <field name="templateLocation">
+ <string>classpath:/org/exoplatform/portal/mop/user</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>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <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>manager</string></field>
+ <field name="description"><string>manager
membership type</string></field>
+ </object>
+ </value>
+ <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>validator</string></field>
+ <field name="description"><string>validator
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>administrators</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/administrators group</string></field>
+ <field
name="label"><string>Administrators</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>guests</string></field>
+ <field
name="parentId"><string>/platform</string></field>
+ <field name="description"><string>the
/platform/guests group</string></field>
+ <field
name="label"><string>Guests</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>organization</string></field>
+ <field
name="parentId"><string></string></field>
+ <field name="description"><string>the
organization group</string></field>
+ <field
name="label"><string>Organization</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>management</string></field>
+ <field
name="parentId"><string>/organization</string></field>
+ <field name="description"><string>the
/organization/management group</string></field>
+ <field
name="label"><string>Management</string></field>
+ </object>
+ </value>
+ <value>
+ <object
type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field
name="name"><string>executive-board</string></field>
+ <field
name="parentId"><string>/organization/management</string></field>
+ <field name="description"><string>the
/organization/management/executive-board group</string></field>
+ <field name="label"><string>Executive
Board</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>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>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/guests,member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ </external-component-plugins>
+
+</configuration>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>organization/management/executive-board</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,50 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>organization/management/executive-board</owner-id>
+ <priority>5</priority>
+
+ <page-nodes>
+ <node>
+ <uri>organization</uri>
+ <name>organization</name>
+ <label>#{organization.title}</label>
+
+ <node>
+ <uri>organization/newStaff</uri>
+ <name>newStaff</name>
+ <label>#{organization.newstaff}</label>
+
<page-reference>group::organization/management/executive-board::newStaff</page-reference>
+ </node>
+
+ <node>
+ <uri>organization/management</uri>
+ <name>management</name>
+ <label>#{organization.management}</label>
+
<page-reference>group::organization/management/executive-board::management</page-reference>
+ </node>
+ </node>
+
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+
<page-id>group::organization/management/executive-board::newStaff</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>organization/management/executive-board</owner-id>
+ <name>newStaff</name>
+ <title>New Staff</title>
+
<access-permissions>*:/organization/management/executive-board</access-permissions>
+
<edit-permission>manager:/organization/management/executive-board</edit-permission>
+
+ <application>
+
<instance-id>group#organization/management/executive-board:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Staff</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ </application>
+ </page>
+
+ <page>
+
<page-id>group::organization/management/executive-board::management</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>organization/management/executive-board</owner-id>
+ <name>management</name>
+ <title>Organization Management</title>
+
<access-permissions>*:/organization/management/executive-board</access-permissions>
+
<edit-permission>manager:/organization/management/executive-board</edit-permission>
+
+ <application>
+
<instance-id>group#organization/management/executive-board:/exoadmin/OrganizationPortlet/Organization</instance-id>
+ <title>Organization Management</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set />
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1
http://www.gatein.org/xml/ns/gatein_objects_1_1"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_1">
+ <portal-name>platform/administrators</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,70 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <priority>2</priority>
+
+ <page-nodes>
+ <node>
+ <uri>administration</uri>
+ <name>administration</name>
+ <label>#{administration.title}</label>
+
+ <node>
+ <uri>administration/registry</uri>
+ <name>registry</name>
+ <label>#{administration.application-registry}</label>
+ <page-reference>group::platform/administrators::registry</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/newAccount</uri>
+ <name>newAccount</name>
+ <label>#{administration.newAccount}</label>
+
<page-reference>group::platform/administrators::newAccount</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/communityManagement</uri>
+ <name>communityManagement</name>
+ <label>#{administration.community-management}</label>
+
<page-reference>group::platform/administrators::communityManagement</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/pageManagement</uri>
+ <name>i18n</name>
+ <label>#{administration.pageManagement}</label>
+
<page-reference>group::platform/administrators::pageManagement</page-reference>
+ </node>
+
+ <node>
+ <uri>administration/console</uri>
+ <name>console</name>
+ <label>#{administration.console}</label>
+
<page-reference>group::platform/administrators::console</page-reference>
+ </node>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,86 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>group::platform/administrators::newAccount</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>newAccount</name>
+ <title>New Account</title>
+ <access-permissions>MembershipType_1:/Group1</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Account</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/administrators::communityManagement</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>communityManagement</name>
+ <title>Community Management</title>
+
<access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/OrganizationPortlet/Organization</instance-id>
+ <title>Community Management</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/administrators::registry</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>registry</name>
+ <title>Registry</title>
+
<access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/ApplicationRegistryPortlet/ApplicationRegistry</instance-id>
+ <title>Application Registry</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/administrators::pageManagement</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/administrators</owner-id>
+ <name>pageManagement</name>
+ <title>Page Management</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/administrators:/exoadmin/PageManagementPortlet/PageManagement</instance-id>
+ <title>Page Management</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,23 @@
+<?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.
+
+-->
+
+<portlet-preferences-set />
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>platform/guests</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,52 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <priority>9</priority>
+
+ <page-nodes>
+ <node>
+ <uri>register</uri>
+ <name>register</name>
+ <label>#{platform.guests.register}</label>
+ <page-reference>group::platform/guests::register</page-reference>
+ </node>
+
+ <node>
+ <uri>link</uri>
+ <name>link</name>
+ <label>#{platform.guests.link}</label>
+ <page-reference>group::platform/guests::link</page-reference>
+ </node>
+
+ <node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>#{platform.guests.sitemap}</label>
+ <page-reference>group::platform/guests::sitemap</page-reference>
+ </node>
+
+ </page-nodes>
+
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,73 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>group::platform/guests::register</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <name>register</name>
+ <title>Register</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/guests:/exoadmin/AccountPortlet/Account</instance-id>
+ <title>New Account</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/guests::sitemap</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <name>sitemap</name>
+ <title>Site Map</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/guests:/web/SiteMapPortlet/sitemapportlet</instance-id>
+ <title>SiteMap</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::platform/guests::link</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <name>link</name>
+ <title>Link</title>
+ <access-permissions>*:/platform/guests</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/guests:/web/IFramePortlet/blog</instance-id>
+ <title>Blog</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+</page-set>
+
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,36 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>platform/guests</owner-id>
+ <window-id>group#platform/guests:/web/IFramePortlet/blog</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://blog.exoplatform.org</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>/platform/users</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,70 @@
+<?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.
+
+-->
+
+<node-navigation>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <priority>8</priority>
+
+ <page-nodes>
+ <node>
+ <uri>dashboard</uri>
+ <name>dashboard</name>
+ <label>#{platform.users.dashboard}</label>
+ <page-reference>group::/platform/users::dashboard</page-reference>
+ </node>
+
+ <node>
+ <uri>mylink</uri>
+ <name>mylink</name>
+ <label>#{platform.users.mylink}</label>
+
+ <node>
+ <uri>mylink/blog</uri>
+ <name>blog</name>
+ <label>#{platform.users.mylink-blog}</label>
+ <page-reference>group::/platform/users::mylink-blog</page-reference>
+ </node>
+
+ <node>
+ <uri>mylink/google</uri>
+ <name>google</name>
+ <label>#{platform.users.mylink-google}</label>
+ <page-reference>group::/platform/users::mylink-google</page-reference>
+ </node>
+
+ <node>
+ <uri>mylink/facebooks</uri>
+ <name>facebooks</name>
+ <label>#{platform.users.mylink-facebook}</label>
+
<page-reference>group::/platform/users::mylink-facebook</page-reference>
+ </node>
+ </node>
+
+ <node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>#{platform.users.sitemap}</label>
+ <page-reference>group::/platform/users::sitemap</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,121 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>group::/platform/users::dashboard</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>dashboard</name>
+ <title>Dashboard</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/dashboard/DashboardPortlet/Dashboard</instance-id>
+ <title>Dashboard</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::webexplorer</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>webexplorer</name>
+ <title>Web Explorer</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
+ <title>Web Explorer</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::mylink-blog</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>mylink-blog</name>
+ <title>Blog</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/IFramePortlet/blog</instance-id>
+ <title>Blog</title>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::mylink-google</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>mylink-google</name>
+ <title>Google</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/IFramePortlet/google</instance-id>
+ <title>Google</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::mylink-facebook</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>mylink-facebook</name>
+ <title>FaceBook</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/IFramePortlet/facebook</instance-id>
+ <title>FaceBook</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </application>
+ </page>
+
+ <page>
+ <page-id>group::/platform/users::sitemap</page-id>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <name>sitemap</name>
+ <title>Site Map</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#/platform/users:/web/SiteMapPortlet/sitemapportlet</instance-id>
+ <title>SiteMap</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+</page-set>
+
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,57 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <window-id>group#/platform/users:/web/IFramePortlet/blog</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://blog.exoplatform.org</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <window-id>group#/platform/users:/web/IFramePortlet/google</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://www.google.com</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>group</owner-type>
+ <owner-id>/platform/users</owner-id>
+ <window-id>group#/platform/users:/web/IFramePortlet/facebook</window-id>
+ <preference>
+ <name>url</name>
+ <value>http://www.facebook.com</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+ <page-reference>
+ portal::classic::homepage
+ </page-reference>
+ </node>
+ <node>
+ <uri>webexplorer</uri>
+ <name>webexplorer</name>
+ <label>#{portal.classic.webexplorer}</label>
+ <page-reference>portal::classic::webexplorer</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,61 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>portal::classic::homepage</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>homepage</name>
+ <title>Home Page</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>portal#classic:/web/HomePagePortlet/homepageportlet</instance-id>
+ <title>Home Page portlet</title>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>false</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <properties>
+ <entry key="locationX">23432</entry>
+ <entry key="locationY">343534</entry>
+ </properties>
+ </application>
+ </page>
+
+ <page>
+ <page-id>portal::classic::webexplorer</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <name>webexplorer</name>
+ <title>Web Explorer</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <application>
+
<instance-id>group#platform/users:/web/BrowserPortlet/WebExplorer</instance-id>
+ <title>Web Explorer</title>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>classic</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <label>Classic</label>
+ <description>This is classic portal for testing</description>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#classic:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#classic:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#classic:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#classic:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,68 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <window-id>portal#classic:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <window-id>portal#classic:/web/FooterPortlet/footer</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+ <window-id>portal#classic:/web/GroovyPortlet/groovyportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>classic</owner-id>
+
<window-id>portal#classic:/web/HomePagePortlet/homepageportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <uri>foo</uri>
+ <name>foo</name>
+ <label>foo_label</label>
+ </node>
+ <node>
+ <uri>bar</uri>
+ <name>bar</name>
+ <label xml:lang="en">bar_label_en</label>
+ <label xml:lang="fr">bar_label_fr</label>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<portal-config>
+ <portal-name>extended</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portal-layout>
+ </portal-layout>
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2011 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<node-navigation
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_2
http://www.gatein.org/xml/ns/gatein_objects_1_2"
+
xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2">
+ <priority>1</priority>
+ <page-nodes>
+
+ <!-- Node with /platform/administrator permission -->
+ <node>
+ <uri>foo</uri>
+ <name>foo</name>
+ <page-reference>portal::limited::foo</page-reference>
+ </node>
+
+ <!-- Node with /platform/user permission -->
+ <node>
+ <uri>bar</uri>
+ <name>bar</name>
+ <page-reference>portal::limited::bar</page-reference>
+ </node>
+
+ <!-- Node with everyone permission -->
+ <node>
+ <uri>bit</uri>
+ <name>bit</name>
+ <page-reference>portal::limited::bit</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2011 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<page-set>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>limited</owner-id>
+ <name>foo</name>
+ <access-permissions>*:/platform/administrators</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>limited</owner-id>
+ <name>bar</name>
+ <access-permissions>*:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>limited</owner-id>
+ <name>bit</name>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ </page>
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2011 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<portal-config>
+ <portal-name>limited</portal-name>
+ <locale>en</locale>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portal-layout>
+ </portal-layout>
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>system</owner-id>
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+ <page-reference>portal::classic::homepage</page-reference>
+ </node>
+ <node>
+ <uri>sitemap</uri>
+ <name>sitemap</name>
+ <label>#{portal.classic.sitemap}</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::sitemap</page-reference>
+ </node>
+ <node>
+ <uri>groupnavigation</uri>
+ <name>groupnavigation</name>
+ <label>#{portal.classic.groupnavigation}</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::classic::groupnavigation</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,22 @@
+<?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.
+ -->
+
+<page-set>
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,31 @@
+<?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.
+ -->
+
+<portal-config>
+ <portal-name>system</portal-name>
+ <locale>en</locale>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <skin>test_skin</skin>
+
+ <portal-layout>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2011 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ -->
+
+<node-navigation>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <priority>1</priority>
+
+ <page-nodes>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2000-03-21T01:33:00</start-publication-date>
+ <end-publication-date>2009-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name1</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2000-03-21T01:33:00</start-publication-date>
+ <end-publication-date>2050-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name2</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+
<start-publication-date>2050-03-21T01:33:00</start-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name3</name>
+ <label>node_label</label>
+ <icon>node_icon</icon>
+ <end-publication-date>2050-03-21T01:33:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ <node>
+ <uri>node_uri</uri>
+ <name>node_name4</name>
+ <label>node_label4</label>
+ <page-reference>portal::test::test1</page-reference>
+ </node>
+ </page-nodes>
+</node-navigation>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,98 @@
+<?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.
+
+-->
+
+<page-set>
+
+ <page>
+ <page-id>portal::test::test1</page-id>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test1</name>
+ <title>test_title</title>
+ <factory-id>test_factory_id</factory-id>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <show-max-window>true</show-max-window>
+ <container
+ template="container_1_template"
+ decorator="container_1_decorator"
+ width="container_1_width"
+ height="container_1_height">
+ <name>container_1</name>
+ <title>container_1_title</title>
+ <icon>container_1_icon</icon>
+
<access-permissions>container_1_access_permissions</access-permissions>
+ <factory-id>container_1_factory_id</factory-id>
+ <description>container_1_description</description>
+ </container>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ <application-type>application_1_type</application-type>
+ <theme>application_1_theme</theme>
+ <title>application_1_title</title>
+
<access-permissions>application_1_access_permissions</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ <description>application_1_description</description>
+ <icon>application_1_icon</icon>
+ <width>application_1_width</width>
+ <height>application_1_height</height>
+ <properties>
+ <entry key="prop_key">application_1_prop_value</entry>
+ </properties>
+ </application>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test2</name>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test3</name>
+ <application>
+
<instance-id>portal#notexisting:/web/BannerPortlet/banner2</instance-id>
+ </application>
+ </page>
+
+ <page>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <name>test4</name>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <container>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ </application>
+ <application>
+ <instance-id>portal#test:/web/FooterPortlet/footer</instance-id>
+ </application>
+ </container>
+ </page>
+
+</page-set>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,58 @@
+<?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.
+
+-->
+
+<portal-config>
+ <portal-name>test</portal-name>
+ <locale>en</locale>
+ <access-permissions>test_access_permissions</access-permissions>
+ <edit-permission>test_edit_permission</edit-permission>
+ <skin>test_skin</skin>
+
+ <properties>
+ <entry key="prop_key">test_prop_value</entry>
+ </properties>
+
+ <portal-layout>
+ <application>
+ <instance-id>portal#test:/web/BannerPortlet/banner</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+ <instance-id>portal#test:/web/NavigationPortlet/toolbar</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <application>
+
<instance-id>portal#test:/web/BreadcumbsPortlet/breadcumbs</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+
+ <page-body> </page-body>
+
+ <application>
+ <instance-id>portal#test:/web/FooterPortlet/footer</instance-id>
+ <show-info-bar>false</show-info-bar>
+ </application>
+ </portal-layout>
+
+</portal-config>
Added:
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml
===================================================================
---
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml
(rev 0)
+++
portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml 2011-07-22
03:13:14 UTC (rev 6912)
@@ -0,0 +1,69 @@
+<?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.
+
+-->
+
+<portlet-preferences-set>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/BannerPortlet/banner</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/FooterPortlet/footer</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIFooterPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/GroovyPortlet/groovyportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>par:/groovy/groovy/webui/component/UIGroovyPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+ <portlet-preferences>
+ <owner-type>portal</owner-type>
+ <owner-id>test</owner-id>
+ <window-id>portal#test:/web/HomePagePortlet/homepageportlet</window-id>
+ <preference>
+ <name>template</name>
+
<value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </portlet-preferences>
+
+</portlet-preferences-set>