gatein SVN: r7178 - epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: theute
Date: 2011-08-18 15:06:18 -0400 (Thu, 18 Aug 2011)
New Revision: 7178
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
Log:
JBEPP-1088
Use list instead of textfield in page management when adding a page
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2011-08-18 18:49:41 UTC (rev 7177)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageForm.java 2011-08-18 19:06:18 UTC (rev 7178)
@@ -35,6 +35,8 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
+import org.exoplatform.portal.webui.portal.UIPortal;
+import org.exoplatform.portal.webui.portal.UIPortalComponent;
import org.exoplatform.portal.webui.portal.UIPortalComposer;
import org.exoplatform.portal.webui.util.PortalDataMapper;
import org.exoplatform.portal.webui.util.Util;
@@ -83,6 +85,8 @@
protected UIFormInputSet uiPermissionSetting;
protected UIFormSelectBox groupIdSelectBox = null;
+
+ protected UIFormSelectBox portalIdSelectBox = null;
protected UIFormStringInput ownerIdInput = null;
@@ -99,14 +103,6 @@
List<SelectItemOption<String>> ownerTypes = new ArrayList<SelectItemOption<String>>();
ownerTypes.add(new SelectItemOption<String>(PortalConfig.USER_TYPE));
- UserPortalConfig userPortalConfig =
- configService.getUserPortalConfig(pcontext.getPortalOwner(), pcontext.getRemoteUser());
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
- if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
- {
- ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
- }
ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());
@@ -146,6 +142,27 @@
//TODO: This following line is fixed for bug PORTAL-2127
uiListPermissionSelector.getChild(UIFormPopupWindow.class).setId("UIPageFormPopupGroupMembershipSelector");
+ List<String> portals = configService.getAllPortalNames();
+ Collections.sort(portals);
+ List<SelectItemOption<String>> portalsItem = new ArrayList<SelectItemOption<String>>();
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
+ for (String p : portals)
+ {
+ UserPortalConfig userPortalConfig = configService.getUserPortalConfig(p, pcontext.getRemoteUser());
+ if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
+ {
+ portalsItem.add(new SelectItemOption<String>(p));
+ }
+ }
+ if(portalsItem.size() > 0)
+ {
+ ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
+ portalIdSelectBox = new UIFormSelectBox(OWNER_ID, OWNER_ID, portalsItem);
+ portalIdSelectBox.setOnChange("ChangeOwnerId");
+ portalIdSelectBox.setParent(uiSettingSet);
+ }
+
List<String> groups = configService.getMakableNavigations(pcontext.getRemoteUser(), true);
if (groups.size() > 0)
{
@@ -160,6 +177,7 @@
groupIdSelectBox.setOnChange("ChangeOwnerId");
groupIdSelectBox.setParent(uiSettingSet);
}
+
setActions(new String[]{"Save", "Close"});
}
@@ -201,11 +219,6 @@
uiTemplate.setValue(uiPage.getFactoryId());
}
- public void setEditPermission(String per)
- {
-
- }
-
public void invokeSetBindingBean(Object bean) throws Exception
{
String ownerType = getUIFormSelectBox("ownerType").getValue();
@@ -287,6 +300,43 @@
applications.add(PortalDataMapper.buildModelObject(uiPortlet));
}
+ if (Page.DESKTOP_PAGE.equals(uiPage.getFactoryId()) && !Page.DESKTOP_PAGE.equals(page.getFactoryId()))
+ {
+ page.setShowMaxWindow(false);
+ uiPage.getChildren().clear();
+ page.setChildren(applications);
+
+ PortalDataMapper.toUIPage(uiPage, page);
+ if (page.getChildren() == null)
+ page.setChildren(new ArrayList<ModelObject>());
+
+ pcontext.setFullRender(true);
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
+ return;
+ }
+
+ if (Page.DESKTOP_PAGE.equals(page.getFactoryId()))
+ {
+ uiPage.getChildren().clear();
+ page.setChildren(applications);
+
+ PortalDataMapper.toUIPage(uiPage, page);
+ if (page.getChildren() == null)
+ page.setChildren(new ArrayList<ModelObject>());
+
+ UIPortalToolPanel toolPanel = Util.getUIPortalToolPanel();
+ toolPanel.setShowMaskLayer(true);
+ pcontext.setFullRender(true);
+ UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
+ pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
+ pcontext.getJavascriptManager().addJavascript("eXo.portal.UIPortal.changeComposerSaveButton();");
+ DataStorage dataService = uiPageForm.getApplicationComponent(DataStorage.class);
+ dataService.save(page);
+ return;
+ }
+
List<UIComponent> uiChildren = uiPage.getChildren();
if (uiChildren == null)
{
@@ -315,7 +365,6 @@
}
uiPage.setStorageId(storageId);
- // if(page.getTemplate() == null) page.setTemplate(uiPage.getTemplate()) ;
if (page.getChildren() == null)
page.setChildren(new ArrayList<ModelObject>());
}
@@ -361,12 +410,28 @@
if (PortalConfig.PORTAL_TYPE.equals(ownerType))
{
list.remove(2);
- list.add(2, uiForm.ownerIdInput);
- uiForm.ownerIdInput.setValue(prContext.getPortalOwner());
- uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(
- Util.getUIPortal().getAccessPermissions());
- uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(
- Util.getUIPortal().getEditPermission());
+ list.add(2, uiForm.portalIdSelectBox);
+ String portalIdSelected = uiForm.portalIdSelectBox.getValue();
+ String[] accessPermissions = {};
+ String editPermission = "";
+
+ UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
+ UserPortalConfig userConfig = service.getUserPortalConfig(portalIdSelected, prContext.getRemoteUser());
+ if (userConfig != null)
+ {
+ PortalConfig config = userConfig.getPortalConfig();
+ accessPermissions = config.getAccessPermissions();
+ editPermission = config.getEditPermission();
+ }
+ else
+ {
+ UIPortal uiPortal = Util.getUIPortalApplication().getCachedUIPortal(ownerType, portalIdSelected);
+ accessPermissions = uiPortal.getAccessPermissions();
+ editPermission = uiPortal.getEditPermission();
+ }
+
+ uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
+ uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
}
else
{
@@ -390,13 +455,33 @@
public void execute(Event<UIPageForm> event) throws Exception
{
UIPageForm uiForm = event.getSource();
- String groupIdSelected = uiForm.groupIdSelectBox.getValue();
- groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected : "/" + groupIdSelected;
- String permission = "*:" + groupIdSelected;
- uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new String[]{permission});
- UserACL userACL = uiForm.getApplicationComponent(UserACL.class);
- permission = userACL.getMakableMT() + ":" + groupIdSelected;
- uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
+ UIFormSelectBox uiSelectBox = uiForm.getUIFormSelectBox(OWNER_TYPE);
+ String ownerType = uiSelectBox.getValue();
+ if(PortalConfig.PORTAL_TYPE.equals(ownerType)) {
+ String[] accessPermissions = {};
+ String editPermission = "";
+ String portalIdSelected = uiForm.portalIdSelectBox.getValue();
+ UserPortalConfigService service = uiForm.getApplicationComponent(UserPortalConfigService.class);
+ UserPortalConfig userConfig = service.getUserPortalConfig(portalIdSelected, Util.getPortalRequestContext().getRemoteUser());
+ if (userConfig != null)
+ {
+ PortalConfig config = userConfig.getPortalConfig();
+ accessPermissions = config.getAccessPermissions();
+ editPermission = config.getEditPermission();
+ uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(accessPermissions);
+ uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(editPermission);
+ }
+ }
+ else
+ {
+ String groupIdSelected = uiForm.groupIdSelectBox.getValue();
+ groupIdSelected = groupIdSelected.startsWith("/") ? groupIdSelected : "/" + groupIdSelected;
+ String permission = "*:" + groupIdSelected;
+ uiForm.findFirstComponentOfType(UIListPermissionSelector.class).setValue(new String[]{permission});
+ UserACL userACL = uiForm.getApplicationComponent(UserACL.class);
+ permission = userACL.getMakableMT() + ":" + groupIdSelected;
+ uiForm.findFirstComponentOfType(UIPermissionSelector.class).setValue(permission);
+ }
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
}
}
@@ -406,13 +491,6 @@
public void execute(Event<UIGroupMembershipSelector> event) throws Exception
{
UIPageForm uiForm = event.getSource().getAncestorOfType(UIPageForm.class);
- /*if (!uiForm.getUIStringInput(OWNER_TYPE).getValue().equals(PortalConfig.GROUP_TYPE))
- return;
- String editPer = uiForm.findFirstComponentOfType(UIPermissionSelector.class).getValue();
- if (editPer == null || editPer.length() < 1)
- return;
- String group = editPer.substring(editPer.indexOf("/") + 1);
- uiForm.ownerIdInput.setValue(group);*/
event.getRequestContext().addUIComponentToUpdateByAjax(uiForm.getParent());
}
}
13 years, 5 months
gatein SVN: r7177 - in epp/portal/branches/EPP_5_2_Branch: portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component and 2 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-08-18 14:49:41 -0400 (Thu, 18 Aug 2011)
New Revision: 7177
Added:
epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ShindigClientEndpoint.java
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java
Log:
JBEPP-1002: merge in patches for gadget caching issues in App.Registry
Added: epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ShindigClientEndpoint.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ShindigClientEndpoint.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/core/src/main/java/org/exoplatform/portal/gadget/core/ShindigClientEndpoint.java 2011-08-18 18:49:41 UTC (rev 7177)
@@ -0,0 +1,122 @@
+/*
+ * 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.gadget.core;
+
+import org.exoplatform.container.xml.InitParams;
+import org.exoplatform.container.xml.ValueParam;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.Timer;
+import java.util.TimerTask;
+
+/**
+ * An endpoint to send requests to Shindig from Portal.
+ *
+ * This endpoint is necessary as Shindig does not expose any public API to manipulates
+ * its caches from Portal.
+ *
+ * @author <a href="hoang281283(a)gmail.com">Minh Hoang TO</a>
+ * @date 8/15/11
+ */
+public class ShindigClientEndpoint
+{
+
+ private final long delay;
+
+ private final Timer timer;
+
+ public ShindigClientEndpoint(InitParams params) throws Exception
+ {
+ long delayTime = 1000;
+ if(params != null)
+ {
+ ValueParam delayParam = params.getValueParam("delayTime");
+ delayTime = Long.parseLong(delayParam.getValue());
+ }
+ delay = delayTime;
+ timer = new Timer(true);
+ }
+
+ /**
+ * Etablish URLConnection to shindigURL and post request data to it
+ *
+ * @param requestData
+ * @param shindigURL
+ */
+ public void sendRequest(String requestData, String shindigURL)
+ {
+ timer.schedule(createTimerTask(requestData, shindigURL), delay);
+ }
+
+ private TimerTask createTimerTask(final String requestData, final String shindigURL)
+ {
+ return new TimerTask()
+ {
+ @Override
+ public void run()
+ {
+ OutputStreamWriter out = null;
+ InputStream in = null;
+
+ try
+ {
+ URLConnection conn = new URL(shindigURL).openConnection();
+ conn.setDoOutput(true);
+ out = new OutputStreamWriter(conn.getOutputStream());
+ out.write(requestData);
+ out.flush();
+
+ in = conn.getInputStream(); //Don't remove this if you don't understand!
+ }
+ catch (IOException ioEx)
+ {
+ ioEx.printStackTrace();
+
+ }
+ finally
+ {
+ try
+ {
+ if (out != null)
+ out.close();
+ }
+ catch (IOException ex)
+ {
+ ex.printStackTrace();
+ }
+
+ try
+ {
+ if (in != null)
+ in.close();
+ }
+ catch (IOException ex)
+ {
+ ex.printStackTrace();
+ }
+ }
+
+ }
+ };
+ }
+
+}
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-18 15:47:03 UTC (rev 7176)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-18 18:49:41 UTC (rev 7177)
@@ -26,9 +26,10 @@
import org.exoplatform.application.gadget.GadgetRegistryService;
import org.exoplatform.application.gadget.Source;
import org.exoplatform.application.gadget.SourceStorage;
+import org.exoplatform.portal.webui.application.GadgetUtil;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.InitParams;
import org.exoplatform.webui.config.Param;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -37,20 +38,18 @@
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
+import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormInput;
import org.exoplatform.webui.form.UIFormStringInput;
import org.exoplatform.webui.form.UIFormTextAreaInput;
import org.exoplatform.webui.form.validator.ExpressionValidator;
-import org.exoplatform.webui.form.validator.IdentifierValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
import org.exoplatform.webui.form.validator.ResourceValidator;
import org.exoplatform.webui.form.validator.StringLengthValidator;
import org.exoplatform.webui.form.validator.Validator;
-
import java.io.Serializable;
import java.util.Calendar;
@@ -214,7 +213,6 @@
source.setLastModified(Calendar.getInstance());
sourceStorage.saveSource(gadget, source);
-
uiManagement.removeChild(UIGadgetEditor.class);
// This will update the source and also update the gadget related
// cached meta data
@@ -222,6 +220,13 @@
uiManagement.initData();
uiManagement.setSelectedGadget(gadget.getName());
event.getRequestContext().addUIComponentToUpdateByAjax(uiManagement);
+
+ //Send request to invalidate the cache to Shindig
+ String gadgetServerUrl = GadgetUtil.getGadgetServerUrl();
+ String gadgetUrl = GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
+ String metadataUrl = gadgetServerUrl + (gadgetServerUrl.endsWith("/") ? "" : "/") + "metadata";
+ String queryString = "{\"context\":{\"ignoreCache\":\"true\"},\"gadgets\":[" + "{\"url\":\"" + gadgetUrl + "\"}]}";
+ event.getRequestContext().getJavascriptManager().addJavascript("ajaxAsyncRequest('" + metadataUrl + "', true, 'POST', '" + queryString + "');");
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-18 15:47:03 UTC (rev 7176)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-18 18:49:41 UTC (rev 7177)
@@ -626,17 +626,28 @@
eXo.portal.CurrentRequest = null ;
} ;
/**
+ * Create a ajax GET request
+ * @param {String} url - Url
+ * @param {boolean} async - asynchronous or none
+ * @return {String} response text if request is not async
+ */
+function ajaxAsyncGetRequest(url, async) {
+ ajaxAsyncRequest("GET", url, async);
+}
+
+/**
* Create a ajax request
+ * @param {String} method - GET, POST, etc
* @param {String} url - Url
* @param {boolean} async - asynchronous or none
* @return {String} response text if request is not async
*/
-function ajaxAsyncGetRequest(url, async) {
+function ajaxAsyncRequest(url, async, method, queryString) {
if(async == undefined) async = true ;
var request = eXo.core.Browser.createHttpRequest() ;
- request.open('GET', url, async) ;
+ request.open(method, url, async) ;
request.setRequestHeader("Cache-Control", "max-age=86400") ;
- request.send(null) ;
+ request.send((queryString != undefined && queryString != null) ? queryString : null) ;
eXo.session.itvDestroy() ;
if(eXo.session.canKeepState && eXo.session.isOpen && eXo.env.portal.accessMode == 'private') {
eXo.session.itvInit() ;
Modified: epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java 2011-08-18 15:47:03 UTC (rev 7176)
+++ epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java 2011-08-18 18:49:41 UTC (rev 7177)
@@ -42,10 +42,6 @@
*/
private int columns = 30;
- /**
- * HTML Entity Encoder
- */
- private EntityEncoder entityEncoder = EntityEncoder.FULL;
public UIFormTextAreaInput()
{
@@ -78,7 +74,9 @@
w.append(" cols=\"").append(String.valueOf(columns)).append("\"");
w.write(">");
if (value != null)
- w.write(entityEncoder.encode(value));
+ //TODO: remove from other components and than encode here
+ //w.write(org.gatein.common.text.EntityEncoder.FULL.encode(value));
+ w.write(value);
w.write("</textarea>");
if (this.isMandatory())
w.write(" *");
13 years, 5 months
gatein SVN: r7176 - in epp/portal/branches/EPP_5_2_Branch: component and 3 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-08-18 11:47:03 -0400 (Thu, 18 Aug 2011)
New Revision: 7176
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
Log:
JBEPP-1085
Navigation Importer doesn't update extended labels during import
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-18 15:23:53 UTC (rev 7175)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-18 15:47:03 UTC (rev 7176)
@@ -187,10 +187,15 @@
{
cache.removeState(new CacheKey(locale, id));
}
- for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet())
+
+ // Interface specifies it allows a null description map
+ if (descriptions != null)
{
- Described described = able.addI18NMixin(Described.class, entry.getKey());
- described.setState(entry.getValue());
+ for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet())
+ {
+ Described described = able.addI18NMixin(Described.class, entry.getKey());
+ described.setState(entry.getValue());
+ }
}
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java 2011-08-18 15:23:53 UTC (rev 7175)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java 2011-08-18 15:47:03 UTC (rev 7176)
@@ -257,7 +257,7 @@
//
if (config.updatedSame)
{
- dstChild.setState(srcChild.getState());
+ update(srcChild, dstChild, labelMap);
}
//
@@ -280,7 +280,7 @@
{
if (config.updatedSame)
{
- dstChild.setState(srcChild.getState());
+ update(srcChild, dstChild, labelMap);
}
previousChild = dstChild;
}
@@ -362,4 +362,39 @@
//
return child;
}
+
+ private void update(PageNode src, NodeContext<?> target,
+ Map<NodeContext<?>, Map<Locale, Described.State>> labelMap)
+ {
+ target.setState(src.getState());
+
+ // Update extended labels if necessary
+ I18NString labels = src.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));
+ }
+ }
+
+ if (description != null)
+ {
+ labelMap.put(target, description);
+ }
+ else
+ {
+ labelMap.put(target, Collections.<Locale, Described.State>emptyMap());
+ }
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java 2011-08-18 15:23:53 UTC (rev 7175)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java 2011-08-18 15:47:03 UTC (rev 7176)
@@ -338,6 +338,84 @@
Map<Locale, Described.State> cDesc = descriptionService.getDescriptions(c.getId());
assertNull(cDesc);
assertEquals("c_en", c.getState().getLabel());
+
+ //----------------- Now test extended labels merge -----------------//
+ src = new PageNavigation("portal", "extended_label").addFragment(fragment().add(node("a"), node("b"), node("c")).build());
+ fragment = src.getFragment();
+ fragment.getNode("a").setLabels(new I18NString(new LocalizedString("a_it", Locale.ITALIAN), new LocalizedString("a_de", Locale.GERMAN)));
+ fragment.getNode("b").setLabels(new I18NString(new LocalizedString("foo_b_en"), new LocalizedString("b_it", Locale.ITALIAN)));
+ fragment.getNode("c").setLabels(new I18NString(new LocalizedString("foo_c_en")));
+ src.setOwnerId("extended_label");
+
+ importer = new NavigationImporter(Locale.ENGLISH, ImportMode.MERGE, src, service, descriptionService);
+ importer.perform();
+
+ //
+ ctx = service.loadNavigation(SiteKey.portal("extended_label"));
+ node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null).getNode();
+
+ // The fully explicit case
+ a = (NodeContext<?>)node.getNode("a");
+ aDesc = descriptionService.getDescriptions(a.getId());
+ assertNotNull(aDesc);
+ assertEquals(Tools.toSet(Locale.ITALIAN, Locale.GERMAN), aDesc.keySet());
+ assertEquals(new Described.State("a_it", null), aDesc.get(Locale.ITALIAN));
+ assertEquals(new Described.State("a_de", null), aDesc.get(Locale.GERMAN));
+ assertNull(a.getState().getLabel());
+
+ // No explicit language means to use the portal locale
+ b = (NodeContext<?>)node.getNode("b");
+ bDesc = descriptionService.getDescriptions(b.getId());
+ assertNotNull(bDesc);
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.ITALIAN), bDesc.keySet());
+ assertEquals(new Described.State("foo_b_en", null), bDesc.get(Locale.ENGLISH));
+ assertEquals(new Described.State("b_it", null), bDesc.get(Locale.ITALIAN));
+ assertNull(b.getState().getLabel());
+
+ // The simple use case : one single label without the xml:lang attribute
+ c = (NodeContext<?>)node.getNode("c");
+ cDesc = descriptionService.getDescriptions(c.getId());
+ assertNull(cDesc);
+ assertEquals("foo_c_en", c.getState().getLabel());
+
+ //----------------- Now test extended labels overwrite -----------------//
+ src = new PageNavigation("portal", "extended_label").addFragment(fragment().add(node("a"), node("b"), node("c")).build());
+ fragment = src.getFragment();
+ fragment.getNode("a").setLabels(new I18NString(new LocalizedString("bar_a_en", Locale.ENGLISH), new LocalizedString("bar_a_fr", Locale.FRENCH)));
+ fragment.getNode("b").setLabels(new I18NString(new LocalizedString("bar_b_en"), new LocalizedString("bar_b_fr", Locale.FRENCH)));
+ fragment.getNode("c").setLabels(new I18NString(new LocalizedString("bar_c_en")));
+ src.setOwnerId("extended_label");
+
+ importer = new NavigationImporter(Locale.ENGLISH, ImportMode.OVERWRITE, src, service, descriptionService);
+ importer.perform();
+
+ //
+ ctx = service.loadNavigation(SiteKey.portal("extended_label"));
+ node = service.loadNode(NodeModel.SELF_MODEL, ctx, Scope.ALL, null).getNode();
+
+ // The fully explicit case
+ a = (NodeContext<?>)node.getNode("a");
+ aDesc = descriptionService.getDescriptions(a.getId());
+ assertNotNull(aDesc);
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH), aDesc.keySet());
+ assertEquals(new Described.State("bar_a_en", null), aDesc.get(Locale.ENGLISH));
+ assertEquals(new Described.State("bar_a_fr", null), aDesc.get(Locale.FRENCH));
+ assertNull(a.getState().getLabel());
+
+ // No explicit language means to use the portal locale
+ b = (NodeContext<?>)node.getNode("b");
+ bDesc = descriptionService.getDescriptions(b.getId());
+ assertNotNull(bDesc);
+ assertEquals(Tools.toSet(Locale.ENGLISH, Locale.FRENCH), bDesc.keySet());
+ assertEquals(new Described.State("bar_b_en", null), bDesc.get(Locale.ENGLISH));
+ assertEquals(new Described.State("bar_b_fr", null), bDesc.get(Locale.FRENCH));
+ assertNull(b.getState().getLabel());
+
+ // The simple use case : one single label without the xml:lang attribute
+ c = (NodeContext<?>)node.getNode("c");
+ cDesc = descriptionService.getDescriptions(c.getId());
+ assertNull(cDesc);
+ assertEquals("bar_c_en", c.getState().getLabel());
}
public void testFullNavigation()
13 years, 5 months
gatein SVN: r7175 - in epp/portal/branches/EPP_5_2_Branch: component and 1 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-08-18 11:23:53 -0400 (Thu, 18 Aug 2011)
New Revision: 7175
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
Log:
JBEPP-1084
Invalid parent uri while exporting navigation fragment.
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-08-18 15:23:53 UTC (rev 7175)
@@ -123,7 +123,7 @@
children.add(createPageNode(service, node));
NavigationFragment fragment = new NavigationFragment();
- StringBuilder parentUri = new StringBuilder("/");
+ StringBuilder parentUri = new StringBuilder("");
getPath(node.getParent(), parentUri);
fragment.setParentURI(parentUri.toString());
fragment.setNodes(children);
@@ -138,7 +138,7 @@
if (node == null) return;
if (node.getParent() == null) return; // since "default" is the root node, we ignore it
- parentUri.insert(0, node.getName()).append("/");
+ parentUri.insert(0, node.getName()).insert(0, "/");
getPath(node.getParent(), parentUri);
}
13 years, 5 months
gatein SVN: r7174 - in epp/portal/branches/EPP_5_2_Branch: component and 43 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-08-18 11:18:50 -0400 (Thu, 18 Aug 2011)
New Revision: 7174
Added:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/META-INF/services/org.gatein.management.spi.ManagementExtension
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml
Removed:
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java
epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/management/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java
epp/portal/branches/EPP_5_2_Branch/pom.xml
Log:
JBEPP-1083
Merge gatein management mop extension into trunk.
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960
Modified: epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml 2011-08-18 15:14:42 UTC (rev 7173)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -67,6 +67,11 @@
<groupId>org.chromattic</groupId>
<artifactId>chromattic.spi</artifactId>
</dependency>
+ <!-- Staxnav -->
+ <dependency>
+ <groupId>org.staxnav</groupId>
+ <artifactId>staxnav.core</artifactId>
+ </dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
@@ -86,6 +91,12 @@
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.8.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.chromattic</groupId>
<artifactId>chromattic.core</artifactId>
<scope>test</scope>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,76 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.navigator;
-
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class Exceptions
-{
- public static <N> StaxNavException expectedElement(StaxNavigator<N> navigator, N expected)
- {
- return expectedElement(navigator, navigator.getNaming().getLocalPart(expected));
- }
-
- public static StaxNavException expectedElement(StaxNavigator navigator, String expected)
- {
- StringBuilder message = new StringBuilder().append("Expected '").append(expected)
- .append("' but found '").append(navigator.getLocalName()).append("' instead.");
-
- return new StaxNavException(navigator.getLocation(), message.toString());
- }
-
- public static StaxNavException unexpectedElement(StaxNavigator navigator)
- {
- return new StaxNavException(navigator.getLocation(), "Unexpected element '" + navigator.getLocalName() + "'");
- }
-
- public static StaxNavException unknownElement(StaxNavigator navigator)
- {
- return new StaxNavException(navigator.getLocation(), "Unknown element '" + navigator.getLocalName() + "'");
- }
-
- public static StaxNavException invalidSequence(StaxNavigator navigator)
- {
- return new StaxNavException(navigator.getLocation(), "Element '" + navigator.getLocalName() + "' is out of sequence.");
- }
-
- public static StaxNavException contentRequired(StaxNavigator navigator)
- {
- return new StaxNavException(navigator.getLocation(), "Content for element '" + navigator.getLocalName() + "' is required.");
- }
-
- public static StaxNavException invalidParent(StaxNavigator navigator)
- {
- return new StaxNavException(navigator.getLocation(), "Invalid parent for element '" + navigator.getLocalName() + "'");
- }
-
- public static StaxNavException unexpectedEndOfFile(StaxNavigator navigator)
- {
- return new StaxNavException(navigator.getLocation(), "Unexpected end of file.");
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/Exceptions.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.navigator;
+
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class Exceptions
+{
+ public static <N> StaxNavException expectedElement(StaxNavigator<N> navigator, N expected)
+ {
+ return expectedElement(navigator, navigator.getNaming().getLocalPart(expected));
+ }
+
+ public static StaxNavException expectedElement(StaxNavigator navigator, String expected)
+ {
+ StringBuilder message = new StringBuilder().append("Expected '").append(expected)
+ .append("' but found '").append(navigator.getLocalName()).append("' instead.");
+
+ return new StaxNavException(navigator.getLocation(), message.toString());
+ }
+
+ public static StaxNavException unexpectedElement(StaxNavigator navigator)
+ {
+ return new StaxNavException(navigator.getLocation(), "Unexpected element '" + navigator.getLocalName() + "'");
+ }
+
+ public static StaxNavException unknownElement(StaxNavigator navigator)
+ {
+ return new StaxNavException(navigator.getLocation(), "Unknown element '" + navigator.getLocalName() + "'");
+ }
+
+ public static StaxNavException invalidSequence(StaxNavigator navigator)
+ {
+ return new StaxNavException(navigator.getLocation(), "Element '" + navigator.getLocalName() + "' is out of sequence.");
+ }
+
+ public static StaxNavException contentRequired(StaxNavigator navigator)
+ {
+ return new StaxNavException(navigator.getLocation(), "Content for element '" + navigator.getLocalName() + "' is required.");
+ }
+
+ public static StaxNavException invalidParent(StaxNavigator navigator)
+ {
+ return new StaxNavException(navigator.getLocation(), "Invalid parent for element '" + navigator.getLocalName() + "'");
+ }
+
+ public static StaxNavException unexpectedEndOfFile(StaxNavigator navigator)
+ {
+ return new StaxNavException(navigator.getLocation(), "Unexpected end of file.");
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,197 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.navigator;
-
-import org.gatein.common.xml.stax.navigator.builder.StaxNavBuilder;
-import org.gatein.common.xml.stax.navigator.builder.StaxNavBuilderImpl;
-import org.staxnav.EnumElement;
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-import org.staxnav.ValueType;
-
-import javax.xml.namespace.QName;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import static org.gatein.common.xml.stax.navigator.Exceptions.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class StaxNavUtils
-{
- public static <N> StaxNavigator<N> createNavigator(Naming<N> naming, InputStream in) throws StaxNavException
- {
- return buildDefaultNavigator().withInputStream(in).build(naming);
- }
-
- public static StaxNavigator<String> createNavigator(InputStream in) throws StaxNavException
- {
- return createNavigator(new Naming.Local(), in);
- }
-
- public static StaxNavigator<QName> createQualifiedNavigator(InputStream in) throws StaxNavException
- {
- return createNavigator(new Naming.Qualified(), in);
- }
-
- public static <E extends Enum<E> & EnumElement<E>> StaxNavigator<E> createNavigator(Class<E> enumeratedClass,
- E noSuchElement, InputStream in) throws StaxNavException
- {
- Naming<E> naming;
- if (EnumElement.class.isAssignableFrom(enumeratedClass))
- {
- naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, noSuchElement);
- }
- else
- {
- naming = new Naming.Enumerated.Simple<E>(enumeratedClass, noSuchElement);
- }
-
- return createNavigator(naming, in);
- }
-
- public static <N> StaxNavigator<N> createNavigator(Naming<N> naming, Reader reader) throws StaxNavException
- {
- return buildDefaultNavigator().withReader(reader).build(naming);
- }
-
- public static StaxNavigator<String> createNavigator(Reader reader) throws StaxNavException
- {
- return createNavigator(new Naming.Local(), reader);
- }
-
- public static StaxNavigator<QName> createQualifiedNavigator(Reader reader) throws StaxNavException
- {
- return createNavigator(new Naming.Qualified(), reader);
- }
-
- public static <E extends Enum<E> & EnumElement<E>> StaxNavigator<E> createNavigator(Class<E> enumeratedClass,
- E noSuchElement, Reader reader) throws StaxNavException
- {
- Naming<E> naming;
- if (EnumElement.class.isAssignableFrom(enumeratedClass))
- {
- naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, noSuchElement);
- }
- else
- {
- naming = new Naming.Enumerated.Simple<E>(enumeratedClass, noSuchElement);
- }
-
- return createNavigator(naming, reader);
- }
-
- public static <N> void requiresChild(StaxNavigator<N> navigator, N element)
- {
- if (navigator.child() != element)
- {
- throw expectedElement(navigator, element);
- }
- }
-
- public static <N> void requiresSibling(StaxNavigator<N> navigator, N element)
- {
- if (!navigator.sibling(element))
- {
- throw expectedElement(navigator, element);
- }
- }
-
- public static String getRequiredAttribute(StaxNavigator navigator, String attributeName) throws StaxNavException
- {
- String value = navigator.getAttribute(attributeName);
- if (value == null)
- {
- throw new StaxNavException(navigator.getLocation(), "Attribute '" + attributeName + "' is required for element '" + navigator.getLocalName() + "'");
- }
-
- return value;
- }
-
- public static <N> String getContent(StaxNavigator<N> navigator, boolean trim)
- {
- boolean before = navigator.getTrimContent();
- try
- {
- navigator.setTrimContent(trim);
- return navigator.getContent();
- }
- finally
- {
- navigator.setTrimContent(before);
- }
- }
-
- public static <N> String getRequiredContent(StaxNavigator<N> navigator, boolean trim)
- {
- String content = getContent(navigator, trim);
- if (content == null || content.length() == 0)
- {
- throw contentRequired(navigator);
- }
-
- return content;
- }
-
- public static <N, V> V parseContent(StaxNavigator<N> navigator, ValueType<V> valueType, V defaultValue)
- {
- String content = getContent(navigator, true);
- if (content != null && content.length() != 0)
- {
- return navigator.parseContent(valueType);
- }
- else
- {
- return defaultValue;
- }
- }
-
- public static <N, V> V parseRequiredContent(StaxNavigator<N> navigator, ValueType<V> valueType)
- {
- V value = parseContent(navigator, valueType, null);
- if (value == null)
- {
- throw contentRequired(navigator);
- }
-
- return value;
- }
-
- public static <N> Set<N> forNames(N...names)
- {
- return new HashSet<N>(Arrays.asList(names));
- }
-
- private static StaxNavBuilder buildDefaultNavigator()
- {
- return new StaxNavBuilderImpl();
- }
-
- private StaxNavUtils() {}
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/StaxNavUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,197 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.navigator;
+
+import org.gatein.common.xml.stax.navigator.builder.StaxNavBuilder;
+import org.gatein.common.xml.stax.navigator.builder.StaxNavBuilderImpl;
+import org.staxnav.EnumElement;
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+import org.staxnav.ValueType;
+
+import javax.xml.namespace.QName;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import static org.gatein.common.xml.stax.navigator.Exceptions.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class StaxNavUtils
+{
+ public static <N> StaxNavigator<N> createNavigator(Naming<N> naming, InputStream in) throws StaxNavException
+ {
+ return buildDefaultNavigator().withInputStream(in).build(naming);
+ }
+
+ public static StaxNavigator<String> createNavigator(InputStream in) throws StaxNavException
+ {
+ return createNavigator(new Naming.Local(), in);
+ }
+
+ public static StaxNavigator<QName> createQualifiedNavigator(InputStream in) throws StaxNavException
+ {
+ return createNavigator(new Naming.Qualified(), in);
+ }
+
+ public static <E extends Enum<E> & EnumElement<E>> StaxNavigator<E> createNavigator(Class<E> enumeratedClass,
+ E noSuchElement, InputStream in) throws StaxNavException
+ {
+ Naming<E> naming;
+ if (EnumElement.class.isAssignableFrom(enumeratedClass))
+ {
+ naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, noSuchElement);
+ }
+ else
+ {
+ naming = new Naming.Enumerated.Simple<E>(enumeratedClass, noSuchElement);
+ }
+
+ return createNavigator(naming, in);
+ }
+
+ public static <N> StaxNavigator<N> createNavigator(Naming<N> naming, Reader reader) throws StaxNavException
+ {
+ return buildDefaultNavigator().withReader(reader).build(naming);
+ }
+
+ public static StaxNavigator<String> createNavigator(Reader reader) throws StaxNavException
+ {
+ return createNavigator(new Naming.Local(), reader);
+ }
+
+ public static StaxNavigator<QName> createQualifiedNavigator(Reader reader) throws StaxNavException
+ {
+ return createNavigator(new Naming.Qualified(), reader);
+ }
+
+ public static <E extends Enum<E> & EnumElement<E>> StaxNavigator<E> createNavigator(Class<E> enumeratedClass,
+ E noSuchElement, Reader reader) throws StaxNavException
+ {
+ Naming<E> naming;
+ if (EnumElement.class.isAssignableFrom(enumeratedClass))
+ {
+ naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, noSuchElement);
+ }
+ else
+ {
+ naming = new Naming.Enumerated.Simple<E>(enumeratedClass, noSuchElement);
+ }
+
+ return createNavigator(naming, reader);
+ }
+
+ public static <N> void requiresChild(StaxNavigator<N> navigator, N element)
+ {
+ if (navigator.child() != element)
+ {
+ throw expectedElement(navigator, element);
+ }
+ }
+
+ public static <N> void requiresSibling(StaxNavigator<N> navigator, N element)
+ {
+ if (!navigator.sibling(element))
+ {
+ throw expectedElement(navigator, element);
+ }
+ }
+
+ public static String getRequiredAttribute(StaxNavigator navigator, String attributeName) throws StaxNavException
+ {
+ String value = navigator.getAttribute(attributeName);
+ if (value == null)
+ {
+ throw new StaxNavException(navigator.getLocation(), "Attribute '" + attributeName + "' is required for element '" + navigator.getLocalName() + "'");
+ }
+
+ return value;
+ }
+
+ public static <N> String getContent(StaxNavigator<N> navigator, boolean trim)
+ {
+ boolean before = navigator.getTrimContent();
+ try
+ {
+ navigator.setTrimContent(trim);
+ return navigator.getContent();
+ }
+ finally
+ {
+ navigator.setTrimContent(before);
+ }
+ }
+
+ public static <N> String getRequiredContent(StaxNavigator<N> navigator, boolean trim)
+ {
+ String content = getContent(navigator, trim);
+ if (content == null || content.length() == 0)
+ {
+ throw contentRequired(navigator);
+ }
+
+ return content;
+ }
+
+ public static <N, V> V parseContent(StaxNavigator<N> navigator, ValueType<V> valueType, V defaultValue)
+ {
+ String content = getContent(navigator, true);
+ if (content != null && content.length() != 0)
+ {
+ return navigator.parseContent(valueType);
+ }
+ else
+ {
+ return defaultValue;
+ }
+ }
+
+ public static <N, V> V parseRequiredContent(StaxNavigator<N> navigator, ValueType<V> valueType)
+ {
+ V value = parseContent(navigator, valueType, null);
+ if (value == null)
+ {
+ throw contentRequired(navigator);
+ }
+
+ return value;
+ }
+
+ public static <N> Set<N> forNames(N...names)
+ {
+ return new HashSet<N>(Arrays.asList(names));
+ }
+
+ private static StaxNavBuilder buildDefaultNavigator()
+ {
+ return new StaxNavBuilderImpl();
+ }
+
+ private StaxNavUtils() {}
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.navigator.builder;
-
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import java.io.InputStream;
-import java.io.Reader;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public interface StaxNavBuilder
-{
- StaxNavBuilder withProperty(String name, Object value);
-
- StaxNavBuilder withPropertyIfSupported(String name, Object value);
-
- StaxNavBuilder withInputStream(InputStream inputStream);
-
- StaxNavBuilder withInputStream(InputStream inputStream, String encoding);
-
- StaxNavBuilder withReader(Reader reader);
-
- StaxNavBuilder withSource(Source source);
-
- StaxNavBuilder withXmlStreamReader(XMLStreamReader reader);
-
- <N> StaxNavigator<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilder.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.navigator.builder;
+
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Source;
+import java.io.InputStream;
+import java.io.Reader;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public interface StaxNavBuilder
+{
+ StaxNavBuilder withProperty(String name, Object value);
+
+ StaxNavBuilder withPropertyIfSupported(String name, Object value);
+
+ StaxNavBuilder withInputStream(InputStream inputStream);
+
+ StaxNavBuilder withInputStream(InputStream inputStream, String encoding);
+
+ StaxNavBuilder withReader(Reader reader);
+
+ StaxNavBuilder withSource(Source source);
+
+ StaxNavBuilder withXmlStreamReader(XMLStreamReader reader);
+
+ <N> StaxNavigator<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,203 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.navigator.builder;
-
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-import org.staxnav.StaxNavigatorFactory;
-
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-import javax.xml.transform.Source;
-import java.io.InputStream;
-import java.io.Reader;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class StaxNavBuilderImpl implements StaxNavBuilder
-{
- private Object input;
- private String inputEncoding;
- private XMLStreamReader reader;
-
- private Map<String, Object> properties = new HashMap<String, Object>();
- private Map<String, Object> supportedProperties = new HashMap<String, Object>();
-
- @Override
- public StaxNavBuilder withProperty(String name, Object value)
- {
- if (name == null) throw new IllegalArgumentException("name is null");
- if (value == null) throw new IllegalArgumentException("value is null");
-
- properties.put(name, value);
- return this;
- }
-
- @Override
- public StaxNavBuilder withPropertyIfSupported(String name, Object value)
- {
- if (name == null) throw new IllegalArgumentException("name is null");
- if (value == null) throw new IllegalArgumentException("value is null");
-
- supportedProperties.put(name, value);
- return this;
- }
-
- @Override
- public StaxNavBuilder withInputStream(InputStream inputStream)
- {
- if (inputStream == null) throw new IllegalArgumentException("inputStream is null");
-
- input = inputStream;
- return this;
- }
-
- @Override
- public StaxNavBuilder withInputStream(InputStream inputStream, String encoding)
- {
- if (inputStream == null) throw new IllegalArgumentException("inputStream is null");
- if (encoding == null) throw new IllegalArgumentException("encoding is null");
-
- input = inputStream;
- inputEncoding = encoding;
- return this;
- }
-
- @Override
- public StaxNavBuilder withReader(Reader reader)
- {
- if (reader == null) throw new IllegalArgumentException("reader is null");
-
- this.input = reader;
- return this;
- }
-
- @Override
- public StaxNavBuilder withSource(Source source)
- {
- if (source == null) throw new IllegalArgumentException("source is null");
-
- input = source;
- return this;
- }
-
- @Override
- public StaxNavBuilder withXmlStreamReader(XMLStreamReader reader)
- {
- if (reader == null) throw new IllegalArgumentException("reader is null");
-
- this.reader = reader;
- return this;
- }
-
- @Override
- public <N> StaxNavigator<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException
- {
- if (naming == null) throw new IllegalArgumentException("naming is null");
-
- if (reader == null && input == null)
- throw new IllegalStateException("Cannot build stax reader. Try calling withInputStream/withReader or pass in own XMLStreamReader.");
-
- if (reader == null)
- {
- //TODO: Create solution to properly cache XMLInputFactory
- XMLInputFactory factory = XMLInputFactory.newInstance();
-
- // Set properties
- for (Map.Entry<String, Object> entry : properties.entrySet())
- {
- factory.setProperty(entry.getKey(), entry.getValue());
- }
-
- // Set properties if supported
- for (Map.Entry<String, Object> entry : supportedProperties.entrySet())
- {
- String name = entry.getKey();
- if (factory.isPropertySupported(name))
- {
- factory.setProperty(name, entry.getValue());
- }
- }
-
- if (input instanceof InputStream)
- {
- if (inputEncoding == null)
- {
- try
- {
- reader = factory.createXMLStreamReader((InputStream) input, inputEncoding);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(e);
- }
- }
- else
- {
- try
- {
- reader = factory.createXMLStreamReader((InputStream) input);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(null, "Exception creating XMLStreamReader with inputStream: " + input, e);
- }
- }
- }
- else if (input instanceof Reader)
- {
- try
- {
- reader = factory.createXMLStreamReader((Reader) input);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(null, "Exception creating XMLStreamReader with reader: " + input, e);
- }
- }
- else if (input instanceof Source)
- {
- try
- {
- reader = factory.createXMLStreamReader((Source) input);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(null, "Exception creating XMLStreamReader with Source: " + input, e);
- }
- }
- else
- {
- throw new IllegalStateException("Unknown input: " + input); // should never happen...
- }
- }
-
- return StaxNavigatorFactory.create(naming, reader);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/navigator/builder/StaxNavBuilderImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,203 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.navigator.builder;
+
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+import org.staxnav.StaxNavigatorFactory;
+
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.transform.Source;
+import java.io.InputStream;
+import java.io.Reader;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class StaxNavBuilderImpl implements StaxNavBuilder
+{
+ private Object input;
+ private String inputEncoding;
+ private XMLStreamReader reader;
+
+ private Map<String, Object> properties = new HashMap<String, Object>();
+ private Map<String, Object> supportedProperties = new HashMap<String, Object>();
+
+ @Override
+ public StaxNavBuilder withProperty(String name, Object value)
+ {
+ if (name == null) throw new IllegalArgumentException("name is null");
+ if (value == null) throw new IllegalArgumentException("value is null");
+
+ properties.put(name, value);
+ return this;
+ }
+
+ @Override
+ public StaxNavBuilder withPropertyIfSupported(String name, Object value)
+ {
+ if (name == null) throw new IllegalArgumentException("name is null");
+ if (value == null) throw new IllegalArgumentException("value is null");
+
+ supportedProperties.put(name, value);
+ return this;
+ }
+
+ @Override
+ public StaxNavBuilder withInputStream(InputStream inputStream)
+ {
+ if (inputStream == null) throw new IllegalArgumentException("inputStream is null");
+
+ input = inputStream;
+ return this;
+ }
+
+ @Override
+ public StaxNavBuilder withInputStream(InputStream inputStream, String encoding)
+ {
+ if (inputStream == null) throw new IllegalArgumentException("inputStream is null");
+ if (encoding == null) throw new IllegalArgumentException("encoding is null");
+
+ input = inputStream;
+ inputEncoding = encoding;
+ return this;
+ }
+
+ @Override
+ public StaxNavBuilder withReader(Reader reader)
+ {
+ if (reader == null) throw new IllegalArgumentException("reader is null");
+
+ this.input = reader;
+ return this;
+ }
+
+ @Override
+ public StaxNavBuilder withSource(Source source)
+ {
+ if (source == null) throw new IllegalArgumentException("source is null");
+
+ input = source;
+ return this;
+ }
+
+ @Override
+ public StaxNavBuilder withXmlStreamReader(XMLStreamReader reader)
+ {
+ if (reader == null) throw new IllegalArgumentException("reader is null");
+
+ this.reader = reader;
+ return this;
+ }
+
+ @Override
+ public <N> StaxNavigator<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException
+ {
+ if (naming == null) throw new IllegalArgumentException("naming is null");
+
+ if (reader == null && input == null)
+ throw new IllegalStateException("Cannot build stax reader. Try calling withInputStream/withReader or pass in own XMLStreamReader.");
+
+ if (reader == null)
+ {
+ //TODO: Create solution to properly cache XMLInputFactory
+ XMLInputFactory factory = XMLInputFactory.newInstance();
+
+ // Set properties
+ for (Map.Entry<String, Object> entry : properties.entrySet())
+ {
+ factory.setProperty(entry.getKey(), entry.getValue());
+ }
+
+ // Set properties if supported
+ for (Map.Entry<String, Object> entry : supportedProperties.entrySet())
+ {
+ String name = entry.getKey();
+ if (factory.isPropertySupported(name))
+ {
+ factory.setProperty(name, entry.getValue());
+ }
+ }
+
+ if (input instanceof InputStream)
+ {
+ if (inputEncoding == null)
+ {
+ try
+ {
+ reader = factory.createXMLStreamReader((InputStream) input, inputEncoding);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(e);
+ }
+ }
+ else
+ {
+ try
+ {
+ reader = factory.createXMLStreamReader((InputStream) input);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(null, "Exception creating XMLStreamReader with inputStream: " + input, e);
+ }
+ }
+ }
+ else if (input instanceof Reader)
+ {
+ try
+ {
+ reader = factory.createXMLStreamReader((Reader) input);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(null, "Exception creating XMLStreamReader with reader: " + input, e);
+ }
+ }
+ else if (input instanceof Source)
+ {
+ try
+ {
+ reader = factory.createXMLStreamReader((Source) input);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(null, "Exception creating XMLStreamReader with Source: " + input, e);
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Unknown input: " + input); // should never happen...
+ }
+ }
+
+ return StaxNavigatorFactory.create(naming, reader);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,152 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer;
-
-import org.staxnav.StaxNavException;
-
-import javax.xml.namespace.QName;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public interface StaxWriter<N>
-{
- /**
- * Writes the start tag of an xml element. Requires that an element has been started first.
- *
- * @param element element to start
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeStartElement(N element) throws StaxNavException;
-
- /**
- * Writes an attribute for an xml element. Requires that an element has been started first.
- *
- * @param name the name of the attribute
- * @param value the value of the attribute
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeAttribute(String name, String value) throws StaxNavException;
-
- /**
- * Writes an attribute for an xml element. Requires that an element has been started first.
- *
- * @param name QName object representing the name of the attribute
- * @param value the value of the attribute
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeAttribute(QName name, String value) throws StaxNavException;
-
- /**
- * Writes xml content. Requires an xml element has been started first.
- *
- * @param content content to be written
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeContent(String content) throws StaxNavException;
-
- /**
- * Writes xml content based on the ValueType responsible for converting the content to string. Requires an xml element has been started first.
- *
- * @param valueType object responsible for writing content to string
- * @param content content to be written
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- <V> StaxWriter<N> writeContent(WritableValueType<V> valueType, V content) throws StaxNavException;
-
- /**
- * Writes an end tag for the previously started element. Requires that an element has been started first.
- *
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeEndElement() throws StaxNavException;
-
- /**
- * Convenience method for calling <code>writeStartElement</code>, <code>writeContent</code>, <code>writeEndElement</code>
- *
- * @param element element to write
- * @param content content to be written
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- <V> StaxWriter<N> writeElement(N element, String content) throws StaxNavException;
-
- /**
- * Convenience method for calling <code>writeStartElement</code>, <code>writeContent</code>, <code>writeEndElement</code>
- *
- * @param element element to write
- * @param valueType object responsible for writing content to string
- * @param content content to be written
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- <V> StaxWriter<N> writeElement(N element, WritableValueType<V> valueType, V content) throws StaxNavException;
-
- /**
- * Writes the namespace. If prefix is an empty string, "xmlns", or null this will delegate to writeDefaultNamespace
- * @param prefix the prefix to bind the namespace to
- * @param uri the uri to bind the prefix to
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeNamespace(String prefix, String uri) throws StaxNavException;
-
- /**
- * Writes the default namespace
- * @param uri the uri to bind the default namespace to
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeDefaultNamespace(String uri) throws StaxNavException;
-
- /**
- * Writes an xml comment
- * @param comment the comment to write
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeComment(String comment) throws StaxNavException;
-
- /**
- * Writes a cdata section
- * @param cdata content of the cdata
- * @return StaxWriter
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- StaxWriter<N> writeCData(String cdata) throws StaxNavException;
-
- /**
- * Calling finish will flush and close the underlying stream. It will also call any endElements for you
- * if they were never explicitly called.
- *
- * @throws org.staxnav.StaxNavException if an exception occurs
- */
- void finish() throws StaxNavException;
-}
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,152 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer;
+
+import org.staxnav.StaxNavException;
+
+import javax.xml.namespace.QName;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public interface StaxWriter<N>
+{
+ /**
+ * Writes the start tag of an xml element. Requires that an element has been started first.
+ *
+ * @param element element to start
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeStartElement(N element) throws StaxNavException;
+
+ /**
+ * Writes an attribute for an xml element. Requires that an element has been started first.
+ *
+ * @param name the name of the attribute
+ * @param value the value of the attribute
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeAttribute(String name, String value) throws StaxNavException;
+
+ /**
+ * Writes an attribute for an xml element. Requires that an element has been started first.
+ *
+ * @param name QName object representing the name of the attribute
+ * @param value the value of the attribute
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeAttribute(QName name, String value) throws StaxNavException;
+
+ /**
+ * Writes xml content. Requires an xml element has been started first.
+ *
+ * @param content content to be written
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeContent(String content) throws StaxNavException;
+
+ /**
+ * Writes xml content based on the ValueType responsible for converting the content to string. Requires an xml element has been started first.
+ *
+ * @param valueType object responsible for writing content to string
+ * @param content content to be written
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ <V> StaxWriter<N> writeContent(WritableValueType<V> valueType, V content) throws StaxNavException;
+
+ /**
+ * Writes an end tag for the previously started element. Requires that an element has been started first.
+ *
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeEndElement() throws StaxNavException;
+
+ /**
+ * Convenience method for calling <code>writeStartElement</code>, <code>writeContent</code>, <code>writeEndElement</code>
+ *
+ * @param element element to write
+ * @param content content to be written
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ <V> StaxWriter<N> writeElement(N element, String content) throws StaxNavException;
+
+ /**
+ * Convenience method for calling <code>writeStartElement</code>, <code>writeContent</code>, <code>writeEndElement</code>
+ *
+ * @param element element to write
+ * @param valueType object responsible for writing content to string
+ * @param content content to be written
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ <V> StaxWriter<N> writeElement(N element, WritableValueType<V> valueType, V content) throws StaxNavException;
+
+ /**
+ * Writes the namespace. If prefix is an empty string, "xmlns", or null this will delegate to writeDefaultNamespace
+ * @param prefix the prefix to bind the namespace to
+ * @param uri the uri to bind the prefix to
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeNamespace(String prefix, String uri) throws StaxNavException;
+
+ /**
+ * Writes the default namespace
+ * @param uri the uri to bind the default namespace to
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeDefaultNamespace(String uri) throws StaxNavException;
+
+ /**
+ * Writes an xml comment
+ * @param comment the comment to write
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeComment(String comment) throws StaxNavException;
+
+ /**
+ * Writes a cdata section
+ * @param cdata content of the cdata
+ * @return StaxWriter
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ StaxWriter<N> writeCData(String cdata) throws StaxNavException;
+
+ /**
+ * Calling finish will flush and close the underlying stream. It will also call any endElements for you
+ * if they were never explicitly called.
+ *
+ * @throws org.staxnav.StaxNavException if an exception occurs
+ */
+ void finish() throws StaxNavException;
+}
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,503 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer;
-
-
-import org.gatein.common.xml.stax.writer.formatting.NoOpFormatter;
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import java.util.ArrayDeque;
-import java.util.Deque;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class StaxWriterImpl<N> implements StaxWriter<N>, XMLStreamConstants
-{
- private Naming<N> naming;
- private XMLStreamWriter writer;
- private XmlStreamingFormatter formatter;
-
- private Deque<Element> elementStack = new ArrayDeque<Element>();
-
- public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer)
- {
- this(naming, writer, null);
- }
-
- public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer, XmlStreamingFormatter formatter)
- {
- this(naming, writer, formatter, null, null);
- }
-
- public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer, XmlStreamingFormatter formatter, String encoding, String version)
- {
- this.naming = naming;
- this.writer = writer;
- if (formatter == null) formatter = new NoOpFormatter();
-
- this.formatter = formatter;
- elementStack.push(new RootElement(writer, formatter, encoding, version));
- }
-
- public StaxWriter<N> writeAttribute(String name, String value)
- {
- if (name == null) throw new IllegalArgumentException("name cannot be null");
- if (value == null) throw new IllegalArgumentException("value cannot be null");
-
- Element current = elementStack.peek();
- current.writeAttribute(name, value);
- return this;
- }
-
- public StaxWriter<N> writeAttribute(QName name, String value)
- {
- if (name == null) throw new IllegalArgumentException("name cannot be null");
-
- Element current = elementStack.peek();
- current.writeAttribute(name, value);
- return this;
- }
-
- public StaxWriter<N> writeStartElement(N element) throws StaxNavException
- {
- Element current = elementStack.peek();
- if (current instanceof RootElement)
- {
- if (((RootElement) current).started)
- {
- current = new StreamElement(writer, formatter);
- elementStack.push(current);
- }
- }
- else
- {
- current = new StreamElement(writer, formatter);
- elementStack.push(current);
- }
-
- current.writeStartElement(naming, element);
- return this;
- }
-
- public StaxWriter<N> writeEndElement() throws StaxNavException
- {
- if (elementStack.isEmpty()) throw new StaxNavException(null, "No matching startElement was found for this endElement");
-
- elementStack.pop().end();
-
- return this;
- }
-
- public StaxWriter<N> writeContent(String content) throws StaxNavException
- {
- return writeContent(WritableValueTypes.STRING, content);
- }
-
- public <V> StaxWriter<N> writeContent(WritableValueType<V> valueType, V content) throws StaxNavException
- {
- if (valueType == null) throw new IllegalArgumentException("valueType cannot be null.");
- if (content == null) throw new IllegalArgumentException("content cannot be null.");
-
- Element current = elementStack.peek();
- current.writeContent(valueType.format(content));
-
- return this;
- }
-
- public <V> StaxWriter<N> writeElement(N element, String content) throws StaxNavException
- {
- return writeElement(element, WritableValueTypes.STRING, content);
- }
-
- public <V> StaxWriter<N> writeElement(N element, WritableValueType<V> valueType, V content) throws StaxNavException
- {
- writeStartElement(element).writeContent(valueType, content).writeEndElement();
- return this;
- }
-
- public StaxWriter<N> writeNamespace(String prefix, String uri) throws StaxNavException
- {
- Element current = elementStack.peek();
- current.writeNamespace(prefix, uri);
- return this;
- }
-
- public StaxWriter<N> writeDefaultNamespace(String uri) throws StaxNavException
- {
- Element current = elementStack.peek();
- current.writeDefaultNamespace(uri);
- return this;
- }
-
- public StaxWriter<N> writeComment(final String comment) throws StaxNavException
- {
- Element current = elementStack.peek();
- current.writeComment(comment);
- return this;
- }
-
- public StaxWriter<N> writeCData(String cdata) throws StaxNavException
- {
- Element current = elementStack.peek();
- current.writeCData(cdata);
- return this;
- }
-
- public void finish() throws StaxNavException
- {
- while (!elementStack.isEmpty())
- {
- elementStack.pop().end();
- }
- }
-
- private static abstract class Element
- {
- abstract void writeAttribute(String name, String value) throws StaxNavException;
-
- abstract <N> void writeAttribute(QName name, String value) throws StaxNavException;
-
- abstract <N> void writeStartElement(Naming<N> naming, N name) throws StaxNavException;
-
- abstract void writeContent(String content) throws StaxNavException;
-
- abstract void writeNamespace(String prefix, String uri) throws StaxNavException;
-
- abstract void writeDefaultNamespace(String uri) throws StaxNavException;
-
- abstract void writeComment(String comment) throws StaxNavException;
-
- abstract void writeCData(String cdata) throws StaxNavException;
-
- abstract void end();
-
- XMLStreamWriter writer;
- XmlStreamingFormatter formatter;
- private List<StreamClosure> closures;
-
- Element(XMLStreamWriter writer, XmlStreamingFormatter formatter)
- {
- this(writer, formatter, null);
- }
-
- Element(XMLStreamWriter writer, XmlStreamingFormatter formatter, List<StreamClosure> closures)
- {
- this.writer = writer;
- this.formatter = formatter;
- this.closures = closures;
- }
-
- void apply(int event, StreamClosure closure) throws StaxNavException
- {
- try
- {
- formatter.before(writer, event);
- closure.execute(writer);
- formatter.after(writer, event);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(e);
- }
- }
- }
-
- private static class RootElement extends Element
- {
- private String encoding;
- private String version;
- private Element element;
- private boolean started;
-
- RootElement(XMLStreamWriter writer, XmlStreamingFormatter formatter, String encoding, String version)
- {
- super(writer, formatter);
- this.encoding = encoding;
- this.version = version;
- }
-
- public void writeAttribute(String name, String value) throws StaxNavException
- {
- get().writeAttribute(name, value);
- }
-
- public <N> void writeAttribute(QName name, String value) throws StaxNavException
- {
- get().writeAttribute(name, value);
- }
-
- public <N> void writeStartElement(Naming<N> naming, N name) throws StaxNavException
- {
- get().writeStartElement(naming, name);
- started = true;
- }
-
- public void writeContent(String content) throws StaxNavException
- {
- get().writeContent(content);
- }
-
- public void writeNamespace(String prefix, String uri) throws StaxNavException
- {
- get().writeNamespace(prefix, uri);
- }
-
- public void writeDefaultNamespace(String uri) throws StaxNavException
- {
- get().writeDefaultNamespace(uri);
- }
-
- public void writeComment(String comment) throws StaxNavException
- {
- get().writeComment(comment);
- }
-
- public void writeCData(String cdata) throws StaxNavException
- {
- get().writeCData(cdata);
- }
-
- public void end()
- {
- if (started)
- {
- get().end();
- }
- endDocument();
- }
-
- private Element get()
- {
- if (element == null)
- {
- startDocument();
- element = new StreamElement(writer, formatter);
- }
- return element;
- }
-
- private void startDocument() throws StaxNavException
- {
- apply(START_DOCUMENT, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- if (encoding == null && version == null)
- {
- writer.writeStartDocument();
- }
- else if (encoding == null)
- {
- writer.writeStartDocument(version);
- }
- else
- {
- writer.writeStartDocument(encoding, version);
- }
- }
- });
- }
-
- private void endDocument() throws StaxNavException
- {
- try
- {
- apply(END_DOCUMENT, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeEndDocument();
- }
- });
-
- writer.flush();
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(e);
- }
- finally
- {
- try
- {
- writer.close();
- }
- catch (XMLStreamException e)
- {
- }
- }
- }
- }
-
- private static class StreamElement extends Element
- {
- StreamElement(XMLStreamWriter writer, XmlStreamingFormatter formatter)
- {
- super(writer, formatter);
- }
-
- public void writeAttribute(final String name, final String value) throws StaxNavException
- {
- apply(ATTRIBUTE, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeAttribute(name, value);
- }
- });
- }
-
- public <N> void writeAttribute(QName name, final String value) throws StaxNavException
- {
- final String prefix = name.getPrefix();
- final String uri = name.getNamespaceURI();
- final String localPart = name.getLocalPart();
-
- apply(ATTRIBUTE, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- if (uri == null || XMLConstants.NULL_NS_URI.equals(uri))
- {
- writer.writeAttribute(localPart, value);
- }
- else if (prefix == null || XMLConstants.DEFAULT_NS_PREFIX.equals(prefix))
- {
- writer.writeAttribute(uri, localPart, value);
- }
- else
- {
- writer.writeAttribute(prefix, uri, localPart, value);
- }
- }
- });
- }
-
- public <N> void writeStartElement(Naming<N> naming, N name) throws StaxNavException
- {
- final String prefix = naming.getPrefix(name);
- final String uri = naming.getURI(name);
- final String localPart = naming.getLocalPart(name);
-
- apply(START_ELEMENT, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- if (uri == null || XMLConstants.NULL_NS_URI.equals(uri))
- {
- writer.writeStartElement(localPart);
- }
- else if (prefix == null || XMLConstants.DEFAULT_NS_PREFIX.equals(prefix))
- {
- writer.writeStartElement(uri, localPart);
- }
- else
- {
- writer.writeStartElement(prefix, localPart, uri);
- }
- }
- });
- }
-
- public void writeContent(final String content) throws StaxNavException
- {
- apply(CHARACTERS, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeCharacters(content);
- }
- });
- }
-
- public void writeNamespace(final String prefix, final String uri) throws StaxNavException
- {
- apply(NAMESPACE, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeNamespace(prefix, uri);
- }
- });
- }
-
- public void writeDefaultNamespace(final String uri) throws StaxNavException
- {
- apply(NAMESPACE, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeDefaultNamespace(uri);
- }
- });
- }
-
- public void writeComment(final String comment) throws StaxNavException
- {
- apply(COMMENT, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeComment(comment);
- }
- });
- }
-
- public void writeCData(final String cdata) throws StaxNavException
- {
- apply(CDATA, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeCData(cdata);
- }
- });
- }
-
- public void end()
- {
- apply(END_ELEMENT, new StreamClosure()
- {
- public void execute(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeEndElement();
- }
- });
- }
- }
-
- private static interface StreamClosure
- {
- void execute(XMLStreamWriter writer) throws XMLStreamException;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,503 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer;
+
+
+import org.gatein.common.xml.stax.writer.formatting.NoOpFormatter;
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import java.util.ArrayDeque;
+import java.util.Deque;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class StaxWriterImpl<N> implements StaxWriter<N>, XMLStreamConstants
+{
+ private Naming<N> naming;
+ private XMLStreamWriter writer;
+ private XmlStreamingFormatter formatter;
+
+ private Deque<Element> elementStack = new ArrayDeque<Element>();
+
+ public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer)
+ {
+ this(naming, writer, null);
+ }
+
+ public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer, XmlStreamingFormatter formatter)
+ {
+ this(naming, writer, formatter, null, null);
+ }
+
+ public StaxWriterImpl(Naming<N> naming, XMLStreamWriter writer, XmlStreamingFormatter formatter, String encoding, String version)
+ {
+ this.naming = naming;
+ this.writer = writer;
+ if (formatter == null) formatter = new NoOpFormatter();
+
+ this.formatter = formatter;
+ elementStack.push(new RootElement(writer, formatter, encoding, version));
+ }
+
+ public StaxWriter<N> writeAttribute(String name, String value)
+ {
+ if (name == null) throw new IllegalArgumentException("name cannot be null");
+ if (value == null) throw new IllegalArgumentException("value cannot be null");
+
+ Element current = elementStack.peek();
+ current.writeAttribute(name, value);
+ return this;
+ }
+
+ public StaxWriter<N> writeAttribute(QName name, String value)
+ {
+ if (name == null) throw new IllegalArgumentException("name cannot be null");
+
+ Element current = elementStack.peek();
+ current.writeAttribute(name, value);
+ return this;
+ }
+
+ public StaxWriter<N> writeStartElement(N element) throws StaxNavException
+ {
+ Element current = elementStack.peek();
+ if (current instanceof RootElement)
+ {
+ if (((RootElement) current).started)
+ {
+ current = new StreamElement(writer, formatter);
+ elementStack.push(current);
+ }
+ }
+ else
+ {
+ current = new StreamElement(writer, formatter);
+ elementStack.push(current);
+ }
+
+ current.writeStartElement(naming, element);
+ return this;
+ }
+
+ public StaxWriter<N> writeEndElement() throws StaxNavException
+ {
+ if (elementStack.isEmpty()) throw new StaxNavException(null, "No matching startElement was found for this endElement");
+
+ elementStack.pop().end();
+
+ return this;
+ }
+
+ public StaxWriter<N> writeContent(String content) throws StaxNavException
+ {
+ return writeContent(WritableValueTypes.STRING, content);
+ }
+
+ public <V> StaxWriter<N> writeContent(WritableValueType<V> valueType, V content) throws StaxNavException
+ {
+ if (valueType == null) throw new IllegalArgumentException("valueType cannot be null.");
+ if (content == null) throw new IllegalArgumentException("content cannot be null.");
+
+ Element current = elementStack.peek();
+ current.writeContent(valueType.format(content));
+
+ return this;
+ }
+
+ public <V> StaxWriter<N> writeElement(N element, String content) throws StaxNavException
+ {
+ return writeElement(element, WritableValueTypes.STRING, content);
+ }
+
+ public <V> StaxWriter<N> writeElement(N element, WritableValueType<V> valueType, V content) throws StaxNavException
+ {
+ writeStartElement(element).writeContent(valueType, content).writeEndElement();
+ return this;
+ }
+
+ public StaxWriter<N> writeNamespace(String prefix, String uri) throws StaxNavException
+ {
+ Element current = elementStack.peek();
+ current.writeNamespace(prefix, uri);
+ return this;
+ }
+
+ public StaxWriter<N> writeDefaultNamespace(String uri) throws StaxNavException
+ {
+ Element current = elementStack.peek();
+ current.writeDefaultNamespace(uri);
+ return this;
+ }
+
+ public StaxWriter<N> writeComment(final String comment) throws StaxNavException
+ {
+ Element current = elementStack.peek();
+ current.writeComment(comment);
+ return this;
+ }
+
+ public StaxWriter<N> writeCData(String cdata) throws StaxNavException
+ {
+ Element current = elementStack.peek();
+ current.writeCData(cdata);
+ return this;
+ }
+
+ public void finish() throws StaxNavException
+ {
+ while (!elementStack.isEmpty())
+ {
+ elementStack.pop().end();
+ }
+ }
+
+ private static abstract class Element
+ {
+ abstract void writeAttribute(String name, String value) throws StaxNavException;
+
+ abstract <N> void writeAttribute(QName name, String value) throws StaxNavException;
+
+ abstract <N> void writeStartElement(Naming<N> naming, N name) throws StaxNavException;
+
+ abstract void writeContent(String content) throws StaxNavException;
+
+ abstract void writeNamespace(String prefix, String uri) throws StaxNavException;
+
+ abstract void writeDefaultNamespace(String uri) throws StaxNavException;
+
+ abstract void writeComment(String comment) throws StaxNavException;
+
+ abstract void writeCData(String cdata) throws StaxNavException;
+
+ abstract void end();
+
+ XMLStreamWriter writer;
+ XmlStreamingFormatter formatter;
+ private List<StreamClosure> closures;
+
+ Element(XMLStreamWriter writer, XmlStreamingFormatter formatter)
+ {
+ this(writer, formatter, null);
+ }
+
+ Element(XMLStreamWriter writer, XmlStreamingFormatter formatter, List<StreamClosure> closures)
+ {
+ this.writer = writer;
+ this.formatter = formatter;
+ this.closures = closures;
+ }
+
+ void apply(int event, StreamClosure closure) throws StaxNavException
+ {
+ try
+ {
+ formatter.before(writer, event);
+ closure.execute(writer);
+ formatter.after(writer, event);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(e);
+ }
+ }
+ }
+
+ private static class RootElement extends Element
+ {
+ private String encoding;
+ private String version;
+ private Element element;
+ private boolean started;
+
+ RootElement(XMLStreamWriter writer, XmlStreamingFormatter formatter, String encoding, String version)
+ {
+ super(writer, formatter);
+ this.encoding = encoding;
+ this.version = version;
+ }
+
+ public void writeAttribute(String name, String value) throws StaxNavException
+ {
+ get().writeAttribute(name, value);
+ }
+
+ public <N> void writeAttribute(QName name, String value) throws StaxNavException
+ {
+ get().writeAttribute(name, value);
+ }
+
+ public <N> void writeStartElement(Naming<N> naming, N name) throws StaxNavException
+ {
+ get().writeStartElement(naming, name);
+ started = true;
+ }
+
+ public void writeContent(String content) throws StaxNavException
+ {
+ get().writeContent(content);
+ }
+
+ public void writeNamespace(String prefix, String uri) throws StaxNavException
+ {
+ get().writeNamespace(prefix, uri);
+ }
+
+ public void writeDefaultNamespace(String uri) throws StaxNavException
+ {
+ get().writeDefaultNamespace(uri);
+ }
+
+ public void writeComment(String comment) throws StaxNavException
+ {
+ get().writeComment(comment);
+ }
+
+ public void writeCData(String cdata) throws StaxNavException
+ {
+ get().writeCData(cdata);
+ }
+
+ public void end()
+ {
+ if (started)
+ {
+ get().end();
+ }
+ endDocument();
+ }
+
+ private Element get()
+ {
+ if (element == null)
+ {
+ startDocument();
+ element = new StreamElement(writer, formatter);
+ }
+ return element;
+ }
+
+ private void startDocument() throws StaxNavException
+ {
+ apply(START_DOCUMENT, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ if (encoding == null && version == null)
+ {
+ writer.writeStartDocument();
+ }
+ else if (encoding == null)
+ {
+ writer.writeStartDocument(version);
+ }
+ else
+ {
+ writer.writeStartDocument(encoding, version);
+ }
+ }
+ });
+ }
+
+ private void endDocument() throws StaxNavException
+ {
+ try
+ {
+ apply(END_DOCUMENT, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeEndDocument();
+ }
+ });
+
+ writer.flush();
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(e);
+ }
+ finally
+ {
+ try
+ {
+ writer.close();
+ }
+ catch (XMLStreamException e)
+ {
+ }
+ }
+ }
+ }
+
+ private static class StreamElement extends Element
+ {
+ StreamElement(XMLStreamWriter writer, XmlStreamingFormatter formatter)
+ {
+ super(writer, formatter);
+ }
+
+ public void writeAttribute(final String name, final String value) throws StaxNavException
+ {
+ apply(ATTRIBUTE, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeAttribute(name, value);
+ }
+ });
+ }
+
+ public <N> void writeAttribute(QName name, final String value) throws StaxNavException
+ {
+ final String prefix = name.getPrefix();
+ final String uri = name.getNamespaceURI();
+ final String localPart = name.getLocalPart();
+
+ apply(ATTRIBUTE, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ if (uri == null || XMLConstants.NULL_NS_URI.equals(uri))
+ {
+ writer.writeAttribute(localPart, value);
+ }
+ else if (prefix == null || XMLConstants.DEFAULT_NS_PREFIX.equals(prefix))
+ {
+ writer.writeAttribute(uri, localPart, value);
+ }
+ else
+ {
+ writer.writeAttribute(prefix, uri, localPart, value);
+ }
+ }
+ });
+ }
+
+ public <N> void writeStartElement(Naming<N> naming, N name) throws StaxNavException
+ {
+ final String prefix = naming.getPrefix(name);
+ final String uri = naming.getURI(name);
+ final String localPart = naming.getLocalPart(name);
+
+ apply(START_ELEMENT, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ if (uri == null || XMLConstants.NULL_NS_URI.equals(uri))
+ {
+ writer.writeStartElement(localPart);
+ }
+ else if (prefix == null || XMLConstants.DEFAULT_NS_PREFIX.equals(prefix))
+ {
+ writer.writeStartElement(uri, localPart);
+ }
+ else
+ {
+ writer.writeStartElement(prefix, localPart, uri);
+ }
+ }
+ });
+ }
+
+ public void writeContent(final String content) throws StaxNavException
+ {
+ apply(CHARACTERS, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeCharacters(content);
+ }
+ });
+ }
+
+ public void writeNamespace(final String prefix, final String uri) throws StaxNavException
+ {
+ apply(NAMESPACE, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeNamespace(prefix, uri);
+ }
+ });
+ }
+
+ public void writeDefaultNamespace(final String uri) throws StaxNavException
+ {
+ apply(NAMESPACE, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeDefaultNamespace(uri);
+ }
+ });
+ }
+
+ public void writeComment(final String comment) throws StaxNavException
+ {
+ apply(COMMENT, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeComment(comment);
+ }
+ });
+ }
+
+ public void writeCData(final String cdata) throws StaxNavException
+ {
+ apply(CDATA, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeCData(cdata);
+ }
+ });
+ }
+
+ public void end()
+ {
+ apply(END_ELEMENT, new StreamClosure()
+ {
+ public void execute(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeEndElement();
+ }
+ });
+ }
+ }
+
+ private static interface StreamClosure
+ {
+ void execute(XMLStreamWriter writer) throws XMLStreamException;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,199 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer;
-
-import org.gatein.common.xml.stax.writer.builder.StaxFormatterBuilder;
-import org.gatein.common.xml.stax.writer.builder.StaxFormatterBuilderImpl;
-import org.gatein.common.xml.stax.writer.builder.StaxWriterBuilder;
-import org.gatein.common.xml.stax.writer.builder.StaxWriterBuilderImpl;
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-import org.staxnav.EnumElement;
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-
-import javax.xml.namespace.QName;
-import java.io.OutputStream;
-import java.io.Writer;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class StaxWriterUtils
-{
- public static <N> StaxWriter<N> createWriter(Naming<N> naming, OutputStream outputStream) throws StaxNavException
- {
- return buildDefaultWriter(outputStream).build(naming);
- }
-
- public static StaxWriter<String> createWriter(OutputStream outputStream) throws StaxNavException
- {
- return createWriter(new Naming.Local(), outputStream);
- }
-
- public static StaxWriter<QName> createQualifiedWriter(OutputStream outputStream) throws StaxNavException
- {
- return createWriter(new Naming.Qualified(), outputStream);
- }
-
- public static <E extends Enum<E> & EnumElement<E>> StaxWriter<E> createWriter(Class<E> enumeratedClass,
- OutputStream outputStream) throws StaxNavException
- {
- Naming<E> naming;
- if (EnumElement.class.isAssignableFrom(enumeratedClass))
- {
- naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, null);
- }
- else
- {
- naming = new Naming.Enumerated.Simple<E>(enumeratedClass, null);
- }
-
- return createWriter(naming, outputStream);
- }
-
- public static <N> StaxWriter<N> createWriter(Naming<N> naming, Writer writer) throws StaxNavException
- {
- return buildDefaultWriter().withWriter(writer).build(naming);
- }
-
- public static StaxWriter<String> createWriter(Writer writer) throws StaxNavException
- {
- return createWriter(new Naming.Local(), writer);
- }
-
- public static StaxWriter<QName> createQualifiedWriter(Writer writer) throws StaxNavException
- {
- return createWriter(new Naming.Qualified(), writer);
- }
-
- public static <E extends Enum<E> & EnumElement<E>> StaxWriter<E> createWriter(Class<E> enumeratedClass,
- Writer writer) throws StaxNavException
- {
- Naming<E> naming;
- if (EnumElement.class.isAssignableFrom(enumeratedClass))
- {
- naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, null);
- }
- else
- {
- naming = new Naming.Enumerated.Simple<E>(enumeratedClass, null);
- }
-
- return createWriter(naming, writer);
- }
-
- public static StaxWriterBuilder buildWriter()
- {
- return new StaxWriterBuilderImpl();
- }
-
- public static XmlStreamingFormatter createFormatter()
- {
- return buildFormatter().withNewline(DEFAULT_NEWLINE)
- .ofIndentSize(DEFAULT_INDENT_SIZE).withIndentCharacter(DEFAULT_INDENT_CHAR)
- .build();
- }
-
- public static XmlStreamingFormatter createFormatter(int indentSize)
- {
- return buildFormatter().withNewline(DEFAULT_NEWLINE)
- .ofIndentSize(indentSize).withIndentCharacter(DEFAULT_INDENT_CHAR)
- .build();
- }
-
- public static StaxFormatterBuilder buildFormatter()
- {
- return new StaxFormatterBuilderImpl();
- }
-
- public static <N> void writeOptionalElement(StaxWriter<N> writer, N element, String content)
- {
- if (content == null) return;
-
- writer.writeElement(element, content);
- }
-
- public static <N, V> void writeOptionalElement(StaxWriter<N> writer, N element, WritableValueType<V> valueType, V value)
- {
- if (value == null) return;
-
- writer.writeElement(element, valueType, value);
- }
-
- public static <N> void writeOptionalContent(StaxWriter<N> writer, N element, String content)
- {
- writer.writeStartElement(element);
- if (content != null)
- {
- writer.writeContent(content);
- }
- writer.writeEndElement();
- }
-
- public static <N, V> void writeOptionalContent(StaxWriter<N> writer, N element, WritableValueType<V> valueType, V value)
- {
- writer.writeStartElement(element);
- if (value != null)
- {
- writer.writeContent(valueType, value);
- }
- writer.writeEndElement();
- }
-
- private static StaxWriterBuilder buildDefaultWriter()
- {
- return buildWriter().withEncoding("UTF-8").withVersion("1.0")
- .withPropertyIfSupported("com.ctc.wstx.outputEscapeCr", Boolean.FALSE)
- .withFormatting(createFormatter());
- }
-
- private static StaxWriterBuilder buildDefaultWriter(OutputStream outputStream)
- {
- return buildWriter().withEncoding("UTF-8").withVersion("1.0")
- .withPropertyIfSupported("com.ctc.wstx.outputEscapeCr", Boolean.FALSE)
- .withFormatting(createFormatter())
- .withOutputStream(outputStream, "UTF-8");
- }
-
- private static final int DEFAULT_INDENT_SIZE = 3;
- private static final char DEFAULT_INDENT_CHAR = ' ';
- private static final String DEFAULT_NEWLINE;
-
- static
- {
- String newline = null;
- try
- {
- newline = System.getProperty("line.separator");
- }
- catch (Throwable ignored)
- {
- }
- if (newline == null) newline = "\n";
-
- DEFAULT_NEWLINE = newline;
- }
-
- private StaxWriterUtils(){}
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/StaxWriterUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,199 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer;
+
+import org.gatein.common.xml.stax.writer.builder.StaxFormatterBuilder;
+import org.gatein.common.xml.stax.writer.builder.StaxFormatterBuilderImpl;
+import org.gatein.common.xml.stax.writer.builder.StaxWriterBuilder;
+import org.gatein.common.xml.stax.writer.builder.StaxWriterBuilderImpl;
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+import org.staxnav.EnumElement;
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+
+import javax.xml.namespace.QName;
+import java.io.OutputStream;
+import java.io.Writer;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class StaxWriterUtils
+{
+ public static <N> StaxWriter<N> createWriter(Naming<N> naming, OutputStream outputStream) throws StaxNavException
+ {
+ return buildDefaultWriter(outputStream).build(naming);
+ }
+
+ public static StaxWriter<String> createWriter(OutputStream outputStream) throws StaxNavException
+ {
+ return createWriter(new Naming.Local(), outputStream);
+ }
+
+ public static StaxWriter<QName> createQualifiedWriter(OutputStream outputStream) throws StaxNavException
+ {
+ return createWriter(new Naming.Qualified(), outputStream);
+ }
+
+ public static <E extends Enum<E> & EnumElement<E>> StaxWriter<E> createWriter(Class<E> enumeratedClass,
+ OutputStream outputStream) throws StaxNavException
+ {
+ Naming<E> naming;
+ if (EnumElement.class.isAssignableFrom(enumeratedClass))
+ {
+ naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, null);
+ }
+ else
+ {
+ naming = new Naming.Enumerated.Simple<E>(enumeratedClass, null);
+ }
+
+ return createWriter(naming, outputStream);
+ }
+
+ public static <N> StaxWriter<N> createWriter(Naming<N> naming, Writer writer) throws StaxNavException
+ {
+ return buildDefaultWriter().withWriter(writer).build(naming);
+ }
+
+ public static StaxWriter<String> createWriter(Writer writer) throws StaxNavException
+ {
+ return createWriter(new Naming.Local(), writer);
+ }
+
+ public static StaxWriter<QName> createQualifiedWriter(Writer writer) throws StaxNavException
+ {
+ return createWriter(new Naming.Qualified(), writer);
+ }
+
+ public static <E extends Enum<E> & EnumElement<E>> StaxWriter<E> createWriter(Class<E> enumeratedClass,
+ Writer writer) throws StaxNavException
+ {
+ Naming<E> naming;
+ if (EnumElement.class.isAssignableFrom(enumeratedClass))
+ {
+ naming = new Naming.Enumerated.Mapped<E>(enumeratedClass, null);
+ }
+ else
+ {
+ naming = new Naming.Enumerated.Simple<E>(enumeratedClass, null);
+ }
+
+ return createWriter(naming, writer);
+ }
+
+ public static StaxWriterBuilder buildWriter()
+ {
+ return new StaxWriterBuilderImpl();
+ }
+
+ public static XmlStreamingFormatter createFormatter()
+ {
+ return buildFormatter().withNewline(DEFAULT_NEWLINE)
+ .ofIndentSize(DEFAULT_INDENT_SIZE).withIndentCharacter(DEFAULT_INDENT_CHAR)
+ .build();
+ }
+
+ public static XmlStreamingFormatter createFormatter(int indentSize)
+ {
+ return buildFormatter().withNewline(DEFAULT_NEWLINE)
+ .ofIndentSize(indentSize).withIndentCharacter(DEFAULT_INDENT_CHAR)
+ .build();
+ }
+
+ public static StaxFormatterBuilder buildFormatter()
+ {
+ return new StaxFormatterBuilderImpl();
+ }
+
+ public static <N> void writeOptionalElement(StaxWriter<N> writer, N element, String content)
+ {
+ if (content == null) return;
+
+ writer.writeElement(element, content);
+ }
+
+ public static <N, V> void writeOptionalElement(StaxWriter<N> writer, N element, WritableValueType<V> valueType, V value)
+ {
+ if (value == null) return;
+
+ writer.writeElement(element, valueType, value);
+ }
+
+ public static <N> void writeOptionalContent(StaxWriter<N> writer, N element, String content)
+ {
+ writer.writeStartElement(element);
+ if (content != null)
+ {
+ writer.writeContent(content);
+ }
+ writer.writeEndElement();
+ }
+
+ public static <N, V> void writeOptionalContent(StaxWriter<N> writer, N element, WritableValueType<V> valueType, V value)
+ {
+ writer.writeStartElement(element);
+ if (value != null)
+ {
+ writer.writeContent(valueType, value);
+ }
+ writer.writeEndElement();
+ }
+
+ private static StaxWriterBuilder buildDefaultWriter()
+ {
+ return buildWriter().withEncoding("UTF-8").withVersion("1.0")
+ .withPropertyIfSupported("com.ctc.wstx.outputEscapeCr", Boolean.FALSE)
+ .withFormatting(createFormatter());
+ }
+
+ private static StaxWriterBuilder buildDefaultWriter(OutputStream outputStream)
+ {
+ return buildWriter().withEncoding("UTF-8").withVersion("1.0")
+ .withPropertyIfSupported("com.ctc.wstx.outputEscapeCr", Boolean.FALSE)
+ .withFormatting(createFormatter())
+ .withOutputStream(outputStream, "UTF-8");
+ }
+
+ private static final int DEFAULT_INDENT_SIZE = 3;
+ private static final char DEFAULT_INDENT_CHAR = ' ';
+ private static final String DEFAULT_NEWLINE;
+
+ static
+ {
+ String newline = null;
+ try
+ {
+ newline = System.getProperty("line.separator");
+ }
+ catch (Throwable ignored)
+ {
+ }
+ if (newline == null) newline = "\n";
+
+ DEFAULT_NEWLINE = newline;
+ }
+
+ private StaxWriterUtils(){}
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer;
-
-import org.staxnav.StaxNavException;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public interface WritableValueType<V>
-{
- String format(V value) throws StaxNavException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueType.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer;
+
+import org.staxnav.StaxNavException;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public interface WritableValueType<V>
+{
+ String format(V value) throws StaxNavException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer;
-
-import org.staxnav.StaxNavException;
-
-import javax.xml.bind.DatatypeConverter;
-import java.util.Calendar;
-import java.util.Date;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class WritableValueTypes
-{
- /**
- * Returns a value type for an enum class.
- *
- * @param <E> the enum parameter type
- * @return the corresponding value type
- */
- public static <E extends Enum<E>> WritableValueType<E> getEnumType()
- {
- return new EnumType<E>();
- }
-
- public static final WritableValueType<String> STRING = new WritableValueType<String>()
- {
- @Override
- public String format(String value) throws StaxNavException
- {
- return value;
- }
- };
-
- public static final WritableValueType<String> TRIMMED_STRING = new WritableValueType<String>()
- {
- @Override
- public String format(String value) throws StaxNavException
- {
- return value.trim();
- }
- };
-
- public static final WritableValueType<Boolean> BOOLEAN = new WritableValueType<Boolean>()
- {
- @Override
- public String format(Boolean value) throws StaxNavException
- {
- return value.toString();
- }
- };
-
- public static final WritableValueType<Integer> INTEGER = new WritableValueType<Integer>()
- {
- @Override
- public String format(Integer value) throws StaxNavException
- {
- return value.toString();
- }
- };
-
- public static final WritableValueType<Date> DATE = new WritableValueType<Date>()
- {
- @Override
- public String format(Date value) throws StaxNavException
- {
- Calendar cal = Calendar.getInstance();
- cal.setTime(value);
- return DatatypeConverter.printDate(cal);
- }
- };
-
- public static final WritableValueType<Date> DATE_TIME = new WritableValueType<Date>()
- {
-
- @Override
- public String format(Date value) throws StaxNavException
- {
- Calendar cal = Calendar.getInstance();
- cal.setTime(value);
- return DatatypeConverter.printDateTime(cal);
- }
- };
-
- protected static class EnumType<E extends Enum<E>> implements WritableValueType<E>
- {
- @Override
- public String format(E value) throws StaxNavException
- {
- return value.name();
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/WritableValueTypes.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer;
+
+import org.staxnav.StaxNavException;
+
+import javax.xml.bind.DatatypeConverter;
+import java.util.Calendar;
+import java.util.Date;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class WritableValueTypes
+{
+ /**
+ * Returns a value type for an enum class.
+ *
+ * @param <E> the enum parameter type
+ * @return the corresponding value type
+ */
+ public static <E extends Enum<E>> WritableValueType<E> getEnumType()
+ {
+ return new EnumType<E>();
+ }
+
+ public static final WritableValueType<String> STRING = new WritableValueType<String>()
+ {
+ @Override
+ public String format(String value) throws StaxNavException
+ {
+ return value;
+ }
+ };
+
+ public static final WritableValueType<String> TRIMMED_STRING = new WritableValueType<String>()
+ {
+ @Override
+ public String format(String value) throws StaxNavException
+ {
+ return value.trim();
+ }
+ };
+
+ public static final WritableValueType<Boolean> BOOLEAN = new WritableValueType<Boolean>()
+ {
+ @Override
+ public String format(Boolean value) throws StaxNavException
+ {
+ return value.toString();
+ }
+ };
+
+ public static final WritableValueType<Integer> INTEGER = new WritableValueType<Integer>()
+ {
+ @Override
+ public String format(Integer value) throws StaxNavException
+ {
+ return value.toString();
+ }
+ };
+
+ public static final WritableValueType<Date> DATE = new WritableValueType<Date>()
+ {
+ @Override
+ public String format(Date value) throws StaxNavException
+ {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(value);
+ return DatatypeConverter.printDate(cal);
+ }
+ };
+
+ public static final WritableValueType<Date> DATE_TIME = new WritableValueType<Date>()
+ {
+
+ @Override
+ public String format(Date value) throws StaxNavException
+ {
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(value);
+ return DatatypeConverter.printDateTime(cal);
+ }
+ };
+
+ protected static class EnumType<E extends Enum<E>> implements WritableValueType<E>
+ {
+ @Override
+ public String format(E value) throws StaxNavException
+ {
+ return value.name();
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.builder;
-
-
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public interface StaxFormatterBuilder
-{
- StaxFormatterBuilder withIndentCharacter(char indentCharacter);
-
- StaxFormatterBuilder ofIndentSize(int indentSize);
-
- StaxFormatterBuilder withNewline(String newline);
-
- XmlStreamingFormatter build() throws IllegalStateException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilder.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.builder;
+
+
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public interface StaxFormatterBuilder
+{
+ StaxFormatterBuilder withIndentCharacter(char indentCharacter);
+
+ StaxFormatterBuilder ofIndentSize(int indentSize);
+
+ StaxFormatterBuilder withNewline(String newline);
+
+ XmlStreamingFormatter build() throws IllegalStateException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.builder;
-
-
-import org.gatein.common.xml.stax.writer.formatting.SimpleFormatter;
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class StaxFormatterBuilderImpl implements StaxFormatterBuilder
-{
- private Character indentCharacter;
- private Integer indentSize;
- private String newline;
-
- public StaxFormatterBuilder withIndentCharacter(char indentCharacter)
- {
- this.indentCharacter = indentCharacter;
- return this;
- }
-
- public StaxFormatterBuilder ofIndentSize(int indentSize)
- {
- this.indentSize = indentSize;
- return this;
- }
-
- public StaxFormatterBuilder withNewline(String newline)
- {
- this.newline = newline;
- return this;
- }
-
- public XmlStreamingFormatter build()
- {
- if (indentCharacter == null) throw new IllegalStateException("indent character is required value for this builder.");
- if (indentSize == null) throw new IllegalArgumentException("indent size is a required value for this builder.");
- if (newline == null) throw new IllegalArgumentException("newline is a required value for this builder.");
-
- return new SimpleFormatter(indentCharacter, indentSize, newline);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxFormatterBuilderImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.builder;
+
+
+import org.gatein.common.xml.stax.writer.formatting.SimpleFormatter;
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class StaxFormatterBuilderImpl implements StaxFormatterBuilder
+{
+ private Character indentCharacter;
+ private Integer indentSize;
+ private String newline;
+
+ public StaxFormatterBuilder withIndentCharacter(char indentCharacter)
+ {
+ this.indentCharacter = indentCharacter;
+ return this;
+ }
+
+ public StaxFormatterBuilder ofIndentSize(int indentSize)
+ {
+ this.indentSize = indentSize;
+ return this;
+ }
+
+ public StaxFormatterBuilder withNewline(String newline)
+ {
+ this.newline = newline;
+ return this;
+ }
+
+ public XmlStreamingFormatter build()
+ {
+ if (indentCharacter == null) throw new IllegalStateException("indent character is required value for this builder.");
+ if (indentSize == null) throw new IllegalArgumentException("indent size is a required value for this builder.");
+ if (newline == null) throw new IllegalArgumentException("newline is a required value for this builder.");
+
+ return new SimpleFormatter(indentCharacter, indentSize, newline);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.builder;
-
-
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import java.io.OutputStream;
-import java.io.Writer;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public interface StaxWriterBuilder
-{
- StaxWriterBuilder withProperty(String name, Object value);
-
- StaxWriterBuilder withPropertyIfSupported(String name, Object value);
-
- StaxWriterBuilder withEncoding(String encoding);
-
- StaxWriterBuilder withVersion(String version);
-
- StaxWriterBuilder withFormatting(XmlStreamingFormatter formatter);
-
- StaxWriterBuilder withOutputStream(OutputStream outputStream);
-
- StaxWriterBuilder withOutputStream(OutputStream outputStream, String encoding);
-
- StaxWriterBuilder withWriter(Writer writer);
-
- StaxWriterBuilder withResult(Result result);
-
- StaxWriterBuilder withXmlStreamWriter(XMLStreamWriter writer);
-
- <N> StaxWriter<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilder.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.builder;
+
+
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.Result;
+import java.io.OutputStream;
+import java.io.Writer;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public interface StaxWriterBuilder
+{
+ StaxWriterBuilder withProperty(String name, Object value);
+
+ StaxWriterBuilder withPropertyIfSupported(String name, Object value);
+
+ StaxWriterBuilder withEncoding(String encoding);
+
+ StaxWriterBuilder withVersion(String version);
+
+ StaxWriterBuilder withFormatting(XmlStreamingFormatter formatter);
+
+ StaxWriterBuilder withOutputStream(OutputStream outputStream);
+
+ StaxWriterBuilder withOutputStream(OutputStream outputStream, String encoding);
+
+ StaxWriterBuilder withWriter(Writer writer);
+
+ StaxWriterBuilder withResult(Result result);
+
+ StaxWriterBuilder withXmlStreamWriter(XMLStreamWriter writer);
+
+ <N> StaxWriter<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,224 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.builder;
-
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.common.xml.stax.writer.StaxWriterImpl;
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-import org.staxnav.Naming;
-import org.staxnav.StaxNavException;
-
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-import javax.xml.transform.Result;
-import java.io.OutputStream;
-import java.io.Writer;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class StaxWriterBuilderImpl implements StaxWriterBuilder
-{
- private XMLStreamWriter writer;
- private Object output;
- private String outputEncoding;
- private String version;
- private String encoding;
-
- private XmlStreamingFormatter formatter;
-
- private Map<String, Object> properties = new HashMap<String, Object>();
- private Map<String, Object> supportedProperties = new HashMap<String, Object>();
-
- public StaxWriterBuilder withProperty(String name, Object value)
- {
- if (name == null) throw new IllegalArgumentException("name is null");
- if (value == null) throw new IllegalArgumentException("value is null");
-
- properties.put(name, value);
- return this;
- }
-
- public StaxWriterBuilder withPropertyIfSupported(String name, Object value)
- {
- if (name == null) throw new IllegalArgumentException("name is null");
- if (value == null) throw new IllegalArgumentException("value is null");
-
- supportedProperties.put(name, value);
- return this;
- }
-
- public StaxWriterBuilder withOutputStream(OutputStream outputStream)
- {
- if (outputStream == null) throw new IllegalArgumentException("outputStream is null");
-
- output = outputStream;
- return this;
- }
-
- public StaxWriterBuilder withOutputStream(OutputStream outputStream, String encoding)
- {
- if (outputStream == null) throw new IllegalArgumentException("outputStream is null");
- if (encoding == null) throw new IllegalArgumentException("encoding is null");
-
- output = outputStream;
- outputEncoding = encoding;
- return this;
- }
-
- public StaxWriterBuilder withWriter(Writer writer)
- {
- if (writer == null) throw new IllegalArgumentException("writer is null");
-
- this.output = writer;
- return this;
- }
-
- public StaxWriterBuilder withResult(Result result)
- {
- if (result == null) throw new IllegalArgumentException("result is null");
-
- output = result;
- return this;
- }
-
- public StaxWriterBuilder withXmlStreamWriter(XMLStreamWriter writer)
- {
- if (writer == null) throw new IllegalArgumentException("writer is null");
-
- this.writer = writer;
- return this;
- }
-
- public StaxWriterBuilder withEncoding(String encoding)
- {
- if (encoding == null) throw new IllegalArgumentException("encoding is null");
-
- this.encoding = encoding;
- return this;
- }
-
- public StaxWriterBuilder withVersion(String version)
- {
- if (version == null) throw new IllegalArgumentException("version is null");
-
- this.version = version;
- return this;
- }
-
- public StaxWriterBuilder withFormatting(XmlStreamingFormatter formatter)
- {
- if (formatter == null) throw new IllegalArgumentException("formatter is null");
-
- this.formatter = formatter;
- return this;
- }
-
- public <N> StaxWriter<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException
- {
- if (naming == null) throw new IllegalArgumentException("naming is null");
-
- if (writer == null && output == null)
- throw new IllegalStateException("Cannot build stax writer. Try calling withOutputStream/withWriter or pass in own XMLStreamWriter.");
-
- if (writer == null)
- {
- //TODO: Create solution to properly cache XMLOutputFactory
- XMLOutputFactory factory = XMLOutputFactory.newInstance();
-
- // Set properties
- for (Map.Entry<String, Object> entry : properties.entrySet())
- {
- factory.setProperty(entry.getKey(), entry.getValue());
- }
-
- // Set properties if supported
- for (Map.Entry<String, Object> entry : supportedProperties.entrySet())
- {
- String name = entry.getKey();
- if (factory.isPropertySupported(name))
- {
- factory.setProperty(name, entry.getValue());
- }
- }
-
- if (output instanceof OutputStream)
- {
- if (outputEncoding != null)
- {
- try
- {
- writer = factory.createXMLStreamWriter((OutputStream) output, outputEncoding);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(e);
- }
- }
- else
- {
- try
- {
- writer = factory.createXMLStreamWriter((OutputStream) output);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(null, "Exception creating XMLStreamWriter with OutputStream: " + output, e);
- }
- }
- }
- else if (output instanceof Writer)
- {
- try
- {
- writer = factory.createXMLStreamWriter((Writer) output);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(null, "Exception creating XMLStreamWriter with Writer: " + output, e);
- }
- }
- else if (output instanceof Result)
- {
- try
- {
- writer = factory.createXMLStreamWriter((Result) output);
- }
- catch (XMLStreamException e)
- {
- throw new StaxNavException(null, "Exception creating XMLStreamWriter with Result: " + output, e);
- }
- }
- else
- {
- throw new IllegalStateException("Unknown output: " + output); // should never happen...
- }
- }
-
- return new StaxWriterImpl<N>(naming, writer, formatter, encoding, version);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/builder/StaxWriterBuilderImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,224 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.builder;
+
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.common.xml.stax.writer.StaxWriterImpl;
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+import org.staxnav.Naming;
+import org.staxnav.StaxNavException;
+
+import javax.xml.stream.XMLOutputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+import javax.xml.transform.Result;
+import java.io.OutputStream;
+import java.io.Writer;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class StaxWriterBuilderImpl implements StaxWriterBuilder
+{
+ private XMLStreamWriter writer;
+ private Object output;
+ private String outputEncoding;
+ private String version;
+ private String encoding;
+
+ private XmlStreamingFormatter formatter;
+
+ private Map<String, Object> properties = new HashMap<String, Object>();
+ private Map<String, Object> supportedProperties = new HashMap<String, Object>();
+
+ public StaxWriterBuilder withProperty(String name, Object value)
+ {
+ if (name == null) throw new IllegalArgumentException("name is null");
+ if (value == null) throw new IllegalArgumentException("value is null");
+
+ properties.put(name, value);
+ return this;
+ }
+
+ public StaxWriterBuilder withPropertyIfSupported(String name, Object value)
+ {
+ if (name == null) throw new IllegalArgumentException("name is null");
+ if (value == null) throw new IllegalArgumentException("value is null");
+
+ supportedProperties.put(name, value);
+ return this;
+ }
+
+ public StaxWriterBuilder withOutputStream(OutputStream outputStream)
+ {
+ if (outputStream == null) throw new IllegalArgumentException("outputStream is null");
+
+ output = outputStream;
+ return this;
+ }
+
+ public StaxWriterBuilder withOutputStream(OutputStream outputStream, String encoding)
+ {
+ if (outputStream == null) throw new IllegalArgumentException("outputStream is null");
+ if (encoding == null) throw new IllegalArgumentException("encoding is null");
+
+ output = outputStream;
+ outputEncoding = encoding;
+ return this;
+ }
+
+ public StaxWriterBuilder withWriter(Writer writer)
+ {
+ if (writer == null) throw new IllegalArgumentException("writer is null");
+
+ this.output = writer;
+ return this;
+ }
+
+ public StaxWriterBuilder withResult(Result result)
+ {
+ if (result == null) throw new IllegalArgumentException("result is null");
+
+ output = result;
+ return this;
+ }
+
+ public StaxWriterBuilder withXmlStreamWriter(XMLStreamWriter writer)
+ {
+ if (writer == null) throw new IllegalArgumentException("writer is null");
+
+ this.writer = writer;
+ return this;
+ }
+
+ public StaxWriterBuilder withEncoding(String encoding)
+ {
+ if (encoding == null) throw new IllegalArgumentException("encoding is null");
+
+ this.encoding = encoding;
+ return this;
+ }
+
+ public StaxWriterBuilder withVersion(String version)
+ {
+ if (version == null) throw new IllegalArgumentException("version is null");
+
+ this.version = version;
+ return this;
+ }
+
+ public StaxWriterBuilder withFormatting(XmlStreamingFormatter formatter)
+ {
+ if (formatter == null) throw new IllegalArgumentException("formatter is null");
+
+ this.formatter = formatter;
+ return this;
+ }
+
+ public <N> StaxWriter<N> build(Naming<N> naming) throws StaxNavException, IllegalStateException
+ {
+ if (naming == null) throw new IllegalArgumentException("naming is null");
+
+ if (writer == null && output == null)
+ throw new IllegalStateException("Cannot build stax writer. Try calling withOutputStream/withWriter or pass in own XMLStreamWriter.");
+
+ if (writer == null)
+ {
+ //TODO: Create solution to properly cache XMLOutputFactory
+ XMLOutputFactory factory = XMLOutputFactory.newInstance();
+
+ // Set properties
+ for (Map.Entry<String, Object> entry : properties.entrySet())
+ {
+ factory.setProperty(entry.getKey(), entry.getValue());
+ }
+
+ // Set properties if supported
+ for (Map.Entry<String, Object> entry : supportedProperties.entrySet())
+ {
+ String name = entry.getKey();
+ if (factory.isPropertySupported(name))
+ {
+ factory.setProperty(name, entry.getValue());
+ }
+ }
+
+ if (output instanceof OutputStream)
+ {
+ if (outputEncoding != null)
+ {
+ try
+ {
+ writer = factory.createXMLStreamWriter((OutputStream) output, outputEncoding);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(e);
+ }
+ }
+ else
+ {
+ try
+ {
+ writer = factory.createXMLStreamWriter((OutputStream) output);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(null, "Exception creating XMLStreamWriter with OutputStream: " + output, e);
+ }
+ }
+ }
+ else if (output instanceof Writer)
+ {
+ try
+ {
+ writer = factory.createXMLStreamWriter((Writer) output);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(null, "Exception creating XMLStreamWriter with Writer: " + output, e);
+ }
+ }
+ else if (output instanceof Result)
+ {
+ try
+ {
+ writer = factory.createXMLStreamWriter((Result) output);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new StaxNavException(null, "Exception creating XMLStreamWriter with Result: " + output, e);
+ }
+ }
+ else
+ {
+ throw new IllegalStateException("Unknown output: " + output); // should never happen...
+ }
+ }
+
+ return new StaxWriterImpl<N>(naming, writer, formatter, encoding, version);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.formatting;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NoOpFormatter implements XmlStreamingFormatter
-{
- @Override
- public void before(XMLStreamWriter writer, int event) throws XMLStreamException
- {
- // No-op
- }
-
- @Override
- public void after(XMLStreamWriter writer, int event) throws XMLStreamException
- {
- // No-op
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/NoOpFormatter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.formatting;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NoOpFormatter implements XmlStreamingFormatter
+{
+ @Override
+ public void before(XMLStreamWriter writer, int event) throws XMLStreamException
+ {
+ // No-op
+ }
+
+ @Override
+ public void after(XMLStreamWriter writer, int event) throws XMLStreamException
+ {
+ // No-op
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,114 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.formatting;
-
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SimpleFormatter implements XmlStreamingFormatter
-{
-
- public static final int DEFAULT_INDENT_SIZE = 3;
- public static final char DEFAULT_INDENT_CHAR = ' ';
- public static final String DEFAULT_NEWLINE;
-
- static
- {
- String newline = null;
- try
- {
- newline = System.getProperty("line.separator");
- }
- catch (Throwable ignored)
- {
- }
- if (newline == null) newline = "\n";
-
- DEFAULT_NEWLINE = newline;
- }
-
- private String indentSequence;
- private String newline;
- private int depth = 0;
-
- private int previousEvent;
-
- public SimpleFormatter()
- {
- this(DEFAULT_INDENT_CHAR, DEFAULT_INDENT_SIZE, DEFAULT_NEWLINE);
- }
-
- public SimpleFormatter(char indentCharacter, int indentSize, String newline)
- {
- if (newline == null) throw new IllegalArgumentException("newline cannot be null");
- this.newline = newline;
-
- StringBuilder sb = new StringBuilder();
- for (int i = 0; i < indentSize; i++)
- {
- sb.append(indentCharacter);
- }
- indentSequence = sb.toString();
- }
-
- public void before(XMLStreamWriter writer, int event) throws XMLStreamException
- {
- switch (event)
- {
- case START_ELEMENT:
- depth++;
- nl(writer);
- indent(writer);
- break;
- case END_ELEMENT:
- if (previousEvent == END_ELEMENT)
- {
- nl(writer);
- indent(writer);
- }
- depth--;
- }
- }
-
- public void after(XMLStreamWriter writer, int event) throws XMLStreamException
- {
- previousEvent = event;
- }
-
- private void nl(XMLStreamWriter writer) throws XMLStreamException
- {
- writer.writeCharacters(newline);
- }
-
- private void indent(XMLStreamWriter writer) throws XMLStreamException
- {
- for (int i = 0; i < depth - 1; i++)
- {
- writer.writeCharacters(indentSequence);
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/SimpleFormatter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.formatting;
+
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SimpleFormatter implements XmlStreamingFormatter
+{
+
+ public static final int DEFAULT_INDENT_SIZE = 3;
+ public static final char DEFAULT_INDENT_CHAR = ' ';
+ public static final String DEFAULT_NEWLINE;
+
+ static
+ {
+ String newline = null;
+ try
+ {
+ newline = System.getProperty("line.separator");
+ }
+ catch (Throwable ignored)
+ {
+ }
+ if (newline == null) newline = "\n";
+
+ DEFAULT_NEWLINE = newline;
+ }
+
+ private String indentSequence;
+ private String newline;
+ private int depth = 0;
+
+ private int previousEvent;
+
+ public SimpleFormatter()
+ {
+ this(DEFAULT_INDENT_CHAR, DEFAULT_INDENT_SIZE, DEFAULT_NEWLINE);
+ }
+
+ public SimpleFormatter(char indentCharacter, int indentSize, String newline)
+ {
+ if (newline == null) throw new IllegalArgumentException("newline cannot be null");
+ this.newline = newline;
+
+ StringBuilder sb = new StringBuilder();
+ for (int i = 0; i < indentSize; i++)
+ {
+ sb.append(indentCharacter);
+ }
+ indentSequence = sb.toString();
+ }
+
+ public void before(XMLStreamWriter writer, int event) throws XMLStreamException
+ {
+ switch (event)
+ {
+ case START_ELEMENT:
+ depth++;
+ nl(writer);
+ indent(writer);
+ break;
+ case END_ELEMENT:
+ if (previousEvent == END_ELEMENT)
+ {
+ nl(writer);
+ indent(writer);
+ }
+ depth--;
+ }
+ }
+
+ public void after(XMLStreamWriter writer, int event) throws XMLStreamException
+ {
+ previousEvent = event;
+ }
+
+ private void nl(XMLStreamWriter writer) throws XMLStreamException
+ {
+ writer.writeCharacters(newline);
+ }
+
+ private void indent(XMLStreamWriter writer) throws XMLStreamException
+ {
+ for (int i = 0; i < depth - 1; i++)
+ {
+ writer.writeCharacters(indentSequence);
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax.writer.formatting;
-
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamWriter;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public interface XmlStreamingFormatter extends XMLStreamConstants
-{
- void before(XMLStreamWriter writer, int event) throws XMLStreamException;
-
- void after(XMLStreamWriter writer, int event) throws XMLStreamException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java (from rev 6960, portal/trunk/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/main/java/org/gatein/common/xml/stax/writer/formatting/XmlStreamingFormatter.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax.writer.formatting;
+
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public interface XmlStreamingFormatter extends XMLStreamConstants
+{
+ void before(XMLStreamWriter writer, int event) throws XMLStreamException;
+
+ void after(XMLStreamWriter writer, int event) throws XMLStreamException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,357 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax;
-
-import junit.framework.TestCase;
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.common.xml.stax.writer.StaxWriterImpl;
-import org.gatein.common.xml.stax.writer.WritableValueType;
-import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
-import org.mockito.InOrder;
-import org.staxnav.Naming;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamConstants;
-import javax.xml.stream.XMLStreamWriter;
-
-import static org.mockito.Mockito.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractStaxWriterTest<N> extends TestCase
-{
- static final String ENCODING = "UTF-8";
- static final String VERSION = "1.0";
-
- private Naming<N> naming;
- protected XMLStreamWriter stream;
- protected XmlStreamingFormatter formatter;
- protected StaxWriter<N> writer;
-
- public abstract Naming<N> getNaming();
-
- @Override
- public void setUp() throws Exception
- {
- naming = getNaming();
- formatter = mock(XmlStreamingFormatter.class);
- stream = mock(XMLStreamWriter.class);
- writer = new StaxWriterImpl<N>(naming, stream, formatter, ENCODING, VERSION);
- }
-
- protected N createName(String localPart)
- {
- return naming.getName(null, null, localPart);
- }
-
- public void testEncodingAndVersion() throws Exception
- {
- String encoding = "UTF-8";
- String version = "1.0";
- StaxWriter<N> writer = new StaxWriterImpl<N>(naming, stream, formatter, encoding, version);
- writer.writeElement(createName("foo"), "blah");
-
- verify(stream).writeStartDocument(encoding, version);
-
- reset(stream);
- encoding = "encoding";
- version = "version";
- writer = new StaxWriterImpl<N>(naming, stream, formatter, encoding, version);
- writer.writeElement(createName("foo"), "blah");
-
- verify(stream).writeStartDocument(encoding, version);
- }
-
- public void testEncoding() throws Exception
- {
- String encoding = "ISO-8859-1";
- StaxWriter<N> writer = new StaxWriterImpl<N>(naming, stream, formatter, encoding, null);
- writer.writeElement(createName("foo"), "blah");
-
- verify(stream).writeStartDocument(encoding, null);
- }
-
- public void testNoEncoding() throws Exception
- {
- StaxWriter<N> writer = new StaxWriterImpl<N>(naming, stream, formatter);
- writer.writeElement(createName("foo"), "blah");
-
- verify(stream).writeStartDocument();
- }
-
- public void testStartDocument() throws Exception
- {
- writer.writeStartElement(createName("foo"));
- writer.writeComment("some comment");
- writer.writeCData("some cdata < & ...");
-
- verify(stream, times(1)).writeStartDocument(ENCODING, VERSION);
-
- }
-
- public void testWriteStartElement() throws Exception
- {
- writer.writeStartElement(createName("foo"));
- verify(stream).writeStartElement("foo");
- }
-
- public void testWriteAttribute() throws Exception
- {
- writer.writeStartElement(createName("foo")).writeAttribute("name", "value");
-
- verify(stream).writeAttribute("name", "value");
- }
-
- public void testWriteQNameAttribute() throws Exception
- {
- writer.writeStartElement(createName("foo"))
- .writeAttribute(new QName("uri", "local", "pre"), "value")
- .writeAttribute(new QName("uri", "local"), "value");
-
- verify(stream).writeAttribute("pre", "uri", "local", "value");
- verify(stream).writeAttribute("uri", "local", "value");
- }
-
- public void testWriteElement() throws Exception
- {
- writer.writeElement(createName("foo"), "content");
-
- verify(stream).writeStartElement("foo");
- verify(stream).writeCharacters("content");
- verify(stream).writeEndElement();
- }
-
- public void testWriteContent() throws Exception
- {
-
- writer.writeStartElement(createName("foo")).writeContent("blah");
- verify(stream).writeCharacters("blah");
-
- WritableValueType<String> vt = new WritableValueType<String>()
- {
- @Override
- public String format(String value)
- {
- return "some value";
- }
- };
-
- writer.writeStartElement(createName("bar")).writeContent(vt, "content");
- verify(stream).writeCharacters("some value");
- }
-
- public void testWriteNullContent() throws Exception
- {
- try
- {
- writer.writeContent(null);
- fail("IllegalArgumentException expected to be thrown");
- }
- catch (IllegalArgumentException e){}
- }
-
- public void testNamespace() throws Exception
- {
- writer.writeStartElement(createName("foo")).writeNamespace("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
-
- verify(stream).writeNamespace("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
- }
-
- public void testDefaultNamespace() throws Exception
- {
- String namespace = "http://www.example.com/ns/mynamespace";
-
- writer.writeStartElement(createName("foo")).writeDefaultNamespace(namespace);
-
- verify(stream).writeDefaultNamespace(namespace);
- }
-
- public void testComment() throws Exception
- {
- writer.writeComment("Some comment");
- writer.writeStartElement(createName("foo"));
-
- verify(stream, times(1)).writeStartDocument(ENCODING, VERSION);
- verify(stream).writeComment("Some comment");
- }
-
- public void testCData() throws Exception
- {
- String cdata = "Some cdata stuff here < & \" ";
- writer.writeCData(cdata);
- writer.writeStartElement(createName("foo"));
-
- verify(stream).writeStartDocument(ENCODING, VERSION);
- verify(stream).writeCData(cdata);
- }
-
- public void testFinish() throws Exception
- {
- writer.writeStartElement(createName("foo")).finish();
-
- verify(stream).flush();
- verify(stream).close();
- }
-
- public void testFinishNoElements() throws Exception
- {
- writer.writeComment("comment");
- writer.finish();
- verify(stream).flush();
- verify(stream).close();
- }
-
- public void testEndElementOnFinish() throws Exception
- {
- writer.writeStartElement(createName("foo")).
- writeStartElement(createName("bar")).
- writeElement(createName("foobar"), "stuff");
-
- // Even though we never explicitly call endElement for the first two start elements, finish will do that for us.
- writer.finish();
-
- verify(stream).writeStartElement("foo");
- verify(stream).writeStartElement("bar");
- verify(stream).writeStartElement("foobar");
- verify(stream).writeCharacters("stuff");
- verify(stream, times(3)).writeEndElement();
- }
-
- public void testFormatter() throws Exception
- {
- InOrder order = inOrder(formatter, stream);
-
- // Start element
- writer.writeStartElement(createName("foo"));
- verifyFormatter(order, XMLStreamConstants.START_DOCUMENT, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- // first start element also writes the document
- order.verify(stream).writeStartDocument(ENCODING, VERSION);
- }
- });
- verifyFormatter(order, XMLStreamConstants.START_ELEMENT, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeStartElement("foo");
- }
- });
-
- // Namespace
- writer.writeNamespace("prefix", "uri");
- verifyFormatter(order, XMLStreamConstants.NAMESPACE, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeNamespace("prefix", "uri");
- }
- });
-
- // Default namespace
- writer.writeDefaultNamespace("uri");
- verifyFormatter(order, XMLStreamConstants.NAMESPACE, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeDefaultNamespace("uri");
- }
- });
-
- // Attribute
- writer.writeAttribute("name", "value");
- verifyFormatter(order, XMLStreamConstants.ATTRIBUTE, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeAttribute("name", "value");
- }
- });
-
- // Comment
- writer.writeComment("comment");
- verifyFormatter(order, XMLStreamConstants.COMMENT, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeComment("comment");
- }
- });
-
- // CData
- writer.writeCData("cdata");
- verifyFormatter(order, XMLStreamConstants.CDATA, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeCData("cdata");
- }
- });
-
- // Content
- writer.writeContent("content");
- verifyFormatter(order, XMLStreamConstants.CHARACTERS, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeCharacters("content");
- }
- });
-
- // End element
- writer.writeEndElement();
- verifyFormatter(order, XMLStreamConstants.END_ELEMENT, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeEndElement();
- }
- });
-
- // End document
- writer.finish();
- verifyFormatter(order, XMLStreamConstants.END_DOCUMENT, new VerifyClosure()
- {
- public void verify(InOrder order) throws Exception
- {
- order.verify(stream).writeEndDocument();
- }
- });
- }
-
- protected void verifyFormatter(InOrder order, int event, VerifyClosure closure) throws Exception
- {
- order.verify(formatter).before(stream, event);
- closure.verify(order);
- order.verify(formatter).after(stream, event);
- }
-
- private static interface VerifyClosure
- {
- void verify(InOrder order) throws Exception;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java (from rev 6960, portal/trunk/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/AbstractStaxWriterTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,357 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax;
+
+import junit.framework.TestCase;
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.common.xml.stax.writer.StaxWriterImpl;
+import org.gatein.common.xml.stax.writer.WritableValueType;
+import org.gatein.common.xml.stax.writer.formatting.XmlStreamingFormatter;
+import org.mockito.InOrder;
+import org.staxnav.Naming;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamConstants;
+import javax.xml.stream.XMLStreamWriter;
+
+import static org.mockito.Mockito.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractStaxWriterTest<N> extends TestCase
+{
+ static final String ENCODING = "UTF-8";
+ static final String VERSION = "1.0";
+
+ private Naming<N> naming;
+ protected XMLStreamWriter stream;
+ protected XmlStreamingFormatter formatter;
+ protected StaxWriter<N> writer;
+
+ public abstract Naming<N> getNaming();
+
+ @Override
+ public void setUp() throws Exception
+ {
+ naming = getNaming();
+ formatter = mock(XmlStreamingFormatter.class);
+ stream = mock(XMLStreamWriter.class);
+ writer = new StaxWriterImpl<N>(naming, stream, formatter, ENCODING, VERSION);
+ }
+
+ protected N createName(String localPart)
+ {
+ return naming.getName(null, null, localPart);
+ }
+
+ public void testEncodingAndVersion() throws Exception
+ {
+ String encoding = "UTF-8";
+ String version = "1.0";
+ StaxWriter<N> writer = new StaxWriterImpl<N>(naming, stream, formatter, encoding, version);
+ writer.writeElement(createName("foo"), "blah");
+
+ verify(stream).writeStartDocument(encoding, version);
+
+ reset(stream);
+ encoding = "encoding";
+ version = "version";
+ writer = new StaxWriterImpl<N>(naming, stream, formatter, encoding, version);
+ writer.writeElement(createName("foo"), "blah");
+
+ verify(stream).writeStartDocument(encoding, version);
+ }
+
+ public void testEncoding() throws Exception
+ {
+ String encoding = "ISO-8859-1";
+ StaxWriter<N> writer = new StaxWriterImpl<N>(naming, stream, formatter, encoding, null);
+ writer.writeElement(createName("foo"), "blah");
+
+ verify(stream).writeStartDocument(encoding, null);
+ }
+
+ public void testNoEncoding() throws Exception
+ {
+ StaxWriter<N> writer = new StaxWriterImpl<N>(naming, stream, formatter);
+ writer.writeElement(createName("foo"), "blah");
+
+ verify(stream).writeStartDocument();
+ }
+
+ public void testStartDocument() throws Exception
+ {
+ writer.writeStartElement(createName("foo"));
+ writer.writeComment("some comment");
+ writer.writeCData("some cdata < & ...");
+
+ verify(stream, times(1)).writeStartDocument(ENCODING, VERSION);
+
+ }
+
+ public void testWriteStartElement() throws Exception
+ {
+ writer.writeStartElement(createName("foo"));
+ verify(stream).writeStartElement("foo");
+ }
+
+ public void testWriteAttribute() throws Exception
+ {
+ writer.writeStartElement(createName("foo")).writeAttribute("name", "value");
+
+ verify(stream).writeAttribute("name", "value");
+ }
+
+ public void testWriteQNameAttribute() throws Exception
+ {
+ writer.writeStartElement(createName("foo"))
+ .writeAttribute(new QName("uri", "local", "pre"), "value")
+ .writeAttribute(new QName("uri", "local"), "value");
+
+ verify(stream).writeAttribute("pre", "uri", "local", "value");
+ verify(stream).writeAttribute("uri", "local", "value");
+ }
+
+ public void testWriteElement() throws Exception
+ {
+ writer.writeElement(createName("foo"), "content");
+
+ verify(stream).writeStartElement("foo");
+ verify(stream).writeCharacters("content");
+ verify(stream).writeEndElement();
+ }
+
+ public void testWriteContent() throws Exception
+ {
+
+ writer.writeStartElement(createName("foo")).writeContent("blah");
+ verify(stream).writeCharacters("blah");
+
+ WritableValueType<String> vt = new WritableValueType<String>()
+ {
+ @Override
+ public String format(String value)
+ {
+ return "some value";
+ }
+ };
+
+ writer.writeStartElement(createName("bar")).writeContent(vt, "content");
+ verify(stream).writeCharacters("some value");
+ }
+
+ public void testWriteNullContent() throws Exception
+ {
+ try
+ {
+ writer.writeContent(null);
+ fail("IllegalArgumentException expected to be thrown");
+ }
+ catch (IllegalArgumentException e){}
+ }
+
+ public void testNamespace() throws Exception
+ {
+ writer.writeStartElement(createName("foo")).writeNamespace("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
+
+ verify(stream).writeNamespace("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
+ }
+
+ public void testDefaultNamespace() throws Exception
+ {
+ String namespace = "http://www.example.com/ns/mynamespace";
+
+ writer.writeStartElement(createName("foo")).writeDefaultNamespace(namespace);
+
+ verify(stream).writeDefaultNamespace(namespace);
+ }
+
+ public void testComment() throws Exception
+ {
+ writer.writeComment("Some comment");
+ writer.writeStartElement(createName("foo"));
+
+ verify(stream, times(1)).writeStartDocument(ENCODING, VERSION);
+ verify(stream).writeComment("Some comment");
+ }
+
+ public void testCData() throws Exception
+ {
+ String cdata = "Some cdata stuff here < & \" ";
+ writer.writeCData(cdata);
+ writer.writeStartElement(createName("foo"));
+
+ verify(stream).writeStartDocument(ENCODING, VERSION);
+ verify(stream).writeCData(cdata);
+ }
+
+ public void testFinish() throws Exception
+ {
+ writer.writeStartElement(createName("foo")).finish();
+
+ verify(stream).flush();
+ verify(stream).close();
+ }
+
+ public void testFinishNoElements() throws Exception
+ {
+ writer.writeComment("comment");
+ writer.finish();
+ verify(stream).flush();
+ verify(stream).close();
+ }
+
+ public void testEndElementOnFinish() throws Exception
+ {
+ writer.writeStartElement(createName("foo")).
+ writeStartElement(createName("bar")).
+ writeElement(createName("foobar"), "stuff");
+
+ // Even though we never explicitly call endElement for the first two start elements, finish will do that for us.
+ writer.finish();
+
+ verify(stream).writeStartElement("foo");
+ verify(stream).writeStartElement("bar");
+ verify(stream).writeStartElement("foobar");
+ verify(stream).writeCharacters("stuff");
+ verify(stream, times(3)).writeEndElement();
+ }
+
+ public void testFormatter() throws Exception
+ {
+ InOrder order = inOrder(formatter, stream);
+
+ // Start element
+ writer.writeStartElement(createName("foo"));
+ verifyFormatter(order, XMLStreamConstants.START_DOCUMENT, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ // first start element also writes the document
+ order.verify(stream).writeStartDocument(ENCODING, VERSION);
+ }
+ });
+ verifyFormatter(order, XMLStreamConstants.START_ELEMENT, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeStartElement("foo");
+ }
+ });
+
+ // Namespace
+ writer.writeNamespace("prefix", "uri");
+ verifyFormatter(order, XMLStreamConstants.NAMESPACE, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeNamespace("prefix", "uri");
+ }
+ });
+
+ // Default namespace
+ writer.writeDefaultNamespace("uri");
+ verifyFormatter(order, XMLStreamConstants.NAMESPACE, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeDefaultNamespace("uri");
+ }
+ });
+
+ // Attribute
+ writer.writeAttribute("name", "value");
+ verifyFormatter(order, XMLStreamConstants.ATTRIBUTE, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeAttribute("name", "value");
+ }
+ });
+
+ // Comment
+ writer.writeComment("comment");
+ verifyFormatter(order, XMLStreamConstants.COMMENT, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeComment("comment");
+ }
+ });
+
+ // CData
+ writer.writeCData("cdata");
+ verifyFormatter(order, XMLStreamConstants.CDATA, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeCData("cdata");
+ }
+ });
+
+ // Content
+ writer.writeContent("content");
+ verifyFormatter(order, XMLStreamConstants.CHARACTERS, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeCharacters("content");
+ }
+ });
+
+ // End element
+ writer.writeEndElement();
+ verifyFormatter(order, XMLStreamConstants.END_ELEMENT, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeEndElement();
+ }
+ });
+
+ // End document
+ writer.finish();
+ verifyFormatter(order, XMLStreamConstants.END_DOCUMENT, new VerifyClosure()
+ {
+ public void verify(InOrder order) throws Exception
+ {
+ order.verify(stream).writeEndDocument();
+ }
+ });
+ }
+
+ protected void verifyFormatter(InOrder order, int event, VerifyClosure closure) throws Exception
+ {
+ order.verify(formatter).before(stream, event);
+ closure.verify(order);
+ order.verify(formatter).after(stream, event);
+ }
+
+ private static interface VerifyClosure
+ {
+ void verify(InOrder order) throws Exception;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,34 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax;
-
-import org.staxnav.Naming;
-
-public class LocalStaxWriterTest extends AbstractStaxWriterTest<String>
-{
- @Override
- public Naming<String> getNaming()
- {
- return new Naming.Local();
- }
-}
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java (from rev 6960, portal/trunk/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/LocalStaxWriterTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax;
+
+import org.staxnav.Naming;
+
+public class LocalStaxWriterTest extends AbstractStaxWriterTest<String>
+{
+ @Override
+ public Naming<String> getNaming()
+ {
+ return new Naming.Local();
+ }
+}
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.gatein.common.xml.stax;
-
-import org.mockito.Mockito;
-import org.staxnav.Naming;
-
-import javax.xml.namespace.QName;
-
-public class QualifiedStaxWriterTest extends AbstractStaxWriterTest<QName>
-{
- @Override
- public Naming<QName> getNaming()
- {
- return new Naming.Qualified();
- }
-
- public void testWriteQualifiedStartElement() throws Exception
- {
- QName bar = new QName("uri", "pre", "bar");
-
- writer.writeStartElement(bar);
- Mockito.verify(stream).writeStartElement(bar.getPrefix(), bar.getLocalPart(), bar.getNamespaceURI());
-
- QName foobar = new QName("http://www.gatein.org/xml/ns/gatein_objects_1_0", "foobar");
- writer.writeStartElement(foobar);
- Mockito.verify(stream).writeStartElement(foobar.getNamespaceURI(), foobar.getLocalPart());
- }
-}
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java (from rev 6960, portal/trunk/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/src/test/java/org/gatein/common/xml/stax/QualifiedStaxWriterTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.gatein.common.xml.stax;
+
+import org.mockito.Mockito;
+import org.staxnav.Naming;
+
+import javax.xml.namespace.QName;
+
+public class QualifiedStaxWriterTest extends AbstractStaxWriterTest<QName>
+{
+ @Override
+ public Naming<QName> getNaming()
+ {
+ return new Naming.Qualified();
+ }
+
+ public void testWriteQualifiedStartElement() throws Exception
+ {
+ QName bar = new QName("uri", "pre", "bar");
+
+ writer.writeStartElement(bar);
+ Mockito.verify(stream).writeStartElement(bar.getPrefix(), bar.getLocalPart(), bar.getNamespaceURI());
+
+ QName foobar = new QName("http://www.gatein.org/xml/ns/gatein_objects_1_0", "foobar");
+ writer.writeStartElement(foobar);
+ Mockito.verify(stream).writeStartElement(foobar.getNamespaceURI(), foobar.getLocalPart());
+ }
+}
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/component/management/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/management/pom.xml 2011-08-18 15:14:42 UTC (rev 7173)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/pom.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -43,6 +43,13 @@
<groupId>org.exoplatform.ws</groupId>
<artifactId>exo.ws.rest.core</artifactId>
</dependency>
-
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-rest</artifactId>
+ </dependency>
</dependencies>
</project>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,30 +0,0 @@
-package org.gatein.management.runtime;
-
-import org.gatein.management.api.ManagementService;
-import org.picocontainer.Startable;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class ManagementBootstrap implements Startable
-{
- private ManagementService service;
-
- public ManagementBootstrap(ManagementService service)
- {
- this.service = service;
- }
-
- @Override
- public void start()
- {
- service.load();
- }
-
- @Override
- public void stop()
- {
- service.unload();
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java (from rev 6960, portal/trunk/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/ManagementBootstrap.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,30 @@
+package org.gatein.management.runtime;
+
+import org.gatein.management.api.ManagementService;
+import org.picocontainer.Startable;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class ManagementBootstrap implements Startable
+{
+ private ManagementService service;
+
+ public ManagementBootstrap(ManagementService service)
+ {
+ this.service = service;
+ }
+
+ @Override
+ public void start()
+ {
+ service.load();
+ }
+
+ @Override
+ public void stop()
+ {
+ service.unload();
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,17 +0,0 @@
-package org.gatein.management.runtime;
-
-import org.exoplatform.container.PortalContainer;
-import org.gatein.management.api.RuntimeContext;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class RuntimeContextImpl implements RuntimeContext
-{
- @Override
- public <T> T getRuntimeComponent(Class<T> componentClass)
- {
- return componentClass.cast(PortalContainer.getInstance().getComponentInstanceOfType(componentClass));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java (from rev 6960, portal/trunk/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/src/main/java/org/gatein/management/runtime/RuntimeContextImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,17 @@
+package org.gatein.management.runtime;
+
+import org.exoplatform.container.PortalContainer;
+import org.gatein.management.api.RuntimeContext;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class RuntimeContextImpl implements RuntimeContext
+{
+ @Override
+ public <T> T getRuntimeComponent(Class<T> componentClass)
+ {
+ return componentClass.cast(PortalContainer.getInstance().getComponentInstanceOfType(componentClass));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml
===================================================================
--- portal/trunk/component/management/src/main/resources/conf/portal/configuration.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,50 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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.gatein.management.api.ManagementService</key>
- <type>org.gatein.management.core.api.ManagementServiceImpl</type>
- </component>
-
- <component>
- <key>org.gatein.management.api.controller.ManagementController</key>
- <type>org.gatein.management.core.api.controller.SimpleManagementController</type>
- </component>
-
- <component>
- <type>org.gatein.management.rest.RestApplication</type>
- </component>
-
- <component>
- <type>org.gatein.management.runtime.RuntimeContextImpl</type>
- </component>
-
- <component>
- <type>org.gatein.management.runtime.ManagementBootstrap</type>
- </component>
-
-</configuration>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml (from rev 6960, portal/trunk/component/management/src/main/resources/conf/portal/configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/management/src/main/resources/conf/portal/configuration.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,50 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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.gatein.management.api.ManagementService</key>
+ <type>org.gatein.management.core.api.ManagementServiceImpl</type>
+ </component>
+
+ <component>
+ <key>org.gatein.management.api.controller.ManagementController</key>
+ <type>org.gatein.management.core.api.controller.SimpleManagementController</type>
+ </component>
+
+ <component>
+ <type>org.gatein.management.rest.RestApplication</type>
+ </component>
+
+ <component>
+ <type>org.gatein.management.runtime.RuntimeContextImpl</type>
+ </component>
+
+ <component>
+ <type>org.gatein.management.runtime.ManagementBootstrap</type>
+ </component>
+
+</configuration>
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml 2011-08-18 15:14:42 UTC (rev 7173)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -74,6 +74,11 @@
</dependency>
<dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-spi</artifactId>
+ </dependency>
+
+ <dependency>
<groupId>org.picketlink.idm</groupId>
<artifactId>picketlink-idm-core</artifactId>
</dependency>
@@ -114,6 +119,13 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>1.8.5</version>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java 2011-08-18 15:14:42 UTC (rev 7173)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorage.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -217,6 +217,8 @@
*/
public void saveDashboard(Dashboard dashboard) throws Exception;
+ public void save() throws Exception;
+
/**
* Returns the list of all portal names.
*
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java 2011-08-18 15:14:42 UTC (rev 7173)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/DataStorageImpl.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -285,6 +285,11 @@
delegate.save(portletPreferences);
}
+ public void save() throws Exception
+ {
+ delegate.save();
+ }
+
public PortalConfig getPortalConfig(String ownerType, String portalName) throws Exception
{
PortalKey key = new PortalKey(ownerType, portalName);
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management;
-
-import org.exoplatform.portal.mop.management.binding.MopBindingProvider;
-import org.exoplatform.portal.mop.management.operations.MopImportResource;
-import org.exoplatform.portal.mop.management.operations.MopReadResource;
-import org.exoplatform.portal.mop.management.operations.navigation.NavigationExportResource;
-import org.exoplatform.portal.mop.management.operations.navigation.NavigationReadConfigAsXml;
-import org.exoplatform.portal.mop.management.operations.navigation.NavigationReadResource;
-import org.exoplatform.portal.mop.management.operations.page.PageExportResource;
-import org.exoplatform.portal.mop.management.operations.page.PageReadConfigAsXml;
-import org.exoplatform.portal.mop.management.operations.page.PageReadResource;
-import org.exoplatform.portal.mop.management.operations.site.SiteLayoutExportResource;
-import org.exoplatform.portal.mop.management.operations.site.SiteLayoutReadConfigAsXml;
-import org.exoplatform.portal.mop.management.operations.site.SiteReadResource;
-import org.exoplatform.portal.mop.management.operations.site.SiteTypeReadResource;
-import org.gatein.management.api.ComponentRegistration;
-import org.gatein.management.api.ManagedDescription;
-import org.gatein.management.api.ManagedResource;
-import org.gatein.management.api.operation.OperationNames;
-import org.gatein.management.spi.ExtensionContext;
-import org.gatein.management.spi.ManagementExtension;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class MopManagementExtension implements ManagementExtension
-{
- @Override
- public void initialize(ExtensionContext context)
- {
- ComponentRegistration registration = context.registerManagedComponent("mop");
- registration.registerBindingProvider(MopBindingProvider.INSTANCE);
-
- ManagedResource.Registration mop = registration.registerManagedResource(description("MOP (Model Object for Portal) Managed Resource"));
- mop.registerOperationHandler(OperationNames.IMPORT_RESOURCE, new MopImportResource(), description("Imports mop data from an exported zip file."));
-
- mop.registerOperationHandler(OperationNames.READ_RESOURCE, new MopReadResource(), description("Available site types for a portal"));
-
- ManagedResource.Registration sitetypes = mop.registerSubResource("{site-type}sites", description("Management resource responsible for handling management operations on a specific site type for a portal."));
- sitetypes.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteTypeReadResource(), description("Available sites for a given site type."));
-
- ManagedResource.Registration sites = sitetypes.registerSubResource("{site-name: .*}", description("Management resource responsible for handling management operations on a specific site."));
- sites.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteReadResource(), description("Available artifacts for a given site (ie pages, navigation, site layout)"));
-
- // Site Layout management
- siteLayoutManagementRegistration(sites);
-
- // Page management
- pageManagementRegistration(sites);
-
- // Navigation management
- navigationManagementRegistration(sites);
- }
-
- private void siteLayoutManagementRegistration(ManagedResource.Registration sites)
- {
- ManagedResource.Registration siteLayout = sites.registerSubResource("portal", description("Management resource responsible for handling management operations for a site layout."));
- siteLayout.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new SiteLayoutReadConfigAsXml(), description("Reads site layout data for a specific site as configuration xml."));
- siteLayout.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new SiteLayoutExportResource(), description("Exports site layout configuration xml as a zip file."));
- }
-
- private void pageManagementRegistration(ManagedResource.Registration sites)
- {
- // Pages management resource registration
- ManagedResource.Registration pages = sites.registerSubResource("pages", description("Management resource responsible for handling management operations on all pages of a site."));
-
- // Pages management operations
- pages.registerOperationHandler(OperationNames.READ_RESOURCE, new PageReadResource(), description("Available pages at the specified address."), true);
- pages.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new PageReadConfigAsXml(), description("Reads pages as configuration xml at the specified address."), true);
- pages.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new PageExportResource(), description("Exports pages configuration xml as a zip file."), true);
-
- // Page name management resource registration
- pages.registerSubResource("{page-name}", description("Page management resource representing an individual page."));
- }
-
- private void navigationManagementRegistration(ManagedResource.Registration sites)
- {
- // Navigation management resource registration
- ManagedResource.Registration navigation = sites.registerSubResource("navigation", description("Management resource responsible for handling management operations on a sites navigation."));
-
- // Navigation management operations
- navigation.registerOperationHandler(OperationNames.READ_RESOURCE, new NavigationReadResource(), description("Available navigation nodes at the specified address."), true);
- navigation.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new NavigationReadConfigAsXml(), description("Reads navigation as configuration xml at the specified address."), true);
- navigation.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new NavigationExportResource(), description("Exports navigation configuration xml as a zip file."), true);
-
- // Navigation node management resource registration
- navigation.registerSubResource("{nav-uri: .*}", description("Management resource responsible for handling management operations on specific navigation nodes."));
- }
-
- @Override
- public void destroy()
- {
- }
-
- private static ManagedDescription description(final String description)
- {
- return new ManagedDescription()
- {
- @Override
- public String getDescription()
- {
- return description;
- }
- };
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management;
+
+import org.exoplatform.portal.mop.management.binding.MopBindingProvider;
+import org.exoplatform.portal.mop.management.operations.MopImportResource;
+import org.exoplatform.portal.mop.management.operations.MopReadResource;
+import org.exoplatform.portal.mop.management.operations.navigation.NavigationExportResource;
+import org.exoplatform.portal.mop.management.operations.navigation.NavigationReadConfigAsXml;
+import org.exoplatform.portal.mop.management.operations.navigation.NavigationReadResource;
+import org.exoplatform.portal.mop.management.operations.page.PageExportResource;
+import org.exoplatform.portal.mop.management.operations.page.PageReadConfigAsXml;
+import org.exoplatform.portal.mop.management.operations.page.PageReadResource;
+import org.exoplatform.portal.mop.management.operations.site.SiteLayoutExportResource;
+import org.exoplatform.portal.mop.management.operations.site.SiteLayoutReadConfigAsXml;
+import org.exoplatform.portal.mop.management.operations.site.SiteReadResource;
+import org.exoplatform.portal.mop.management.operations.site.SiteTypeReadResource;
+import org.gatein.management.api.ComponentRegistration;
+import org.gatein.management.api.ManagedDescription;
+import org.gatein.management.api.ManagedResource;
+import org.gatein.management.api.operation.OperationNames;
+import org.gatein.management.spi.ExtensionContext;
+import org.gatein.management.spi.ManagementExtension;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class MopManagementExtension implements ManagementExtension
+{
+ @Override
+ public void initialize(ExtensionContext context)
+ {
+ ComponentRegistration registration = context.registerManagedComponent("mop");
+ registration.registerBindingProvider(MopBindingProvider.INSTANCE);
+
+ ManagedResource.Registration mop = registration.registerManagedResource(description("MOP (Model Object for Portal) Managed Resource"));
+ mop.registerOperationHandler(OperationNames.IMPORT_RESOURCE, new MopImportResource(), description("Imports mop data from an exported zip file."));
+
+ mop.registerOperationHandler(OperationNames.READ_RESOURCE, new MopReadResource(), description("Available site types for a portal"));
+
+ ManagedResource.Registration sitetypes = mop.registerSubResource("{site-type}sites", description("Management resource responsible for handling management operations on a specific site type for a portal."));
+ sitetypes.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteTypeReadResource(), description("Available sites for a given site type."));
+
+ ManagedResource.Registration sites = sitetypes.registerSubResource("{site-name: .*}", description("Management resource responsible for handling management operations on a specific site."));
+ sites.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteReadResource(), description("Available artifacts for a given site (ie pages, navigation, site layout)"));
+
+ // Site Layout management
+ siteLayoutManagementRegistration(sites);
+
+ // Page management
+ pageManagementRegistration(sites);
+
+ // Navigation management
+ navigationManagementRegistration(sites);
+ }
+
+ private void siteLayoutManagementRegistration(ManagedResource.Registration sites)
+ {
+ ManagedResource.Registration siteLayout = sites.registerSubResource("portal", description("Management resource responsible for handling management operations for a site layout."));
+ siteLayout.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new SiteLayoutReadConfigAsXml(), description("Reads site layout data for a specific site as configuration xml."));
+ siteLayout.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new SiteLayoutExportResource(), description("Exports site layout configuration xml as a zip file."));
+ }
+
+ private void pageManagementRegistration(ManagedResource.Registration sites)
+ {
+ // Pages management resource registration
+ ManagedResource.Registration pages = sites.registerSubResource("pages", description("Management resource responsible for handling management operations on all pages of a site."));
+
+ // Pages management operations
+ pages.registerOperationHandler(OperationNames.READ_RESOURCE, new PageReadResource(), description("Available pages at the specified address."), true);
+ pages.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new PageReadConfigAsXml(), description("Reads pages as configuration xml at the specified address."), true);
+ pages.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new PageExportResource(), description("Exports pages configuration xml as a zip file."), true);
+
+ // Page name management resource registration
+ pages.registerSubResource("{page-name}", description("Page management resource representing an individual page."));
+ }
+
+ private void navigationManagementRegistration(ManagedResource.Registration sites)
+ {
+ // Navigation management resource registration
+ ManagedResource.Registration navigation = sites.registerSubResource("navigation", description("Management resource responsible for handling management operations on a sites navigation."));
+
+ // Navigation management operations
+ navigation.registerOperationHandler(OperationNames.READ_RESOURCE, new NavigationReadResource(), description("Available navigation nodes at the specified address."), true);
+ navigation.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new NavigationReadConfigAsXml(), description("Reads navigation as configuration xml at the specified address."), true);
+ navigation.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new NavigationExportResource(), description("Exports navigation configuration xml as a zip file."), true);
+
+ // Navigation node management resource registration
+ navigation.registerSubResource("{nav-uri: .*}", description("Management resource responsible for handling management operations on specific navigation nodes."));
+ }
+
+ @Override
+ public void destroy()
+ {
+ }
+
+ private static ManagedDescription description(final String description)
+ {
+ return new ManagedDescription()
+ {
+ @Override
+ public String getDescription()
+ {
+ return description;
+ }
+ };
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding;
-
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.mop.management.binding.xml.NavigationMarshaller;
-import org.exoplatform.portal.mop.management.binding.xml.PageMarshaller;
-import org.exoplatform.portal.mop.management.binding.xml.SiteLayoutMarshaller;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.binding.BindingException;
-import org.gatein.management.api.binding.BindingProvider;
-import org.gatein.management.api.binding.Marshaller;
-
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class MopBindingProvider implements BindingProvider
-{
- public static final MopBindingProvider INSTANCE = new MopBindingProvider();
-
- private MopBindingProvider(){}
-
- @Override
- public <T> Marshaller<T> getMarshaller(Class<T> type, ContentType contentType) throws BindingException
- {
- switch (contentType)
- {
- case XML:
- return getXmlMarshaller(type);
- case JSON:
- case ZIP:
- default:
- return null;
- }
- }
-
- @SuppressWarnings("unchecked")
- private <T> Marshaller<T> getXmlMarshaller(Class<T> type)
- {
- if (Page.class.isAssignableFrom(type))
- {
- return (Marshaller<T>) XmlMarshallers.page_marshaller;
- }
- else if (Page.PageSet.class.isAssignableFrom(type))
- {
- return (Marshaller<T>) XmlMarshallers.pages_marshaller;
- }
- else if (PageNavigation.class.isAssignableFrom(type))
- {
- return (Marshaller<T>) XmlMarshallers.navigation_marshaller;
- }
- else if (PortalConfig.class.isAssignableFrom(type))
- {
- return (Marshaller<T>) XmlMarshallers.site_marshaller;
- }
-
- return null;
- }
-
- private static class XmlMarshallers
- {
-
- //------------------------------------ Page Marshallers ------------------------------------//
- private static Marshaller<Page.PageSet> pages_marshaller = new PageMarshaller();
-
- private static Marshaller<Page> page_marshaller = new Marshaller<Page>()
- {
- @Override
- public void marshal(Page page, OutputStream outputStream) throws BindingException
- {
- Page.PageSet pages = new Page.PageSet();
- pages.setPages(new ArrayList<Page>(1));
- pages.getPages().add(page);
-
- XmlMarshallers.pages_marshaller.marshal(pages, outputStream);
- }
-
- @Override
- public Page unmarshal(InputStream inputStream) throws BindingException
- {
- Page.PageSet pages = pages_marshaller.unmarshal(inputStream);
-
- if (pages.getPages().isEmpty()) throw new BindingException("No page was unmarshalled.");
-
- if (pages.getPages().size() != 1) throw new BindingException("Multiple pages found.");
-
- return pages.getPages().get(0);
- }
- };
-
- private static Marshaller<PageNavigation> navigation_marshaller = new NavigationMarshaller();
-
- private static Marshaller<PortalConfig> site_marshaller = new SiteLayoutMarshaller();
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/MopBindingProvider.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding;
+
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.management.binding.xml.NavigationMarshaller;
+import org.exoplatform.portal.mop.management.binding.xml.PageMarshaller;
+import org.exoplatform.portal.mop.management.binding.xml.SiteLayoutMarshaller;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.binding.BindingException;
+import org.gatein.management.api.binding.BindingProvider;
+import org.gatein.management.api.binding.Marshaller;
+
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class MopBindingProvider implements BindingProvider
+{
+ public static final MopBindingProvider INSTANCE = new MopBindingProvider();
+
+ private MopBindingProvider(){}
+
+ @Override
+ public <T> Marshaller<T> getMarshaller(Class<T> type, ContentType contentType) throws BindingException
+ {
+ switch (contentType)
+ {
+ case XML:
+ return getXmlMarshaller(type);
+ case JSON:
+ case ZIP:
+ default:
+ return null;
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private <T> Marshaller<T> getXmlMarshaller(Class<T> type)
+ {
+ if (Page.class.isAssignableFrom(type))
+ {
+ return (Marshaller<T>) XmlMarshallers.page_marshaller;
+ }
+ else if (Page.PageSet.class.isAssignableFrom(type))
+ {
+ return (Marshaller<T>) XmlMarshallers.pages_marshaller;
+ }
+ else if (PageNavigation.class.isAssignableFrom(type))
+ {
+ return (Marshaller<T>) XmlMarshallers.navigation_marshaller;
+ }
+ else if (PortalConfig.class.isAssignableFrom(type))
+ {
+ return (Marshaller<T>) XmlMarshallers.site_marshaller;
+ }
+
+ return null;
+ }
+
+ private static class XmlMarshallers
+ {
+
+ //------------------------------------ Page Marshallers ------------------------------------//
+ private static Marshaller<Page.PageSet> pages_marshaller = new PageMarshaller();
+
+ private static Marshaller<Page> page_marshaller = new Marshaller<Page>()
+ {
+ @Override
+ public void marshal(Page page, OutputStream outputStream) throws BindingException
+ {
+ Page.PageSet pages = new Page.PageSet();
+ pages.setPages(new ArrayList<Page>(1));
+ pages.getPages().add(page);
+
+ XmlMarshallers.pages_marshaller.marshal(pages, outputStream);
+ }
+
+ @Override
+ public Page unmarshal(InputStream inputStream) throws BindingException
+ {
+ Page.PageSet pages = pages_marshaller.unmarshal(inputStream);
+
+ if (pages.getPages().isEmpty()) throw new BindingException("No page was unmarshalled.");
+
+ if (pages.getPages().size() != 1) throw new BindingException("Multiple pages found.");
+
+ return pages.getPages().get(0);
+ }
+ };
+
+ private static Marshaller<PageNavigation> navigation_marshaller = new NavigationMarshaller();
+
+ private static Marshaller<PortalConfig> site_marshaller = new SiteLayoutMarshaller();
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,666 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationState;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PageBody;
-import org.exoplatform.portal.config.model.TransientApplicationState;
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.common.xml.stax.writer.WritableValueTypes;
-import org.exoplatform.portal.pom.data.ModelDataStorage;
-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.portlet.Preference;
-import org.gatein.management.api.binding.Marshaller;
-import org.staxnav.StaxNavigator;
-import org.staxnav.ValueType;
-
-import javax.xml.stream.XMLStreamException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import static org.gatein.common.xml.stax.navigator.Exceptions.*;
-import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
-import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractMarshaller<T> implements Marshaller<T>
-{
- protected void marshalModelObject(StaxWriter<Element> writer, ModelObject modelObject) throws XMLStreamException
- {
- if (modelObject instanceof Application)
- {
- Application application = (Application) modelObject;
- ApplicationType type = application.getType();
- if (ApplicationType.PORTLET == type)
- {
- marshalPortletApplication(writer, safeCast(application, Portlet.class));
- }
- else if (ApplicationType.GADGET == type)
- {
- marshalGadgetApplication(writer, safeCast(application, Gadget.class));
- }
- else if (ApplicationType.WSRP_PORTLET == type)
- {
- throw new XMLStreamException("WSRP portlet marshalling not supported.");
- }
- }
- else if (modelObject instanceof Page)
- {
- //marshalPageData(writer, (PageData) componentData);
- throw new XMLStreamException("Unexpected PageData object. Storage id: " + modelObject.getStorageId());
- }
- else if (modelObject instanceof Container)
- {
- marshalContainer(writer, (Container) modelObject);
- }
- else if (modelObject instanceof PageBody)
- {
- writer.writeStartElement(Element.PAGE_BODY).writeEndElement();
- }
- else
- {
- throw new XMLStreamException("Unknown ComponentData type " + modelObject);
- }
- }
-
- protected void marshalContainer(StaxWriter<Element> writer, Container container) throws XMLStreamException
- {
- writer.writeStartElement(Element.CONTAINER);
-
- writeOptionalAttribute(writer, Attribute.ID, container.getId());
- writeOptionalAttribute(writer, Attribute.TEMPLATE, container.getTemplate());
- writeOptionalAttribute(writer, Attribute.WIDTH, container.getWidth());
- writeOptionalAttribute(writer, Attribute.HEIGHT, container.getHeight());
-
- writeOptionalElement(writer, Element.NAME, container.getName());
- writeOptionalElement(writer, Element.TITLE, container.getTitle());
- writeOptionalElement(writer, Element.ICON, container.getIcon());
- writeOptionalElement(writer, Element.DESCRIPTION, container.getDescription());
-
- marshalAccessPermissions(writer, container.getAccessPermissions());
-
- writeOptionalElement(writer, Element.FACTORY_ID, container.getFactoryId());
-
- List<ModelObject> children = container.getChildren();
- for (ModelObject child : children)
- {
- marshalModelObject(writer, child);
- }
-
- writer.writeEndElement(); // End of container element
- }
-
- protected Container unmarshalContainer(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- Container container = new Container();
- container.setId(navigator.getAttribute(Attribute.ID.getLocalName()));
- container.setTemplate(navigator.getAttribute(Attribute.TEMPLATE.getLocalName()));
- container.setWidth(navigator.getAttribute(Attribute.WIDTH.getLocalName()));
- container.setHeight(navigator.getAttribute(Attribute.HEIGHT.getLocalName()));
-
- Element current = navigator.child();
- while (current != null)
- {
- switch (current)
- {
- case NAME:
- container.setName(navigator.getContent());
- current = navigator.sibling();
- break;
- case TITLE:
- container.setTitle(navigator.getContent());
- current = navigator.sibling();
- break;
- case ICON:
- container.setIcon(navigator.getContent());
- current = navigator.sibling();
- break;
- case DESCRIPTION:
- container.setDescription(navigator.getContent());
- current = navigator.sibling();
- break;
- case ACCESS_PERMISSIONS:
- container.setAccessPermissions(unmarshalAccessPermissions(navigator, false));
- current = navigator.sibling();
- break;
- case FACTORY_ID:
- container.setFactoryId(navigator.getContent());
- current = navigator.sibling();
- break;
- case CONTAINER:
- if (container.getChildren() == null)
- {
- container.setChildren(new ArrayList<ModelObject>());
- }
- container.getChildren().add(unmarshalContainer(navigator.fork()));
- current = navigator.sibling();
- break;
- case PORTLET_APPLICATION:
- if (container.getChildren() == null)
- {
- container.setChildren(new ArrayList<ModelObject>());
- }
- container.getChildren().add(unmarshalPortletApplication(navigator.fork()));
- current = navigator.sibling();
- break;
- case GADGET_APPLICATION:
- if (container.getChildren() == null)
- {
- container.setChildren(new ArrayList<ModelObject>());
- }
- container.getChildren().add(unmarshalGadgetApplication(navigator.fork()));
- current = navigator.sibling();
- break;
- case UNKNOWN:
- throw unknownElement(navigator);
- default:
- throw unexpectedElement(navigator);
- }
- }
-
- return container;
- }
-
- protected void marshalPortletApplication(StaxWriter<Element> writer, Application<Portlet> portletApplication) throws XMLStreamException
- {
- writer.writeStartElement(Element.PORTLET_APPLICATION).writeStartElement(Element.PORTLET);
-
- // Marshal ApplicationState
- ApplicationState<Portlet> state = portletApplication.getState();
-
- // Marshal application state
- String contentId;
- Portlet portlet;
- // If transient we have all the information we need
- if (state instanceof TransientApplicationState)
- {
- TransientApplicationState<Portlet> transientApplicationState = (TransientApplicationState<Portlet>) state;
- contentId = transientApplicationState.getContentId();
- portlet = transientApplicationState.getContentState();
- }
- else
- {
- // The only way to retrieve the information if the state is not transient is if we're within the portal context
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- if (container instanceof PortalContainer)
- {
- DataStorage dataStorage = (DataStorage) container.getComponentInstanceOfType(DataStorage.class);
- try
- {
- portlet = dataStorage.load(state, ApplicationType.PORTLET);
- }
- catch (Exception e)
- {
- throw new XMLStreamException("Could not obtain portlet state.");
- }
-
- try
- {
- contentId = dataStorage.getId(state);
- }
- catch (Exception e)
- {
- throw new XMLStreamException("Could not obtain contentId.", e);
- }
- }
- else
- {
- throw new XMLStreamException("Cannot marshal application state " + state + " outside the context of the portal.");
- }
- }
-
- // Marshal portlet application id
- if (contentId == null) throw new XMLStreamException("Portlet application ID was null.");
- writer.writeElement(Element.APPLICATION_REF, contentId.substring(0, contentId.indexOf("/")));
- writer.writeElement(Element.PORTLET_REF, contentId.substring(contentId.indexOf("/") + 1, contentId.length()));
-
- // Marshal preferences
- if (portlet != null)
- {
- boolean prefsWritten = false;
- for (Preference preference : portlet)
- {
- if (!prefsWritten)
- {
- writer.writeStartElement(Element.PREFERENCES);
- prefsWritten = true;
- }
-
- writer.writeStartElement(Element.PREFERENCE);
- writer.writeElement(Element.NAME, preference.getName());
- for (String value : preference.getValues())
- {
- writeOptionalContent(writer, Element.PREFERENCE_VALUE, value);
- }
- writer.writeElement(Element.PREFERENCE_READONLY, WritableValueTypes.BOOLEAN, preference.isReadOnly());
- writer.writeEndElement(); // End of preference
- }
- if (prefsWritten)
- {
- writer.writeEndElement(); // End of preferences
- }
- }
- writer.writeEndElement(); // End of portlet
-
- marshalApplication(writer, portletApplication);
-
- writer.writeEndElement(); // End of portlet-application
- }
-
- protected Application<Portlet> unmarshalPortletApplication(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- requiresChild(navigator, Element.PORTLET);
- ApplicationState<Portlet> state = unmarshalPortletApplicationState(navigator.fork());
-
- Application<Portlet> portlet = new Application<Portlet>(ApplicationType.PORTLET);
- portlet.setState(state);
-
- boolean showInfoBarParsed = false;
-
- Element current = navigator.sibling();
- while (current != null)
- {
- switch (current)
- {
- case THEME:
- portlet.setTheme(navigator.getContent());
- current = navigator.sibling();
- break;
- case TITLE:
- portlet.setTitle(navigator.getContent());
- current = navigator.sibling();
- break;
- case ACCESS_PERMISSIONS:
- portlet.setAccessPermissions(unmarshalAccessPermissions(navigator, true));
- current = navigator.sibling();
- break;
- case SHOW_INFO_BAR:
- portlet.setShowInfoBar(parseRequiredContent(navigator, ValueType.BOOLEAN));
- showInfoBarParsed = true;
- current = navigator.sibling();
- break;
- case SHOW_APPLICATION_STATE:
- portlet.setShowApplicationState(navigator.parseContent(ValueType.BOOLEAN));
- current = navigator.sibling();
- break;
- case SHOW_APPLICATION_MODE:
- portlet.setShowApplicationMode(navigator.parseContent(ValueType.BOOLEAN));
- current = navigator.sibling();
- break;
- case DESCRIPTION:
- portlet.setDescription(navigator.getContent());
- current = navigator.sibling();
- break;
- case ICON:
- portlet.setIcon(navigator.getContent());
- current = navigator.sibling();
- break;
- case WIDTH:
- portlet.setWidth(navigator.getContent());
- current = navigator.sibling();
- break;
- case HEIGHT:
- portlet.setHeight(navigator.getContent());
- current = navigator.sibling();
- break;
- case UNKNOWN:
- throw unknownElement(navigator);
- default:
- throw unexpectedElement(navigator);
- }
- }
-
- //TODO: We should raise this exception as soon as we know so location is accurate
- if (portlet.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
- if (!showInfoBarParsed) throw expectedElement(navigator, Element.SHOW_INFO_BAR);
-
- return portlet;
- }
-
- private ApplicationState<Portlet> unmarshalPortletApplicationState(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- // Application name
- requiresChild(navigator, Element.APPLICATION_REF);
- String applicationRef = getRequiredContent(navigator, true);
-
- // Portlet name
- requiresSibling(navigator, Element.PORTLET_REF);
- String portletRef = getRequiredContent(navigator, true);
-
- // Preferences
- PortletBuilder portletBuilder = null;
- if (navigator.sibling() == Element.PREFERENCES)
- {
- requiresChild(navigator, Element.PREFERENCE);
- portletBuilder = new PortletBuilder();
- for (StaxNavigator<Element> fork : navigator.fork(Element.PREFERENCE))
- {
- // Preference name
- requiresChild(fork, Element.NAME);
- String prefName = getRequiredContent(fork, false);
-
- // Preference values
- List<String> values = null;
- while (fork.sibling() == Element.PREFERENCE_VALUE)
- {
- if (values == null) values = new ArrayList<String>();
- values.add(getContent(fork, false));
- }
- if (values == null)
- {
- values = Collections.singletonList(null);
- }
-
- // Preference readonly
- Boolean readOnly = null;
- if (fork.getName() == Element.PREFERENCE_READONLY)
- {
- readOnly = parseRequiredContent(fork, ValueType.BOOLEAN);
- }
-
- // Ensure nothing is left.
- if (fork.next() != null)
- {
- throw unexpectedElement(fork);
- }
-
- if (readOnly == null)
- {
- portletBuilder.add(prefName, values);
- }
- else
- {
- portletBuilder.add(prefName, values, readOnly);
- }
- }
- }
-
- TransientApplicationState<Portlet> state = new TransientApplicationState<Portlet>(applicationRef + "/" + portletRef);
- if (portletBuilder != null)
- {
- state.setContentState(portletBuilder.build());
- }
-
- return state;
- }
-
- protected void marshalGadgetApplication(StaxWriter<Element> writer, Application<Gadget> gadgetApplication) throws XMLStreamException
- {
- writer.writeStartElement(Element.GADGET_APPLICATION).writeStartElement(Element.GADGET);
-
- // Marshal ApplicationState
- ApplicationState<Gadget> state = gadgetApplication.getState();
-
- // Marshal application state
- String contentId;
- Gadget gadget;
- // If transient we have all the information we need
- if (state instanceof TransientApplicationState)
- {
- TransientApplicationState<Gadget> transientApplicationState = (TransientApplicationState<Gadget>) state;
- contentId = transientApplicationState.getContentId();
- gadget = transientApplicationState.getContentState();
- }
- else
- {
- // The only way to retrieve the information if the state is not transient is if we're within a portal context
- ExoContainer container = ExoContainerContext.getCurrentContainer();
- if (container instanceof PortalContainer)
- {
- ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
- try
- {
- gadget = dataStorage.load(state, ApplicationType.GADGET);
- }
- catch (Exception e)
- {
- throw new XMLStreamException("Could not obtain gadget state from custom context.");
- }
-
- try
- {
- contentId = dataStorage.getId(state);
- }
- catch (Exception e)
- {
- throw new XMLStreamException("Could not obtain contentId from custom context.", e);
- }
- }
- else
- {
- throw new XMLStreamException("Cannot marshal application state " + state + " outside the context of the portal.");
- }
- }
-
- // Marshal portlet application id
- if (contentId == null) throw new XMLStreamException("Gadget content ID was null.");
- writer.writeElement(Element.GADGET_REF, contentId);
-
- // Marshal preferences
- if (gadget != null)
- {
- //TODO: When user-prefs are supported, uncomment
- //writer.writeOptionalElement(Element.PREFERENCES, gadget.getUserPref());
- }
- writer.writeEndElement(); // End of portlet
-
- marshalApplication(writer, gadgetApplication);
-
-
- writer.writeEndElement(); // End of gadget-application
- }
-
- protected Application<Gadget> unmarshalGadgetApplication(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- requiresChild(navigator, Element.GADGET);
- ApplicationState<Gadget> state = unmarshalGadgetApplicationState(navigator.fork());
-
- Application<Gadget> gadget = new Application<Gadget>(ApplicationType.GADGET);
- gadget.setState(state);
-
- boolean showInfoBarParsed = false;
-
- Element current = navigator.sibling();
- while (current != null)
- {
- switch (current)
- {
- case THEME:
- gadget.setTheme(navigator.getContent());
- current = navigator.sibling();
- break;
- case TITLE:
- gadget.setTitle(navigator.getContent());
- current = navigator.sibling();
- break;
- case ACCESS_PERMISSIONS:
- gadget.setAccessPermissions(unmarshalAccessPermissions(navigator, true));
- current = navigator.sibling();
- break;
- case SHOW_INFO_BAR:
- gadget.setShowInfoBar(parseRequiredContent(navigator, ValueType.BOOLEAN));
- showInfoBarParsed = true;
- current = navigator.sibling();
- break;
- case SHOW_APPLICATION_STATE:
- gadget.setShowApplicationState(navigator.parseContent(ValueType.BOOLEAN));
- current = navigator.sibling();
- break;
- case SHOW_APPLICATION_MODE:
- gadget.setShowApplicationMode(navigator.parseContent(ValueType.BOOLEAN));
- current = navigator.sibling();
- break;
- case DESCRIPTION:
- gadget.setDescription(navigator.getContent());
- current = navigator.sibling();
- break;
- case ICON:
- gadget.setIcon(navigator.getContent());
- current = navigator.sibling();
- break;
- case WIDTH:
- gadget.setWidth(navigator.getContent());
- current = navigator.sibling();
- break;
- case HEIGHT:
- gadget.setHeight(navigator.getContent());
- current = navigator.sibling();
- break;
- case UNKNOWN:
- throw unknownElement(navigator);
- default:
- throw unexpectedElement(navigator);
- }
- }
-
- //TODO: We should raise this exception as soon as we know so location is accurate
- if (gadget.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
- if (!showInfoBarParsed) throw expectedElement(navigator, Element.SHOW_INFO_BAR);
-
- return gadget;
- }
-
- private ApplicationState<Gadget> unmarshalGadgetApplicationState(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- requiresChild(navigator, Element.GADGET_REF);
- String gadgetRef = getRequiredContent(navigator, true);
-
- //TODO: Implement userPref unmarshalling when gatein_objects support it
- Gadget gadget = null;
-
- if (navigator.next() != null)
- {
- throw unexpectedElement(navigator);
- }
-
- return new TransientApplicationState<Gadget>(gadgetRef, gadget);
- }
-
- protected void marshalApplication(StaxWriter<Element> writer, Application<?> application) throws XMLStreamException
- {
- // Theme, Title
- writeOptionalElement(writer, Element.THEME, application.getTheme());
- writeOptionalElement(writer, Element.TITLE, application.getTitle());
-
- // Access Permissions
- marshalAccessPermissions(writer, application.getAccessPermissions());
-
- // common application elements
- writeOptionalElement(writer, Element.SHOW_INFO_BAR, String.valueOf(application.getShowInfoBar()));
- writeOptionalElement(writer, Element.SHOW_APPLICATION_STATE, String.valueOf(application.getShowApplicationState()));
- writeOptionalElement(writer, Element.SHOW_APPLICATION_MODE, String.valueOf(application.getShowApplicationMode()));
-
- // Description, Icon
- writeOptionalElement(writer, Element.DESCRIPTION, application.getDescription());
- writeOptionalElement(writer, Element.ICON, application.getIcon());
-
- // Width & Height
- writeOptionalElement(writer, Element.WIDTH, application.getWidth());
- writeOptionalElement(writer, Element.HEIGHT, application.getHeight());
- }
-
- protected void marshalAccessPermissions(StaxWriter<Element> writer, String[] accessPermissions) throws XMLStreamException
- {
- writeOptionalElement(writer, Element.ACCESS_PERMISSIONS, DelimitedValueType.SEMI_COLON, accessPermissions);
- }
-
- protected String[] unmarshalAccessPermissions(StaxNavigator<Element> navigator, boolean required) throws XMLStreamException
- {
- if (required)
- {
- return parseRequiredContent(navigator, DelimitedValueType.SEMI_COLON);
- }
- else
- {
- return parseContent(navigator, DelimitedValueType.SEMI_COLON, null);
- }
- }
-
- protected void marshalEditPermission(StaxWriter<Element> writer, String editPermission) throws XMLStreamException
- {
- writeOptionalElement(writer, Element.EDIT_PERMISSION, editPermission);
- }
-
- protected String unmarshalEditPermission(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- return getContent(navigator, true);
- }
-
- protected void writeGateinObjectsNamespace(StaxWriter<Element> writer) throws XMLStreamException
- {
- Utils.writeGateinObjectsNamespace(writer);
- }
-
- @SuppressWarnings("unchecked")
- private <S> Application<S> safeCast(Application application, Class<S> stateClass)
- {
- return (Application<S>) application;
- }
-
- private static void writeOptionalAttribute(StaxWriter writer, Attribute attribute, String value) throws XMLStreamException
- {
- if (value == null) return;
-
- writer.writeAttribute(attribute.getLocalName(), value);
- }
-
- private static enum Attribute
- {
- ID("id"),
- TEMPLATE("template"),
- WIDTH("width"),
- HEIGHT("height");
-
- private final String name;
-
- Attribute(final String name)
- {
- this.name = name;
- }
-
- /**
- * Get the local name of this element.
- *
- * @return the local name
- */
- public String getLocalName()
- {
- return name;
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,666 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.Application;
+import org.exoplatform.portal.config.model.ApplicationState;
+import org.exoplatform.portal.config.model.ApplicationType;
+import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PageBody;
+import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.common.xml.stax.writer.WritableValueTypes;
+import org.exoplatform.portal.pom.data.ModelDataStorage;
+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.portlet.Preference;
+import org.gatein.management.api.binding.Marshaller;
+import org.staxnav.StaxNavigator;
+import org.staxnav.ValueType;
+
+import javax.xml.stream.XMLStreamException;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import static org.gatein.common.xml.stax.navigator.Exceptions.*;
+import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
+import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractMarshaller<T> implements Marshaller<T>
+{
+ protected void marshalModelObject(StaxWriter<Element> writer, ModelObject modelObject) throws XMLStreamException
+ {
+ if (modelObject instanceof Application)
+ {
+ Application application = (Application) modelObject;
+ ApplicationType type = application.getType();
+ if (ApplicationType.PORTLET == type)
+ {
+ marshalPortletApplication(writer, safeCast(application, Portlet.class));
+ }
+ else if (ApplicationType.GADGET == type)
+ {
+ marshalGadgetApplication(writer, safeCast(application, Gadget.class));
+ }
+ else if (ApplicationType.WSRP_PORTLET == type)
+ {
+ throw new XMLStreamException("WSRP portlet marshalling not supported.");
+ }
+ }
+ else if (modelObject instanceof Page)
+ {
+ //marshalPageData(writer, (PageData) componentData);
+ throw new XMLStreamException("Unexpected PageData object. Storage id: " + modelObject.getStorageId());
+ }
+ else if (modelObject instanceof Container)
+ {
+ marshalContainer(writer, (Container) modelObject);
+ }
+ else if (modelObject instanceof PageBody)
+ {
+ writer.writeStartElement(Element.PAGE_BODY).writeEndElement();
+ }
+ else
+ {
+ throw new XMLStreamException("Unknown ComponentData type " + modelObject);
+ }
+ }
+
+ protected void marshalContainer(StaxWriter<Element> writer, Container container) throws XMLStreamException
+ {
+ writer.writeStartElement(Element.CONTAINER);
+
+ writeOptionalAttribute(writer, Attribute.ID, container.getId());
+ writeOptionalAttribute(writer, Attribute.TEMPLATE, container.getTemplate());
+ writeOptionalAttribute(writer, Attribute.WIDTH, container.getWidth());
+ writeOptionalAttribute(writer, Attribute.HEIGHT, container.getHeight());
+
+ writeOptionalElement(writer, Element.NAME, container.getName());
+ writeOptionalElement(writer, Element.TITLE, container.getTitle());
+ writeOptionalElement(writer, Element.ICON, container.getIcon());
+ writeOptionalElement(writer, Element.DESCRIPTION, container.getDescription());
+
+ marshalAccessPermissions(writer, container.getAccessPermissions());
+
+ writeOptionalElement(writer, Element.FACTORY_ID, container.getFactoryId());
+
+ List<ModelObject> children = container.getChildren();
+ for (ModelObject child : children)
+ {
+ marshalModelObject(writer, child);
+ }
+
+ writer.writeEndElement(); // End of container element
+ }
+
+ protected Container unmarshalContainer(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ Container container = new Container();
+ container.setId(navigator.getAttribute(Attribute.ID.getLocalName()));
+ container.setTemplate(navigator.getAttribute(Attribute.TEMPLATE.getLocalName()));
+ container.setWidth(navigator.getAttribute(Attribute.WIDTH.getLocalName()));
+ container.setHeight(navigator.getAttribute(Attribute.HEIGHT.getLocalName()));
+
+ Element current = navigator.child();
+ while (current != null)
+ {
+ switch (current)
+ {
+ case NAME:
+ container.setName(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case TITLE:
+ container.setTitle(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case ICON:
+ container.setIcon(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case DESCRIPTION:
+ container.setDescription(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case ACCESS_PERMISSIONS:
+ container.setAccessPermissions(unmarshalAccessPermissions(navigator, false));
+ current = navigator.sibling();
+ break;
+ case FACTORY_ID:
+ container.setFactoryId(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case CONTAINER:
+ if (container.getChildren() == null)
+ {
+ container.setChildren(new ArrayList<ModelObject>());
+ }
+ container.getChildren().add(unmarshalContainer(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case PORTLET_APPLICATION:
+ if (container.getChildren() == null)
+ {
+ container.setChildren(new ArrayList<ModelObject>());
+ }
+ container.getChildren().add(unmarshalPortletApplication(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case GADGET_APPLICATION:
+ if (container.getChildren() == null)
+ {
+ container.setChildren(new ArrayList<ModelObject>());
+ }
+ container.getChildren().add(unmarshalGadgetApplication(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case UNKNOWN:
+ throw unknownElement(navigator);
+ default:
+ throw unexpectedElement(navigator);
+ }
+ }
+
+ return container;
+ }
+
+ protected void marshalPortletApplication(StaxWriter<Element> writer, Application<Portlet> portletApplication) throws XMLStreamException
+ {
+ writer.writeStartElement(Element.PORTLET_APPLICATION).writeStartElement(Element.PORTLET);
+
+ // Marshal ApplicationState
+ ApplicationState<Portlet> state = portletApplication.getState();
+
+ // Marshal application state
+ String contentId;
+ Portlet portlet;
+ // If transient we have all the information we need
+ if (state instanceof TransientApplicationState)
+ {
+ TransientApplicationState<Portlet> transientApplicationState = (TransientApplicationState<Portlet>) state;
+ contentId = transientApplicationState.getContentId();
+ portlet = transientApplicationState.getContentState();
+ }
+ else
+ {
+ // The only way to retrieve the information if the state is not transient is if we're within the portal context
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ if (container instanceof PortalContainer)
+ {
+ DataStorage dataStorage = (DataStorage) container.getComponentInstanceOfType(DataStorage.class);
+ try
+ {
+ portlet = dataStorage.load(state, ApplicationType.PORTLET);
+ }
+ catch (Exception e)
+ {
+ throw new XMLStreamException("Could not obtain portlet state.");
+ }
+
+ try
+ {
+ contentId = dataStorage.getId(state);
+ }
+ catch (Exception e)
+ {
+ throw new XMLStreamException("Could not obtain contentId.", e);
+ }
+ }
+ else
+ {
+ throw new XMLStreamException("Cannot marshal application state " + state + " outside the context of the portal.");
+ }
+ }
+
+ // Marshal portlet application id
+ if (contentId == null) throw new XMLStreamException("Portlet application ID was null.");
+ writer.writeElement(Element.APPLICATION_REF, contentId.substring(0, contentId.indexOf("/")));
+ writer.writeElement(Element.PORTLET_REF, contentId.substring(contentId.indexOf("/") + 1, contentId.length()));
+
+ // Marshal preferences
+ if (portlet != null)
+ {
+ boolean prefsWritten = false;
+ for (Preference preference : portlet)
+ {
+ if (!prefsWritten)
+ {
+ writer.writeStartElement(Element.PREFERENCES);
+ prefsWritten = true;
+ }
+
+ writer.writeStartElement(Element.PREFERENCE);
+ writer.writeElement(Element.NAME, preference.getName());
+ for (String value : preference.getValues())
+ {
+ writeOptionalContent(writer, Element.PREFERENCE_VALUE, value);
+ }
+ writer.writeElement(Element.PREFERENCE_READONLY, WritableValueTypes.BOOLEAN, preference.isReadOnly());
+ writer.writeEndElement(); // End of preference
+ }
+ if (prefsWritten)
+ {
+ writer.writeEndElement(); // End of preferences
+ }
+ }
+ writer.writeEndElement(); // End of portlet
+
+ marshalApplication(writer, portletApplication);
+
+ writer.writeEndElement(); // End of portlet-application
+ }
+
+ protected Application<Portlet> unmarshalPortletApplication(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ requiresChild(navigator, Element.PORTLET);
+ ApplicationState<Portlet> state = unmarshalPortletApplicationState(navigator.fork());
+
+ Application<Portlet> portlet = new Application<Portlet>(ApplicationType.PORTLET);
+ portlet.setState(state);
+
+ boolean showInfoBarParsed = false;
+
+ Element current = navigator.sibling();
+ while (current != null)
+ {
+ switch (current)
+ {
+ case THEME:
+ portlet.setTheme(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case TITLE:
+ portlet.setTitle(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case ACCESS_PERMISSIONS:
+ portlet.setAccessPermissions(unmarshalAccessPermissions(navigator, true));
+ current = navigator.sibling();
+ break;
+ case SHOW_INFO_BAR:
+ portlet.setShowInfoBar(parseRequiredContent(navigator, ValueType.BOOLEAN));
+ showInfoBarParsed = true;
+ current = navigator.sibling();
+ break;
+ case SHOW_APPLICATION_STATE:
+ portlet.setShowApplicationState(navigator.parseContent(ValueType.BOOLEAN));
+ current = navigator.sibling();
+ break;
+ case SHOW_APPLICATION_MODE:
+ portlet.setShowApplicationMode(navigator.parseContent(ValueType.BOOLEAN));
+ current = navigator.sibling();
+ break;
+ case DESCRIPTION:
+ portlet.setDescription(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case ICON:
+ portlet.setIcon(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case WIDTH:
+ portlet.setWidth(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case HEIGHT:
+ portlet.setHeight(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case UNKNOWN:
+ throw unknownElement(navigator);
+ default:
+ throw unexpectedElement(navigator);
+ }
+ }
+
+ //TODO: We should raise this exception as soon as we know so location is accurate
+ if (portlet.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
+ if (!showInfoBarParsed) throw expectedElement(navigator, Element.SHOW_INFO_BAR);
+
+ return portlet;
+ }
+
+ private ApplicationState<Portlet> unmarshalPortletApplicationState(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ // Application name
+ requiresChild(navigator, Element.APPLICATION_REF);
+ String applicationRef = getRequiredContent(navigator, true);
+
+ // Portlet name
+ requiresSibling(navigator, Element.PORTLET_REF);
+ String portletRef = getRequiredContent(navigator, true);
+
+ // Preferences
+ PortletBuilder portletBuilder = null;
+ if (navigator.sibling() == Element.PREFERENCES)
+ {
+ requiresChild(navigator, Element.PREFERENCE);
+ portletBuilder = new PortletBuilder();
+ for (StaxNavigator<Element> fork : navigator.fork(Element.PREFERENCE))
+ {
+ // Preference name
+ requiresChild(fork, Element.NAME);
+ String prefName = getRequiredContent(fork, false);
+
+ // Preference values
+ List<String> values = null;
+ while (fork.sibling() == Element.PREFERENCE_VALUE)
+ {
+ if (values == null) values = new ArrayList<String>();
+ values.add(getContent(fork, false));
+ }
+ if (values == null)
+ {
+ values = Collections.singletonList(null);
+ }
+
+ // Preference readonly
+ Boolean readOnly = null;
+ if (fork.getName() == Element.PREFERENCE_READONLY)
+ {
+ readOnly = parseRequiredContent(fork, ValueType.BOOLEAN);
+ }
+
+ // Ensure nothing is left.
+ if (fork.next() != null)
+ {
+ throw unexpectedElement(fork);
+ }
+
+ if (readOnly == null)
+ {
+ portletBuilder.add(prefName, values);
+ }
+ else
+ {
+ portletBuilder.add(prefName, values, readOnly);
+ }
+ }
+ }
+
+ TransientApplicationState<Portlet> state = new TransientApplicationState<Portlet>(applicationRef + "/" + portletRef);
+ if (portletBuilder != null)
+ {
+ state.setContentState(portletBuilder.build());
+ }
+
+ return state;
+ }
+
+ protected void marshalGadgetApplication(StaxWriter<Element> writer, Application<Gadget> gadgetApplication) throws XMLStreamException
+ {
+ writer.writeStartElement(Element.GADGET_APPLICATION).writeStartElement(Element.GADGET);
+
+ // Marshal ApplicationState
+ ApplicationState<Gadget> state = gadgetApplication.getState();
+
+ // Marshal application state
+ String contentId;
+ Gadget gadget;
+ // If transient we have all the information we need
+ if (state instanceof TransientApplicationState)
+ {
+ TransientApplicationState<Gadget> transientApplicationState = (TransientApplicationState<Gadget>) state;
+ contentId = transientApplicationState.getContentId();
+ gadget = transientApplicationState.getContentState();
+ }
+ else
+ {
+ // The only way to retrieve the information if the state is not transient is if we're within a portal context
+ ExoContainer container = ExoContainerContext.getCurrentContainer();
+ if (container instanceof PortalContainer)
+ {
+ ModelDataStorage dataStorage = (ModelDataStorage) container.getComponentInstanceOfType(ModelDataStorage.class);
+ try
+ {
+ gadget = dataStorage.load(state, ApplicationType.GADGET);
+ }
+ catch (Exception e)
+ {
+ throw new XMLStreamException("Could not obtain gadget state from custom context.");
+ }
+
+ try
+ {
+ contentId = dataStorage.getId(state);
+ }
+ catch (Exception e)
+ {
+ throw new XMLStreamException("Could not obtain contentId from custom context.", e);
+ }
+ }
+ else
+ {
+ throw new XMLStreamException("Cannot marshal application state " + state + " outside the context of the portal.");
+ }
+ }
+
+ // Marshal portlet application id
+ if (contentId == null) throw new XMLStreamException("Gadget content ID was null.");
+ writer.writeElement(Element.GADGET_REF, contentId);
+
+ // Marshal preferences
+ if (gadget != null)
+ {
+ //TODO: When user-prefs are supported, uncomment
+ //writer.writeOptionalElement(Element.PREFERENCES, gadget.getUserPref());
+ }
+ writer.writeEndElement(); // End of portlet
+
+ marshalApplication(writer, gadgetApplication);
+
+
+ writer.writeEndElement(); // End of gadget-application
+ }
+
+ protected Application<Gadget> unmarshalGadgetApplication(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ requiresChild(navigator, Element.GADGET);
+ ApplicationState<Gadget> state = unmarshalGadgetApplicationState(navigator.fork());
+
+ Application<Gadget> gadget = new Application<Gadget>(ApplicationType.GADGET);
+ gadget.setState(state);
+
+ boolean showInfoBarParsed = false;
+
+ Element current = navigator.sibling();
+ while (current != null)
+ {
+ switch (current)
+ {
+ case THEME:
+ gadget.setTheme(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case TITLE:
+ gadget.setTitle(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case ACCESS_PERMISSIONS:
+ gadget.setAccessPermissions(unmarshalAccessPermissions(navigator, true));
+ current = navigator.sibling();
+ break;
+ case SHOW_INFO_BAR:
+ gadget.setShowInfoBar(parseRequiredContent(navigator, ValueType.BOOLEAN));
+ showInfoBarParsed = true;
+ current = navigator.sibling();
+ break;
+ case SHOW_APPLICATION_STATE:
+ gadget.setShowApplicationState(navigator.parseContent(ValueType.BOOLEAN));
+ current = navigator.sibling();
+ break;
+ case SHOW_APPLICATION_MODE:
+ gadget.setShowApplicationMode(navigator.parseContent(ValueType.BOOLEAN));
+ current = navigator.sibling();
+ break;
+ case DESCRIPTION:
+ gadget.setDescription(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case ICON:
+ gadget.setIcon(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case WIDTH:
+ gadget.setWidth(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case HEIGHT:
+ gadget.setHeight(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case UNKNOWN:
+ throw unknownElement(navigator);
+ default:
+ throw unexpectedElement(navigator);
+ }
+ }
+
+ //TODO: We should raise this exception as soon as we know so location is accurate
+ if (gadget.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
+ if (!showInfoBarParsed) throw expectedElement(navigator, Element.SHOW_INFO_BAR);
+
+ return gadget;
+ }
+
+ private ApplicationState<Gadget> unmarshalGadgetApplicationState(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ requiresChild(navigator, Element.GADGET_REF);
+ String gadgetRef = getRequiredContent(navigator, true);
+
+ //TODO: Implement userPref unmarshalling when gatein_objects support it
+ Gadget gadget = null;
+
+ if (navigator.next() != null)
+ {
+ throw unexpectedElement(navigator);
+ }
+
+ return new TransientApplicationState<Gadget>(gadgetRef, gadget);
+ }
+
+ protected void marshalApplication(StaxWriter<Element> writer, Application<?> application) throws XMLStreamException
+ {
+ // Theme, Title
+ writeOptionalElement(writer, Element.THEME, application.getTheme());
+ writeOptionalElement(writer, Element.TITLE, application.getTitle());
+
+ // Access Permissions
+ marshalAccessPermissions(writer, application.getAccessPermissions());
+
+ // common application elements
+ writeOptionalElement(writer, Element.SHOW_INFO_BAR, String.valueOf(application.getShowInfoBar()));
+ writeOptionalElement(writer, Element.SHOW_APPLICATION_STATE, String.valueOf(application.getShowApplicationState()));
+ writeOptionalElement(writer, Element.SHOW_APPLICATION_MODE, String.valueOf(application.getShowApplicationMode()));
+
+ // Description, Icon
+ writeOptionalElement(writer, Element.DESCRIPTION, application.getDescription());
+ writeOptionalElement(writer, Element.ICON, application.getIcon());
+
+ // Width & Height
+ writeOptionalElement(writer, Element.WIDTH, application.getWidth());
+ writeOptionalElement(writer, Element.HEIGHT, application.getHeight());
+ }
+
+ protected void marshalAccessPermissions(StaxWriter<Element> writer, String[] accessPermissions) throws XMLStreamException
+ {
+ writeOptionalElement(writer, Element.ACCESS_PERMISSIONS, DelimitedValueType.SEMI_COLON, accessPermissions);
+ }
+
+ protected String[] unmarshalAccessPermissions(StaxNavigator<Element> navigator, boolean required) throws XMLStreamException
+ {
+ if (required)
+ {
+ return parseRequiredContent(navigator, DelimitedValueType.SEMI_COLON);
+ }
+ else
+ {
+ return parseContent(navigator, DelimitedValueType.SEMI_COLON, null);
+ }
+ }
+
+ protected void marshalEditPermission(StaxWriter<Element> writer, String editPermission) throws XMLStreamException
+ {
+ writeOptionalElement(writer, Element.EDIT_PERMISSION, editPermission);
+ }
+
+ protected String unmarshalEditPermission(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ return getContent(navigator, true);
+ }
+
+ protected void writeGateinObjectsNamespace(StaxWriter<Element> writer) throws XMLStreamException
+ {
+ Utils.writeGateinObjectsNamespace(writer);
+ }
+
+ @SuppressWarnings("unchecked")
+ private <S> Application<S> safeCast(Application application, Class<S> stateClass)
+ {
+ return (Application<S>) application;
+ }
+
+ private static void writeOptionalAttribute(StaxWriter writer, Attribute attribute, String value) throws XMLStreamException
+ {
+ if (value == null) return;
+
+ writer.writeAttribute(attribute.getLocalName(), value);
+ }
+
+ private static enum Attribute
+ {
+ ID("id"),
+ TEMPLATE("template"),
+ WIDTH("width"),
+ HEIGHT("height");
+
+ private final String name;
+
+ Attribute(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,65 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.gatein.common.xml.stax.writer.WritableValueType;
-import org.exoplatform.portal.pom.config.Utils;
-import org.staxnav.StaxNavException;
-import org.staxnav.ValueType;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class DelimitedValueType extends ValueType<String[]> implements WritableValueType<String[]>
-{
- public static DelimitedValueType SEMI_COLON = new DelimitedValueType(";");
-
- private final String delimiter;
-
- public DelimitedValueType(String delimiter)
- {
- this.delimiter = delimiter;
- }
-
- @Override
- protected String[] parse(String s) throws Exception
- {
- return Utils.split(delimiter, s);
- }
-
- @Override
- public String format(String[] value) throws StaxNavException
- {
- String s = Utils.join(delimiter, value);
-
- if (s != null && s.trim().length() == 0)
- {
- return null;
- }
- else
- {
- return s;
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/DelimitedValueType.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.gatein.common.xml.stax.writer.WritableValueType;
+import org.exoplatform.portal.pom.config.Utils;
+import org.staxnav.StaxNavException;
+import org.staxnav.ValueType;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class DelimitedValueType extends ValueType<String[]> implements WritableValueType<String[]>
+{
+ public static DelimitedValueType SEMI_COLON = new DelimitedValueType(";");
+
+ private final String delimiter;
+
+ public DelimitedValueType(String delimiter)
+ {
+ this.delimiter = delimiter;
+ }
+
+ @Override
+ protected String[] parse(String s) throws Exception
+ {
+ return Utils.split(delimiter, s);
+ }
+
+ @Override
+ public String format(String[] value) throws StaxNavException
+ {
+ String s = Utils.join(delimiter, value);
+
+ if (s != null && s.trim().length() == 0)
+ {
+ return null;
+ }
+ else
+ {
+ return s;
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,104 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-
-import org.staxnav.EnumElement;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public enum Element implements EnumElement<Element>
-{
- // Navigation Elements
- UNKNOWN(null),
- NODE_NAVIGATION("node-navigation"),
- PRIORITY("priority"),
- PAGE_NODES("page-nodes"),
- NODE("node"),
- @Deprecated
- URI("uri"),
- PARENT_URI("parent-uri"),
- LABEL("label"),
- START_PUBLICATION_DATE("start-publication-date"),
- END_PUBLICATION_DATE("end-publication-date"),
- VISIBILITY("visibility"),
- PAGE_REFERENCE("page-reference"),
-
- // Page elements
- PAGE_SET("page-set"),
- PAGE("page"),
- NAME("name"),
- SHOW_MAX_WINDOW("show-max-window"),
-
- // Portal config elements
- PORTAL_CONFIG("portal-config"),
- PORTAL_NAME("portal-name"),
- LOCALE("locale"),
- SKIN("skin"),
- PROPERTIES("properties"),
- PROPERTIES_ENTRY("entry"),
- PORTAL_LAYOUT("portal-layout"),
-
- // Common elements
- TITLE("title"),
- DESCRIPTION("description"),
- FACTORY_ID("factory-id"),
- ACCESS_PERMISSIONS("access-permissions"),
- EDIT_PERMISSION("edit-permission"),
- PORTLET_APPLICATION("portlet-application"),
- GADGET_APPLICATION("gadget-application"),
- CONTAINER("container"),
- PAGE_BODY("page-body"),
- APPLICATION_REF("application-ref"),
- PORTLET_REF("portlet-ref"),
- PORTLET("portlet"),
- GADGET_REF("gadget-ref"),
- GADGET("gadget"),
- THEME("theme"),
- SHOW_INFO_BAR("show-info-bar"),
- SHOW_APPLICATION_STATE("show-application-state"),
- SHOW_APPLICATION_MODE("show-application-mode"),
- ICON("icon"),
- WIDTH("width"),
- HEIGHT("height"),
- PREFERENCES("preferences"),
- PREFERENCE("preference"),
- PREFERENCE_VALUE("value"),
- PREFERENCE_READONLY("read-only")
- ;
-
- private final String name;
-
- Element(String name)
- {
- this.name = name;
- }
-
- @Override
- public String getLocalName()
- {
- return name;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Element.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,104 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+
+import org.staxnav.EnumElement;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public enum Element implements EnumElement<Element>
+{
+ // Navigation Elements
+ UNKNOWN(null),
+ NODE_NAVIGATION("node-navigation"),
+ PRIORITY("priority"),
+ PAGE_NODES("page-nodes"),
+ NODE("node"),
+ @Deprecated
+ URI("uri"),
+ PARENT_URI("parent-uri"),
+ LABEL("label"),
+ START_PUBLICATION_DATE("start-publication-date"),
+ END_PUBLICATION_DATE("end-publication-date"),
+ VISIBILITY("visibility"),
+ PAGE_REFERENCE("page-reference"),
+
+ // Page elements
+ PAGE_SET("page-set"),
+ PAGE("page"),
+ NAME("name"),
+ SHOW_MAX_WINDOW("show-max-window"),
+
+ // Portal config elements
+ PORTAL_CONFIG("portal-config"),
+ PORTAL_NAME("portal-name"),
+ LOCALE("locale"),
+ SKIN("skin"),
+ PROPERTIES("properties"),
+ PROPERTIES_ENTRY("entry"),
+ PORTAL_LAYOUT("portal-layout"),
+
+ // Common elements
+ TITLE("title"),
+ DESCRIPTION("description"),
+ FACTORY_ID("factory-id"),
+ ACCESS_PERMISSIONS("access-permissions"),
+ EDIT_PERMISSION("edit-permission"),
+ PORTLET_APPLICATION("portlet-application"),
+ GADGET_APPLICATION("gadget-application"),
+ CONTAINER("container"),
+ PAGE_BODY("page-body"),
+ APPLICATION_REF("application-ref"),
+ PORTLET_REF("portlet-ref"),
+ PORTLET("portlet"),
+ GADGET_REF("gadget-ref"),
+ GADGET("gadget"),
+ THEME("theme"),
+ SHOW_INFO_BAR("show-info-bar"),
+ SHOW_APPLICATION_STATE("show-application-state"),
+ SHOW_APPLICATION_MODE("show-application-mode"),
+ ICON("icon"),
+ WIDTH("width"),
+ HEIGHT("height"),
+ PREFERENCES("preferences"),
+ PREFERENCE("preference"),
+ PREFERENCE_VALUE("value"),
+ PREFERENCE_READONLY("read-only")
+ ;
+
+ private final String name;
+
+ Element(String name)
+ {
+ this.name = name;
+ }
+
+ @Override
+ public String getLocalName()
+ {
+ return name;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,55 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public enum Namespace
-{
- GATEIN_OBJECTS_1_1("http://www.gatein.org/xml/ns/gatein_objects_1_1"),
- GATEIN_OBJECTS_1_2("http://www.gatein.org/xml/ns/gatein_objects_1_2");
-
- /**
- * The current namespace version.
- */
- public static final Namespace CURRENT = GATEIN_OBJECTS_1_2;
-
- private final String name;
-
- Namespace(final String name)
- {
- this.name = name;
- }
-
- /**
- * Get the URI of this namespace.
- *
- * @return the URI
- */
- public String getUri()
- {
- return name;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Namespace.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public enum Namespace
+{
+ GATEIN_OBJECTS_1_1("http://www.gatein.org/xml/ns/gatein_objects_1_1"),
+ GATEIN_OBJECTS_1_2("http://www.gatein.org/xml/ns/gatein_objects_1_2");
+
+ /**
+ * The current namespace version.
+ */
+ public static final Namespace CURRENT = GATEIN_OBJECTS_1_2;
+
+ private final String name;
+
+ Namespace(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the URI of this namespace.
+ *
+ * @return the URI
+ */
+ public String getUri()
+ {
+ return name;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,302 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-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.config.model.PageNode;
-import org.exoplatform.portal.mop.Visibility;
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.common.xml.stax.writer.WritableValueTypes;
-import org.gatein.management.api.binding.BindingException;
-import org.gatein.management.api.binding.Marshaller;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-import org.staxnav.ValueType;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import static org.gatein.common.xml.stax.navigator.Exceptions.*;
-import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
-import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationMarshaller implements Marshaller<PageNavigation>
-{
-
- @Override
- public void marshal(PageNavigation navigation, OutputStream outputStream) throws BindingException
- {
- try
- {
- StaxWriter<Element> writer = createWriter(Element.class, outputStream);
- marshalNavigation(writer, navigation);
- }
- catch (StaxNavException e)
- {
- throw new BindingException(e);
- }
- catch (XMLStreamException e)
- {
- throw new BindingException(e);
- }
- }
-
- @Override
- public PageNavigation unmarshal(InputStream is) throws BindingException
- {
- try
- {
- StaxNavigator<Element> navigator = createNavigator(Element.class, Element.UNKNOWN, is);
- return unmarshalNavigation(navigator);
- }
- catch (StaxNavException e)
- {
- throw new BindingException(e);
- }
- }
-
- private void marshalNavigation(StaxWriter<Element> writer, PageNavigation navigation) throws XMLStreamException
- {
- writer.writeStartElement(Element.NODE_NAVIGATION);
-
- // Write gatein_objects xml namespace
- Utils.writeGateinObjectsNamespace(writer);
-
- // Priority
- writer.writeElement(Element.PRIORITY, WritableValueTypes.INTEGER, navigation.getPriority());
-
- // Page nodes
- writer.writeStartElement(Element.PAGE_NODES);
- ArrayList<NavigationFragment> fragments = navigation.getFragments();
- for (NavigationFragment fragment : fragments)
- {
- if (fragment.getParentURI() != null)
- {
- String parentUri = fragment.getParentURI();
- writeOptionalElement(writer, Element.PARENT_URI, parentUri);
- }
-
- Collection<PageNode> nodes = fragment.getNodes();
- if (nodes != null && !nodes.isEmpty())
- {
- for (PageNode node : nodes)
- {
- marshallNode(writer, node);
- }
- }
- }
-
- writer.writeEndElement().writeEndElement(); // End page-nodes and node-navigation
- }
-
- public void marshallNode(StaxWriter<Element> writer, PageNode node) throws XMLStreamException
- {
- writer.writeStartElement(Element.NODE);
- writer.writeElement(Element.NAME, node.getName());
-
- if (node.getLabels() != null)
- {
- for (LocalizedString label : node.getLabels())
- {
- writer.writeStartElement(Element.LABEL);
- if (label.getLang() != null)
- {
- String localeString = label.getLang().getLanguage();
- if (localeString == null)
- {
- throw new XMLStreamException("Language was null for locale " + label.getLang());
- }
- String country = label.getLang().getCountry();
- if (country != null && country.length() > 0)
- {
- localeString += "-" + country.toLowerCase();
- }
-
- writer.writeAttribute(new QName(XMLConstants.XML_NS_URI, "lang", XMLConstants.XML_NS_PREFIX), localeString);
- }
- writer.writeContent(label.getValue()).writeEndElement();
- }
- }
-
- writeOptionalElement(writer, Element.ICON, node.getIcon());
-
- writeOptionalElement(writer, Element.START_PUBLICATION_DATE, WritableValueTypes.DATE_TIME, node.getStartPublicationDate());
- writeOptionalElement(writer, Element.END_PUBLICATION_DATE, WritableValueTypes.DATE_TIME, node.getEndPublicationDate());
-
- String visibility = (node.getVisibility() == null) ? null : node.getVisibility().name();
- writeOptionalElement(writer, Element.VISIBILITY, visibility);
- writeOptionalElement(writer, Element.PAGE_REFERENCE, node.getPageReference());
-
- // Marshall children
- List<PageNode> children = node.getNodes();
- if (children != null && !children.isEmpty())
- {
- for (PageNode child : children)
- {
- marshallNode(writer, child);
- }
- }
-
- writer.writeEndElement(); // End of node
- }
-
- private PageNavigation unmarshalNavigation(StaxNavigator<Element> navigator) throws StaxNavException
- {
- PageNavigation navigation = new PageNavigation();
-
- if (navigator.getName() == Element.NODE_NAVIGATION)
- {
- Element next = navigator.child();
- if (next != Element.PRIORITY)
- {
- throw expectedElement(navigator, Element.PRIORITY);
- }
- Integer priority = parseRequiredContent(navigator, ValueType.INTEGER);
- navigation.setPriority(priority);
-
- next = navigator.sibling();
- if (next == Element.PAGE_NODES)
- {
- for (StaxNavigator<Element> fork: navigator.fork(Element.PAGE_NODES))
- {
- NavigationFragment fragment = new NavigationFragment();
- navigation.addFragment(fragment);
-
- next = fork.child();
- if (next == Element.PARENT_URI)
- {
- String parentUri = fork.getContent();
- if (parentUri == null)
- {
- parentUri = "";
- }
- else if (parentUri.charAt(0) == '/')
- {
- parentUri = parentUri.substring(1, parentUri.length());
- }
- fragment.setParentURI(parentUri);
-
- next = fork.sibling();
- }
-
- if (next == Element.NODE)
- {
- ArrayList<PageNode> nodes = new ArrayList<PageNode>();
- for (StaxNavigator<Element> nodeFork : fork.fork(Element.NODE))
- {
- nodes.add(unmarshalNode(nodeFork));
- }
- fragment.setNodes(nodes);
- }
- else if (next != null)
- {
- throw unknownElement(fork);
- }
- }
- }
- else if (next != null)
- {
- throw expectedElement(navigator, Element.PAGE_NODES);
- }
-
- return navigation;
- }
- else
- {
- throw unknownElement(navigator);
- }
- }
-
- private PageNode unmarshalNode(StaxNavigator<Element> navigator) throws StaxNavException
- {
- PageNode node = new PageNode();
- I18NString labels = new I18NString();
- ArrayList<PageNode> children = new ArrayList<PageNode>();
-
- Element current = navigator.child();
- while (current != null)
- {
- switch (navigator.getName())
- {
- case URI: // For backwards compatibility
- current = navigator.sibling();
- break;
- case NAME:
- node.setName(navigator.getContent());
- current = navigator.sibling();
- break;
- case LABEL:
- labels.add(Utils.parseLocalizedString(navigator));
- current = navigator.sibling();
- break;
- case ICON:
- node.setIcon(navigator.getContent());
- current = navigator.sibling();
- break;
- case START_PUBLICATION_DATE:
- node.setStartPublicationDate(navigator.parseContent(ValueType.DATE_TIME));
- current = navigator.sibling();
- break;
- case END_PUBLICATION_DATE:
- node.setEndPublicationDate(navigator.parseContent(ValueType.DATE_TIME));
- current = navigator.sibling();
- break;
- case VISIBILITY:
- node.setVisibility(navigator.parseContent(ValueType.get(Visibility.class)));
- current = navigator.sibling();
- break;
- case PAGE_REFERENCE:
- node.setPageReference(navigator.getContent());
- current = navigator.sibling();
- break;
- case NODE:
- PageNode child = unmarshalNode(navigator.fork());
- children.add(child);
- current = navigator.sibling();
- break;
- case UNKNOWN:
- throw unknownElement(navigator);
- default:
- throw unexpectedElement(navigator);
- }
- }
-
- node.setLabels(labels);
- node.setChildren(children);
-
- return node;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,302 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+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.config.model.PageNode;
+import org.exoplatform.portal.mop.Visibility;
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.common.xml.stax.writer.WritableValueTypes;
+import org.gatein.management.api.binding.BindingException;
+import org.gatein.management.api.binding.Marshaller;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+import org.staxnav.ValueType;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import static org.gatein.common.xml.stax.navigator.Exceptions.*;
+import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
+import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationMarshaller implements Marshaller<PageNavigation>
+{
+
+ @Override
+ public void marshal(PageNavigation navigation, OutputStream outputStream) throws BindingException
+ {
+ try
+ {
+ StaxWriter<Element> writer = createWriter(Element.class, outputStream);
+ marshalNavigation(writer, navigation);
+ }
+ catch (StaxNavException e)
+ {
+ throw new BindingException(e);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ @Override
+ public PageNavigation unmarshal(InputStream is) throws BindingException
+ {
+ try
+ {
+ StaxNavigator<Element> navigator = createNavigator(Element.class, Element.UNKNOWN, is);
+ return unmarshalNavigation(navigator);
+ }
+ catch (StaxNavException e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ private void marshalNavigation(StaxWriter<Element> writer, PageNavigation navigation) throws XMLStreamException
+ {
+ writer.writeStartElement(Element.NODE_NAVIGATION);
+
+ // Write gatein_objects xml namespace
+ Utils.writeGateinObjectsNamespace(writer);
+
+ // Priority
+ writer.writeElement(Element.PRIORITY, WritableValueTypes.INTEGER, navigation.getPriority());
+
+ // Page nodes
+ writer.writeStartElement(Element.PAGE_NODES);
+ ArrayList<NavigationFragment> fragments = navigation.getFragments();
+ for (NavigationFragment fragment : fragments)
+ {
+ if (fragment.getParentURI() != null)
+ {
+ String parentUri = fragment.getParentURI();
+ writeOptionalElement(writer, Element.PARENT_URI, parentUri);
+ }
+
+ Collection<PageNode> nodes = fragment.getNodes();
+ if (nodes != null && !nodes.isEmpty())
+ {
+ for (PageNode node : nodes)
+ {
+ marshallNode(writer, node);
+ }
+ }
+ }
+
+ writer.writeEndElement().writeEndElement(); // End page-nodes and node-navigation
+ }
+
+ public void marshallNode(StaxWriter<Element> writer, PageNode node) throws XMLStreamException
+ {
+ writer.writeStartElement(Element.NODE);
+ writer.writeElement(Element.NAME, node.getName());
+
+ if (node.getLabels() != null)
+ {
+ for (LocalizedString label : node.getLabels())
+ {
+ writer.writeStartElement(Element.LABEL);
+ if (label.getLang() != null)
+ {
+ String localeString = label.getLang().getLanguage();
+ if (localeString == null)
+ {
+ throw new XMLStreamException("Language was null for locale " + label.getLang());
+ }
+ String country = label.getLang().getCountry();
+ if (country != null && country.length() > 0)
+ {
+ localeString += "-" + country.toLowerCase();
+ }
+
+ writer.writeAttribute(new QName(XMLConstants.XML_NS_URI, "lang", XMLConstants.XML_NS_PREFIX), localeString);
+ }
+ writer.writeContent(label.getValue()).writeEndElement();
+ }
+ }
+
+ writeOptionalElement(writer, Element.ICON, node.getIcon());
+
+ writeOptionalElement(writer, Element.START_PUBLICATION_DATE, WritableValueTypes.DATE_TIME, node.getStartPublicationDate());
+ writeOptionalElement(writer, Element.END_PUBLICATION_DATE, WritableValueTypes.DATE_TIME, node.getEndPublicationDate());
+
+ String visibility = (node.getVisibility() == null) ? null : node.getVisibility().name();
+ writeOptionalElement(writer, Element.VISIBILITY, visibility);
+ writeOptionalElement(writer, Element.PAGE_REFERENCE, node.getPageReference());
+
+ // Marshall children
+ List<PageNode> children = node.getNodes();
+ if (children != null && !children.isEmpty())
+ {
+ for (PageNode child : children)
+ {
+ marshallNode(writer, child);
+ }
+ }
+
+ writer.writeEndElement(); // End of node
+ }
+
+ private PageNavigation unmarshalNavigation(StaxNavigator<Element> navigator) throws StaxNavException
+ {
+ PageNavigation navigation = new PageNavigation();
+
+ if (navigator.getName() == Element.NODE_NAVIGATION)
+ {
+ Element next = navigator.child();
+ if (next != Element.PRIORITY)
+ {
+ throw expectedElement(navigator, Element.PRIORITY);
+ }
+ Integer priority = parseRequiredContent(navigator, ValueType.INTEGER);
+ navigation.setPriority(priority);
+
+ next = navigator.sibling();
+ if (next == Element.PAGE_NODES)
+ {
+ for (StaxNavigator<Element> fork: navigator.fork(Element.PAGE_NODES))
+ {
+ NavigationFragment fragment = new NavigationFragment();
+ navigation.addFragment(fragment);
+
+ next = fork.child();
+ if (next == Element.PARENT_URI)
+ {
+ String parentUri = fork.getContent();
+ if (parentUri == null)
+ {
+ parentUri = "";
+ }
+ else if (parentUri.charAt(0) == '/')
+ {
+ parentUri = parentUri.substring(1, parentUri.length());
+ }
+ fragment.setParentURI(parentUri);
+
+ next = fork.sibling();
+ }
+
+ if (next == Element.NODE)
+ {
+ ArrayList<PageNode> nodes = new ArrayList<PageNode>();
+ for (StaxNavigator<Element> nodeFork : fork.fork(Element.NODE))
+ {
+ nodes.add(unmarshalNode(nodeFork));
+ }
+ fragment.setNodes(nodes);
+ }
+ else if (next != null)
+ {
+ throw unknownElement(fork);
+ }
+ }
+ }
+ else if (next != null)
+ {
+ throw expectedElement(navigator, Element.PAGE_NODES);
+ }
+
+ return navigation;
+ }
+ else
+ {
+ throw unknownElement(navigator);
+ }
+ }
+
+ private PageNode unmarshalNode(StaxNavigator<Element> navigator) throws StaxNavException
+ {
+ PageNode node = new PageNode();
+ I18NString labels = new I18NString();
+ ArrayList<PageNode> children = new ArrayList<PageNode>();
+
+ Element current = navigator.child();
+ while (current != null)
+ {
+ switch (navigator.getName())
+ {
+ case URI: // For backwards compatibility
+ current = navigator.sibling();
+ break;
+ case NAME:
+ node.setName(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case LABEL:
+ labels.add(Utils.parseLocalizedString(navigator));
+ current = navigator.sibling();
+ break;
+ case ICON:
+ node.setIcon(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case START_PUBLICATION_DATE:
+ node.setStartPublicationDate(navigator.parseContent(ValueType.DATE_TIME));
+ current = navigator.sibling();
+ break;
+ case END_PUBLICATION_DATE:
+ node.setEndPublicationDate(navigator.parseContent(ValueType.DATE_TIME));
+ current = navigator.sibling();
+ break;
+ case VISIBILITY:
+ node.setVisibility(navigator.parseContent(ValueType.get(Visibility.class)));
+ current = navigator.sibling();
+ break;
+ case PAGE_REFERENCE:
+ node.setPageReference(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case NODE:
+ PageNode child = unmarshalNode(navigator.fork());
+ children.add(child);
+ current = navigator.sibling();
+ break;
+ case UNKNOWN:
+ throw unknownElement(navigator);
+ default:
+ throw unexpectedElement(navigator);
+ }
+ }
+
+ node.setLabels(labels);
+ node.setChildren(children);
+
+ return node;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,220 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.Page;
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.common.xml.stax.writer.WritableValueTypes;
-import org.gatein.management.api.binding.BindingException;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-import org.staxnav.ValueType;
-
-import javax.xml.stream.XMLStreamException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.gatein.common.xml.stax.navigator.Exceptions.*;
-import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
-import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
-
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageMarshaller extends AbstractMarshaller<Page.PageSet>
-{
- @Override
- public void marshal(Page.PageSet pageSet, OutputStream outputStream) throws BindingException
- {
- try
- {
- StaxWriter<Element> writer = createWriter(Element.class, outputStream);
-
- writer.writeStartElement(Element.PAGE_SET);
- writeGateinObjectsNamespace(writer);
-
- // Marshal pages
- for (Page page : pageSet.getPages())
- {
- marshalPage(writer, page);
- }
-
- writer.finish();
- }
- catch (StaxNavException e)
- {
- throw new BindingException(e);
- }
- catch (XMLStreamException e)
- {
- throw new BindingException(e);
- }
- }
-
- @Override
- public Page.PageSet unmarshal(InputStream inputStream) throws BindingException
- {
- try
- {
- StaxNavigator<Element> navigator = createNavigator(Element.class, Element.UNKNOWN, inputStream);
- if (navigator.getName() == Element.PAGE_SET)
- {
- ArrayList<Page> pages = new ArrayList<Page>();
- Element next = navigator.child();
- if (next == Element.PAGE)
- {
- for (StaxNavigator<Element> fork : navigator.fork(Element.PAGE))
- {
- pages.add(unmarshalPage(fork));
- }
- }
- else if (next != null)
- {
- throw unexpectedElement(navigator);
- }
-
- //Seems like next should be null here...
- if (navigator.sibling() != null)
- {
- throw unexpectedElement(navigator);
- }
-
- Page.PageSet pageSet = new Page.PageSet();
- pageSet.setPages(pages);
-
- return pageSet;
- }
- else
- {
- throw unknownElement(navigator);
- }
- }
- catch (StaxNavException e)
- {
- throw new BindingException(e);
- }
- catch (XMLStreamException e)
- {
- throw new BindingException(e);
- }
- }
-
- private void marshalPage(StaxWriter<Element> writer, Page page) throws XMLStreamException
- {
- writer.writeStartElement(Element.PAGE);
-
- // name, title description
- writer.writeElement(Element.NAME, page.getName());
- writeOptionalElement(writer, Element.TITLE, page.getTitle());
- writeOptionalElement(writer, Element.DESCRIPTION, page.getDescription());
-
- // Access/Edit permissions
- marshalAccessPermissions(writer, page.getAccessPermissions());
- marshalEditPermission(writer, page.getEditPermission());
-
- writeOptionalElement(writer, Element.SHOW_MAX_WINDOW, WritableValueTypes.BOOLEAN, page.isShowMaxWindow());
-
- List<ModelObject> children = page.getChildren();
- for (ModelObject child : children)
- {
- marshalModelObject(writer, child);
- }
-
- writer.writeEndElement(); // End of page element
- }
-
- private Page unmarshalPage(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- requiresChild(navigator, Element.NAME);
- String name = getRequiredContent(navigator, true);
-
- Page page = new Page();
- page.setName(name);
-
- //TODO: Need valid way to ensure a sequence of xml elements, with a mix of required and optional elements.
- Element current = navigator.sibling();
- while (current != null)
- {
- switch (current)
- {
- case TITLE:
- page.setTitle(getContent(navigator, false));
- current = navigator.sibling();
- break;
- case DESCRIPTION:
- page.setDescription(getContent(navigator, false));
- current = navigator.sibling();
- break;
- case ACCESS_PERMISSIONS:
- page.setAccessPermissions(unmarshalAccessPermissions(navigator, true));
- current = navigator.sibling();
- break;
- case EDIT_PERMISSION:
- page.setEditPermission(unmarshalEditPermission(navigator));
- current = navigator.sibling();
- break;
- case SHOW_MAX_WINDOW:
- page.setShowMaxWindow(parseRequiredContent(navigator, ValueType.BOOLEAN));
- current = navigator.sibling();
- break;
- case CONTAINER:
- if (page.getChildren() == null)
- {
- page.setChildren(new ArrayList<ModelObject>());
- }
- page.getChildren().add(unmarshalContainer(navigator.fork()));
- current = navigator.sibling();
- break;
- case PORTLET_APPLICATION:
- if (page.getChildren() == null)
- {
- page.setChildren(new ArrayList<ModelObject>());
- }
- page.getChildren().add(unmarshalPortletApplication(navigator.fork()));
- current = navigator.sibling();
- break;
- case GADGET_APPLICATION:
- if (page.getChildren() == null)
- {
- page.setChildren(new ArrayList<ModelObject>());
- }
- page.getChildren().add(unmarshalGadgetApplication(navigator.fork()));
- current = navigator.sibling();
- break;
- case UNKNOWN:
- throw unknownElement(navigator);
- default:
- throw unexpectedElement(navigator);
- }
- }
- //TODO: We should raise this exception as soon as we know so location is accurate
- if (page.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
-
- return page;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,220 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.Page;
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.common.xml.stax.writer.WritableValueTypes;
+import org.gatein.management.api.binding.BindingException;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+import org.staxnav.ValueType;
+
+import javax.xml.stream.XMLStreamException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.gatein.common.xml.stax.navigator.Exceptions.*;
+import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
+import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
+
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageMarshaller extends AbstractMarshaller<Page.PageSet>
+{
+ @Override
+ public void marshal(Page.PageSet pageSet, OutputStream outputStream) throws BindingException
+ {
+ try
+ {
+ StaxWriter<Element> writer = createWriter(Element.class, outputStream);
+
+ writer.writeStartElement(Element.PAGE_SET);
+ writeGateinObjectsNamespace(writer);
+
+ // Marshal pages
+ for (Page page : pageSet.getPages())
+ {
+ marshalPage(writer, page);
+ }
+
+ writer.finish();
+ }
+ catch (StaxNavException e)
+ {
+ throw new BindingException(e);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ @Override
+ public Page.PageSet unmarshal(InputStream inputStream) throws BindingException
+ {
+ try
+ {
+ StaxNavigator<Element> navigator = createNavigator(Element.class, Element.UNKNOWN, inputStream);
+ if (navigator.getName() == Element.PAGE_SET)
+ {
+ ArrayList<Page> pages = new ArrayList<Page>();
+ Element next = navigator.child();
+ if (next == Element.PAGE)
+ {
+ for (StaxNavigator<Element> fork : navigator.fork(Element.PAGE))
+ {
+ pages.add(unmarshalPage(fork));
+ }
+ }
+ else if (next != null)
+ {
+ throw unexpectedElement(navigator);
+ }
+
+ //Seems like next should be null here...
+ if (navigator.sibling() != null)
+ {
+ throw unexpectedElement(navigator);
+ }
+
+ Page.PageSet pageSet = new Page.PageSet();
+ pageSet.setPages(pages);
+
+ return pageSet;
+ }
+ else
+ {
+ throw unknownElement(navigator);
+ }
+ }
+ catch (StaxNavException e)
+ {
+ throw new BindingException(e);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ private void marshalPage(StaxWriter<Element> writer, Page page) throws XMLStreamException
+ {
+ writer.writeStartElement(Element.PAGE);
+
+ // name, title description
+ writer.writeElement(Element.NAME, page.getName());
+ writeOptionalElement(writer, Element.TITLE, page.getTitle());
+ writeOptionalElement(writer, Element.DESCRIPTION, page.getDescription());
+
+ // Access/Edit permissions
+ marshalAccessPermissions(writer, page.getAccessPermissions());
+ marshalEditPermission(writer, page.getEditPermission());
+
+ writeOptionalElement(writer, Element.SHOW_MAX_WINDOW, WritableValueTypes.BOOLEAN, page.isShowMaxWindow());
+
+ List<ModelObject> children = page.getChildren();
+ for (ModelObject child : children)
+ {
+ marshalModelObject(writer, child);
+ }
+
+ writer.writeEndElement(); // End of page element
+ }
+
+ private Page unmarshalPage(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ requiresChild(navigator, Element.NAME);
+ String name = getRequiredContent(navigator, true);
+
+ Page page = new Page();
+ page.setName(name);
+
+ //TODO: Need valid way to ensure a sequence of xml elements, with a mix of required and optional elements.
+ Element current = navigator.sibling();
+ while (current != null)
+ {
+ switch (current)
+ {
+ case TITLE:
+ page.setTitle(getContent(navigator, false));
+ current = navigator.sibling();
+ break;
+ case DESCRIPTION:
+ page.setDescription(getContent(navigator, false));
+ current = navigator.sibling();
+ break;
+ case ACCESS_PERMISSIONS:
+ page.setAccessPermissions(unmarshalAccessPermissions(navigator, true));
+ current = navigator.sibling();
+ break;
+ case EDIT_PERMISSION:
+ page.setEditPermission(unmarshalEditPermission(navigator));
+ current = navigator.sibling();
+ break;
+ case SHOW_MAX_WINDOW:
+ page.setShowMaxWindow(parseRequiredContent(navigator, ValueType.BOOLEAN));
+ current = navigator.sibling();
+ break;
+ case CONTAINER:
+ if (page.getChildren() == null)
+ {
+ page.setChildren(new ArrayList<ModelObject>());
+ }
+ page.getChildren().add(unmarshalContainer(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case PORTLET_APPLICATION:
+ if (page.getChildren() == null)
+ {
+ page.setChildren(new ArrayList<ModelObject>());
+ }
+ page.getChildren().add(unmarshalPortletApplication(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case GADGET_APPLICATION:
+ if (page.getChildren() == null)
+ {
+ page.setChildren(new ArrayList<ModelObject>());
+ }
+ page.getChildren().add(unmarshalGadgetApplication(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case UNKNOWN:
+ throw unknownElement(navigator);
+ default:
+ throw unexpectedElement(navigator);
+ }
+ }
+ //TODO: We should raise this exception as soon as we know so location is accurate
+ if (page.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
+
+ return page;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,292 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.PageBody;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.config.model.Properties;
-import org.gatein.common.xml.stax.navigator.StaxNavUtils;
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.gatein.management.api.binding.BindingException;
-import org.staxnav.Axis;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-
-import javax.xml.stream.XMLStreamException;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.List;
-import java.util.Map;
-
-import static org.gatein.common.xml.stax.navigator.Exceptions.*;
-import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
-import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteLayoutMarshaller extends AbstractMarshaller<PortalConfig>
-{
- @Override
- public void marshal(PortalConfig object, OutputStream outputStream) throws BindingException
- {
- try
- {
- StaxWriter<Element> writer = createWriter(Element.class, outputStream);
-
- // root element
- writer.writeStartElement(Element.PORTAL_CONFIG);
- writeGateinObjectsNamespace(writer);
-
- marshalPortalConfig(writer, object);
-
- writer.finish();
- }
- catch (StaxNavException e)
- {
- throw new BindingException(e);
- }
- catch (XMLStreamException e)
- {
- throw new BindingException(e);
- }
- }
-
- @Override
- public PortalConfig unmarshal(InputStream is) throws BindingException
- {
- try
- {
- StaxNavigator<Element> navigator = StaxNavUtils.createNavigator(Element.class, Element.UNKNOWN, is);
-
- if (navigator.getName() == Element.PORTAL_CONFIG)
- {
- return unmarshalPortalConfig(navigator);
- }
- else
- {
- throw unknownElement(navigator);
- }
- }
- catch (StaxNavException e)
- {
- throw new BindingException(e);
- }
- catch (XMLStreamException e)
- {
- throw new BindingException(e);
- }
- }
-
- private void marshalPortalConfig(StaxWriter<Element> writer, PortalConfig portalConfig) throws XMLStreamException
- {
- writer.writeElement(Element.PORTAL_NAME, portalConfig.getName());
- writeOptionalElement(writer, Element.LABEL, portalConfig.getLabel());
- writeOptionalElement(writer, Element.DESCRIPTION, portalConfig.getDescription());
- writeOptionalElement(writer, Element.LOCALE, portalConfig.getLocale());
-
- // Access permissions
- marshalAccessPermissions(writer, portalConfig.getAccessPermissions());
-
- // Edit permission
- marshalEditPermission(writer, portalConfig.getEditPermission());
-
- writeOptionalElement(writer, Element.SKIN, portalConfig.getSkin());
-
- boolean propertiesWritten = false;
- Map<String, String> properties = portalConfig.getProperties();
- if (properties != null)
- {
- for (String key : properties.keySet())
- {
- if (!propertiesWritten)
- {
- writer.writeStartElement(Element.PROPERTIES);
- propertiesWritten = true;
- }
- String value = properties.get(key);
- if (value != null)
- {
- writer.writeStartElement(Element.PROPERTIES_ENTRY);
- writer.writeAttribute(Attribute.PROPERTIES_KEY.getLocalName(), key);
- writer.writeContent(value).writeEndElement();
- }
- }
- if (propertiesWritten)
- {
- writer.writeEndElement();
- }
- }
-
- Container container = portalConfig.getPortalLayout();
- if (container != null)
- {
- writer.writeStartElement(Element.PORTAL_LAYOUT);
- List<ModelObject> children = container.getChildren();
- if (children != null && !children.isEmpty())
- {
- for (ModelObject child : children)
- {
- marshalModelObject(writer, child);
- }
- }
- writer.writeEndElement();
- }
- }
-
- private PortalConfig unmarshalPortalConfig(StaxNavigator<Element> navigator) throws XMLStreamException
- {
- PortalConfig portalConfig = new PortalConfig();
-
- Container portalLayout = null;
- Element current = navigator.child();
- while (current != null)
- {
- switch (current)
- {
- case PORTAL_NAME:
- portalConfig.setName(navigator.getContent());
- current = navigator.sibling();
- break;
- case LOCALE:
- portalConfig.setLocale(navigator.getContent());
- current = navigator.sibling();
- break;
- case LABEL:
- portalConfig.setLabel(navigator.getContent());
- current = navigator.sibling();
- break;
- case DESCRIPTION:
- portalConfig.setDescription(navigator.getContent());
- current = navigator.sibling();
- break;
- case SKIN:
- portalConfig.setSkin(navigator.getContent());
- current = navigator.sibling();
- break;
- case PROPERTIES:
- Properties properties = new Properties();
- if (navigator.navigate(Axis.CHILD, Element.PROPERTIES_ENTRY))
- {
- for (StaxNavigator<Element> fork : navigator.fork(Element.PROPERTIES_ENTRY))
- {
- String key = getRequiredAttribute(fork, Attribute.PROPERTIES_KEY.getLocalName());
- String value = getRequiredContent(fork, false);
- properties.put(key, value);
- }
- }
- else
- {
- throw expectedElement(navigator, Element.PROPERTIES_ENTRY);
- }
- portalConfig.setProperties(properties);
- current = navigator.next();
- break;
- case ACCESS_PERMISSIONS:
- portalConfig.setAccessPermissions(unmarshalAccessPermissions(navigator, false));
- current = navigator.sibling();
- break;
- case EDIT_PERMISSION:
- portalConfig.setEditPermission(unmarshalEditPermission(navigator));
- current = navigator.sibling();
- break;
- case PORTAL_LAYOUT:
- portalLayout = new Container();
- current = navigator.child();
- break;
- case PAGE_BODY:
- if (portalLayout == null)
- {
- throw expectedElement(navigator, Element.PORTAL_LAYOUT);
- }
- portalLayout.getChildren().add(new PageBody());
- current = navigator.sibling();
- break;
- case PORTLET_APPLICATION:
- if (portalLayout == null)
- {
- throw expectedElement(navigator, Element.PORTAL_LAYOUT);
- }
- portalLayout.getChildren().add(unmarshalPortletApplication(navigator.fork()));
- current = navigator.sibling();
- break;
- case GADGET_APPLICATION:
- if (portalLayout == null)
- {
- throw expectedElement(navigator, Element.PORTAL_LAYOUT);
- }
- portalLayout.getChildren().add(unmarshalGadgetApplication(navigator.fork()));
- current = navigator.sibling();
- break;
- case CONTAINER:
- if (portalLayout == null)
- {
- throw expectedElement(navigator, Element.PORTAL_LAYOUT);
- }
- portalLayout.getChildren().add(unmarshalContainer(navigator.fork()));
- current = navigator.sibling();
- break;
- case UNKNOWN:
- throw unknownElement(navigator);
- default:
- throw unexpectedElement(navigator);
- }
- }
-
- //TODO: We should raise this exception as soon as we know so location is accurate
- if (portalConfig.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
- if (portalLayout == null)
- {
- portalLayout = PortalConfig.DEFAULT_LAYOUT;
- }
-
- portalConfig.setPortalLayout(portalLayout);
-
- return portalConfig;
- }
-
- private static enum Attribute
- {
- PROPERTIES_KEY("key");
-
- private final String name;
-
- Attribute(final String name)
- {
- this.name = name;
- }
-
- /**
- * Get the local name of this element.
- *
- * @return the local name
- */
- public String getLocalName()
- {
- return name;
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshaller.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,292 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.PageBody;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.config.model.Properties;
+import org.gatein.common.xml.stax.navigator.StaxNavUtils;
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.gatein.management.api.binding.BindingException;
+import org.staxnav.Axis;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+
+import javax.xml.stream.XMLStreamException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.Map;
+
+import static org.gatein.common.xml.stax.navigator.Exceptions.*;
+import static org.gatein.common.xml.stax.navigator.StaxNavUtils.*;
+import static org.gatein.common.xml.stax.writer.StaxWriterUtils.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutMarshaller extends AbstractMarshaller<PortalConfig>
+{
+ @Override
+ public void marshal(PortalConfig object, OutputStream outputStream) throws BindingException
+ {
+ try
+ {
+ StaxWriter<Element> writer = createWriter(Element.class, outputStream);
+
+ // root element
+ writer.writeStartElement(Element.PORTAL_CONFIG);
+ writeGateinObjectsNamespace(writer);
+
+ marshalPortalConfig(writer, object);
+
+ writer.finish();
+ }
+ catch (StaxNavException e)
+ {
+ throw new BindingException(e);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ @Override
+ public PortalConfig unmarshal(InputStream is) throws BindingException
+ {
+ try
+ {
+ StaxNavigator<Element> navigator = StaxNavUtils.createNavigator(Element.class, Element.UNKNOWN, is);
+
+ if (navigator.getName() == Element.PORTAL_CONFIG)
+ {
+ return unmarshalPortalConfig(navigator);
+ }
+ else
+ {
+ throw unknownElement(navigator);
+ }
+ }
+ catch (StaxNavException e)
+ {
+ throw new BindingException(e);
+ }
+ catch (XMLStreamException e)
+ {
+ throw new BindingException(e);
+ }
+ }
+
+ private void marshalPortalConfig(StaxWriter<Element> writer, PortalConfig portalConfig) throws XMLStreamException
+ {
+ writer.writeElement(Element.PORTAL_NAME, portalConfig.getName());
+ writeOptionalElement(writer, Element.LABEL, portalConfig.getLabel());
+ writeOptionalElement(writer, Element.DESCRIPTION, portalConfig.getDescription());
+ writeOptionalElement(writer, Element.LOCALE, portalConfig.getLocale());
+
+ // Access permissions
+ marshalAccessPermissions(writer, portalConfig.getAccessPermissions());
+
+ // Edit permission
+ marshalEditPermission(writer, portalConfig.getEditPermission());
+
+ writeOptionalElement(writer, Element.SKIN, portalConfig.getSkin());
+
+ boolean propertiesWritten = false;
+ Map<String, String> properties = portalConfig.getProperties();
+ if (properties != null)
+ {
+ for (String key : properties.keySet())
+ {
+ if (!propertiesWritten)
+ {
+ writer.writeStartElement(Element.PROPERTIES);
+ propertiesWritten = true;
+ }
+ String value = properties.get(key);
+ if (value != null)
+ {
+ writer.writeStartElement(Element.PROPERTIES_ENTRY);
+ writer.writeAttribute(Attribute.PROPERTIES_KEY.getLocalName(), key);
+ writer.writeContent(value).writeEndElement();
+ }
+ }
+ if (propertiesWritten)
+ {
+ writer.writeEndElement();
+ }
+ }
+
+ Container container = portalConfig.getPortalLayout();
+ if (container != null)
+ {
+ writer.writeStartElement(Element.PORTAL_LAYOUT);
+ List<ModelObject> children = container.getChildren();
+ if (children != null && !children.isEmpty())
+ {
+ for (ModelObject child : children)
+ {
+ marshalModelObject(writer, child);
+ }
+ }
+ writer.writeEndElement();
+ }
+ }
+
+ private PortalConfig unmarshalPortalConfig(StaxNavigator<Element> navigator) throws XMLStreamException
+ {
+ PortalConfig portalConfig = new PortalConfig();
+
+ Container portalLayout = null;
+ Element current = navigator.child();
+ while (current != null)
+ {
+ switch (current)
+ {
+ case PORTAL_NAME:
+ portalConfig.setName(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case LOCALE:
+ portalConfig.setLocale(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case LABEL:
+ portalConfig.setLabel(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case DESCRIPTION:
+ portalConfig.setDescription(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case SKIN:
+ portalConfig.setSkin(navigator.getContent());
+ current = navigator.sibling();
+ break;
+ case PROPERTIES:
+ Properties properties = new Properties();
+ if (navigator.navigate(Axis.CHILD, Element.PROPERTIES_ENTRY))
+ {
+ for (StaxNavigator<Element> fork : navigator.fork(Element.PROPERTIES_ENTRY))
+ {
+ String key = getRequiredAttribute(fork, Attribute.PROPERTIES_KEY.getLocalName());
+ String value = getRequiredContent(fork, false);
+ properties.put(key, value);
+ }
+ }
+ else
+ {
+ throw expectedElement(navigator, Element.PROPERTIES_ENTRY);
+ }
+ portalConfig.setProperties(properties);
+ current = navigator.next();
+ break;
+ case ACCESS_PERMISSIONS:
+ portalConfig.setAccessPermissions(unmarshalAccessPermissions(navigator, false));
+ current = navigator.sibling();
+ break;
+ case EDIT_PERMISSION:
+ portalConfig.setEditPermission(unmarshalEditPermission(navigator));
+ current = navigator.sibling();
+ break;
+ case PORTAL_LAYOUT:
+ portalLayout = new Container();
+ current = navigator.child();
+ break;
+ case PAGE_BODY:
+ if (portalLayout == null)
+ {
+ throw expectedElement(navigator, Element.PORTAL_LAYOUT);
+ }
+ portalLayout.getChildren().add(new PageBody());
+ current = navigator.sibling();
+ break;
+ case PORTLET_APPLICATION:
+ if (portalLayout == null)
+ {
+ throw expectedElement(navigator, Element.PORTAL_LAYOUT);
+ }
+ portalLayout.getChildren().add(unmarshalPortletApplication(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case GADGET_APPLICATION:
+ if (portalLayout == null)
+ {
+ throw expectedElement(navigator, Element.PORTAL_LAYOUT);
+ }
+ portalLayout.getChildren().add(unmarshalGadgetApplication(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case CONTAINER:
+ if (portalLayout == null)
+ {
+ throw expectedElement(navigator, Element.PORTAL_LAYOUT);
+ }
+ portalLayout.getChildren().add(unmarshalContainer(navigator.fork()));
+ current = navigator.sibling();
+ break;
+ case UNKNOWN:
+ throw unknownElement(navigator);
+ default:
+ throw unexpectedElement(navigator);
+ }
+ }
+
+ //TODO: We should raise this exception as soon as we know so location is accurate
+ if (portalConfig.getAccessPermissions() == null) throw expectedElement(navigator, Element.ACCESS_PERMISSIONS);
+ if (portalLayout == null)
+ {
+ portalLayout = PortalConfig.DEFAULT_LAYOUT;
+ }
+
+ portalConfig.setPortalLayout(portalLayout);
+
+ return portalConfig;
+ }
+
+ private static enum Attribute
+ {
+ PROPERTIES_KEY("key");
+
+ private final String name;
+
+ Attribute(final String name)
+ {
+ this.name = name;
+ }
+
+ /**
+ * Get the local name of this element.
+ *
+ * @return the local name
+ */
+ public String getLocalName()
+ {
+ return name;
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.exoplatform.portal.config.model.LocalizedString;
-import org.gatein.common.xml.stax.navigator.StaxNavUtils;
-import org.gatein.common.xml.stax.writer.StaxWriter;
-import org.staxnav.StaxNavException;
-import org.staxnav.StaxNavigator;
-
-import javax.xml.XMLConstants;
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLStreamException;
-import java.util.Locale;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-class Utils
-{
- private static final Pattern XMLLANG_PATTERN = Pattern.compile("^([a-zA-Z]{2})(?:-([a-zA-Z]{2}))?$");
-
- public static <N> void writeGateinObjectsNamespace(StaxWriter<N> writer) throws XMLStreamException
- {
- String gatein_object_ns = Namespace.CURRENT.getUri();
- String location = new StringBuilder().append(gatein_object_ns).append(" ").append(gatein_object_ns).toString();
-
- writer.writeDefaultNamespace(gatein_object_ns);
- writer.writeNamespace("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
- writer.writeAttribute(new QName(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "schemaLocation"), location);
- }
-
- public static <N> LocalizedString parseLocalizedString(StaxNavigator<N> navigator) throws StaxNavException
- {
- String attribute = navigator.getAttribute(new QName(XMLConstants.XML_NS_URI, "lang", XMLConstants.XML_NS_PREFIX));
- if (attribute == null)
- {
- attribute = navigator.getAttribute("lang");
- }
-
- Locale lang = null;
- if (attribute != null)
- {
- Matcher matcher = XMLLANG_PATTERN.matcher(attribute);
- if (matcher.matches())
- {
- String langISO = matcher.group(1);
- String countryISO = matcher.group(2);
- if (countryISO == null)
- {
- lang = new Locale(langISO.toLowerCase());
- }
- else
- {
- lang = new Locale(langISO.toLowerCase(), countryISO.toLowerCase());
- }
- }
- else
- {
- throw new StaxNavException(navigator.getLocation(), "The attribute xml:lang='" + attribute + "' does not represent a valid language pattern (ie: en, en-us).");
- }
- }
-
- String value = StaxNavUtils.getRequiredContent(navigator, false);
-
- return new LocalizedString(value, lang);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/Utils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.exoplatform.portal.config.model.LocalizedString;
+import org.gatein.common.xml.stax.navigator.StaxNavUtils;
+import org.gatein.common.xml.stax.writer.StaxWriter;
+import org.staxnav.StaxNavException;
+import org.staxnav.StaxNavigator;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import java.util.Locale;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+class Utils
+{
+ private static final Pattern XMLLANG_PATTERN = Pattern.compile("^([a-zA-Z]{2})(?:-([a-zA-Z]{2}))?$");
+
+ public static <N> void writeGateinObjectsNamespace(StaxWriter<N> writer) throws XMLStreamException
+ {
+ String gatein_object_ns = Namespace.CURRENT.getUri();
+ String location = new StringBuilder().append(gatein_object_ns).append(" ").append(gatein_object_ns).toString();
+
+ writer.writeDefaultNamespace(gatein_object_ns);
+ writer.writeNamespace("xsi", XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI);
+ writer.writeAttribute(new QName(XMLConstants.W3C_XML_SCHEMA_INSTANCE_NS_URI, "schemaLocation"), location);
+ }
+
+ public static <N> LocalizedString parseLocalizedString(StaxNavigator<N> navigator) throws StaxNavException
+ {
+ String attribute = navigator.getAttribute(new QName(XMLConstants.XML_NS_URI, "lang", XMLConstants.XML_NS_PREFIX));
+ if (attribute == null)
+ {
+ attribute = navigator.getAttribute("lang");
+ }
+
+ Locale lang = null;
+ if (attribute != null)
+ {
+ Matcher matcher = XMLLANG_PATTERN.matcher(attribute);
+ if (matcher.matches())
+ {
+ String langISO = matcher.group(1);
+ String countryISO = matcher.group(2);
+ if (countryISO == null)
+ {
+ lang = new Locale(langISO.toLowerCase());
+ }
+ else
+ {
+ lang = new Locale(langISO.toLowerCase(), countryISO.toLowerCase());
+ }
+ }
+ else
+ {
+ throw new StaxNavException(navigator.getLocation(), "The attribute xml:lang='" + attribute + "' does not represent a valid language pattern (ie: en, en-us).");
+ }
+ }
+
+ String value = StaxNavUtils.getRequiredContent(navigator, false);
+
+ return new LocalizedString(value, lang);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.mop.SiteKey;
-import org.gatein.management.api.operation.model.ExportTask;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractExportTask implements ExportTask
-{
- protected SiteKey siteKey;
-
- protected AbstractExportTask(SiteKey siteKey)
- {
- this.siteKey = siteKey;
- }
-
- @Override
- public String getEntry()
- {
- String siteType = siteKey.getTypeName();
-
- String siteName = siteKey.getName();
- if (siteName.charAt(0) == '/') siteName = siteName.substring(1, siteName.length());
-
- return new StringBuilder().
- append(siteType).append("/").append(siteName).append("/").append(getXmlFileName()).toString();
- }
-
- protected abstract String getXmlFileName();
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.gatein.management.api.operation.model.ExportTask;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractExportTask implements ExportTask
+{
+ protected SiteKey siteKey;
+
+ protected AbstractExportTask(SiteKey siteKey)
+ {
+ this.siteKey = siteKey;
+ }
+
+ @Override
+ public String getEntry()
+ {
+ String siteType = siteKey.getTypeName();
+
+ String siteName = siteKey.getName();
+ if (siteName.charAt(0) == '/') siteName = siteName.substring(1, siteName.length());
+
+ return new StringBuilder().
+ append(siteType).append("/").append(siteName).append("/").append(getXmlFileName()).toString();
+ }
+
+ protected abstract String getXmlFileName();
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,45 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.mop.SiteKey;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractImportTask<T> extends ImportTask<T>
-{
- protected final SiteKey siteKey;
-
- public AbstractImportTask(T data, SiteKey siteKey)
- {
- super(data);
- this.siteKey = siteKey;
- }
-
- public SiteKey getSiteKey()
- {
- return siteKey;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/AbstractImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.mop.SiteKey;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractImportTask<T> extends ImportTask<T>
+{
+ protected final SiteKey siteKey;
+
+ public AbstractImportTask(T data, SiteKey siteKey)
+ {
+ super(data);
+ this.siteKey = siteKey;
+ }
+
+ public SiteKey getSiteKey()
+ {
+ return siteKey;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,78 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public enum ImportStrategy
-{
- /**
- * Import when data does not exist. Otherwise do nothing.
- */
- CONSERVE("conserve"),
-
- /**
- * Import when data does not exist. Otherwise perform a merge
- */
- MERGE("merge"),
-
- /**
- * Delete existing data, import new data.
- */
- OVERWRITE("overwrite");
-
- private String name;
-
- ImportStrategy(String name)
- {
- this.name = name;
- }
-
- private static final Map<String, ImportStrategy> MAP;
-
- static
- {
- Map<String, ImportStrategy> tmp = new HashMap<String, ImportStrategy>(3);
- for (ImportStrategy strategy : ImportStrategy.values())
- {
- tmp.put(strategy.name, strategy);
- }
-
- MAP = tmp;
- }
-
- public String getName()
- {
- return name;
- }
-
- public static ImportStrategy forName(String name)
- {
- return MAP.get(name);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportStrategy.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,78 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public enum ImportStrategy
+{
+ /**
+ * Import when data does not exist. Otherwise do nothing.
+ */
+ CONSERVE("conserve"),
+
+ /**
+ * Import when data does not exist. Otherwise perform a merge
+ */
+ MERGE("merge"),
+
+ /**
+ * Delete existing data, import new data.
+ */
+ OVERWRITE("overwrite");
+
+ private String name;
+
+ ImportStrategy(String name)
+ {
+ this.name = name;
+ }
+
+ private static final Map<String, ImportStrategy> MAP;
+
+ static
+ {
+ Map<String, ImportStrategy> tmp = new HashMap<String, ImportStrategy>(3);
+ for (ImportStrategy strategy : ImportStrategy.values())
+ {
+ tmp.put(strategy.name, strategy);
+ }
+
+ MAP = tmp;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public static ImportStrategy forName(String name)
+ {
+ return MAP.get(name);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class ImportTask<T>
-{
- protected final T data;
- protected ImportTask(T data)
- {
- this.data = data;
- }
-
- public abstract void importData(ImportStrategy importStrategy) throws Exception;
-
- public abstract void rollback() throws Exception;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/ImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class ImportTask<T>
+{
+ protected final T data;
+ protected ImportTask(T data)
+ {
+ this.data = data;
+ }
+
+ public abstract void importData(ImportStrategy importStrategy) throws Exception;
+
+ public abstract void rollback() throws Exception;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,70 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.mop.description.DescriptionService;
-import org.exoplatform.portal.mop.management.operations.navigation.NavigationKey;
-import org.exoplatform.portal.mop.management.operations.navigation.NavigationUtils;
-import org.exoplatform.portal.mop.navigation.NavigationService;
-import org.gatein.management.api.binding.Marshaller;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationExportTask extends AbstractExportTask
-{
- public static final String FILE = "navigation.xml";
-
- private NavigationKey navigationKey;
- private Marshaller<PageNavigation> marshaller;
- private NavigationService navigationService;
- private DescriptionService descriptionService;
-
- public NavigationExportTask(NavigationKey navigationKey, NavigationService navigationService,
- DescriptionService descriptionService, Marshaller<PageNavigation> marshaller)
- {
- super(navigationKey.getSiteKey());
- this.navigationKey = navigationKey;
- this.navigationService = navigationService;
- this.descriptionService = descriptionService;
- this.marshaller = marshaller;
- }
-
- @Override
- protected String getXmlFileName()
- {
- return FILE;
- }
-
- @Override
- public void export(OutputStream outputStream) throws IOException
- {
- PageNavigation navigation = NavigationUtils.loadPageNavigation(navigationKey, navigationService, descriptionService);
- marshaller.marshal(navigation, outputStream);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.description.DescriptionService;
+import org.exoplatform.portal.mop.management.operations.navigation.NavigationKey;
+import org.exoplatform.portal.mop.management.operations.navigation.NavigationUtils;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.gatein.management.api.binding.Marshaller;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationExportTask extends AbstractExportTask
+{
+ public static final String FILE = "navigation.xml";
+
+ private NavigationKey navigationKey;
+ private Marshaller<PageNavigation> marshaller;
+ private NavigationService navigationService;
+ private DescriptionService descriptionService;
+
+ public NavigationExportTask(NavigationKey navigationKey, NavigationService navigationService,
+ DescriptionService descriptionService, Marshaller<PageNavigation> marshaller)
+ {
+ super(navigationKey.getSiteKey());
+ this.navigationKey = navigationKey;
+ this.navigationService = navigationService;
+ this.descriptionService = descriptionService;
+ this.marshaller = marshaller;
+ }
+
+ @Override
+ protected String getXmlFileName()
+ {
+ return FILE;
+ }
+
+ @Override
+ public void export(OutputStream outputStream) throws IOException
+ {
+ PageNavigation navigation = NavigationUtils.loadPageNavigation(navigationKey, navigationService, descriptionService);
+ marshaller.marshal(navigation, outputStream);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,130 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.config.DataStorage;
-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.description.DescriptionService;
-import org.exoplatform.portal.mop.importer.ImportMode;
-import org.exoplatform.portal.mop.importer.NavigationImporter;
-import org.exoplatform.portal.mop.navigation.NavigationContext;
-import org.exoplatform.portal.mop.navigation.NavigationService;
-import org.exoplatform.portal.pom.data.ModelDataStorage;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.exoplatform.portal.pom.data.PortalKey;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-
-import java.util.Locale;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationImportTask extends AbstractImportTask<PageNavigation>
-{
- private static final Logger log = LoggerFactory.getLogger(NavigationImportTask.class);
-
- private NavigationService navigationService;
- private DescriptionService descriptionService;
- private DataStorage dataStorage;
- private RollbackTask rollbackTask;
-
- public NavigationImportTask(PageNavigation data, SiteKey siteKey,
- NavigationService navigationService, DescriptionService descriptionService, DataStorage dataStorage)
- {
- super(data, siteKey);
- this.navigationService = navigationService;
- this.descriptionService = descriptionService;
- this.dataStorage = dataStorage;
- }
-
- @Override
- public void importData(ImportStrategy importStrategy) throws Exception
- {
- ImportMode mode;
- switch (importStrategy)
- {
- case CONSERVE:
- mode = ImportMode.INSERT;
- break;
- case MERGE:
- mode = ImportMode.MERGE;
- break;
- case OVERWRITE:
- mode = ImportMode.OVERWRITE;
- break;
- default:
- throw new Exception("Could not map import strategy " + importStrategy.getName() + " to import mode.");
- }
-
- PortalConfig portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
- if (portalConfig == null) throw new Exception("Cannot import navigation because site does not exist for " + siteKey);
-
- Locale locale = (portalConfig.getLocale() == null) ? Locale.ENGLISH : new Locale(portalConfig.getLocale());
-
- final NavigationContext navContext = navigationService.loadNavigation(siteKey);
- if (navContext == null)
- {
- rollbackTask = new RollbackTask()
- {
- @Override
- public void rollback() throws Exception
- {
- navigationService.destroyNavigation(navContext);
- }
- };
- }
- else
- {
- //TODO: Rollback updates.
- rollbackTask = new RollbackTask()
- {
- @Override
- public void rollback() throws Exception
- {
- log.warn("Rollback for existing navigation not supported at the moment.");
- }
- };
- }
-
- NavigationImporter importer = new NavigationImporter(locale, mode, data, navigationService, descriptionService);
- importer.perform();
- }
-
- @Override
- public void rollback() throws Exception
- {
- if (rollbackTask != null)
- {
- rollbackTask.rollback();
- }
- }
-
- private static interface RollbackTask
- {
- void rollback() throws Exception;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,130 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.config.DataStorage;
+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.description.DescriptionService;
+import org.exoplatform.portal.mop.importer.ImportMode;
+import org.exoplatform.portal.mop.importer.NavigationImporter;
+import org.exoplatform.portal.mop.navigation.NavigationContext;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.exoplatform.portal.pom.data.ModelDataStorage;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.exoplatform.portal.pom.data.PortalKey;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+import java.util.Locale;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationImportTask extends AbstractImportTask<PageNavigation>
+{
+ private static final Logger log = LoggerFactory.getLogger(NavigationImportTask.class);
+
+ private NavigationService navigationService;
+ private DescriptionService descriptionService;
+ private DataStorage dataStorage;
+ private RollbackTask rollbackTask;
+
+ public NavigationImportTask(PageNavigation data, SiteKey siteKey,
+ NavigationService navigationService, DescriptionService descriptionService, DataStorage dataStorage)
+ {
+ super(data, siteKey);
+ this.navigationService = navigationService;
+ this.descriptionService = descriptionService;
+ this.dataStorage = dataStorage;
+ }
+
+ @Override
+ public void importData(ImportStrategy importStrategy) throws Exception
+ {
+ ImportMode mode;
+ switch (importStrategy)
+ {
+ case CONSERVE:
+ mode = ImportMode.INSERT;
+ break;
+ case MERGE:
+ mode = ImportMode.MERGE;
+ break;
+ case OVERWRITE:
+ mode = ImportMode.OVERWRITE;
+ break;
+ default:
+ throw new Exception("Could not map import strategy " + importStrategy.getName() + " to import mode.");
+ }
+
+ PortalConfig portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
+ if (portalConfig == null) throw new Exception("Cannot import navigation because site does not exist for " + siteKey);
+
+ Locale locale = (portalConfig.getLocale() == null) ? Locale.ENGLISH : new Locale(portalConfig.getLocale());
+
+ final NavigationContext navContext = navigationService.loadNavigation(siteKey);
+ if (navContext == null)
+ {
+ rollbackTask = new RollbackTask()
+ {
+ @Override
+ public void rollback() throws Exception
+ {
+ navigationService.destroyNavigation(navContext);
+ }
+ };
+ }
+ else
+ {
+ //TODO: Rollback updates.
+ rollbackTask = new RollbackTask()
+ {
+ @Override
+ public void rollback() throws Exception
+ {
+ log.warn("Rollback for existing navigation not supported at the moment.");
+ }
+ };
+ }
+
+ NavigationImporter importer = new NavigationImporter(locale, mode, data, navigationService, descriptionService);
+ importer.perform();
+ }
+
+ @Override
+ public void rollback() throws Exception
+ {
+ if (rollbackTask != null)
+ {
+ rollbackTask.rollback();
+ }
+ }
+
+ private static interface RollbackTask
+ {
+ void rollback() throws Exception;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.POMSession;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class POMSessionExportTask extends AbstractExportTask
-{
- protected POMSession session;
-
- public POMSessionExportTask(SiteKey siteKey, POMSession session)
- {
- super(siteKey);
- this.session = session;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/POMSessionExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.config.POMSession;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class POMSessionExportTask extends AbstractExportTask
+{
+ protected POMSession session;
+
+ public POMSessionExportTask(SiteKey siteKey, POMSession session)
+ {
+ super(siteKey);
+ this.session = session;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.Utils;
-import org.gatein.management.api.binding.Marshaller;
-import org.gatein.management.api.operation.model.ExportTask;
-
-import java.io.IOException;
-import java.io.OutputStream;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageExportTask extends AbstractExportTask implements ExportTask
-{
- public static final String FILE = "pages.xml";
-
- private final DataStorage dataStorage;
- private final Marshaller<Page.PageSet> marshaller;
- private final List<String> pageNames;
-
- public PageExportTask(SiteKey siteKey, DataStorage dataStorage, Marshaller<Page.PageSet> marshaller)
- {
- super(siteKey);
- this.dataStorage = dataStorage;
- this.marshaller = marshaller;
- pageNames = new ArrayList<String>();
- }
-
- @Override
- public void export(OutputStream outputStream) throws IOException
- {
- Page.PageSet pages = new Page.PageSet();
- pages.setPages(new ArrayList<Page>(pageNames.size()));
- for (String pageName : pageNames)
- {
- try
- {
- Page page = dataStorage.getPage(Utils.join("::", siteKey.getTypeName(), siteKey.getName(), pageName));
- pages.getPages().add(page);
- }
- catch (Exception e)
- {
- throw new IOException("Could not retrieve page name " + pageName + " for site " + siteKey, e);
- }
- }
-
- marshaller.marshal(pages, outputStream);
- }
-
- @Override
- protected String getXmlFileName()
- {
- return FILE;
- }
-
- public void addPageName(String pageName)
- {
- pageNames.add(pageName);
- }
-
- public List<String> getPageNames()
- {
- return Collections.unmodifiableList(pageNames);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.Utils;
+import org.gatein.management.api.binding.Marshaller;
+import org.gatein.management.api.operation.model.ExportTask;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageExportTask extends AbstractExportTask implements ExportTask
+{
+ public static final String FILE = "pages.xml";
+
+ private final DataStorage dataStorage;
+ private final Marshaller<Page.PageSet> marshaller;
+ private final List<String> pageNames;
+
+ public PageExportTask(SiteKey siteKey, DataStorage dataStorage, Marshaller<Page.PageSet> marshaller)
+ {
+ super(siteKey);
+ this.dataStorage = dataStorage;
+ this.marshaller = marshaller;
+ pageNames = new ArrayList<String>();
+ }
+
+ @Override
+ public void export(OutputStream outputStream) throws IOException
+ {
+ Page.PageSet pages = new Page.PageSet();
+ pages.setPages(new ArrayList<Page>(pageNames.size()));
+ for (String pageName : pageNames)
+ {
+ try
+ {
+ Page page = dataStorage.getPage(Utils.join("::", siteKey.getTypeName(), siteKey.getName(), pageName));
+ pages.getPages().add(page);
+ }
+ catch (Exception e)
+ {
+ throw new IOException("Could not retrieve page name " + pageName + " for site " + siteKey, e);
+ }
+ }
+
+ marshaller.marshal(pages, outputStream);
+ }
+
+ @Override
+ protected String getXmlFileName()
+ {
+ return FILE;
+ }
+
+ public void addPageName(String pageName)
+ {
+ pageNames.add(pageName);
+ }
+
+ public List<String> getPageNames()
+ {
+ return Collections.unmodifiableList(pageNames);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,203 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.Query;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.mop.SiteKey;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageImportTask extends AbstractImportTask<Page.PageSet>
-{
- private final DataStorage dataStorage;
- private Page.PageSet rollbackSaves;
- private Page.PageSet rollbackDeletes;
-
- public PageImportTask(Page.PageSet data, SiteKey siteKey, DataStorage dataStorage)
- {
- super(data, siteKey);
- this.dataStorage = dataStorage;
- }
-
- @Override
- public void importData(ImportStrategy strategy) throws Exception
- {
- if (data == null || data.getPages() == null || data.getPages().isEmpty()) return;
-
- Query<Page> query = new Query<Page>(siteKey.getTypeName(), siteKey.getName(), Page.class);
- LazyPageList<Page> list = dataStorage.find(query);
- int size = list.getAvailable();
-
- Page.PageSet dst = null;
- switch (strategy)
- {
- case CONSERVE:
- if (size == 0)
- {
- dst = data; // No pages exist yet.
- rollbackDeletes = data;
- }
- else
- {
- dst = new Page.PageSet();
- dst.setPages(new ArrayList<Page>());
- List<Page> existingPages = list.getAll();
- rollbackDeletes = new Page.PageSet();
- rollbackDeletes.setPages(new ArrayList<Page>());
- for (Page src : data.getPages())
- {
- Page found = findPage(existingPages, src);
- if (found == null)
- {
- dst.getPages().add(src);
- rollbackDeletes.getPages().add(src);
- }
- }
- }
- break;
- case MERGE:
- if (size == 0) // No pages exist yet.
- {
- dst = data;
- rollbackDeletes = data;
- }
- else
- {
- dst = new Page.PageSet();
- dst.setPages(new ArrayList<Page>(data.getPages().size()));
- List<Page> existingPages = list.getAll();
- rollbackSaves = new Page.PageSet();
- rollbackSaves.setPages(new ArrayList<Page>(size));
- rollbackDeletes = new Page.PageSet();
- rollbackDeletes.setPages(new ArrayList<Page>());
- for (Page src : data.getPages())
- {
- dst.getPages().add(src);
-
- Page found = findPage(existingPages, src);
- if (found == null)
- {
- rollbackDeletes.getPages().add(src);
- }
- else
- {
- rollbackSaves.getPages().add(found);
- }
- }
- }
- break;
- case OVERWRITE:
- if (size == 0)
- {
- dst = data;
- rollbackDeletes = data;
- }
- else
- {
- List<Page> existingPages = list.getAll();
- rollbackSaves = new Page.PageSet();
- rollbackSaves.setPages(new ArrayList<Page>(size));
- rollbackDeletes = new Page.PageSet();
- rollbackDeletes.setPages(new ArrayList<Page>());
- for (Page page : existingPages)
- {
- dataStorage.remove(page);
- dataStorage.save();
- rollbackSaves.getPages().add(page);
- }
- for (Page src : data.getPages())
- {
- Page found = findPage(rollbackSaves.getPages(), src);
- if (found == null)
- {
- rollbackDeletes.getPages().add(src);
- }
- }
-
- dst = data;
- }
- break;
- }
-
- if (dst != null)
- {
- for (Page page : dst.getPages())
- {
- dataStorage.save(page);
- dataStorage.save();
- }
- }
- }
-
- @Override
- public void rollback() throws Exception
- {
- if (rollbackDeletes != null && !rollbackDeletes.getPages().isEmpty())
- {
- for (Page page : rollbackDeletes.getPages())
- {
- dataStorage.remove(page);
- dataStorage.save();
- }
- }
- if (rollbackSaves != null && !rollbackSaves.getPages().isEmpty())
- {
- for (Page page : rollbackSaves.getPages())
- {
- dataStorage.save(page);
- dataStorage.save();
- }
- }
- }
-
- Page.PageSet getRollbackSaves()
- {
- return rollbackSaves;
- }
-
- Page.PageSet getRollbackDeletes()
- {
- return rollbackDeletes;
- }
-
- private Page findPage(List<Page> pages, Page src)
- {
- Page found = null;
- for (Page page : pages)
- {
- if (src.getName().equals(page.getName()))
- {
- found = page;
- }
- }
- return found;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/PageImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,203 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.Query;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.mop.SiteKey;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageImportTask extends AbstractImportTask<Page.PageSet>
+{
+ private final DataStorage dataStorage;
+ private Page.PageSet rollbackSaves;
+ private Page.PageSet rollbackDeletes;
+
+ public PageImportTask(Page.PageSet data, SiteKey siteKey, DataStorage dataStorage)
+ {
+ super(data, siteKey);
+ this.dataStorage = dataStorage;
+ }
+
+ @Override
+ public void importData(ImportStrategy strategy) throws Exception
+ {
+ if (data == null || data.getPages() == null || data.getPages().isEmpty()) return;
+
+ Query<Page> query = new Query<Page>(siteKey.getTypeName(), siteKey.getName(), Page.class);
+ LazyPageList<Page> list = dataStorage.find(query);
+ int size = list.getAvailable();
+
+ Page.PageSet dst = null;
+ switch (strategy)
+ {
+ case CONSERVE:
+ if (size == 0)
+ {
+ dst = data; // No pages exist yet.
+ rollbackDeletes = data;
+ }
+ else
+ {
+ dst = new Page.PageSet();
+ dst.setPages(new ArrayList<Page>());
+ List<Page> existingPages = list.getAll();
+ rollbackDeletes = new Page.PageSet();
+ rollbackDeletes.setPages(new ArrayList<Page>());
+ for (Page src : data.getPages())
+ {
+ Page found = findPage(existingPages, src);
+ if (found == null)
+ {
+ dst.getPages().add(src);
+ rollbackDeletes.getPages().add(src);
+ }
+ }
+ }
+ break;
+ case MERGE:
+ if (size == 0) // No pages exist yet.
+ {
+ dst = data;
+ rollbackDeletes = data;
+ }
+ else
+ {
+ dst = new Page.PageSet();
+ dst.setPages(new ArrayList<Page>(data.getPages().size()));
+ List<Page> existingPages = list.getAll();
+ rollbackSaves = new Page.PageSet();
+ rollbackSaves.setPages(new ArrayList<Page>(size));
+ rollbackDeletes = new Page.PageSet();
+ rollbackDeletes.setPages(new ArrayList<Page>());
+ for (Page src : data.getPages())
+ {
+ dst.getPages().add(src);
+
+ Page found = findPage(existingPages, src);
+ if (found == null)
+ {
+ rollbackDeletes.getPages().add(src);
+ }
+ else
+ {
+ rollbackSaves.getPages().add(found);
+ }
+ }
+ }
+ break;
+ case OVERWRITE:
+ if (size == 0)
+ {
+ dst = data;
+ rollbackDeletes = data;
+ }
+ else
+ {
+ List<Page> existingPages = list.getAll();
+ rollbackSaves = new Page.PageSet();
+ rollbackSaves.setPages(new ArrayList<Page>(size));
+ rollbackDeletes = new Page.PageSet();
+ rollbackDeletes.setPages(new ArrayList<Page>());
+ for (Page page : existingPages)
+ {
+ dataStorage.remove(page);
+ dataStorage.save();
+ rollbackSaves.getPages().add(page);
+ }
+ for (Page src : data.getPages())
+ {
+ Page found = findPage(rollbackSaves.getPages(), src);
+ if (found == null)
+ {
+ rollbackDeletes.getPages().add(src);
+ }
+ }
+
+ dst = data;
+ }
+ break;
+ }
+
+ if (dst != null)
+ {
+ for (Page page : dst.getPages())
+ {
+ dataStorage.save(page);
+ dataStorage.save();
+ }
+ }
+ }
+
+ @Override
+ public void rollback() throws Exception
+ {
+ if (rollbackDeletes != null && !rollbackDeletes.getPages().isEmpty())
+ {
+ for (Page page : rollbackDeletes.getPages())
+ {
+ dataStorage.remove(page);
+ dataStorage.save();
+ }
+ }
+ if (rollbackSaves != null && !rollbackSaves.getPages().isEmpty())
+ {
+ for (Page page : rollbackSaves.getPages())
+ {
+ dataStorage.save(page);
+ dataStorage.save();
+ }
+ }
+ }
+
+ Page.PageSet getRollbackSaves()
+ {
+ return rollbackSaves;
+ }
+
+ Page.PageSet getRollbackDeletes()
+ {
+ return rollbackDeletes;
+ }
+
+ private Page findPage(List<Page> pages, Page src)
+ {
+ Page found = null;
+ for (Page page : pages)
+ {
+ if (src.getName().equals(page.getName()))
+ {
+ found = page;
+ }
+ }
+ return found;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,77 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.exoplatform.portal.pom.data.PortalKey;
-import org.gatein.management.api.binding.Marshaller;
-import org.gatein.management.api.operation.model.ExportTask;
-
-import java.io.IOException;
-import java.io.OutputStream;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteLayoutExportTask extends AbstractExportTask implements ExportTask
-{
- public static final String FILE = "portal.xml";
-
- private final DataStorage dataStorage;
- private final Marshaller<PortalConfig> marshaller;
-
- public SiteLayoutExportTask(SiteKey siteKey, DataStorage dataStorage, Marshaller<PortalConfig> marshaller)
- {
- super(siteKey);
- this.dataStorage = dataStorage;
- this.marshaller = marshaller;
- }
-
- @Override
- protected String getXmlFileName()
- {
- return FILE;
- }
-
- @Override
- public void export(OutputStream outputStream) throws IOException
- {
- PortalConfig portalConfig;
- try
- {
- portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
- }
- catch (Exception e)
- {
- throw new IOException("Could not retrieve site " + siteKey, e);
- }
-
- marshaller.marshal(portalConfig, outputStream);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutExportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,77 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.exoplatform.portal.pom.data.PortalKey;
+import org.gatein.management.api.binding.Marshaller;
+import org.gatein.management.api.operation.model.ExportTask;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutExportTask extends AbstractExportTask implements ExportTask
+{
+ public static final String FILE = "portal.xml";
+
+ private final DataStorage dataStorage;
+ private final Marshaller<PortalConfig> marshaller;
+
+ public SiteLayoutExportTask(SiteKey siteKey, DataStorage dataStorage, Marshaller<PortalConfig> marshaller)
+ {
+ super(siteKey);
+ this.dataStorage = dataStorage;
+ this.marshaller = marshaller;
+ }
+
+ @Override
+ protected String getXmlFileName()
+ {
+ return FILE;
+ }
+
+ @Override
+ public void export(OutputStream outputStream) throws IOException
+ {
+ PortalConfig portalConfig;
+ try
+ {
+ portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
+ }
+ catch (Exception e)
+ {
+ throw new IOException("Could not retrieve site " + siteKey, e);
+ }
+
+ marshaller.marshal(portalConfig, outputStream);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.data.ModelDataStorage;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.exoplatform.portal.pom.data.PortalKey;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteLayoutImportTask extends AbstractImportTask<PortalConfig>
-{
- private final DataStorage dataStorage;
- private PortalConfig rollbackDelete;
- private PortalConfig rollbackSave;
-
- public SiteLayoutImportTask(PortalConfig data, SiteKey siteKey, DataStorage dataStorage)
- {
- super(data, siteKey);
- this.dataStorage = dataStorage;
- }
-
- @Override
- public void importData(ImportStrategy importStrategy) throws Exception
- {
- PortalConfig dst = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
-
- switch (importStrategy)
- {
- // Really doesn't make sense to "merge" site layout data. Really two modes, conserve (keep) and overwrite.
- case CONSERVE:
- if (dst == null)
- {
- dst = data;
- rollbackDelete = data;
- }
- else
- {
- dst = null;
- }
- break;
- case MERGE:
- case OVERWRITE:
- if (dst == null)
- {
- rollbackDelete = data;
- }
- else
- {
- rollbackSave = dst;
- }
- dst = data;
- break;
- }
-
- if (dst != null)
- {
- if (rollbackDelete == null)
- {
- dataStorage.save(dst);
- }
- else
- {
- dataStorage.create(dst);
- }
- }
- }
-
- @Override
- public void rollback() throws Exception
- {
- if (rollbackDelete != null)
- {
- dataStorage.remove(rollbackDelete);
- }
- else if (rollbackSave != null)
- {
- dataStorage.save(rollbackSave);
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/SiteLayoutImportTask.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.data.ModelDataStorage;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.exoplatform.portal.pom.data.PortalKey;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutImportTask extends AbstractImportTask<PortalConfig>
+{
+ private final DataStorage dataStorage;
+ private PortalConfig rollbackDelete;
+ private PortalConfig rollbackSave;
+
+ public SiteLayoutImportTask(PortalConfig data, SiteKey siteKey, DataStorage dataStorage)
+ {
+ super(data, siteKey);
+ this.dataStorage = dataStorage;
+ }
+
+ @Override
+ public void importData(ImportStrategy importStrategy) throws Exception
+ {
+ PortalConfig dst = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
+
+ switch (importStrategy)
+ {
+ // Really doesn't make sense to "merge" site layout data. Really two modes, conserve (keep) and overwrite.
+ case CONSERVE:
+ if (dst == null)
+ {
+ dst = data;
+ rollbackDelete = data;
+ }
+ else
+ {
+ dst = null;
+ }
+ break;
+ case MERGE:
+ case OVERWRITE:
+ if (dst == null)
+ {
+ rollbackDelete = data;
+ }
+ else
+ {
+ rollbackSave = dst;
+ }
+ dst = data;
+ break;
+ }
+
+ if (dst != null)
+ {
+ if (rollbackDelete == null)
+ {
+ dataStorage.save(dst);
+ }
+ else
+ {
+ dataStorage.create(dst);
+ }
+ }
+ }
+
+ @Override
+ public void rollback() throws Exception
+ {
+ if (rollbackDelete != null)
+ {
+ dataStorage.remove(rollbackDelete);
+ }
+ else if (rollbackSave != null)
+ {
+ dataStorage.save(rollbackSave);
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,88 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations;
-
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.SiteType;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.OperationHandler;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Site;
-import org.gatein.mop.api.workspace.Workspace;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractMopOperationHandler implements OperationHandler
-{
- @Override
- public final void execute(OperationContext operationContext, ResultHandler resultHandler) throws ResourceNotFoundException, OperationException
- {
- String operationName = operationContext.getOperationName();
- PathAddress address = operationContext.getAddress();
-
- String siteType = address.resolvePathTemplate("site-type");
- if (siteType == null) throw new OperationException(operationName, "Site type was not specified.");
-
- ObjectType<Site> objectType = Utils.getObjectType(Utils.getSiteType(siteType));
- if (objectType == null)
- {
- throw new ResourceNotFoundException("No site type found for " + siteType);
- }
-
- POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
- POMSession session = mgr.getSession();
- if (session == null) throw new OperationException(operationName, "MOP session was null");
-
- Workspace workspace = session.getWorkspace();
- if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");
-
- execute(operationContext, resultHandler, workspace, objectType);
- }
-
- protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler,
- Workspace workspace, ObjectType<Site> siteType) throws ResourceNotFoundException, OperationException;
-
-
- protected SiteType getSiteType(ObjectType<? extends Site> objectType)
- {
- return Utils.getSiteType(objectType);
- }
-
- protected SiteKey getSiteKey(ObjectType<? extends Site> objectType, String name)
- {
- return Utils.siteKey(Utils.getSiteType(objectType), name);
- }
-
- protected SiteKey getSiteKey(Site site)
- {
- return getSiteKey(site.getObjectType(), site.getName());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.OperationHandler;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Site;
+import org.gatein.mop.api.workspace.Workspace;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractMopOperationHandler implements OperationHandler
+{
+ @Override
+ public final void execute(OperationContext operationContext, ResultHandler resultHandler) throws ResourceNotFoundException, OperationException
+ {
+ String operationName = operationContext.getOperationName();
+ PathAddress address = operationContext.getAddress();
+
+ String siteType = address.resolvePathTemplate("site-type");
+ if (siteType == null) throw new OperationException(operationName, "Site type was not specified.");
+
+ ObjectType<Site> objectType = Utils.getObjectType(Utils.getSiteType(siteType));
+ if (objectType == null)
+ {
+ throw new ResourceNotFoundException("No site type found for " + siteType);
+ }
+
+ POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
+ POMSession session = mgr.getSession();
+ if (session == null) throw new OperationException(operationName, "MOP session was null");
+
+ Workspace workspace = session.getWorkspace();
+ if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");
+
+ execute(operationContext, resultHandler, workspace, objectType);
+ }
+
+ protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler,
+ Workspace workspace, ObjectType<Site> siteType) throws ResourceNotFoundException, OperationException;
+
+
+ protected SiteType getSiteType(ObjectType<? extends Site> objectType)
+ {
+ return Utils.getSiteType(objectType);
+ }
+
+ protected SiteKey getSiteKey(ObjectType<? extends Site> objectType, String name)
+ {
+ return Utils.siteKey(Utils.getSiteType(objectType), name);
+ }
+
+ protected SiteKey getSiteKey(Site site)
+ {
+ return getSiteKey(site.getObjectType(), site.getName());
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,343 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.Page;
-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.description.DescriptionService;
-import org.exoplatform.portal.mop.management.exportimport.ImportStrategy;
-import org.exoplatform.portal.mop.management.exportimport.NavigationExportTask;
-import org.exoplatform.portal.mop.management.exportimport.NavigationImportTask;
-import org.exoplatform.portal.mop.management.exportimport.PageExportTask;
-import org.exoplatform.portal.mop.management.exportimport.PageImportTask;
-import org.exoplatform.portal.mop.management.exportimport.SiteLayoutExportTask;
-import org.exoplatform.portal.mop.management.exportimport.SiteLayoutImportTask;
-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.gatein.management.api.ContentType;
-import org.gatein.management.api.binding.Marshaller;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationAttachment;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.OperationHandler;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.NoResultModel;
-import org.gatein.mop.api.workspace.Workspace;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipInputStream;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class MopImportResource implements OperationHandler
-{
- private static final Logger log = LoggerFactory.getLogger(MopImportResource.class);
-
- //TODO: Would like to see the step operations be handled by mgmt core.
-
- //TODO: Clean this up when we have time
- @Override
- public void execute(final OperationContext operationContext, ResultHandler resultHandler) throws ResourceNotFoundException, OperationException
- {
- final String operationName = operationContext.getOperationName();
-
- OperationAttachment attachment = operationContext.getAttachment(true);
- if (attachment == null) throw new OperationException(operationContext.getOperationName(), "No attachment available for MOP import.");
-
- InputStream inputStream = attachment.getStream();
- if (inputStream == null) throw new OperationException(operationContext.getOperationName(), "No data stream available for import.");
-
- POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
- POMSession session = mgr.getSession();
- if (session == null) throw new OperationException(operationName, "MOP session was null");
-
- Workspace workspace = session.getWorkspace();
- if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");
-
- DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
- if (dataStorage == null) throw new OperationException(operationName, "DataStorage was null");
-
- NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
- if (navigationService == null) throw new OperationException(operationName, "Navigation service was null");
-
- DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
- if (descriptionService == null) throw new OperationException(operationName, "Description service was null");
-
- String strategyAttribute = operationContext.getAttributes().getValue("import-strategy");
- ImportStrategy strategy = ImportStrategy.MERGE;
- if (strategyAttribute != null)
- {
- strategy = ImportStrategy.forName(strategyAttribute);
- if (strategy == null) throw new OperationException(operationName, "Unknown import strategy " + strategyAttribute);
- }
-
- Map<SiteKey, MopImport> importMap = new HashMap<SiteKey, MopImport>();
- final NonCloseableZipInputStream zis = new NonCloseableZipInputStream(inputStream);
- ZipEntry entry;
- try
- {
- log.info("Preparing data for import.");
- while ( (entry = zis.getNextEntry()) != null)
- {
- // Skip directories
- if (entry.isDirectory()) continue;
-
- // Parse zip entry
- String[] parts = parseEntry(entry);
- SiteKey siteKey = Utils.siteKey(parts[0], parts[1]);
- String file = parts[2];
-
- MopImport mopImport = importMap.get(siteKey);
- if (mopImport == null)
- {
- mopImport = new MopImport();
- importMap.put(siteKey, mopImport);
- }
-
- if (file.equals(SiteLayoutExportTask.FILE))
- {
- // Unmarshal site layout data
- Marshaller<PortalConfig> marshaller = operationContext.getBindingProvider().getMarshaller(PortalConfig.class, ContentType.XML);
- PortalConfig portalConfig = marshaller.unmarshal(zis);
- portalConfig.setType(siteKey.getTypeName());
- if (!portalConfig.getName().equals(siteKey.getName()))
- {
- throw new OperationException(operationName, "Name of site does not match that of the zip entry site name.");
- }
-
- // Add import task to run later
- mopImport.siteTask = new SiteLayoutImportTask(portalConfig, siteKey, dataStorage);
- }
- else if (file.equals(PageExportTask.FILE))
- {
- // Unmarshal page data
- Marshaller<Page.PageSet> marshaller = operationContext.getBindingProvider().getMarshaller(Page.PageSet.class, ContentType.XML);
- Page.PageSet pages = marshaller.unmarshal(zis);
- for (Page page : pages.getPages())
- {
- page.setOwnerType(siteKey.getTypeName());
- page.setOwnerId(siteKey.getName());
- }
-
- // Add import task to run later.
- mopImport.pageTask = new PageImportTask(pages, siteKey, dataStorage);
- }
- else if (file.equals(NavigationExportTask.FILE))
- {
- // Unmarshal navigation data
- Marshaller<PageNavigation> marshaller = operationContext.getBindingProvider().getMarshaller(PageNavigation.class, ContentType.XML);
- PageNavigation navigation = marshaller.unmarshal(zis);
- navigation.setOwnerType(siteKey.getTypeName());
- navigation.setOwnerId(siteKey.getName());
-
- // Add import task to run later
- mopImport.navigationTask = new NavigationImportTask(navigation, siteKey, navigationService, descriptionService, dataStorage);
- }
- }
-
- resultHandler.completed(NoResultModel.INSTANCE);
- }
- catch (Throwable t)
- {
- throw new OperationException(operationContext.getOperationName(), "Exception reading data for import.", t);
- }
- finally
- {
- try
- {
- zis.reallyClose();
- }
- catch (IOException e)
- {
- log.warn("Exception closing underlying data stream from import.");
- }
- }
-
- // Perform import
- Map<SiteKey, MopImport> completedImportMap = new HashMap<SiteKey, MopImport>();
- try
- {
- log.info("Performing import using strategy '" + strategy.getName() + "'");
- for (Map.Entry<SiteKey, MopImport> mopImportEntry : importMap.entrySet())
- {
- SiteKey siteKey = mopImportEntry.getKey();
- MopImport mopImport = mopImportEntry.getValue();
- MopImport completed = new MopImport();
-
- if (completedImportMap.containsKey(siteKey))
- {
- throw new IllegalStateException("Multiple site imports for same operation.");
- }
- completedImportMap.put(siteKey, completed);
-
- log.debug("Importing data for site " + siteKey);
-
- // Site layout import
- if (mopImport.siteTask != null)
- {
- log.debug("Importing site layout data.");
- mopImport.siteTask.importData(strategy);
- completed.siteTask = mopImport.siteTask;
- }
-
- // Page import
- if (mopImport.pageTask != null)
- {
- log.debug("Importing page data.");
- mopImport.pageTask.importData(strategy);
- completed.pageTask = mopImport.pageTask;
- }
-
- // Navigation import
- if (mopImport.navigationTask != null)
- {
- log.debug("Importing navigation data.");
- mopImport.navigationTask.importData(strategy);
- completed.navigationTask = mopImport.navigationTask;
- }
- }
- log.info("Import successful !");
- }
- catch (Throwable t)
- {
- boolean rollbackSuccess = true;
- log.error("Exception importing data.", t);
- log.info("Attempting to rollback data modified by import.");
- for (Map.Entry<SiteKey, MopImport> mopImportEntry : completedImportMap.entrySet())
- {
- SiteKey siteKey = mopImportEntry.getKey();
- MopImport mopImport = mopImportEntry.getValue();
-
- log.debug("Rolling back imported data for site " + siteKey);
- if (mopImport.navigationTask != null)
- {
- log.debug("Rolling back navigation modified during import...");
- try
- {
- mopImport.navigationTask.rollback();
- }
- catch (Throwable t1) // Continue rolling back even though there are exceptions.
- {
- rollbackSuccess = false;
- log.error("Error rolling back navigation data for site " + siteKey, t1);
- }
- }
- if (mopImport.pageTask != null)
- {
- log.debug("Rolling back pages modified during import...");
- try
- {
- mopImport.pageTask.rollback();
- }
- catch (Throwable t1) // Continue rolling back even though there are exceptions.
- {
- rollbackSuccess = false;
- log.error("Error rolling back page data for site " + siteKey, t1);
- }
- }
- if (mopImport.siteTask != null)
- {
- log.debug("Rolling back site layout modified during import...");
- try
- {
- mopImport.siteTask.rollback();
- }
- catch (Throwable t1) // Continue rolling back even though there are exceptions.
- {
- rollbackSuccess = false;
- log.error("Error rolling back site layout for site " + siteKey, t1);
- }
- }
- }
-
- String message = (rollbackSuccess) ?
- "Error during import. Tasks successfully rolled back. Portal should be back to consistent state." :
- "Error during import. Errors in rollback as well. Portal may be in an inconsistent state.";
-
- throw new OperationException(operationName, message, t);
- }
- finally
- {
- importMap.clear();
- completedImportMap.clear();
- }
- }
-
- private static String[] parseEntry(ZipEntry entry) throws IOException
- {
- String name = entry.getName();
- if (name.endsWith(SiteLayoutExportTask.FILE) || name.endsWith(PageExportTask.FILE) || name.endsWith(NavigationExportTask.FILE))
- {
- String[] parts = new String[3];
- parts[0] = name.substring(0, name.indexOf("/"));
- parts[1] = name.substring(parts[0].length() + 1, name.lastIndexOf("/"));
- parts[2] = name.substring(name.lastIndexOf("/") + 1);
- return parts;
- }
- else
- {
- throw new IOException("Unknown entry " + name + " in zip file.");
- }
- }
-
- // Bug in SUN's JDK XMLStreamReader implementation closes the underlying stream when
- // it finishes reading an XML document. This is no good when we are using a ZipInputStream.
- // See http://bugs.sun.com/view_bug.do?bug_id=6539065 for more information.
- private static class NonCloseableZipInputStream extends ZipInputStream
- {
- private NonCloseableZipInputStream(InputStream inputStream)
- {
- super(inputStream);
- }
-
- @Override
- public void close() throws IOException
- {
- }
-
- private void reallyClose() throws IOException
- {
- super.close();
- }
- }
-
- private static class MopImport
- {
- private SiteLayoutImportTask siteTask;
- private PageImportTask pageTask;
- private NavigationImportTask navigationTask;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,343 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.Page;
+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.description.DescriptionService;
+import org.exoplatform.portal.mop.management.exportimport.ImportStrategy;
+import org.exoplatform.portal.mop.management.exportimport.NavigationExportTask;
+import org.exoplatform.portal.mop.management.exportimport.NavigationImportTask;
+import org.exoplatform.portal.mop.management.exportimport.PageExportTask;
+import org.exoplatform.portal.mop.management.exportimport.PageImportTask;
+import org.exoplatform.portal.mop.management.exportimport.SiteLayoutExportTask;
+import org.exoplatform.portal.mop.management.exportimport.SiteLayoutImportTask;
+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.gatein.management.api.ContentType;
+import org.gatein.management.api.binding.Marshaller;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationAttachment;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.OperationHandler;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.NoResultModel;
+import org.gatein.mop.api.workspace.Workspace;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipInputStream;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class MopImportResource implements OperationHandler
+{
+ private static final Logger log = LoggerFactory.getLogger(MopImportResource.class);
+
+ //TODO: Would like to see the step operations be handled by mgmt core.
+
+ //TODO: Clean this up when we have time
+ @Override
+ public void execute(final OperationContext operationContext, ResultHandler resultHandler) throws ResourceNotFoundException, OperationException
+ {
+ final String operationName = operationContext.getOperationName();
+
+ OperationAttachment attachment = operationContext.getAttachment(true);
+ if (attachment == null) throw new OperationException(operationContext.getOperationName(), "No attachment available for MOP import.");
+
+ InputStream inputStream = attachment.getStream();
+ if (inputStream == null) throw new OperationException(operationContext.getOperationName(), "No data stream available for import.");
+
+ POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
+ POMSession session = mgr.getSession();
+ if (session == null) throw new OperationException(operationName, "MOP session was null");
+
+ Workspace workspace = session.getWorkspace();
+ if (workspace == null) throw new OperationException(operationName, "MOP workspace was null");
+
+ DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
+ if (dataStorage == null) throw new OperationException(operationName, "DataStorage was null");
+
+ NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
+ if (navigationService == null) throw new OperationException(operationName, "Navigation service was null");
+
+ DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
+ if (descriptionService == null) throw new OperationException(operationName, "Description service was null");
+
+ String strategyAttribute = operationContext.getAttributes().getValue("import-strategy");
+ ImportStrategy strategy = ImportStrategy.MERGE;
+ if (strategyAttribute != null)
+ {
+ strategy = ImportStrategy.forName(strategyAttribute);
+ if (strategy == null) throw new OperationException(operationName, "Unknown import strategy " + strategyAttribute);
+ }
+
+ Map<SiteKey, MopImport> importMap = new HashMap<SiteKey, MopImport>();
+ final NonCloseableZipInputStream zis = new NonCloseableZipInputStream(inputStream);
+ ZipEntry entry;
+ try
+ {
+ log.info("Preparing data for import.");
+ while ( (entry = zis.getNextEntry()) != null)
+ {
+ // Skip directories
+ if (entry.isDirectory()) continue;
+
+ // Parse zip entry
+ String[] parts = parseEntry(entry);
+ SiteKey siteKey = Utils.siteKey(parts[0], parts[1]);
+ String file = parts[2];
+
+ MopImport mopImport = importMap.get(siteKey);
+ if (mopImport == null)
+ {
+ mopImport = new MopImport();
+ importMap.put(siteKey, mopImport);
+ }
+
+ if (file.equals(SiteLayoutExportTask.FILE))
+ {
+ // Unmarshal site layout data
+ Marshaller<PortalConfig> marshaller = operationContext.getBindingProvider().getMarshaller(PortalConfig.class, ContentType.XML);
+ PortalConfig portalConfig = marshaller.unmarshal(zis);
+ portalConfig.setType(siteKey.getTypeName());
+ if (!portalConfig.getName().equals(siteKey.getName()))
+ {
+ throw new OperationException(operationName, "Name of site does not match that of the zip entry site name.");
+ }
+
+ // Add import task to run later
+ mopImport.siteTask = new SiteLayoutImportTask(portalConfig, siteKey, dataStorage);
+ }
+ else if (file.equals(PageExportTask.FILE))
+ {
+ // Unmarshal page data
+ Marshaller<Page.PageSet> marshaller = operationContext.getBindingProvider().getMarshaller(Page.PageSet.class, ContentType.XML);
+ Page.PageSet pages = marshaller.unmarshal(zis);
+ for (Page page : pages.getPages())
+ {
+ page.setOwnerType(siteKey.getTypeName());
+ page.setOwnerId(siteKey.getName());
+ }
+
+ // Add import task to run later.
+ mopImport.pageTask = new PageImportTask(pages, siteKey, dataStorage);
+ }
+ else if (file.equals(NavigationExportTask.FILE))
+ {
+ // Unmarshal navigation data
+ Marshaller<PageNavigation> marshaller = operationContext.getBindingProvider().getMarshaller(PageNavigation.class, ContentType.XML);
+ PageNavigation navigation = marshaller.unmarshal(zis);
+ navigation.setOwnerType(siteKey.getTypeName());
+ navigation.setOwnerId(siteKey.getName());
+
+ // Add import task to run later
+ mopImport.navigationTask = new NavigationImportTask(navigation, siteKey, navigationService, descriptionService, dataStorage);
+ }
+ }
+
+ resultHandler.completed(NoResultModel.INSTANCE);
+ }
+ catch (Throwable t)
+ {
+ throw new OperationException(operationContext.getOperationName(), "Exception reading data for import.", t);
+ }
+ finally
+ {
+ try
+ {
+ zis.reallyClose();
+ }
+ catch (IOException e)
+ {
+ log.warn("Exception closing underlying data stream from import.");
+ }
+ }
+
+ // Perform import
+ Map<SiteKey, MopImport> completedImportMap = new HashMap<SiteKey, MopImport>();
+ try
+ {
+ log.info("Performing import using strategy '" + strategy.getName() + "'");
+ for (Map.Entry<SiteKey, MopImport> mopImportEntry : importMap.entrySet())
+ {
+ SiteKey siteKey = mopImportEntry.getKey();
+ MopImport mopImport = mopImportEntry.getValue();
+ MopImport completed = new MopImport();
+
+ if (completedImportMap.containsKey(siteKey))
+ {
+ throw new IllegalStateException("Multiple site imports for same operation.");
+ }
+ completedImportMap.put(siteKey, completed);
+
+ log.debug("Importing data for site " + siteKey);
+
+ // Site layout import
+ if (mopImport.siteTask != null)
+ {
+ log.debug("Importing site layout data.");
+ mopImport.siteTask.importData(strategy);
+ completed.siteTask = mopImport.siteTask;
+ }
+
+ // Page import
+ if (mopImport.pageTask != null)
+ {
+ log.debug("Importing page data.");
+ mopImport.pageTask.importData(strategy);
+ completed.pageTask = mopImport.pageTask;
+ }
+
+ // Navigation import
+ if (mopImport.navigationTask != null)
+ {
+ log.debug("Importing navigation data.");
+ mopImport.navigationTask.importData(strategy);
+ completed.navigationTask = mopImport.navigationTask;
+ }
+ }
+ log.info("Import successful !");
+ }
+ catch (Throwable t)
+ {
+ boolean rollbackSuccess = true;
+ log.error("Exception importing data.", t);
+ log.info("Attempting to rollback data modified by import.");
+ for (Map.Entry<SiteKey, MopImport> mopImportEntry : completedImportMap.entrySet())
+ {
+ SiteKey siteKey = mopImportEntry.getKey();
+ MopImport mopImport = mopImportEntry.getValue();
+
+ log.debug("Rolling back imported data for site " + siteKey);
+ if (mopImport.navigationTask != null)
+ {
+ log.debug("Rolling back navigation modified during import...");
+ try
+ {
+ mopImport.navigationTask.rollback();
+ }
+ catch (Throwable t1) // Continue rolling back even though there are exceptions.
+ {
+ rollbackSuccess = false;
+ log.error("Error rolling back navigation data for site " + siteKey, t1);
+ }
+ }
+ if (mopImport.pageTask != null)
+ {
+ log.debug("Rolling back pages modified during import...");
+ try
+ {
+ mopImport.pageTask.rollback();
+ }
+ catch (Throwable t1) // Continue rolling back even though there are exceptions.
+ {
+ rollbackSuccess = false;
+ log.error("Error rolling back page data for site " + siteKey, t1);
+ }
+ }
+ if (mopImport.siteTask != null)
+ {
+ log.debug("Rolling back site layout modified during import...");
+ try
+ {
+ mopImport.siteTask.rollback();
+ }
+ catch (Throwable t1) // Continue rolling back even though there are exceptions.
+ {
+ rollbackSuccess = false;
+ log.error("Error rolling back site layout for site " + siteKey, t1);
+ }
+ }
+ }
+
+ String message = (rollbackSuccess) ?
+ "Error during import. Tasks successfully rolled back. Portal should be back to consistent state." :
+ "Error during import. Errors in rollback as well. Portal may be in an inconsistent state.";
+
+ throw new OperationException(operationName, message, t);
+ }
+ finally
+ {
+ importMap.clear();
+ completedImportMap.clear();
+ }
+ }
+
+ private static String[] parseEntry(ZipEntry entry) throws IOException
+ {
+ String name = entry.getName();
+ if (name.endsWith(SiteLayoutExportTask.FILE) || name.endsWith(PageExportTask.FILE) || name.endsWith(NavigationExportTask.FILE))
+ {
+ String[] parts = new String[3];
+ parts[0] = name.substring(0, name.indexOf("/"));
+ parts[1] = name.substring(parts[0].length() + 1, name.lastIndexOf("/"));
+ parts[2] = name.substring(name.lastIndexOf("/") + 1);
+ return parts;
+ }
+ else
+ {
+ throw new IOException("Unknown entry " + name + " in zip file.");
+ }
+ }
+
+ // Bug in SUN's JDK XMLStreamReader implementation closes the underlying stream when
+ // it finishes reading an XML document. This is no good when we are using a ZipInputStream.
+ // See http://bugs.sun.com/view_bug.do?bug_id=6539065 for more information.
+ private static class NonCloseableZipInputStream extends ZipInputStream
+ {
+ private NonCloseableZipInputStream(InputStream inputStream)
+ {
+ super(inputStream);
+ }
+
+ @Override
+ public void close() throws IOException
+ {
+ }
+
+ private void reallyClose() throws IOException
+ {
+ super.close();
+ }
+ }
+
+ private static class MopImport
+ {
+ private SiteLayoutImportTask siteTask;
+ private PageImportTask pageTask;
+ private NavigationImportTask navigationTask;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations;
-
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.OperationHandler;
-import org.gatein.management.api.operation.ResultHandler;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class MopReadResource implements OperationHandler
-{
- @Override
- public void execute(OperationContext operationContext, ResultHandler resultHandler) throws OperationException
- {
- Set<String> children = new LinkedHashSet<String>(3);
- children.add("portalsites");
- children.add("groupsites");
- children.add("usersites");
-
- resultHandler.completed(new ReadResourceModel("Available site types.", children));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations;
+
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.OperationHandler;
+import org.gatein.management.api.operation.ResultHandler;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class MopReadResource implements OperationHandler
+{
+ @Override
+ public void execute(OperationContext operationContext, ResultHandler resultHandler) throws OperationException
+ {
+ Set<String> children = new LinkedHashSet<String>(3);
+ children.add("portalsites");
+ children.add("groupsites");
+ children.add("usersites");
+
+ resultHandler.completed(new ReadResourceModel("Available site types.", children));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,111 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations;
-
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.SiteType;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class Utils
-{
-
- private Utils()
- {
- }
-
- public static ObjectType<Site> getObjectType(SiteType siteType)
- {
- switch (siteType)
- {
- case PORTAL:
- return ObjectType.PORTAL_SITE;
- case GROUP:
- return ObjectType.GROUP_SITE;
- case USER:
- return ObjectType.USER_SITE;
- default:
- return null;
- }
- }
-
- public static SiteType getSiteType(ObjectType<? extends Site> objectType)
- {
- if (ObjectType.PORTAL_SITE == objectType)
- {
- return SiteType.PORTAL;
- }
- else if (ObjectType.GROUP_SITE == objectType)
- {
- return SiteType.GROUP;
- }
- else if (ObjectType.USER_SITE == objectType)
- {
- return SiteType.USER;
- }
- else
- {
- return null;
- }
- }
-
- public static SiteType getSiteType(String siteType)
- {
- if (siteType == null) return null;
-
- return SiteType.valueOf(siteType.toUpperCase());
- }
-
-
- public static SiteKey siteKey(String siteType, String siteName)
- {
- SiteType st = getSiteType(siteType);
- return siteKey(st, siteName);
- }
-
- public static SiteKey siteKey(SiteType siteType, String siteName)
- {
- switch (siteType)
- {
- case PORTAL:
- return SiteKey.portal(siteName);
- case GROUP:
- if (siteName.charAt(0) != '/') siteName = "/" + siteName;
- return SiteKey.group(siteName);
- case USER:
- return SiteKey.user(siteName);
- default:
- return null;
-
- }
- }
-
- public static SiteKey siteKey(Site site)
- {
- return siteKey(getSiteType(site.getObjectType()), site.getName());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/Utils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.SiteType;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class Utils
+{
+
+ private Utils()
+ {
+ }
+
+ public static ObjectType<Site> getObjectType(SiteType siteType)
+ {
+ switch (siteType)
+ {
+ case PORTAL:
+ return ObjectType.PORTAL_SITE;
+ case GROUP:
+ return ObjectType.GROUP_SITE;
+ case USER:
+ return ObjectType.USER_SITE;
+ default:
+ return null;
+ }
+ }
+
+ public static SiteType getSiteType(ObjectType<? extends Site> objectType)
+ {
+ if (ObjectType.PORTAL_SITE == objectType)
+ {
+ return SiteType.PORTAL;
+ }
+ else if (ObjectType.GROUP_SITE == objectType)
+ {
+ return SiteType.GROUP;
+ }
+ else if (ObjectType.USER_SITE == objectType)
+ {
+ return SiteType.USER;
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public static SiteType getSiteType(String siteType)
+ {
+ if (siteType == null) return null;
+
+ return SiteType.valueOf(siteType.toUpperCase());
+ }
+
+
+ public static SiteKey siteKey(String siteType, String siteName)
+ {
+ SiteType st = getSiteType(siteType);
+ return siteKey(st, siteName);
+ }
+
+ public static SiteKey siteKey(SiteType siteType, String siteName)
+ {
+ switch (siteType)
+ {
+ case PORTAL:
+ return SiteKey.portal(siteName);
+ case GROUP:
+ if (siteName.charAt(0) != '/') siteName = "/" + siteName;
+ return SiteKey.group(siteName);
+ case USER:
+ return SiteKey.user(siteName);
+ default:
+ return null;
+
+ }
+ }
+
+ public static SiteKey siteKey(Site site)
+ {
+ return siteKey(getSiteType(site.getObjectType()), site.getName());
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.navigation;
-
-import org.exoplatform.portal.mop.management.operations.site.AbstractSiteOperationHandler;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.mop.api.workspace.Navigation;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractNavigationOperationHandler extends AbstractSiteOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
- {
- Navigation navigation = site.getRootNavigation().getChild("default");
- if (navigation == null) throw new ResourceNotFoundException("Navigation does not exist for site " + getSiteKey(site));
-
- execute(operationContext, resultHandler, navigation);
- }
-
- protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation);
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/AbstractNavigationOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.navigation;
+
+import org.exoplatform.portal.mop.management.operations.site.AbstractSiteOperationHandler;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.mop.api.workspace.Navigation;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractNavigationOperationHandler extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
+ {
+ Navigation navigation = site.getRootNavigation().getChild("default");
+ if (navigation == null) throw new ResourceNotFoundException("Navigation does not exist for site " + getSiteKey(site));
+
+ execute(operationContext, resultHandler, navigation);
+ }
+
+ protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation);
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,63 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.navigation;
-
-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.management.exportimport.NavigationExportTask;
-import org.exoplatform.portal.mop.navigation.NavigationService;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.binding.BindingProvider;
-import org.gatein.management.api.binding.Marshaller;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ExportResourceModel;
-import org.gatein.mop.api.workspace.Navigation;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationExportResource extends AbstractNavigationOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation navigation) throws ResourceNotFoundException, OperationException
- {
- Site site = navigation.getSite();
- String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
- SiteKey siteKey = getSiteKey(site);
-
- DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
- NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
- BindingProvider bindingProvider = operationContext.getBindingProvider();
- Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
-
- NavigationExportTask exportTask = new NavigationExportTask(new NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
-
- resultHandler.completed(new ExportResourceModel(exportTask));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,63 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.navigation;
+
+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.management.exportimport.NavigationExportTask;
+import org.exoplatform.portal.mop.navigation.NavigationService;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.binding.BindingProvider;
+import org.gatein.management.api.binding.Marshaller;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ExportResourceModel;
+import org.gatein.mop.api.workspace.Navigation;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationExportResource extends AbstractNavigationOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation navigation) throws ResourceNotFoundException, OperationException
+ {
+ Site site = navigation.getSite();
+ String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
+ SiteKey siteKey = getSiteKey(site);
+
+ DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
+ NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+ Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
+
+ NavigationExportTask exportTask = new NavigationExportTask(new NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
+
+ resultHandler.completed(new ExportResourceModel(exportTask));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.navigation;
-
-import org.exoplatform.portal.mop.SiteKey;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationKey
-{
- private SiteKey siteKey;
- private String navUri;
-
- public NavigationKey(SiteKey siteKey)
- {
- this.siteKey = siteKey;
- }
-
- public NavigationKey(SiteKey siteKey, String navUri)
- {
- this.siteKey = siteKey;
- this.navUri = navUri;
- }
-
- public SiteKey getSiteKey()
- {
- return siteKey;
- }
-
- public String getNavUri()
- {
- return navUri;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationKey.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.navigation;
+
+import org.exoplatform.portal.mop.SiteKey;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationKey
+{
+ private SiteKey siteKey;
+ private String navUri;
+
+ public NavigationKey(SiteKey siteKey)
+ {
+ this.siteKey = siteKey;
+ }
+
+ public NavigationKey(SiteKey siteKey, String navUri)
+ {
+ this.siteKey = siteKey;
+ this.navUri = navUri;
+ }
+
+ public SiteKey getSiteKey()
+ {
+ return siteKey;
+ }
+
+ public String getNavUri()
+ {
+ return navUri;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.navigation;
-
-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.NavigationService;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.mop.api.workspace.Navigation;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationReadConfigAsXml extends AbstractNavigationOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation)
- {
- String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
-
- Site site = defaultNavigation.getSite();
- SiteKey siteKey = getSiteKey(site);
-
- //TODO: If there's any benefit in creating our own node model to use with navigation service, lets do it
-
- DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
- NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
-
- PageNavigation pageNavigation = NavigationUtils.loadPageNavigation(new NavigationKey(siteKey, navUri), navigationService, descriptionService);
- if (pageNavigation == null) throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri +"'");
-
- resultHandler.completed(pageNavigation);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadConfigAsXml.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.navigation;
+
+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.NavigationService;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.mop.api.workspace.Navigation;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationReadConfigAsXml extends AbstractNavigationOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation)
+ {
+ String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
+
+ Site site = defaultNavigation.getSite();
+ SiteKey siteKey = getSiteKey(site);
+
+ //TODO: If there's any benefit in creating our own node model to use with navigation service, lets do it
+
+ DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
+ NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
+
+ PageNavigation pageNavigation = NavigationUtils.loadPageNavigation(new NavigationKey(siteKey, navUri), navigationService, descriptionService);
+ if (pageNavigation == null) throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri +"'");
+
+ resultHandler.completed(pageNavigation);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,47 +0,0 @@
-package org.exoplatform.portal.mop.management.operations.navigation;
-
-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.NodeContext;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-import org.gatein.mop.api.workspace.Navigation;
-
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationReadResource extends AbstractNavigationOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation)
- {
- SiteKey siteKey = getSiteKey(defaultNavigation.getSite());
- String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
-
- NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
- NavigationContext navigation = navigationService.loadNavigation(siteKey);
-
- Set<String> children = new LinkedHashSet<String>();
-
- NodeContext<NodeContext<?>> node = NavigationUtils.loadNode(navigationService, navigation, navUri);
- if (node == null)
- {
- throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri +"'");
- }
-
- for (NodeContext child : node.getNodes())
- {
- children.add(child.getName());
- }
-
- ReadResourceModel model = new ReadResourceModel("Navigation nodes available at this resource.", children);
- resultHandler.completed(model);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,47 @@
+package org.exoplatform.portal.mop.management.operations.navigation;
+
+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.NodeContext;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.mop.api.workspace.Navigation;
+
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationReadResource extends AbstractNavigationOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation defaultNavigation)
+ {
+ SiteKey siteKey = getSiteKey(defaultNavigation.getSite());
+ String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
+
+ NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
+ NavigationContext navigation = navigationService.loadNavigation(siteKey);
+
+ Set<String> children = new LinkedHashSet<String>();
+
+ NodeContext<NodeContext<?>> node = NavigationUtils.loadNode(navigationService, navigation, navUri);
+ if (node == null)
+ {
+ throw new ResourceNotFoundException("Navigation node not found for navigation uri '" + navUri +"'");
+ }
+
+ for (NodeContext child : node.getNodes())
+ {
+ children.add(child.getName());
+ }
+
+ ReadResourceModel model = new ReadResourceModel("Navigation nodes available at this resource.", children);
+ resultHandler.completed(model);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,218 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.navigation;
-
-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.config.model.PageNode;
-import org.exoplatform.portal.mop.Described;
-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.Scope;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationUtils
-{
- private NavigationUtils(){}
-
- public static PageNavigation loadPageNavigation(NavigationKey key, NavigationService navigationService, DescriptionService descriptionService)
- {
- NavigationContext navigation = navigationService.loadNavigation(key.getSiteKey());
- if (navigation == null) return null;
-
- NodeContext<NodeContext<?>> node = loadNode(navigationService, navigation, key.getNavUri());
- if (node == null) return null;
-
- if (key.getNavUri() != null)
- {
- return createFragmentedPageNavigation(descriptionService, navigation, node);
- }
- else
- {
- return createPageNavigation(descriptionService, navigation, node);
- }
- }
-
- public static NodeContext<NodeContext<?>> loadNode(NavigationService navigationService, NavigationContext navigation, String navUri)
- {
- if (navigation == null) return null;
-
- if (navUri != null)
- {
- String[] path = trim(navUri.split("/"));
- NodeContext<NodeContext<?>> node = navigationService.loadNode(NodeModel.SELF_MODEL, navigation, GenericScope.branchShape(path, Scope.ALL), null);
- for (String name : path)
- {
- node = node.get(name);
- if (node == null) break;
- }
-
- return node;
- }
- else
- {
- return navigationService.loadNode(NodeModel.SELF_MODEL, navigation, Scope.ALL, null);
- }
- }
-
- public static PageNavigation createPageNavigation(DescriptionService service, NavigationContext navigation, NodeContext<NodeContext<?>> node)
- {
- PageNavigation pageNavigation = new PageNavigation();
- pageNavigation.setPriority(navigation.getState().getPriority());
- pageNavigation.setOwnerType(navigation.getKey().getTypeName());
- pageNavigation.setOwnerId(navigation.getKey().getName());
-
- ArrayList<PageNode> children = new ArrayList<PageNode>(node.getNodeCount());
- for (NodeContext<?> child : node.getNodes())
- {
- @SuppressWarnings("unchecked")
- NodeContext<NodeContext<?>> childNode = (NodeContext<NodeContext<?>>) child;
- children.add(createPageNode(service, childNode));
- }
-
- NavigationFragment fragment = new NavigationFragment();
- fragment.setNodes(children);
- pageNavigation.addFragment(fragment);
-
- return pageNavigation;
- }
-
- private static PageNavigation createFragmentedPageNavigation(DescriptionService service, NavigationContext navigation, NodeContext<NodeContext<?>> node)
- {
- PageNavigation pageNavigation = new PageNavigation();
- pageNavigation.setPriority(navigation.getState().getPriority());
- pageNavigation.setOwnerType(navigation.getKey().getTypeName());
- pageNavigation.setOwnerId(navigation.getKey().getName());
-
- ArrayList<PageNode> children = new ArrayList<PageNode>(1);
- children.add(createPageNode(service, node));
-
- NavigationFragment fragment = new NavigationFragment();
- StringBuilder parentUri = new StringBuilder("/");
- getPath(node.getParent(), parentUri);
- fragment.setParentURI(parentUri.toString());
- fragment.setNodes(children);
-
- pageNavigation.addFragment(fragment);
-
- return pageNavigation;
- }
-
- private static void getPath(NodeContext<NodeContext<?>> node, StringBuilder parentUri)
- {
- if (node == null) return;
- if (node.getParent() == null) return; // since "default" is the root node, we ignore it
-
- parentUri.insert(0, node.getName()).append("/");
- getPath(node.getParent(), parentUri);
- }
-
- private static PageNode createPageNode(DescriptionService service, NodeContext<NodeContext<?>> node)
- {
- PageNode pageNode = new PageNode();
- pageNode.setName(node.getName());
-
- if (node.getState().getLabel() == null)
- {
- Map<Locale, Described.State> descriptions = service.getDescriptions(node.getId());
- if (descriptions != null && !descriptions.isEmpty())
- {
- I18NString labels = new I18NString();
- for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet())
- {
- labels.add(new LocalizedString(entry.getValue().getName(), entry.getKey()));
- }
-
- pageNode.setLabels(labels);
- }
- }
- else
- {
- pageNode.setLabel(node.getState().getLabel());
- }
-
- pageNode.setIcon(node.getState().getIcon());
- long startPublicationTime = node.getState().getStartPublicationTime();
- if (startPublicationTime != -1)
- {
- pageNode.setStartPublicationDate(new Date(startPublicationTime));
- }
-
- long endPublicationTime = node.getState().getEndPublicationTime();
- if (endPublicationTime != -1)
- {
- pageNode.setEndPublicationDate(new Date(endPublicationTime));
- }
-
- pageNode.setVisibility(node.getState().getVisibility());
- pageNode.setPageReference(node.getState().getPageRef());
-
- if (node.getNodes() != null)
- {
- ArrayList<PageNode> children = new ArrayList<PageNode>(node.getNodeCount());
- for (NodeContext<?> child : node.getNodes())
- {
- @SuppressWarnings("unchecked")
- NodeContext<NodeContext<?>> childNode = (NodeContext<NodeContext<?>>) child;
- children.add(createPageNode(service, childNode));
- }
-
- pageNode.setChildren(children);
- }
- else
- {
- pageNode.setChildren(new ArrayList<PageNode>(0));
- }
-
- return pageNode;
- }
-
- private static String[] trim(String[] array)
- {
- List<String> trimmed = new ArrayList<String>(array.length);
- for (String s : array)
- {
- if (s != null && !"".equals(s))
- {
- trimmed.add(s);
- }
- }
-
- return trimmed.toArray(new String[trimmed.size()]);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,218 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.navigation;
+
+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.config.model.PageNode;
+import org.exoplatform.portal.mop.Described;
+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.Scope;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationUtils
+{
+ private NavigationUtils(){}
+
+ public static PageNavigation loadPageNavigation(NavigationKey key, NavigationService navigationService, DescriptionService descriptionService)
+ {
+ NavigationContext navigation = navigationService.loadNavigation(key.getSiteKey());
+ if (navigation == null) return null;
+
+ NodeContext<NodeContext<?>> node = loadNode(navigationService, navigation, key.getNavUri());
+ if (node == null) return null;
+
+ if (key.getNavUri() != null)
+ {
+ return createFragmentedPageNavigation(descriptionService, navigation, node);
+ }
+ else
+ {
+ return createPageNavigation(descriptionService, navigation, node);
+ }
+ }
+
+ public static NodeContext<NodeContext<?>> loadNode(NavigationService navigationService, NavigationContext navigation, String navUri)
+ {
+ if (navigation == null) return null;
+
+ if (navUri != null)
+ {
+ String[] path = trim(navUri.split("/"));
+ NodeContext<NodeContext<?>> node = navigationService.loadNode(NodeModel.SELF_MODEL, navigation, GenericScope.branchShape(path, Scope.ALL), null);
+ for (String name : path)
+ {
+ node = node.get(name);
+ if (node == null) break;
+ }
+
+ return node;
+ }
+ else
+ {
+ return navigationService.loadNode(NodeModel.SELF_MODEL, navigation, Scope.ALL, null);
+ }
+ }
+
+ public static PageNavigation createPageNavigation(DescriptionService service, NavigationContext navigation, NodeContext<NodeContext<?>> node)
+ {
+ PageNavigation pageNavigation = new PageNavigation();
+ pageNavigation.setPriority(navigation.getState().getPriority());
+ pageNavigation.setOwnerType(navigation.getKey().getTypeName());
+ pageNavigation.setOwnerId(navigation.getKey().getName());
+
+ ArrayList<PageNode> children = new ArrayList<PageNode>(node.getNodeCount());
+ for (NodeContext<?> child : node.getNodes())
+ {
+ @SuppressWarnings("unchecked")
+ NodeContext<NodeContext<?>> childNode = (NodeContext<NodeContext<?>>) child;
+ children.add(createPageNode(service, childNode));
+ }
+
+ NavigationFragment fragment = new NavigationFragment();
+ fragment.setNodes(children);
+ pageNavigation.addFragment(fragment);
+
+ return pageNavigation;
+ }
+
+ private static PageNavigation createFragmentedPageNavigation(DescriptionService service, NavigationContext navigation, NodeContext<NodeContext<?>> node)
+ {
+ PageNavigation pageNavigation = new PageNavigation();
+ pageNavigation.setPriority(navigation.getState().getPriority());
+ pageNavigation.setOwnerType(navigation.getKey().getTypeName());
+ pageNavigation.setOwnerId(navigation.getKey().getName());
+
+ ArrayList<PageNode> children = new ArrayList<PageNode>(1);
+ children.add(createPageNode(service, node));
+
+ NavigationFragment fragment = new NavigationFragment();
+ StringBuilder parentUri = new StringBuilder("/");
+ getPath(node.getParent(), parentUri);
+ fragment.setParentURI(parentUri.toString());
+ fragment.setNodes(children);
+
+ pageNavigation.addFragment(fragment);
+
+ return pageNavigation;
+ }
+
+ private static void getPath(NodeContext<NodeContext<?>> node, StringBuilder parentUri)
+ {
+ if (node == null) return;
+ if (node.getParent() == null) return; // since "default" is the root node, we ignore it
+
+ parentUri.insert(0, node.getName()).append("/");
+ getPath(node.getParent(), parentUri);
+ }
+
+ private static PageNode createPageNode(DescriptionService service, NodeContext<NodeContext<?>> node)
+ {
+ PageNode pageNode = new PageNode();
+ pageNode.setName(node.getName());
+
+ if (node.getState().getLabel() == null)
+ {
+ Map<Locale, Described.State> descriptions = service.getDescriptions(node.getId());
+ if (descriptions != null && !descriptions.isEmpty())
+ {
+ I18NString labels = new I18NString();
+ for (Map.Entry<Locale, Described.State> entry : descriptions.entrySet())
+ {
+ labels.add(new LocalizedString(entry.getValue().getName(), entry.getKey()));
+ }
+
+ pageNode.setLabels(labels);
+ }
+ }
+ else
+ {
+ pageNode.setLabel(node.getState().getLabel());
+ }
+
+ pageNode.setIcon(node.getState().getIcon());
+ long startPublicationTime = node.getState().getStartPublicationTime();
+ if (startPublicationTime != -1)
+ {
+ pageNode.setStartPublicationDate(new Date(startPublicationTime));
+ }
+
+ long endPublicationTime = node.getState().getEndPublicationTime();
+ if (endPublicationTime != -1)
+ {
+ pageNode.setEndPublicationDate(new Date(endPublicationTime));
+ }
+
+ pageNode.setVisibility(node.getState().getVisibility());
+ pageNode.setPageReference(node.getState().getPageRef());
+
+ if (node.getNodes() != null)
+ {
+ ArrayList<PageNode> children = new ArrayList<PageNode>(node.getNodeCount());
+ for (NodeContext<?> child : node.getNodes())
+ {
+ @SuppressWarnings("unchecked")
+ NodeContext<NodeContext<?>> childNode = (NodeContext<NodeContext<?>>) child;
+ children.add(createPageNode(service, childNode));
+ }
+
+ pageNode.setChildren(children);
+ }
+ else
+ {
+ pageNode.setChildren(new ArrayList<PageNode>(0));
+ }
+
+ return pageNode;
+ }
+
+ private static String[] trim(String[] array)
+ {
+ List<String> trimmed = new ArrayList<String>(array.length);
+ for (String s : array)
+ {
+ if (s != null && !"".equals(s))
+ {
+ trimmed.add(s);
+ }
+ }
+
+ return trimmed.toArray(new String[trimmed.size()]);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.page;
-
-import org.exoplatform.portal.mop.management.operations.site.AbstractSiteOperationHandler;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.mop.api.workspace.Page;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractPageOperationHandler extends AbstractSiteOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
- {
- Page pages = site.getRootPage().getChild("pages");
- if (pages == null || pages.getChildren().isEmpty()) throw new ResourceNotFoundException("No pages found for site " + getSiteKey(site));
-
- execute(operationContext, resultHandler, pages);
- }
-
- protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler, Page page) throws ResourceNotFoundException, OperationException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/AbstractPageOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.page;
+
+import org.exoplatform.portal.mop.management.operations.site.AbstractSiteOperationHandler;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.mop.api.workspace.Page;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractPageOperationHandler extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
+ {
+ Page pages = site.getRootPage().getChild("pages");
+ if (pages == null || pages.getChildren().isEmpty()) throw new ResourceNotFoundException("No pages found for site " + getSiteKey(site));
+
+ execute(operationContext, resultHandler, pages);
+ }
+
+ protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler, Page page) throws ResourceNotFoundException, OperationException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.page;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.management.exportimport.PageExportTask;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.binding.BindingProvider;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ExportResourceModel;
-import org.gatein.management.api.operation.model.ExportTask;
-import org.gatein.mop.api.workspace.Page;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageExportResource extends AbstractPageOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Page pages) throws ResourceNotFoundException, OperationException
- {
- SiteKey siteKey = getSiteKey(pages.getSite());
-
- DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
- BindingProvider bindingProvider = operationContext.getBindingProvider();
-
- Collection<Page> pagesList = pages.getChildren();
- List<ExportTask> tasks = new ArrayList<ExportTask>(pagesList.size());
- PageExportTask pageExportTask =
- new PageExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(
- org.exoplatform.portal.config.model.Page.PageSet.class, ContentType.XML));
-
- String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
- for (Page page : pagesList)
- {
- if (pageName == null)
- {
- pageExportTask.addPageName(page.getName());
- }
- else if (pageName.equals(page.getName()))
- {
- pageExportTask.addPageName(page.getName());
- }
- }
-
- if (pageExportTask.getPageNames().isEmpty() && pageName != null)
- {
- throw new ResourceNotFoundException("No page found for " + new PageKey(siteKey, pageName));
- }
-
- tasks.add(pageExportTask);
-
- resultHandler.completed(new ExportResourceModel(tasks));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,84 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.page;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.management.exportimport.PageExportTask;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.binding.BindingProvider;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ExportResourceModel;
+import org.gatein.management.api.operation.model.ExportTask;
+import org.gatein.mop.api.workspace.Page;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageExportResource extends AbstractPageOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Page pages) throws ResourceNotFoundException, OperationException
+ {
+ SiteKey siteKey = getSiteKey(pages.getSite());
+
+ DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+
+ Collection<Page> pagesList = pages.getChildren();
+ List<ExportTask> tasks = new ArrayList<ExportTask>(pagesList.size());
+ PageExportTask pageExportTask =
+ new PageExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(
+ org.exoplatform.portal.config.model.Page.PageSet.class, ContentType.XML));
+
+ String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
+ for (Page page : pagesList)
+ {
+ if (pageName == null)
+ {
+ pageExportTask.addPageName(page.getName());
+ }
+ else if (pageName.equals(page.getName()))
+ {
+ pageExportTask.addPageName(page.getName());
+ }
+ }
+
+ if (pageExportTask.getPageNames().isEmpty() && pageName != null)
+ {
+ throw new ResourceNotFoundException("No page found for " + new PageKey(siteKey, pageName));
+ }
+
+ tasks.add(pageExportTask);
+
+ resultHandler.completed(new ExportResourceModel(tasks));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,43 +0,0 @@
-package org.exoplatform.portal.mop.management.operations.page;
-
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.Utils;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageKey
-{
- private final SiteKey siteKey;
- private final String pageName;
- private final String pageId;
-
- public PageKey(SiteKey siteKey, String pageName)
- {
- this.siteKey = siteKey;
- this.pageName = pageName;
- this.pageId = Utils.join("::", siteKey.getTypeName(), siteKey.getName(), pageName);
- }
-
- public SiteKey getSiteKey()
- {
- return siteKey;
- }
-
- public String getPageName()
- {
- return pageName;
- }
-
- public String getPageId()
- {
- return pageId;
- }
-
- @Override
- public String toString()
- {
- return "PageKey{siteKey=" + siteKey + ", pageName='" + pageName + "'}";
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageKey.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,43 @@
+package org.exoplatform.portal.mop.management.operations.page;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.config.Utils;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageKey
+{
+ private final SiteKey siteKey;
+ private final String pageName;
+ private final String pageId;
+
+ public PageKey(SiteKey siteKey, String pageName)
+ {
+ this.siteKey = siteKey;
+ this.pageName = pageName;
+ this.pageId = Utils.join("::", siteKey.getTypeName(), siteKey.getName(), pageName);
+ }
+
+ public SiteKey getSiteKey()
+ {
+ return siteKey;
+ }
+
+ public String getPageName()
+ {
+ return pageName;
+ }
+
+ public String getPageId()
+ {
+ return pageId;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "PageKey{siteKey=" + siteKey + ", pageName='" + pageName + "'}";
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,68 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.page;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.Query;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.mop.SiteKey;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageReadConfigAsXml extends AbstractPageOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, org.gatein.mop.api.workspace.Page rootPage) throws ResourceNotFoundException, OperationException
- {
- SiteKey siteKey = getSiteKey(rootPage.getSite());
- DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
-
- String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
- if (pageName == null)
- {
- resultHandler.completed(PageUtils.getAllPages(dataStorage, siteKey, operationContext.getOperationName()));
- }
- else
- {
- PageKey key = new PageKey(siteKey, pageName);
- Page page = PageUtils.getPage(dataStorage, key, operationContext.getOperationName());
- if (page == null)
- {
- throw new ResourceNotFoundException("No page found for " + key);
- }
- else
- {
- resultHandler.completed(page);
- }
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadConfigAsXml.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.page;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.Query;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.mop.SiteKey;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageReadConfigAsXml extends AbstractPageOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, org.gatein.mop.api.workspace.Page rootPage) throws ResourceNotFoundException, OperationException
+ {
+ SiteKey siteKey = getSiteKey(rootPage.getSite());
+ DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
+
+ String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
+ if (pageName == null)
+ {
+ resultHandler.completed(PageUtils.getAllPages(dataStorage, siteKey, operationContext.getOperationName()));
+ }
+ else
+ {
+ PageKey key = new PageKey(siteKey, pageName);
+ Page page = PageUtils.getPage(dataStorage, key, operationContext.getOperationName());
+ if (page == null)
+ {
+ throw new ResourceNotFoundException("No page found for " + key);
+ }
+ else
+ {
+ resultHandler.completed(page);
+ }
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,50 +0,0 @@
-package org.exoplatform.portal.mop.management.operations.page;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-import org.gatein.mop.api.workspace.Page;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageReadResource extends AbstractPageOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Page rootPage) throws ResourceNotFoundException, OperationException
- {
- String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
- if (pageName == null)
- {
- Collection<Page> pageList = rootPage.getChildren();
- Set<String> children = new LinkedHashSet<String>(pageList.size());
- for (Page page : pageList)
- {
- children.add(page.getName());
- }
-
- resultHandler.completed(new ReadResourceModel("List of all available pages for site '" + rootPage.getSite().getName() +"'", children));
- }
- else
- {
- DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
- PageKey pageKey = new PageKey(getSiteKey(rootPage.getSite()), pageName);
-
- if (PageUtils.getPage(dataStorage, pageKey, operationContext.getOperationName()) == null)
- {
- throw new ResourceNotFoundException("No page found for " + pageKey);
- }
-
- resultHandler.completed(new ReadResourceModel("List of child pages for page '" + pageName +"'", Collections.<String>emptySet()));
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,50 @@
+package org.exoplatform.portal.mop.management.operations.page;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.mop.api.workspace.Page;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageReadResource extends AbstractPageOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Page rootPage) throws ResourceNotFoundException, OperationException
+ {
+ String pageName = operationContext.getAddress().resolvePathTemplate("page-name");
+ if (pageName == null)
+ {
+ Collection<Page> pageList = rootPage.getChildren();
+ Set<String> children = new LinkedHashSet<String>(pageList.size());
+ for (Page page : pageList)
+ {
+ children.add(page.getName());
+ }
+
+ resultHandler.completed(new ReadResourceModel("List of all available pages for site '" + rootPage.getSite().getName() +"'", children));
+ }
+ else
+ {
+ DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
+ PageKey pageKey = new PageKey(getSiteKey(rootPage.getSite()), pageName);
+
+ if (PageUtils.getPage(dataStorage, pageKey, operationContext.getOperationName()) == null)
+ {
+ throw new ResourceNotFoundException("No page found for " + pageKey);
+ }
+
+ resultHandler.completed(new ReadResourceModel("List of child pages for page '" + pageName +"'", Collections.<String>emptySet()));
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,48 +0,0 @@
-package org.exoplatform.portal.mop.management.operations.page;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.Query;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.mop.SiteKey;
-import org.gatein.management.api.exceptions.OperationException;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageUtils
-{
- private PageUtils(){}
-
- public static Page getPage(DataStorage dataStorage, PageKey pageKey, String operationName)
- {
- try
- {
- return dataStorage.getPage(pageKey.getPageId());
- }
- catch (Exception e)
- {
- throw new OperationException(operationName, "Operation failed getting page for " + pageKey, e);
- }
- }
-
- public static Page.PageSet getAllPages(DataStorage dataStorage, SiteKey siteKey, String operationName)
- {
- Query<Page> query = new Query<Page>(siteKey.getTypeName(), siteKey.getName(), Page.class);
- try
- {
- List<Page> pageList = dataStorage.find(query).getAll();
- Page.PageSet pages = new Page.PageSet();
- pages.setPages(new ArrayList<Page>(pageList));
-
- return pages;
- }
- catch (Exception e)
- {
- throw new OperationException(operationName, "Could not retrieve pages for site " + siteKey);
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageUtils.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,48 @@
+package org.exoplatform.portal.mop.management.operations.page;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.Query;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.mop.SiteKey;
+import org.gatein.management.api.exceptions.OperationException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageUtils
+{
+ private PageUtils(){}
+
+ public static Page getPage(DataStorage dataStorage, PageKey pageKey, String operationName)
+ {
+ try
+ {
+ return dataStorage.getPage(pageKey.getPageId());
+ }
+ catch (Exception e)
+ {
+ throw new OperationException(operationName, "Operation failed getting page for " + pageKey, e);
+ }
+ }
+
+ public static Page.PageSet getAllPages(DataStorage dataStorage, SiteKey siteKey, String operationName)
+ {
+ Query<Page> query = new Query<Page>(siteKey.getTypeName(), siteKey.getName(), Page.class);
+ try
+ {
+ List<Page> pageList = dataStorage.find(query).getAll();
+ Page.PageSet pages = new Page.PageSet();
+ pages.setPages(new ArrayList<Page>(pageList));
+
+ return pages;
+ }
+ catch (Exception e)
+ {
+ throw new OperationException(operationName, "Could not retrieve pages for site " + siteKey);
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.site;
-
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.management.operations.AbstractMopOperationHandler;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.mop.api.workspace.ObjectType;
-import org.gatein.mop.api.workspace.Site;
-import org.gatein.mop.api.workspace.Workspace;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractSiteOperationHandler extends AbstractMopOperationHandler
-{
- @Override
- protected final void execute(OperationContext operationContext, ResultHandler resultHandler, Workspace workspace, ObjectType<Site> siteType) throws ResourceNotFoundException, OperationException
- {
- String operationName = operationContext.getOperationName();
- PathAddress address = operationContext.getAddress();
-
- String siteName = address.resolvePathTemplate("site-name");
- if (siteName == null) throw new OperationException(operationName, "No site name specified.");
-
- SiteKey siteKey = getSiteKey(siteType, siteName);
-
- Site site = workspace.getSite(siteType, siteKey.getName());
- if (site == null) throw new ResourceNotFoundException("No site found for site " + siteKey);
-
- execute(operationContext, resultHandler, site);
- }
-
- protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/AbstractSiteOperationHandler.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.site;
+
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.management.operations.AbstractMopOperationHandler;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.mop.api.workspace.ObjectType;
+import org.gatein.mop.api.workspace.Site;
+import org.gatein.mop.api.workspace.Workspace;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractSiteOperationHandler extends AbstractMopOperationHandler
+{
+ @Override
+ protected final void execute(OperationContext operationContext, ResultHandler resultHandler, Workspace workspace, ObjectType<Site> siteType) throws ResourceNotFoundException, OperationException
+ {
+ String operationName = operationContext.getOperationName();
+ PathAddress address = operationContext.getAddress();
+
+ String siteName = address.resolvePathTemplate("site-name");
+ if (siteName == null) throw new OperationException(operationName, "No site name specified.");
+
+ SiteKey siteKey = getSiteKey(siteType, siteName);
+
+ Site site = workspace.getSite(siteType, siteKey.getName());
+ if (site == null) throw new ResourceNotFoundException("No site found for site " + siteKey);
+
+ execute(operationContext, resultHandler, site);
+ }
+
+ protected abstract void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,57 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.site;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.mop.management.exportimport.SiteLayoutExportTask;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.binding.BindingProvider;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ExportResourceModel;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteLayoutExportResource extends AbstractSiteOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
- {
- BindingProvider bindingProvider = operationContext.getBindingProvider();
- DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
-
- SiteKey siteKey = getSiteKey(site);
-
- resultHandler.completed(new ExportResourceModel(new SiteLayoutExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(PortalConfig.class, ContentType.XML))));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,57 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.site;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.management.exportimport.SiteLayoutExportTask;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.binding.BindingProvider;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ExportResourceModel;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutExportResource extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
+ {
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+ DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
+
+ SiteKey siteKey = getSiteKey(site);
+
+ resultHandler.completed(new ExportResourceModel(new SiteLayoutExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(PortalConfig.class, ContentType.XML))));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,60 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.site;
-
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.exoplatform.portal.pom.data.PortalKey;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.mop.api.workspace.Site;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteLayoutReadConfigAsXml extends AbstractSiteOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
- {
- DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
- SiteKey siteKey = getSiteKey(site);
-
- try
- {
- PortalConfig portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
- resultHandler.completed(portalConfig);
- }
- catch (Exception e)
- {
- throw new OperationException(operationContext.getOperationName(), "Could not retrieve site layout for site " + site, e);
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,60 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.site;
+
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.exoplatform.portal.pom.data.PortalKey;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.mop.api.workspace.Site;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutReadConfigAsXml extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
+ {
+ DataStorage dataStorage = operationContext.getRuntimeContext().getRuntimeComponent(DataStorage.class);
+ SiteKey siteKey = getSiteKey(site);
+
+ try
+ {
+ PortalConfig portalConfig = dataStorage.getPortalConfig(siteKey.getTypeName(), siteKey.getName());
+ resultHandler.completed(portalConfig);
+ }
+ catch (Exception e)
+ {
+ throw new OperationException(operationContext.getOperationName(), "Could not retrieve site layout for site " + site, e);
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.site;
-
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-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 java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteReadResource extends AbstractSiteOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
- {
- boolean pageOrNav = false;
- Set<String> children = new LinkedHashSet<String>(3);
-
- Page pages = site.getRootPage().getChild("pages");
- if (pages != null && !pages.getChildren().isEmpty())
- {
- children.add("pages");
- pageOrNav = true;
- }
-
- Navigation defaultNav = site.getRootNavigation().getChild("default");
- if (defaultNav != null && !defaultNav.getChildren().isEmpty())
- {
- children.add("navigation");
- pageOrNav = true;
- }
-
- if (pageOrNav)
- {
- children.add("portal");
- }
- else
- {
- if (site.getObjectType() == ObjectType.GROUP_SITE)
- {
- Collection<? extends Site> groupsites = site.getWorkspace().getSites(site.getObjectType());
- for (Site groupsite : groupsites)
- {
- String siteName = site.getName();
- String groupName = groupsite.getName();
- if (siteName.equals(groupName)) continue;
-
- int index = groupName.indexOf(siteName);
- if (index == 0)
- {
- children.add(groupName.substring(siteName.length(), groupName.length()));
- }
- }
- }
- }
-
- resultHandler.completed(new ReadResourceModel("Available artifacts for site " + getSiteKey(site), children));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,91 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.site;
+
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+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 java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteReadResource extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
+ {
+ boolean pageOrNav = false;
+ Set<String> children = new LinkedHashSet<String>(3);
+
+ Page pages = site.getRootPage().getChild("pages");
+ if (pages != null && !pages.getChildren().isEmpty())
+ {
+ children.add("pages");
+ pageOrNav = true;
+ }
+
+ Navigation defaultNav = site.getRootNavigation().getChild("default");
+ if (defaultNav != null && !defaultNav.getChildren().isEmpty())
+ {
+ children.add("navigation");
+ pageOrNav = true;
+ }
+
+ if (pageOrNav)
+ {
+ children.add("portal");
+ }
+ else
+ {
+ if (site.getObjectType() == ObjectType.GROUP_SITE)
+ {
+ Collection<? extends Site> groupsites = site.getWorkspace().getSites(site.getObjectType());
+ for (Site groupsite : groupsites)
+ {
+ String siteName = site.getName();
+ String groupName = groupsite.getName();
+ if (siteName.equals(groupName)) continue;
+
+ int index = groupName.indexOf(siteName);
+ if (index == 0)
+ {
+ children.add(groupName.substring(siteName.length(), groupName.length()));
+ }
+ }
+ }
+ }
+
+ resultHandler.completed(new ReadResourceModel("Available artifacts for site " + getSiteKey(site), children));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.operations.site;
-
-import org.exoplatform.portal.mop.management.operations.AbstractMopOperationHandler;
-import org.gatein.management.api.exceptions.OperationException;
-import org.gatein.management.api.exceptions.ResourceNotFoundException;
-import org.gatein.management.api.operation.OperationContext;
-import org.gatein.management.api.operation.ResultHandler;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-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.Workspace;
-
-import java.util.Collection;
-import java.util.LinkedHashSet;
-import java.util.Set;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteTypeReadResource extends AbstractMopOperationHandler
-{
- @Override
- protected void execute(OperationContext operationContext, ResultHandler resultHandler, Workspace workspace, ObjectType<Site> siteType) throws ResourceNotFoundException, OperationException
- {
- Collection<Site> sites = workspace.getSites(siteType);
- Set<String> children = new LinkedHashSet<String>(sites.size());
- for (Site site : sites)
- {
- boolean pageOrNav = false;
- Page pages = site.getRootPage().getChild("pages");
- if (pages != null && !pages.getChildren().isEmpty())
- {
- pageOrNav = true;
- }
- Navigation defaultNav = site.getRootNavigation().getChild("default");
- if (defaultNav != null && !defaultNav.getChildren().isEmpty())
- {
- pageOrNav = true;
- }
-
- //TODO: Until invalid site entries without a leading slash is corrected, this is needed to ignore them.
- if (siteType == ObjectType.GROUP_SITE)
- {
- String name = site.getName();
- if (name.charAt(0) == '/' && pageOrNav)
- {
- children.add(site.getName());
- }
- }
- else if (pageOrNav)
- {
- children.add(site.getName());
- }
- }
- resultHandler.completed(new ReadResourceModel("Available sites for site type '" + getSiteType(siteType).getName() + "'", children));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java (from rev 6960, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteTypeReadResource.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.operations.site;
+
+import org.exoplatform.portal.mop.management.operations.AbstractMopOperationHandler;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+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.Workspace;
+
+import java.util.Collection;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteTypeReadResource extends AbstractMopOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Workspace workspace, ObjectType<Site> siteType) throws ResourceNotFoundException, OperationException
+ {
+ Collection<Site> sites = workspace.getSites(siteType);
+ Set<String> children = new LinkedHashSet<String>(sites.size());
+ for (Site site : sites)
+ {
+ boolean pageOrNav = false;
+ Page pages = site.getRootPage().getChild("pages");
+ if (pages != null && !pages.getChildren().isEmpty())
+ {
+ pageOrNav = true;
+ }
+ Navigation defaultNav = site.getRootNavigation().getChild("default");
+ if (defaultNav != null && !defaultNav.getChildren().isEmpty())
+ {
+ pageOrNav = true;
+ }
+
+ //TODO: Until invalid site entries without a leading slash is corrected, this is needed to ignore them.
+ if (siteType == ObjectType.GROUP_SITE)
+ {
+ String name = site.getName();
+ if (name.charAt(0) == '/' && pageOrNav)
+ {
+ children.add(site.getName());
+ }
+ }
+ else if (pageOrNav)
+ {
+ children.add(site.getName());
+ }
+ }
+ resultHandler.completed(new ReadResourceModel("Available sites for site type '" + getSiteType(siteType).getName() + "'", children));
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/META-INF/services/org.gatein.management.spi.ManagementExtension (from rev 6960, portal/trunk/component/portal/src/main/resources/META-INF/services/org.gatein.management.spi.ManagementExtension)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/META-INF/services/org.gatein.management.spi.ManagementExtension (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/META-INF/services/org.gatein.management.spi.ManagementExtension 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1 @@
+org.exoplatform.portal.mop.management.MopManagementExtension
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,169 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import junit.framework.TestCase;
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationState;
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.PageBody;
-import org.exoplatform.portal.config.model.TransientApplicationState;
-import org.exoplatform.portal.pom.data.ApplicationData;
-import org.exoplatform.portal.pom.data.ContainerData;
-import org.exoplatform.portal.pom.spi.gadget.Gadget;
-import org.exoplatform.portal.pom.spi.portlet.Portlet;
-import org.exoplatform.portal.pom.spi.portlet.Preference;
-
-import java.util.Arrays;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class AbstractMarshallerTest extends TestCase
-{
- protected void compareComponents(List<ModelObject> expectedComponents, List<ModelObject> actualComponents)
- {
- assertEquals(expectedComponents.size(), actualComponents.size());
- for (int i=0; i<expectedComponents.size(); i++)
- {
- ModelObject expected = expectedComponents.get(i);
- ModelObject actual = actualComponents.get(i);
- assertEquals(expected.getClass(), actual.getClass());
-
- if (expected instanceof Application)
- {
- compareApplication((Application) expected, (Application) actual);
- }
- else if (expected instanceof PageBody)
- {
- assertTrue(actual instanceof PageBody);
- }
- else if (expected instanceof Container)
- {
- compareContainer((Container) expected, (Container) actual);
- }
- }
- }
-
- protected void compareContainer(Container expected, Container actual)
- {
- assertNull(actual.getStorageId());
- assertNull(actual.getStorageName());
- assertEquals(expected.getId(), actual.getId());
- assertEquals(expected.getName(), actual.getName());
- assertEquals(expected.getIcon(), actual.getIcon());
- assertEquals(expected.getTemplate(), actual.getTemplate());
- assertEquals(expected.getFactoryId(), actual.getFactoryId());
- assertEquals(expected.getTitle(), actual.getTitle());
- assertEquals(expected.getDescription(), actual.getDescription());
- assertEquals(expected.getWidth(), actual.getWidth());
- assertEquals(expected.getHeight(), actual.getHeight());
- assertEquals(Arrays.asList(expected.getAccessPermissions()), Arrays.asList(actual.getAccessPermissions()));
-
- compareComponents(expected.getChildren(), actual.getChildren());
- }
-
- protected void compareApplication(Application expected, Application actual)
- {
- assertNull(actual.getStorageId());
- assertNull(actual.getStorageName());
- assertEquals(expected.getType(), actual.getType());
- if (expected.getState() == null)
- {
- assertNull(actual.getState());
- }
- else
- {
- assertNotNull(actual.getState());
- compareApplicationState(expected.getState(), actual.getState());
- }
-
- assertNull(actual.getStorageId());
- assertNull(actual.getStorageName());
- assertNull(actual.getId());
- assertEquals(expected.getTitle(), actual.getTitle());
- assertEquals(expected.getIcon(), actual.getIcon());
- assertEquals(expected.getDescription(), actual.getDescription());
- assertEquals(expected.getShowInfoBar(), actual.getShowInfoBar());
- assertEquals(expected.getShowApplicationState(), actual.getShowApplicationState());
- assertEquals(expected.getShowApplicationMode(), actual.getShowApplicationMode());
- assertEquals(expected.getTheme(), actual.getTheme());
- assertEquals(expected.getWidth(), actual.getWidth());
- assertEquals(expected.getHeight(), actual.getHeight());
- assertEquals(expected.getProperties(), actual.getProperties());
- assertEquals(Arrays.asList(expected.getAccessPermissions()), Arrays.asList(actual.getAccessPermissions()));
- }
-
- protected void compareApplicationState(ApplicationState expected, ApplicationState actual)
- {
- assertEquals(expected.getClass(), actual.getClass());
- if (expected instanceof TransientApplicationState)
- {
- TransientApplicationState expectedTas = (TransientApplicationState) expected;
- TransientApplicationState actualTas = (TransientApplicationState) actual;
- assertEquals(expectedTas.getContentId(), actualTas.getContentId());
- assertNull(actualTas.getOwnerType());
- assertNull(actualTas.getOwnerId());
- assertNull(actualTas.getUniqueId());
- if (expectedTas.getContentState() == null)
- {
- assertNull(actualTas.getContentState());
- }
- else
- {
- assertEquals(expectedTas.getContentState().getClass(), actualTas.getContentState().getClass());
- if (expectedTas.getContentState() instanceof Portlet)
- {
- comparePortlet((Portlet) expectedTas.getContentState(), (Portlet) actualTas.getContentState());
- }
- else if (expectedTas.getContentState() instanceof Gadget)
- {
- compareGadget((Gadget) expectedTas.getContentState(), (Gadget) actualTas.getContentState());
- }
- }
- }
- }
-
- protected void comparePortlet(Portlet expected, Portlet actual)
- {
- for (Preference expectedPref : expected)
- {
- Preference actualPref = actual.getPreference(expectedPref.getName());
- assertNotNull(actualPref);
- assertEquals(expectedPref.getName(), actualPref.getName());
- assertEquals(expectedPref.getValues(), actualPref.getValues());
- assertEquals(expectedPref.isReadOnly(), actualPref.isReadOnly());
- }
- }
-
- private void compareGadget(Gadget expected, Gadget actual)
- {
- assertNotNull(expected);
- assertNotNull(actual);
- // When gadget user prefs are supported in gatein_objects, uncomment.
- //assertEquals(expected.getUserPref(), actual.getUserPref());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java (from rev 6960, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/AbstractMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,169 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import junit.framework.TestCase;
+import org.exoplatform.portal.config.model.Application;
+import org.exoplatform.portal.config.model.ApplicationState;
+import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.PageBody;
+import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.pom.data.ApplicationData;
+import org.exoplatform.portal.pom.data.ContainerData;
+import org.exoplatform.portal.pom.spi.gadget.Gadget;
+import org.exoplatform.portal.pom.spi.portlet.Portlet;
+import org.exoplatform.portal.pom.spi.portlet.Preference;
+
+import java.util.Arrays;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class AbstractMarshallerTest extends TestCase
+{
+ protected void compareComponents(List<ModelObject> expectedComponents, List<ModelObject> actualComponents)
+ {
+ assertEquals(expectedComponents.size(), actualComponents.size());
+ for (int i=0; i<expectedComponents.size(); i++)
+ {
+ ModelObject expected = expectedComponents.get(i);
+ ModelObject actual = actualComponents.get(i);
+ assertEquals(expected.getClass(), actual.getClass());
+
+ if (expected instanceof Application)
+ {
+ compareApplication((Application) expected, (Application) actual);
+ }
+ else if (expected instanceof PageBody)
+ {
+ assertTrue(actual instanceof PageBody);
+ }
+ else if (expected instanceof Container)
+ {
+ compareContainer((Container) expected, (Container) actual);
+ }
+ }
+ }
+
+ protected void compareContainer(Container expected, Container actual)
+ {
+ assertNull(actual.getStorageId());
+ assertNull(actual.getStorageName());
+ assertEquals(expected.getId(), actual.getId());
+ assertEquals(expected.getName(), actual.getName());
+ assertEquals(expected.getIcon(), actual.getIcon());
+ assertEquals(expected.getTemplate(), actual.getTemplate());
+ assertEquals(expected.getFactoryId(), actual.getFactoryId());
+ assertEquals(expected.getTitle(), actual.getTitle());
+ assertEquals(expected.getDescription(), actual.getDescription());
+ assertEquals(expected.getWidth(), actual.getWidth());
+ assertEquals(expected.getHeight(), actual.getHeight());
+ assertEquals(Arrays.asList(expected.getAccessPermissions()), Arrays.asList(actual.getAccessPermissions()));
+
+ compareComponents(expected.getChildren(), actual.getChildren());
+ }
+
+ protected void compareApplication(Application expected, Application actual)
+ {
+ assertNull(actual.getStorageId());
+ assertNull(actual.getStorageName());
+ assertEquals(expected.getType(), actual.getType());
+ if (expected.getState() == null)
+ {
+ assertNull(actual.getState());
+ }
+ else
+ {
+ assertNotNull(actual.getState());
+ compareApplicationState(expected.getState(), actual.getState());
+ }
+
+ assertNull(actual.getStorageId());
+ assertNull(actual.getStorageName());
+ assertNull(actual.getId());
+ assertEquals(expected.getTitle(), actual.getTitle());
+ assertEquals(expected.getIcon(), actual.getIcon());
+ assertEquals(expected.getDescription(), actual.getDescription());
+ assertEquals(expected.getShowInfoBar(), actual.getShowInfoBar());
+ assertEquals(expected.getShowApplicationState(), actual.getShowApplicationState());
+ assertEquals(expected.getShowApplicationMode(), actual.getShowApplicationMode());
+ assertEquals(expected.getTheme(), actual.getTheme());
+ assertEquals(expected.getWidth(), actual.getWidth());
+ assertEquals(expected.getHeight(), actual.getHeight());
+ assertEquals(expected.getProperties(), actual.getProperties());
+ assertEquals(Arrays.asList(expected.getAccessPermissions()), Arrays.asList(actual.getAccessPermissions()));
+ }
+
+ protected void compareApplicationState(ApplicationState expected, ApplicationState actual)
+ {
+ assertEquals(expected.getClass(), actual.getClass());
+ if (expected instanceof TransientApplicationState)
+ {
+ TransientApplicationState expectedTas = (TransientApplicationState) expected;
+ TransientApplicationState actualTas = (TransientApplicationState) actual;
+ assertEquals(expectedTas.getContentId(), actualTas.getContentId());
+ assertNull(actualTas.getOwnerType());
+ assertNull(actualTas.getOwnerId());
+ assertNull(actualTas.getUniqueId());
+ if (expectedTas.getContentState() == null)
+ {
+ assertNull(actualTas.getContentState());
+ }
+ else
+ {
+ assertEquals(expectedTas.getContentState().getClass(), actualTas.getContentState().getClass());
+ if (expectedTas.getContentState() instanceof Portlet)
+ {
+ comparePortlet((Portlet) expectedTas.getContentState(), (Portlet) actualTas.getContentState());
+ }
+ else if (expectedTas.getContentState() instanceof Gadget)
+ {
+ compareGadget((Gadget) expectedTas.getContentState(), (Gadget) actualTas.getContentState());
+ }
+ }
+ }
+ }
+
+ protected void comparePortlet(Portlet expected, Portlet actual)
+ {
+ for (Preference expectedPref : expected)
+ {
+ Preference actualPref = actual.getPreference(expectedPref.getName());
+ assertNotNull(actualPref);
+ assertEquals(expectedPref.getName(), actualPref.getName());
+ assertEquals(expectedPref.getValues(), actualPref.getValues());
+ assertEquals(expectedPref.isReadOnly(), actualPref.isReadOnly());
+ }
+ }
+
+ private void compareGadget(Gadget expected, Gadget actual)
+ {
+ assertNotNull(expected);
+ assertNotNull(actual);
+ // When gadget user prefs are supported in gatein_objects, uncomment.
+ //assertEquals(expected.getUserPref(), actual.getUserPref());
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,323 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import junit.framework.TestCase;
-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.config.model.PageNode;
-import org.exoplatform.portal.mop.Visibility;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.Calendar;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Locale;
-import java.util.TimeZone;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class NavigationMarshallerTest extends TestCase
-{
- public void testNavigationUnmarshalling()
- {
- NavigationMarshaller marshaller = new NavigationMarshaller();
- PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation.xml"));
- assertNotNull(data);
- assertEquals(111, data.getPriority());
- assertNotNull(data.getFragment());
- assertEquals(7, data.getFragment().getNodes().size());
- PageNode node = data.getFragment().getNodes().get(0);
- verifyNode(node, "home", "#{portal.classic.home}", "home", Visibility.DISPLAYED, "portal::classic::homepage", null, null, null, 1);
- node = node.getNodes().get(0);
- Date start = createDate(2011, 1, 10, 12, 13, 55);
- Date end = createDate(2011, 1, 17, 17, 14, 0);
- verifyNode(node, "home-1", "Home 1", "home/home-1", Visibility.TEMPORAL, null, start, end, "StarAward", 1);
- node = node.getNodes().get(0);
- verifyNode(node, "empty", "Empty", "home/home-1/empty", Visibility.HIDDEN, "portal::classic::empty-page", null, null, null, 0);
-
- node = data.getFragment().getNodes().get(5);
- verifyNode(node, "notfound", "NotFound", "notfound", Visibility.SYSTEM, null, null, null, null, 0);
-
- node = data.getFragment().getNodes().get(6);
- verifyNode(node, "n0", "n0", "n0", Visibility.DISPLAYED, "portal::classic::n0", null, null, null, 1);
- node = node.getNodes().get(0);
- verifyNode(node, "n0", "n0", "n0/n0", Visibility.DISPLAYED, "portal::classic::n0_n0", null, null, null, 10);
- for (int i=0; i<10; i++)
- {
- String name = "n" + i;
- String uri = "n0/n0/n" + i;
- String pageref = uri.replace("/", "_");
-
- PageNode child = node.getNodes().get(i);
- verifyNode(child, name, name, uri, Visibility.DISPLAYED, "portal::classic::" + pageref, null, null, null, 0);
- }
- }
-
- public void testEmptyNavigationUnmarshalling()
- {
- NavigationMarshaller marshaller = new NavigationMarshaller();
- PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation-empty.xml"));
- assertNotNull(data);
- assertEquals(3, data.getPriority());
- assertNotNull(data.getFragment().getNodes());
- assertTrue(data.getFragment().getNodes().isEmpty());
- }
-
- public void testFragmentedNavigationUnmarshalling()
- {
- NavigationMarshaller marshaller = new NavigationMarshaller();
- PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation-fragment.xml"));
- assertNotNull(data);
- assertNotNull(data.getFragments());
- assertEquals(2, data.getFragments().size());
-
- NavigationFragment fragment = data.getFragments().get(0);
- assertNotNull(fragment);
- assertEquals("home", fragment.getParentURI());
- assertNotNull(fragment.getNodes());
- assertEquals(1, fragment.getNodes().size());
- PageNode node = fragment.getNode("home-1");
- assertNotNull(node);
- assertNotNull(node.getNodes());
- assertEquals(2, node.getNodes().size());
- assertNotNull(node.getNode("home-1-1"));
- assertNotNull(node.getNode("home-1-2"));
-
- fragment = data.getFragments().get(1);
- assertNotNull(fragment);
- assertEquals("foo-bar", fragment.getParentURI());
- assertNotNull(fragment.getNodes());
- assertEquals(2, fragment.getNodes().size());
- assertNotNull(fragment.getNode("foo"));
- assertNotNull(fragment.getNode("bar"));
- }
-
- public void testLocaleNavigationUnmarshalling()
- {
- NavigationMarshaller marshaller = new NavigationMarshaller();
- PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation-extended.xml"));
- assertNotNull(data);
- assertNotNull(data.getFragment().getNodes());
-
- PageNode node = data.getFragment().getNode("hello-node");
- assertNotNull(node);
- assertNotNull(node.getLabels());
- assertEquals(8, node.getLabels().size());
-
- Locale locale = Locale.getDefault();
-
- String cn = "Dobrý den";
- String fr = "Bonjour";
- String en = "Hello";
- String es = "Hola";
- String ja = "こんにちは";
- String it = "Ciào";
- String zh = "你好";
- String zh_tw = "Li-ho";
-
- assertEquals(cn, node.getLabels().getExtended(locale).get(new Locale("cn")));
- assertEquals(fr, node.getLabels().getExtended(locale).get(new Locale("fr")));
- assertEquals(en, node.getLabels().getExtended(locale).get(new Locale("en")));
- assertEquals(es, node.getLabels().getExtended(locale).get(new Locale("es")));
- assertEquals(ja, node.getLabels().getExtended(locale).get(new Locale("ja")));
- assertEquals(it, node.getLabels().getExtended(locale).get(new Locale("it")));
- assertEquals(zh, node.getLabels().getExtended(locale).get(new Locale("zh")));
- assertEquals(zh_tw, node.getLabels().getExtended(locale).get(Locale.TAIWAN));
-
- node = data.getFragment().getNode("hello-node2");
- assertNotNull(node);
- assertNotNull(node.getLabels());
- assertEquals(8, node.getLabels().size());
-
- assertEquals(cn, node.getLabels().getExtended(locale).get(new Locale("cn")));
- assertEquals(fr, node.getLabels().getExtended(locale).get(new Locale("fr")));
- assertEquals(en, node.getLabels().getExtended(locale).get(new Locale("en")));
- assertEquals(es, node.getLabels().getExtended(locale).get(new Locale("es")));
- assertEquals(ja, node.getLabels().getExtended(locale).get(new Locale("ja")));
- assertEquals(it, node.getLabels().getExtended(locale).get(new Locale("it")));
- assertEquals(zh, node.getLabels().getExtended(locale).get(new Locale("zh")));
- assertEquals(zh_tw, node.getLabels().getExtended(locale).get(Locale.TAIWAN));
- }
-
- public void testNavigationMarshalling()
- {
- Calendar startCal = Calendar.getInstance();
- startCal.set(Calendar.MILLISECOND, 0);
- Date start = startCal.getTime();
- Calendar endCal = Calendar.getInstance();
- endCal.set(Calendar.MILLISECOND, 0);
- Date end = endCal.getTime();
-
- PageNode expectedChild1 = newPageNode("node-1", "Icon-1", "Node 1",
- null, null, Visibility.DISPLAYED, null, new ArrayList<PageNode>());
-
- I18NString labels = new I18NString(
- new LocalizedString("Node 2", Locale.ENGLISH),
- new LocalizedString("Node 2", Locale.FRENCH),
- new LocalizedString("Node 2", Locale.TAIWAN));
-
- PageNode expectedChild2 = newPageNode("node-2", "Icon-2", labels,
- createDate(2011, 7, 22, 10, 10, 10), createDate(2011, 7, 30, 12, 0, 0), Visibility.SYSTEM, "some:page:ref", new ArrayList<PageNode>());
-
- ArrayList<PageNode> children = new ArrayList<PageNode>(2);
- children.add(expectedChild1);
- children.add(expectedChild2);
-
- PageNode expectedNode = newPageNode("node", "Icon", "Node", start, end, Visibility.HIDDEN, "page-ref", children);
-
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- NavigationMarshaller marshaller = new NavigationMarshaller();
- PageNavigation expected = newPageNavigation("", "", 123, new ArrayList<PageNode>(Collections.singletonList(expectedNode)));
- marshaller.marshal(expected, baos);
-
- PageNavigation actual = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
-
- assertNotNull(actual);
- assertNull(actual.getOwnerType());
- assertNull(actual.getOwnerId());
- assertEquals(expected.getPriority(), actual.getPriority());
- assertNotNull(expected.getFragment().getNodes());
- assertEquals(expected.getFragment().getNodes().size(), actual.getFragment().getNodes().size());
-
- PageNode actualNode = actual.getFragment().getNodes().get(0);
- compareNode(expectedNode, actualNode);
-
- assertNotNull(actualNode.getNodes());
- assertEquals(expectedNode.getNodes().size(), actualNode.getNodes().size());
- compareNode(expectedChild1, actualNode.getNodes().get(0));
- compareNode(expectedChild2, actualNode.getNodes().get(1));
- }
-
- private PageNavigation newPageNavigation(String ownerType, String ownerId, int priority, ArrayList<PageNode> children)
- {
- PageNavigation pageNavigation = new PageNavigation();
- pageNavigation.setOwnerType(ownerType);
- pageNavigation.setOwnerId(ownerId);
- pageNavigation.setPriority(priority);
- NavigationFragment fragment = new NavigationFragment();
- fragment.setNodes(children);
- pageNavigation.addFragment(fragment);
-
- return pageNavigation;
- }
-
- private void verifyNode(PageNode node, String name, String label, String uri, Visibility visibility,
- String pageRef, Date start, Date end, String icon, int children)
- {
- assertNotNull(node);
- assertEquals(name, node.getName());
- assertEquals(label, node.getLabel());
- assertEquals(visibility, node.getVisibility());
- assertEquals(pageRef, node.getPageReference());
- assertEquals(start, node.getStartPublicationDate());
- assertEquals(end, node.getEndPublicationDate());
- assertEquals(icon, node.getIcon());
- assertNotNull(node.getNodes());
- assertEquals(children, node.getNodes().size());
- }
-
- private void compareNode(PageNode expected, PageNode actual)
- {
- if (expected.getLabel() != null)
- {
- assertEquals(expected.getLabel(), actual.getLabel());
- }
- else if (expected.getLabels() != null)
- {
- assertNotNull(actual.getLabels());
- assertEquals(actual.getLabels().size(), expected.getLabels().size());
-
- for (int i=0; i<actual.getLabels().size(); i++)
- {
- LocalizedString actualLocalizedString = expected.getLabels().get(i);
- LocalizedString expectedLocalizedString = expected.getLabels().get(i);
- assertEquals(actualLocalizedString.getValue(), expectedLocalizedString.getValue());
- assertEquals(actualLocalizedString.getLang(), expectedLocalizedString.getLang());
- }
- }
- else
- {
- assertNull(actual.getLabel());
- assertNull(actual.getLabels());
- }
-
- assertEquals(expected.getIcon(), actual.getIcon());
- assertEquals(expected.getName(), actual.getName());
- assertEquals(expected.getStartPublicationDate(), actual.getStartPublicationDate());
- assertEquals(expected.getEndPublicationDate(), actual.getEndPublicationDate());
- assertEquals(expected.getVisibility(), actual.getVisibility());
- assertEquals(expected.getPageReference(), actual.getPageReference());
- assertEquals(expected.getNodes().size(), actual.getNodes().size());
- }
-
- private Date createDate(int year, int month, int day, int hour, int minute, int seconds)
- {
- Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("US/Eastern"));
- cal.set(Calendar.YEAR, year);
- cal.set(Calendar.MONTH, month-1);
- cal.set(Calendar.DAY_OF_MONTH, day);
- cal.set(Calendar.HOUR_OF_DAY, hour);
- cal.set(Calendar.MINUTE, minute);
- cal.set(Calendar.SECOND, seconds);
- cal.set(Calendar.MILLISECOND, 0);
-
- return cal.getTime();
- }
-
- private PageNode newPageNode(String name, String icon, String label, Date start, Date end, Visibility visibility, String pageref, ArrayList<PageNode> pageNodes)
- {
- PageNode pageNode = new PageNode();
- pageNode.setName(name);
- pageNode.setIcon(icon);
- pageNode.setLabel(label);
- pageNode.setStartPublicationDate(start);
- pageNode.setEndPublicationDate(end);
- pageNode.setVisibility(visibility);
- pageNode.setPageReference(pageref);
- pageNode.setChildren(pageNodes);
-
- return pageNode;
- }
-
- private PageNode newPageNode(String name, String icon, I18NString labels, Date start, Date end, Visibility visibility, String pageref, ArrayList<PageNode> pageNodes)
- {
- PageNode pageNode = new PageNode();
- pageNode.setName(name);
- pageNode.setIcon(icon);
- pageNode.setLabels(labels);
- pageNode.setStartPublicationDate(start);
- pageNode.setEndPublicationDate(end);
- pageNode.setVisibility(visibility);
- pageNode.setPageReference(pageref);
- pageNode.setChildren(pageNodes);
-
- return pageNode;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java (from rev 6960, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,323 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import junit.framework.TestCase;
+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.config.model.PageNode;
+import org.exoplatform.portal.mop.Visibility;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Collections;
+import java.util.Date;
+import java.util.Locale;
+import java.util.TimeZone;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class NavigationMarshallerTest extends TestCase
+{
+ public void testNavigationUnmarshalling()
+ {
+ NavigationMarshaller marshaller = new NavigationMarshaller();
+ PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation.xml"));
+ assertNotNull(data);
+ assertEquals(111, data.getPriority());
+ assertNotNull(data.getFragment());
+ assertEquals(7, data.getFragment().getNodes().size());
+ PageNode node = data.getFragment().getNodes().get(0);
+ verifyNode(node, "home", "#{portal.classic.home}", "home", Visibility.DISPLAYED, "portal::classic::homepage", null, null, null, 1);
+ node = node.getNodes().get(0);
+ Date start = createDate(2011, 1, 10, 12, 13, 55);
+ Date end = createDate(2011, 1, 17, 17, 14, 0);
+ verifyNode(node, "home-1", "Home 1", "home/home-1", Visibility.TEMPORAL, null, start, end, "StarAward", 1);
+ node = node.getNodes().get(0);
+ verifyNode(node, "empty", "Empty", "home/home-1/empty", Visibility.HIDDEN, "portal::classic::empty-page", null, null, null, 0);
+
+ node = data.getFragment().getNodes().get(5);
+ verifyNode(node, "notfound", "NotFound", "notfound", Visibility.SYSTEM, null, null, null, null, 0);
+
+ node = data.getFragment().getNodes().get(6);
+ verifyNode(node, "n0", "n0", "n0", Visibility.DISPLAYED, "portal::classic::n0", null, null, null, 1);
+ node = node.getNodes().get(0);
+ verifyNode(node, "n0", "n0", "n0/n0", Visibility.DISPLAYED, "portal::classic::n0_n0", null, null, null, 10);
+ for (int i=0; i<10; i++)
+ {
+ String name = "n" + i;
+ String uri = "n0/n0/n" + i;
+ String pageref = uri.replace("/", "_");
+
+ PageNode child = node.getNodes().get(i);
+ verifyNode(child, name, name, uri, Visibility.DISPLAYED, "portal::classic::" + pageref, null, null, null, 0);
+ }
+ }
+
+ public void testEmptyNavigationUnmarshalling()
+ {
+ NavigationMarshaller marshaller = new NavigationMarshaller();
+ PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation-empty.xml"));
+ assertNotNull(data);
+ assertEquals(3, data.getPriority());
+ assertNotNull(data.getFragment().getNodes());
+ assertTrue(data.getFragment().getNodes().isEmpty());
+ }
+
+ public void testFragmentedNavigationUnmarshalling()
+ {
+ NavigationMarshaller marshaller = new NavigationMarshaller();
+ PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation-fragment.xml"));
+ assertNotNull(data);
+ assertNotNull(data.getFragments());
+ assertEquals(2, data.getFragments().size());
+
+ NavigationFragment fragment = data.getFragments().get(0);
+ assertNotNull(fragment);
+ assertEquals("home", fragment.getParentURI());
+ assertNotNull(fragment.getNodes());
+ assertEquals(1, fragment.getNodes().size());
+ PageNode node = fragment.getNode("home-1");
+ assertNotNull(node);
+ assertNotNull(node.getNodes());
+ assertEquals(2, node.getNodes().size());
+ assertNotNull(node.getNode("home-1-1"));
+ assertNotNull(node.getNode("home-1-2"));
+
+ fragment = data.getFragments().get(1);
+ assertNotNull(fragment);
+ assertEquals("foo-bar", fragment.getParentURI());
+ assertNotNull(fragment.getNodes());
+ assertEquals(2, fragment.getNodes().size());
+ assertNotNull(fragment.getNode("foo"));
+ assertNotNull(fragment.getNode("bar"));
+ }
+
+ public void testLocaleNavigationUnmarshalling()
+ {
+ NavigationMarshaller marshaller = new NavigationMarshaller();
+ PageNavigation data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/navigation-extended.xml"));
+ assertNotNull(data);
+ assertNotNull(data.getFragment().getNodes());
+
+ PageNode node = data.getFragment().getNode("hello-node");
+ assertNotNull(node);
+ assertNotNull(node.getLabels());
+ assertEquals(8, node.getLabels().size());
+
+ Locale locale = Locale.getDefault();
+
+ String cn = "Dobrý den";
+ String fr = "Bonjour";
+ String en = "Hello";
+ String es = "Hola";
+ String ja = "こんにちは";
+ String it = "Ciào";
+ String zh = "你好";
+ String zh_tw = "Li-ho";
+
+ assertEquals(cn, node.getLabels().getExtended(locale).get(new Locale("cn")));
+ assertEquals(fr, node.getLabels().getExtended(locale).get(new Locale("fr")));
+ assertEquals(en, node.getLabels().getExtended(locale).get(new Locale("en")));
+ assertEquals(es, node.getLabels().getExtended(locale).get(new Locale("es")));
+ assertEquals(ja, node.getLabels().getExtended(locale).get(new Locale("ja")));
+ assertEquals(it, node.getLabels().getExtended(locale).get(new Locale("it")));
+ assertEquals(zh, node.getLabels().getExtended(locale).get(new Locale("zh")));
+ assertEquals(zh_tw, node.getLabels().getExtended(locale).get(Locale.TAIWAN));
+
+ node = data.getFragment().getNode("hello-node2");
+ assertNotNull(node);
+ assertNotNull(node.getLabels());
+ assertEquals(8, node.getLabels().size());
+
+ assertEquals(cn, node.getLabels().getExtended(locale).get(new Locale("cn")));
+ assertEquals(fr, node.getLabels().getExtended(locale).get(new Locale("fr")));
+ assertEquals(en, node.getLabels().getExtended(locale).get(new Locale("en")));
+ assertEquals(es, node.getLabels().getExtended(locale).get(new Locale("es")));
+ assertEquals(ja, node.getLabels().getExtended(locale).get(new Locale("ja")));
+ assertEquals(it, node.getLabels().getExtended(locale).get(new Locale("it")));
+ assertEquals(zh, node.getLabels().getExtended(locale).get(new Locale("zh")));
+ assertEquals(zh_tw, node.getLabels().getExtended(locale).get(Locale.TAIWAN));
+ }
+
+ public void testNavigationMarshalling()
+ {
+ Calendar startCal = Calendar.getInstance();
+ startCal.set(Calendar.MILLISECOND, 0);
+ Date start = startCal.getTime();
+ Calendar endCal = Calendar.getInstance();
+ endCal.set(Calendar.MILLISECOND, 0);
+ Date end = endCal.getTime();
+
+ PageNode expectedChild1 = newPageNode("node-1", "Icon-1", "Node 1",
+ null, null, Visibility.DISPLAYED, null, new ArrayList<PageNode>());
+
+ I18NString labels = new I18NString(
+ new LocalizedString("Node 2", Locale.ENGLISH),
+ new LocalizedString("Node 2", Locale.FRENCH),
+ new LocalizedString("Node 2", Locale.TAIWAN));
+
+ PageNode expectedChild2 = newPageNode("node-2", "Icon-2", labels,
+ createDate(2011, 7, 22, 10, 10, 10), createDate(2011, 7, 30, 12, 0, 0), Visibility.SYSTEM, "some:page:ref", new ArrayList<PageNode>());
+
+ ArrayList<PageNode> children = new ArrayList<PageNode>(2);
+ children.add(expectedChild1);
+ children.add(expectedChild2);
+
+ PageNode expectedNode = newPageNode("node", "Icon", "Node", start, end, Visibility.HIDDEN, "page-ref", children);
+
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ NavigationMarshaller marshaller = new NavigationMarshaller();
+ PageNavigation expected = newPageNavigation("", "", 123, new ArrayList<PageNode>(Collections.singletonList(expectedNode)));
+ marshaller.marshal(expected, baos);
+
+ PageNavigation actual = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
+
+ assertNotNull(actual);
+ assertNull(actual.getOwnerType());
+ assertNull(actual.getOwnerId());
+ assertEquals(expected.getPriority(), actual.getPriority());
+ assertNotNull(expected.getFragment().getNodes());
+ assertEquals(expected.getFragment().getNodes().size(), actual.getFragment().getNodes().size());
+
+ PageNode actualNode = actual.getFragment().getNodes().get(0);
+ compareNode(expectedNode, actualNode);
+
+ assertNotNull(actualNode.getNodes());
+ assertEquals(expectedNode.getNodes().size(), actualNode.getNodes().size());
+ compareNode(expectedChild1, actualNode.getNodes().get(0));
+ compareNode(expectedChild2, actualNode.getNodes().get(1));
+ }
+
+ private PageNavigation newPageNavigation(String ownerType, String ownerId, int priority, ArrayList<PageNode> children)
+ {
+ PageNavigation pageNavigation = new PageNavigation();
+ pageNavigation.setOwnerType(ownerType);
+ pageNavigation.setOwnerId(ownerId);
+ pageNavigation.setPriority(priority);
+ NavigationFragment fragment = new NavigationFragment();
+ fragment.setNodes(children);
+ pageNavigation.addFragment(fragment);
+
+ return pageNavigation;
+ }
+
+ private void verifyNode(PageNode node, String name, String label, String uri, Visibility visibility,
+ String pageRef, Date start, Date end, String icon, int children)
+ {
+ assertNotNull(node);
+ assertEquals(name, node.getName());
+ assertEquals(label, node.getLabel());
+ assertEquals(visibility, node.getVisibility());
+ assertEquals(pageRef, node.getPageReference());
+ assertEquals(start, node.getStartPublicationDate());
+ assertEquals(end, node.getEndPublicationDate());
+ assertEquals(icon, node.getIcon());
+ assertNotNull(node.getNodes());
+ assertEquals(children, node.getNodes().size());
+ }
+
+ private void compareNode(PageNode expected, PageNode actual)
+ {
+ if (expected.getLabel() != null)
+ {
+ assertEquals(expected.getLabel(), actual.getLabel());
+ }
+ else if (expected.getLabels() != null)
+ {
+ assertNotNull(actual.getLabels());
+ assertEquals(actual.getLabels().size(), expected.getLabels().size());
+
+ for (int i=0; i<actual.getLabels().size(); i++)
+ {
+ LocalizedString actualLocalizedString = expected.getLabels().get(i);
+ LocalizedString expectedLocalizedString = expected.getLabels().get(i);
+ assertEquals(actualLocalizedString.getValue(), expectedLocalizedString.getValue());
+ assertEquals(actualLocalizedString.getLang(), expectedLocalizedString.getLang());
+ }
+ }
+ else
+ {
+ assertNull(actual.getLabel());
+ assertNull(actual.getLabels());
+ }
+
+ assertEquals(expected.getIcon(), actual.getIcon());
+ assertEquals(expected.getName(), actual.getName());
+ assertEquals(expected.getStartPublicationDate(), actual.getStartPublicationDate());
+ assertEquals(expected.getEndPublicationDate(), actual.getEndPublicationDate());
+ assertEquals(expected.getVisibility(), actual.getVisibility());
+ assertEquals(expected.getPageReference(), actual.getPageReference());
+ assertEquals(expected.getNodes().size(), actual.getNodes().size());
+ }
+
+ private Date createDate(int year, int month, int day, int hour, int minute, int seconds)
+ {
+ Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("US/Eastern"));
+ cal.set(Calendar.YEAR, year);
+ cal.set(Calendar.MONTH, month-1);
+ cal.set(Calendar.DAY_OF_MONTH, day);
+ cal.set(Calendar.HOUR_OF_DAY, hour);
+ cal.set(Calendar.MINUTE, minute);
+ cal.set(Calendar.SECOND, seconds);
+ cal.set(Calendar.MILLISECOND, 0);
+
+ return cal.getTime();
+ }
+
+ private PageNode newPageNode(String name, String icon, String label, Date start, Date end, Visibility visibility, String pageref, ArrayList<PageNode> pageNodes)
+ {
+ PageNode pageNode = new PageNode();
+ pageNode.setName(name);
+ pageNode.setIcon(icon);
+ pageNode.setLabel(label);
+ pageNode.setStartPublicationDate(start);
+ pageNode.setEndPublicationDate(end);
+ pageNode.setVisibility(visibility);
+ pageNode.setPageReference(pageref);
+ pageNode.setChildren(pageNodes);
+
+ return pageNode;
+ }
+
+ private PageNode newPageNode(String name, String icon, I18NString labels, Date start, Date end, Visibility visibility, String pageref, ArrayList<PageNode> pageNodes)
+ {
+ PageNode pageNode = new PageNode();
+ pageNode.setName(name);
+ pageNode.setIcon(icon);
+ pageNode.setLabels(labels);
+ pageNode.setStartPublicationDate(start);
+ pageNode.setEndPublicationDate(end);
+ pageNode.setVisibility(visibility);
+ pageNode.setPageReference(pageref);
+ pageNode.setChildren(pageNodes);
+
+ return pageNode;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,441 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationState;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.TransientApplicationState;
-import org.exoplatform.portal.pom.config.Utils;
-import org.exoplatform.portal.pom.data.ApplicationData;
-import org.exoplatform.portal.pom.data.ComponentData;
-import org.exoplatform.portal.pom.data.ContainerData;
-import org.exoplatform.portal.pom.data.PageData;
-import org.exoplatform.portal.pom.spi.gadget.Gadget;
-import org.exoplatform.portal.pom.spi.portlet.Portlet;
-import org.exoplatform.portal.pom.spi.portlet.Preference;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageMarshallerTest extends AbstractMarshallerTest
-{
- public void testHomePageUnMarshalling()
- {
- PageMarshaller marshaller = new PageMarshaller();
- Page.PageSet pages = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/pages-homepage.xml"));
- assertNotNull(pages);
- assertNotNull(pages.getPages());
- assertEquals(1, pages.getPages().size());
- Page page = pages.getPages().get(0);
-
- assertEquals("homepage", page.getName());
- assertEquals("Home Page", page.getTitle());
- assertEquals("Everyone", Utils.join(";", page.getAccessPermissions()));
- assertEquals("*:/platform/administrators", page.getEditPermission());
- assertNotNull(page.getChildren());
- assertEquals(1, page.getChildren().size());
- ModelObject child = page.getChildren().get(0);
- assertTrue(child instanceof Application);
- @SuppressWarnings("unchecked")
- Application<Portlet> application = (Application<Portlet>) child;
- assertTrue(application.getType() == ApplicationType.PORTLET);
- ApplicationState<Portlet> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
- assertEquals("web/HomePagePortlet", tas.getContentId());
- Portlet portlet = tas.getContentState();
- int count = 0;
- for (Preference pref : portlet)
- {
- count++;
- }
- assertEquals(1, count);
- Preference pref = portlet.getPreference("template");
- assertNotNull(pref);
- assertEquals("template", pref.getName());
- assertEquals("system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl", pref.getValue());
- assertFalse(pref.isReadOnly());
-
- assertNull(application.getTheme());
- assertEquals("Home Page portlet", application.getTitle());
- assertEquals("Everyone", Utils.join(";", application.getAccessPermissions()));
- assertFalse(application.getShowInfoBar());
- assertFalse(application.getShowApplicationState());
- assertFalse(application.getShowApplicationMode());
- assertNull(application.getDescription());
- assertNull(application.getIcon());
- assertNull(application.getWidth());
- assertNull(application.getHeight());
- }
-
- public void testLoadedPageUnmarshalling()
- {
- PageMarshaller marshaller = new PageMarshaller();
- Page.PageSet pages = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/pages-loaded.xml"));
- assertNotNull(pages);
- assertNotNull(pages.getPages());
- assertEquals(1, pages.getPages().size());
- Page page = pages.getPages().get(0);
-
- // Verify page properties
- assertEquals("loaded-page", page.getName());
- assertEquals("Loaded Page", page.getTitle());
- assertEquals("manager:/platform/administrators;manager:/platform/users", Utils.join(";", page.getAccessPermissions()));
- assertEquals("*:/platform/administrators", page.getEditPermission());
-
- // Verify page children
- assertNotNull(page.getChildren());
- assertEquals(1, page.getChildren().size());
- ModelObject child = page.getChildren().get(0);
- assertTrue(child instanceof Container);
-
- // Verify root container
- Container rootContainer = (Container) child;
- assertEquals("rootContainer", rootContainer.getId());
- assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", rootContainer.getTemplate());
- assertEquals("Everyone", Utils.join(";", rootContainer.getAccessPermissions()));
-
- // Verify root container children
- List<ModelObject> rootChildren = rootContainer.getChildren();
- assertNotNull(rootChildren);
- assertEquals(3, rootChildren.size());
-
- // Verify container 1
- ModelObject c1 = rootChildren.get(0);
- assertNotNull(c1);
- assertTrue(c1 instanceof ModelObject);
- Container container1 = (Container) c1;
- assertEquals("c1", container1.getId());
- assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", container1.getTemplate());
- assertEquals("*:/platform/users", Utils.join(";", container1.getAccessPermissions()));
- {
- // Verify homepage application
- assertNotNull(container1.getChildren());
- assertEquals(1, container1.getChildren().size());
- ModelObject homeComponent = container1.getChildren().get(0);
- assertTrue(homeComponent instanceof Application);
- @SuppressWarnings("unchecked")
- Application<Portlet> application = (Application<Portlet>) homeComponent;
- assertTrue(application.getType() == ApplicationType.PORTLET);
- ApplicationState<Portlet> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
- assertEquals("web/HomePagePortlet", tas.getContentId());
- Portlet portlet = tas.getContentState();
- int count = 0;
- for (Preference pref : portlet)
- {
- count++;
- }
- assertEquals(3, count);
- Preference pref = portlet.getPreference("template");
- assertNotNull(pref);
- assertEquals("template", pref.getName());
- assertEquals("system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl", pref.getValue());
- assertTrue(pref.isReadOnly());
-
- pref = portlet.getPreference("empty-preference-value");
- assertNotNull(pref);
- assertEquals("empty-preference-value", pref.getName());
- assertNull(pref.getValue());
- assertFalse(pref.isReadOnly());
-
- pref = portlet.getPreference("no-preference-value");
- assertNotNull(pref);
- assertEquals("no-preference-value", pref.getName());
- assertNull(pref.getValue());
- assertFalse(pref.isReadOnly());
-
- assertEquals("Mac:MacTheme::Default:DefaultTheme::Vista:VistaTheme", application.getTheme());
- assertEquals("Home Page portlet", application.getTitle());
- assertEquals("Everyone", Utils.join(";", application.getAccessPermissions()));
- assertTrue(application.getShowInfoBar());
- assertTrue(application.getShowApplicationState());
- assertTrue(application.getShowApplicationMode());
- assertNull(application.getDescription());
- assertNull(application.getIcon());
- assertNull(application.getWidth());
- assertNull(application.getHeight());
- }
-
- // Verify container 2
- ModelObject c2 = rootChildren.get(1);
- assertNotNull(c2);
- assertTrue(c2 instanceof Container);
- Container container2 = (Container) c2;
- assertEquals("c2", container2.getId());
- assertEquals("system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl", container2.getTemplate());
- assertEquals("*:/platform/guests", Utils.join(";", container2.getAccessPermissions()));
- assertEquals("TableColumnContainer", container2.getFactoryId());
- assertNotNull(container2.getChildren());
- assertEquals(2, container2.getChildren().size());
-
- {
- // Verify column 1 of container 2
- ModelObject appregComp = container2.getChildren().get(0);
- assertTrue(appregComp instanceof Container);
- Container appregContainer = (Container) appregComp;
- assertEquals("c2-1", appregContainer.getId());
- assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", appregContainer.getTemplate());
- assertEquals("300px", appregContainer.getWidth());
- assertEquals("400px", appregContainer.getHeight());
- assertEquals("Everyone", Utils.join(";", appregContainer.getAccessPermissions()));
- {
- // Verify app registry application
- assertNotNull(appregContainer.getChildren());
- assertEquals(1, appregContainer.getChildren().size());
- ModelObject appregComponent = appregContainer.getChildren().get(0);
- assertTrue(appregComponent instanceof Application);
- @SuppressWarnings("unchecked")
- Application<Portlet> application = (Application<Portlet>) appregComponent;
- assertTrue(application.getType() == ApplicationType.PORTLET);
- ApplicationState<Portlet> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
- assertEquals("exoadmin/ApplicationRegistryPortlet", tas.getContentId());
- assertNull(tas.getContentState());
-
- assertEquals("Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme", application.getTheme());
- assertEquals("Application Registry", application.getTitle());
- assertEquals("*:/platform/administrators;*:/organization/management/executive-board", Utils.join(";", application.getAccessPermissions()));
- assertFalse(application.getShowInfoBar());
- assertTrue(application.getShowApplicationState());
- assertFalse(application.getShowApplicationMode());
- assertEquals("Application Registry", application.getDescription());
- assertEquals("PortletIcon", application.getIcon());
- assertEquals("250px", application.getWidth());
- assertEquals("350px", application.getHeight());
- }
-
- // Verify column 2 of container 2
- ModelObject orgComp = container2.getChildren().get(1);
- assertTrue(orgComp instanceof Container);
- Container orgContainer = (Container) orgComp;
- assertEquals("c2-2", orgContainer.getId());
- assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", orgContainer.getTemplate());
- assertEquals("200px", orgContainer.getWidth());
- assertEquals("300px", orgContainer.getHeight());
- assertEquals("/platform/users", Utils.join(";", orgContainer.getAccessPermissions()));
- {
- // Verify calendar gadget application
- assertNotNull(orgContainer.getChildren());
- assertEquals(1, orgContainer.getChildren().size());
- ModelObject gadgetComponent = orgContainer.getChildren().get(0);
- assertTrue(gadgetComponent instanceof Application);
- @SuppressWarnings("unchecked")
- Application<Gadget> application = (Application<Gadget>) gadgetComponent;
- assertTrue(application.getType() == ApplicationType.GADGET);
- ApplicationState<Gadget> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Gadget> tas = (TransientApplicationState<Gadget>) state;
- assertEquals("Calendar", tas.getContentId());
- assertNull(tas.getContentState());
-
- assertEquals("Vista:VistaTheme::Mac:MacTheme::Default:DefaultTheme", application.getTheme());
- assertEquals("Calendar Title", application.getTitle());
- assertEquals("*:/platform/administrators;*:/organization/management/executive-board", Utils.join(";", application.getAccessPermissions()));
- assertTrue(application.getShowInfoBar());
- assertFalse(application.getShowApplicationState());
- assertFalse(application.getShowApplicationMode());
- assertEquals("Calendar Description", application.getDescription());
- assertEquals("StarAwardIcon", application.getIcon());
- assertEquals("100px", application.getWidth());
- assertEquals("200px", application.getHeight());
- }
- }
-
- // Verify container 3
- ModelObject c3 = rootChildren.get(2);
- assertNotNull(c3);
- assertTrue(c3 instanceof Container);
- Container container3 = (Container) c3;
- assertEquals("c3", container3.getId());
- assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", container3.getTemplate());
- assertEquals(container3.getTemplate(), "system:/groovy/portal/webui/container/UIContainer.gtmpl");
- assertEquals("Everyone", Utils.join(";", container3.getAccessPermissions()));
- assertNull(container3.getFactoryId());
- {
- // Verify site map application
- assertNotNull(container3.getChildren());
- assertEquals(1, container3.getChildren().size());
- ModelObject sitemapcomponent = container3.getChildren().get(0);
- assertTrue(sitemapcomponent instanceof Application);
- @SuppressWarnings("unchecked")
- Application<Portlet> application = (Application<Portlet>) sitemapcomponent;
- assertTrue(application.getType() == ApplicationType.PORTLET);
- ApplicationState<Portlet> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
- assertEquals("web/SiteMapPortlet", tas.getContentId());
- assertNull(tas.getContentState());
-
- assertEquals("Default:DefaultTheme::Vista:VistaTheme::Mac:MacTheme", application.getTheme());
- assertEquals("SiteMap", application.getTitle());
- assertEquals("*:/platform/users", Utils.join(";", application.getAccessPermissions()));
- assertTrue(application.getShowInfoBar());
- assertTrue(application.getShowApplicationState());
- assertFalse(application.getShowApplicationMode());
- assertEquals("SiteMap", application.getDescription());
- assertNull(application.getIcon());
- assertNull(application.getWidth());
- assertNull(application.getHeight());
- }
- }
-
- public void testEmptyPageUnmarshalling()
- {
- PageMarshaller marshaller = new PageMarshaller();
- Page.PageSet pages = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/pages-empty.xml"));
- assertNotNull(pages);
- assertNotNull(pages.getPages());
- assertEquals(1, pages.getPages().size());
- Page page = pages.getPages().get(0);
- assertNotNull(page);
- assertEquals("empty-page", page.getName());
- assertEquals("Empty", page.getTitle());
- assertNotNull(page.getChildren());
- assertTrue(page.getChildren().isEmpty());
- }
-
- public void testPageMarshalling()
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- Portlet portlet = new Portlet();
- portlet.putPreference(new Preference("pref-1", "value-1", true));
- portlet.putPreference(new Preference("pref-2", "value-2", false));
- portlet.putPreference(new Preference("multi-value-pref", Arrays.asList("one", "two", "three"), false));
- portlet.putPreference(new Preference("empty-value-pref", (String) null, true));
-
- ApplicationState<Portlet> state = new TransientApplicationState<Portlet>("app-ref/portlet-ref", portlet);
- ApplicationData<Portlet> applicationData = new ApplicationData<Portlet>(null, null,
- ApplicationType.PORTLET, state, null, "app-title", "app-icon", "app-description", false, true, false,
- "app-theme", "app-wdith", "app-height", new HashMap<String,String>(),
- Collections.singletonList("app-edit-permissions"));
-
- ContainerData containerData = new ContainerData(null, "cd-id", "cd-name", "cd-icon", "cd-template", "cd-factoryId", "cd-title", "cd-description", "cd-width", "cd-height", Collections.singletonList("cd-access-permissions"), Collections.singletonList((ComponentData) applicationData));
- List<ComponentData> children = Collections.singletonList((ComponentData) containerData);
-
- PageData expectedData = new PageData(null, null, "page-name", null, null, null, "Page Title", null, null, null,
- Collections.singletonList("access-permissions"), children, "", "", "edit-permission", true);
-
- Page expected = new Page(expectedData);
-
- Page.PageSet expectedPages = new Page.PageSet();
- expectedPages.setPages(new ArrayList<Page>(1));
- expectedPages.getPages().add(expected);
-
- PageMarshaller marshaller = new PageMarshaller();
- marshaller.marshal(expectedPages, baos);
-
- //System.out.println(baos.toString());
-
- Page.PageSet actualPages = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
-
- assertNotNull(actualPages);
- assertNotNull(actualPages.getPages());
- assertEquals(1, actualPages.getPages().size());
-
- comparePages(expected, actualPages.getPages().get(0));
- }
-
- public void testPageMarshallingWithGadget()
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- Gadget gadget = null;
- //TODO: Uncomment when gadget user-prefs are supported in gatein_objects
- //Gadget gadget = new Gadget();
- //gadget.setUserPref("user-pref");
-
- ApplicationState<Gadget> state = new TransientApplicationState<Gadget>("gadget-ref", gadget);
- ApplicationData<Gadget> applicationData = new ApplicationData<Gadget>(null, null,
- ApplicationType.GADGET, state, null, "app-title", "app-icon", "app-description", false, true, false,
- "app-theme", "app-wdith", "app-height", new HashMap<String,String>(),
- Collections.singletonList("app-edit-permissions"));
-
- List<ComponentData> children = Collections.singletonList((ComponentData) applicationData);
- PageData expectedData = new PageData(null, null, "page-name", null, null, null, "Page Title", null, null, null,
- Collections.singletonList("access-permissions"), children, "", "", "edit-permission", true);
-
- Page expected = new Page(expectedData);
-
- Page.PageSet expectedPages = new Page.PageSet();
- expectedPages.setPages(new ArrayList<Page>(1));
- expectedPages.getPages().add(expected);
-
- PageMarshaller marshaller = new PageMarshaller();
- marshaller.marshal(expectedPages, baos);
-
- //System.out.println(baos.toString());
-
- Page.PageSet actualPages = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
-
- assertNotNull(actualPages);
- assertNotNull(actualPages.getPages());
- assertEquals(1, actualPages.getPages().size());
-
- comparePages(expected, actualPages.getPages().get(0));
- }
-
- private void comparePages(Page expected, Page actual)
- {
- assertNull(actual.getStorageId());
- assertNull(actual.getStorageName());
- assertNull(actual.getId());
- assertNull(actual.getOwnerType());
- assertNull(actual.getOwnerId());
- assertEquals(expected.getName(), actual.getName());
- assertNull(actual.getIcon());
- assertNull(actual.getTemplate());
- assertNull(actual.getFactoryId());
- assertEquals(expected.getTitle(), actual.getTitle());
- assertNull(actual.getDescription());
- assertNull(actual.getWidth());
- assertNull(actual.getHeight());
- assertEquals(Arrays.asList(expected.getAccessPermissions()), Arrays.asList(actual.getAccessPermissions()));
-
- compareComponents(expected.getChildren(), actual.getChildren());
-
- assertEquals(expected.getEditPermission(), actual.getEditPermission());
- assertEquals(expected.isShowMaxWindow(), actual.isShowMaxWindow());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java (from rev 6960, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/PageMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,441 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.exoplatform.portal.config.model.Application;
+import org.exoplatform.portal.config.model.ApplicationState;
+import org.exoplatform.portal.config.model.ApplicationType;
+import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.pom.config.Utils;
+import org.exoplatform.portal.pom.data.ApplicationData;
+import org.exoplatform.portal.pom.data.ComponentData;
+import org.exoplatform.portal.pom.data.ContainerData;
+import org.exoplatform.portal.pom.data.PageData;
+import org.exoplatform.portal.pom.spi.gadget.Gadget;
+import org.exoplatform.portal.pom.spi.portlet.Portlet;
+import org.exoplatform.portal.pom.spi.portlet.Preference;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageMarshallerTest extends AbstractMarshallerTest
+{
+ public void testHomePageUnMarshalling()
+ {
+ PageMarshaller marshaller = new PageMarshaller();
+ Page.PageSet pages = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/pages-homepage.xml"));
+ assertNotNull(pages);
+ assertNotNull(pages.getPages());
+ assertEquals(1, pages.getPages().size());
+ Page page = pages.getPages().get(0);
+
+ assertEquals("homepage", page.getName());
+ assertEquals("Home Page", page.getTitle());
+ assertEquals("Everyone", Utils.join(";", page.getAccessPermissions()));
+ assertEquals("*:/platform/administrators", page.getEditPermission());
+ assertNotNull(page.getChildren());
+ assertEquals(1, page.getChildren().size());
+ ModelObject child = page.getChildren().get(0);
+ assertTrue(child instanceof Application);
+ @SuppressWarnings("unchecked")
+ Application<Portlet> application = (Application<Portlet>) child;
+ assertTrue(application.getType() == ApplicationType.PORTLET);
+ ApplicationState<Portlet> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
+ assertEquals("web/HomePagePortlet", tas.getContentId());
+ Portlet portlet = tas.getContentState();
+ int count = 0;
+ for (Preference pref : portlet)
+ {
+ count++;
+ }
+ assertEquals(1, count);
+ Preference pref = portlet.getPreference("template");
+ assertNotNull(pref);
+ assertEquals("template", pref.getName());
+ assertEquals("system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl", pref.getValue());
+ assertFalse(pref.isReadOnly());
+
+ assertNull(application.getTheme());
+ assertEquals("Home Page portlet", application.getTitle());
+ assertEquals("Everyone", Utils.join(";", application.getAccessPermissions()));
+ assertFalse(application.getShowInfoBar());
+ assertFalse(application.getShowApplicationState());
+ assertFalse(application.getShowApplicationMode());
+ assertNull(application.getDescription());
+ assertNull(application.getIcon());
+ assertNull(application.getWidth());
+ assertNull(application.getHeight());
+ }
+
+ public void testLoadedPageUnmarshalling()
+ {
+ PageMarshaller marshaller = new PageMarshaller();
+ Page.PageSet pages = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/pages-loaded.xml"));
+ assertNotNull(pages);
+ assertNotNull(pages.getPages());
+ assertEquals(1, pages.getPages().size());
+ Page page = pages.getPages().get(0);
+
+ // Verify page properties
+ assertEquals("loaded-page", page.getName());
+ assertEquals("Loaded Page", page.getTitle());
+ assertEquals("manager:/platform/administrators;manager:/platform/users", Utils.join(";", page.getAccessPermissions()));
+ assertEquals("*:/platform/administrators", page.getEditPermission());
+
+ // Verify page children
+ assertNotNull(page.getChildren());
+ assertEquals(1, page.getChildren().size());
+ ModelObject child = page.getChildren().get(0);
+ assertTrue(child instanceof Container);
+
+ // Verify root container
+ Container rootContainer = (Container) child;
+ assertEquals("rootContainer", rootContainer.getId());
+ assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", rootContainer.getTemplate());
+ assertEquals("Everyone", Utils.join(";", rootContainer.getAccessPermissions()));
+
+ // Verify root container children
+ List<ModelObject> rootChildren = rootContainer.getChildren();
+ assertNotNull(rootChildren);
+ assertEquals(3, rootChildren.size());
+
+ // Verify container 1
+ ModelObject c1 = rootChildren.get(0);
+ assertNotNull(c1);
+ assertTrue(c1 instanceof ModelObject);
+ Container container1 = (Container) c1;
+ assertEquals("c1", container1.getId());
+ assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", container1.getTemplate());
+ assertEquals("*:/platform/users", Utils.join(";", container1.getAccessPermissions()));
+ {
+ // Verify homepage application
+ assertNotNull(container1.getChildren());
+ assertEquals(1, container1.getChildren().size());
+ ModelObject homeComponent = container1.getChildren().get(0);
+ assertTrue(homeComponent instanceof Application);
+ @SuppressWarnings("unchecked")
+ Application<Portlet> application = (Application<Portlet>) homeComponent;
+ assertTrue(application.getType() == ApplicationType.PORTLET);
+ ApplicationState<Portlet> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
+ assertEquals("web/HomePagePortlet", tas.getContentId());
+ Portlet portlet = tas.getContentState();
+ int count = 0;
+ for (Preference pref : portlet)
+ {
+ count++;
+ }
+ assertEquals(3, count);
+ Preference pref = portlet.getPreference("template");
+ assertNotNull(pref);
+ assertEquals("template", pref.getName());
+ assertEquals("system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl", pref.getValue());
+ assertTrue(pref.isReadOnly());
+
+ pref = portlet.getPreference("empty-preference-value");
+ assertNotNull(pref);
+ assertEquals("empty-preference-value", pref.getName());
+ assertNull(pref.getValue());
+ assertFalse(pref.isReadOnly());
+
+ pref = portlet.getPreference("no-preference-value");
+ assertNotNull(pref);
+ assertEquals("no-preference-value", pref.getName());
+ assertNull(pref.getValue());
+ assertFalse(pref.isReadOnly());
+
+ assertEquals("Mac:MacTheme::Default:DefaultTheme::Vista:VistaTheme", application.getTheme());
+ assertEquals("Home Page portlet", application.getTitle());
+ assertEquals("Everyone", Utils.join(";", application.getAccessPermissions()));
+ assertTrue(application.getShowInfoBar());
+ assertTrue(application.getShowApplicationState());
+ assertTrue(application.getShowApplicationMode());
+ assertNull(application.getDescription());
+ assertNull(application.getIcon());
+ assertNull(application.getWidth());
+ assertNull(application.getHeight());
+ }
+
+ // Verify container 2
+ ModelObject c2 = rootChildren.get(1);
+ assertNotNull(c2);
+ assertTrue(c2 instanceof Container);
+ Container container2 = (Container) c2;
+ assertEquals("c2", container2.getId());
+ assertEquals("system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl", container2.getTemplate());
+ assertEquals("*:/platform/guests", Utils.join(";", container2.getAccessPermissions()));
+ assertEquals("TableColumnContainer", container2.getFactoryId());
+ assertNotNull(container2.getChildren());
+ assertEquals(2, container2.getChildren().size());
+
+ {
+ // Verify column 1 of container 2
+ ModelObject appregComp = container2.getChildren().get(0);
+ assertTrue(appregComp instanceof Container);
+ Container appregContainer = (Container) appregComp;
+ assertEquals("c2-1", appregContainer.getId());
+ assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", appregContainer.getTemplate());
+ assertEquals("300px", appregContainer.getWidth());
+ assertEquals("400px", appregContainer.getHeight());
+ assertEquals("Everyone", Utils.join(";", appregContainer.getAccessPermissions()));
+ {
+ // Verify app registry application
+ assertNotNull(appregContainer.getChildren());
+ assertEquals(1, appregContainer.getChildren().size());
+ ModelObject appregComponent = appregContainer.getChildren().get(0);
+ assertTrue(appregComponent instanceof Application);
+ @SuppressWarnings("unchecked")
+ Application<Portlet> application = (Application<Portlet>) appregComponent;
+ assertTrue(application.getType() == ApplicationType.PORTLET);
+ ApplicationState<Portlet> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
+ assertEquals("exoadmin/ApplicationRegistryPortlet", tas.getContentId());
+ assertNull(tas.getContentState());
+
+ assertEquals("Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme", application.getTheme());
+ assertEquals("Application Registry", application.getTitle());
+ assertEquals("*:/platform/administrators;*:/organization/management/executive-board", Utils.join(";", application.getAccessPermissions()));
+ assertFalse(application.getShowInfoBar());
+ assertTrue(application.getShowApplicationState());
+ assertFalse(application.getShowApplicationMode());
+ assertEquals("Application Registry", application.getDescription());
+ assertEquals("PortletIcon", application.getIcon());
+ assertEquals("250px", application.getWidth());
+ assertEquals("350px", application.getHeight());
+ }
+
+ // Verify column 2 of container 2
+ ModelObject orgComp = container2.getChildren().get(1);
+ assertTrue(orgComp instanceof Container);
+ Container orgContainer = (Container) orgComp;
+ assertEquals("c2-2", orgContainer.getId());
+ assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", orgContainer.getTemplate());
+ assertEquals("200px", orgContainer.getWidth());
+ assertEquals("300px", orgContainer.getHeight());
+ assertEquals("/platform/users", Utils.join(";", orgContainer.getAccessPermissions()));
+ {
+ // Verify calendar gadget application
+ assertNotNull(orgContainer.getChildren());
+ assertEquals(1, orgContainer.getChildren().size());
+ ModelObject gadgetComponent = orgContainer.getChildren().get(0);
+ assertTrue(gadgetComponent instanceof Application);
+ @SuppressWarnings("unchecked")
+ Application<Gadget> application = (Application<Gadget>) gadgetComponent;
+ assertTrue(application.getType() == ApplicationType.GADGET);
+ ApplicationState<Gadget> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Gadget> tas = (TransientApplicationState<Gadget>) state;
+ assertEquals("Calendar", tas.getContentId());
+ assertNull(tas.getContentState());
+
+ assertEquals("Vista:VistaTheme::Mac:MacTheme::Default:DefaultTheme", application.getTheme());
+ assertEquals("Calendar Title", application.getTitle());
+ assertEquals("*:/platform/administrators;*:/organization/management/executive-board", Utils.join(";", application.getAccessPermissions()));
+ assertTrue(application.getShowInfoBar());
+ assertFalse(application.getShowApplicationState());
+ assertFalse(application.getShowApplicationMode());
+ assertEquals("Calendar Description", application.getDescription());
+ assertEquals("StarAwardIcon", application.getIcon());
+ assertEquals("100px", application.getWidth());
+ assertEquals("200px", application.getHeight());
+ }
+ }
+
+ // Verify container 3
+ ModelObject c3 = rootChildren.get(2);
+ assertNotNull(c3);
+ assertTrue(c3 instanceof Container);
+ Container container3 = (Container) c3;
+ assertEquals("c3", container3.getId());
+ assertEquals("system:/groovy/portal/webui/container/UIContainer.gtmpl", container3.getTemplate());
+ assertEquals(container3.getTemplate(), "system:/groovy/portal/webui/container/UIContainer.gtmpl");
+ assertEquals("Everyone", Utils.join(";", container3.getAccessPermissions()));
+ assertNull(container3.getFactoryId());
+ {
+ // Verify site map application
+ assertNotNull(container3.getChildren());
+ assertEquals(1, container3.getChildren().size());
+ ModelObject sitemapcomponent = container3.getChildren().get(0);
+ assertTrue(sitemapcomponent instanceof Application);
+ @SuppressWarnings("unchecked")
+ Application<Portlet> application = (Application<Portlet>) sitemapcomponent;
+ assertTrue(application.getType() == ApplicationType.PORTLET);
+ ApplicationState<Portlet> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
+ assertEquals("web/SiteMapPortlet", tas.getContentId());
+ assertNull(tas.getContentState());
+
+ assertEquals("Default:DefaultTheme::Vista:VistaTheme::Mac:MacTheme", application.getTheme());
+ assertEquals("SiteMap", application.getTitle());
+ assertEquals("*:/platform/users", Utils.join(";", application.getAccessPermissions()));
+ assertTrue(application.getShowInfoBar());
+ assertTrue(application.getShowApplicationState());
+ assertFalse(application.getShowApplicationMode());
+ assertEquals("SiteMap", application.getDescription());
+ assertNull(application.getIcon());
+ assertNull(application.getWidth());
+ assertNull(application.getHeight());
+ }
+ }
+
+ public void testEmptyPageUnmarshalling()
+ {
+ PageMarshaller marshaller = new PageMarshaller();
+ Page.PageSet pages = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/pages-empty.xml"));
+ assertNotNull(pages);
+ assertNotNull(pages.getPages());
+ assertEquals(1, pages.getPages().size());
+ Page page = pages.getPages().get(0);
+ assertNotNull(page);
+ assertEquals("empty-page", page.getName());
+ assertEquals("Empty", page.getTitle());
+ assertNotNull(page.getChildren());
+ assertTrue(page.getChildren().isEmpty());
+ }
+
+ public void testPageMarshalling()
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ Portlet portlet = new Portlet();
+ portlet.putPreference(new Preference("pref-1", "value-1", true));
+ portlet.putPreference(new Preference("pref-2", "value-2", false));
+ portlet.putPreference(new Preference("multi-value-pref", Arrays.asList("one", "two", "three"), false));
+ portlet.putPreference(new Preference("empty-value-pref", (String) null, true));
+
+ ApplicationState<Portlet> state = new TransientApplicationState<Portlet>("app-ref/portlet-ref", portlet);
+ ApplicationData<Portlet> applicationData = new ApplicationData<Portlet>(null, null,
+ ApplicationType.PORTLET, state, null, "app-title", "app-icon", "app-description", false, true, false,
+ "app-theme", "app-wdith", "app-height", new HashMap<String,String>(),
+ Collections.singletonList("app-edit-permissions"));
+
+ ContainerData containerData = new ContainerData(null, "cd-id", "cd-name", "cd-icon", "cd-template", "cd-factoryId", "cd-title", "cd-description", "cd-width", "cd-height", Collections.singletonList("cd-access-permissions"), Collections.singletonList((ComponentData) applicationData));
+ List<ComponentData> children = Collections.singletonList((ComponentData) containerData);
+
+ PageData expectedData = new PageData(null, null, "page-name", null, null, null, "Page Title", null, null, null,
+ Collections.singletonList("access-permissions"), children, "", "", "edit-permission", true);
+
+ Page expected = new Page(expectedData);
+
+ Page.PageSet expectedPages = new Page.PageSet();
+ expectedPages.setPages(new ArrayList<Page>(1));
+ expectedPages.getPages().add(expected);
+
+ PageMarshaller marshaller = new PageMarshaller();
+ marshaller.marshal(expectedPages, baos);
+
+ //System.out.println(baos.toString());
+
+ Page.PageSet actualPages = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
+
+ assertNotNull(actualPages);
+ assertNotNull(actualPages.getPages());
+ assertEquals(1, actualPages.getPages().size());
+
+ comparePages(expected, actualPages.getPages().get(0));
+ }
+
+ public void testPageMarshallingWithGadget()
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ Gadget gadget = null;
+ //TODO: Uncomment when gadget user-prefs are supported in gatein_objects
+ //Gadget gadget = new Gadget();
+ //gadget.setUserPref("user-pref");
+
+ ApplicationState<Gadget> state = new TransientApplicationState<Gadget>("gadget-ref", gadget);
+ ApplicationData<Gadget> applicationData = new ApplicationData<Gadget>(null, null,
+ ApplicationType.GADGET, state, null, "app-title", "app-icon", "app-description", false, true, false,
+ "app-theme", "app-wdith", "app-height", new HashMap<String,String>(),
+ Collections.singletonList("app-edit-permissions"));
+
+ List<ComponentData> children = Collections.singletonList((ComponentData) applicationData);
+ PageData expectedData = new PageData(null, null, "page-name", null, null, null, "Page Title", null, null, null,
+ Collections.singletonList("access-permissions"), children, "", "", "edit-permission", true);
+
+ Page expected = new Page(expectedData);
+
+ Page.PageSet expectedPages = new Page.PageSet();
+ expectedPages.setPages(new ArrayList<Page>(1));
+ expectedPages.getPages().add(expected);
+
+ PageMarshaller marshaller = new PageMarshaller();
+ marshaller.marshal(expectedPages, baos);
+
+ //System.out.println(baos.toString());
+
+ Page.PageSet actualPages = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
+
+ assertNotNull(actualPages);
+ assertNotNull(actualPages.getPages());
+ assertEquals(1, actualPages.getPages().size());
+
+ comparePages(expected, actualPages.getPages().get(0));
+ }
+
+ private void comparePages(Page expected, Page actual)
+ {
+ assertNull(actual.getStorageId());
+ assertNull(actual.getStorageName());
+ assertNull(actual.getId());
+ assertNull(actual.getOwnerType());
+ assertNull(actual.getOwnerId());
+ assertEquals(expected.getName(), actual.getName());
+ assertNull(actual.getIcon());
+ assertNull(actual.getTemplate());
+ assertNull(actual.getFactoryId());
+ assertEquals(expected.getTitle(), actual.getTitle());
+ assertNull(actual.getDescription());
+ assertNull(actual.getWidth());
+ assertNull(actual.getHeight());
+ assertEquals(Arrays.asList(expected.getAccessPermissions()), Arrays.asList(actual.getAccessPermissions()));
+
+ compareComponents(expected.getChildren(), actual.getChildren());
+
+ assertEquals(expected.getEditPermission(), actual.getEditPermission());
+ assertEquals(expected.isShowMaxWindow(), actual.isShowMaxWindow());
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,225 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.binding.xml;
-
-import org.exoplatform.portal.config.model.Application;
-import org.exoplatform.portal.config.model.ApplicationState;
-import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.config.model.Container;
-import org.exoplatform.portal.config.model.ModelObject;
-import org.exoplatform.portal.config.model.PageBody;
-import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.config.model.TransientApplicationState;
-import org.exoplatform.portal.pom.config.Utils;
-import org.exoplatform.portal.pom.data.ApplicationData;
-import org.exoplatform.portal.pom.data.BodyData;
-import org.exoplatform.portal.pom.data.BodyType;
-import org.exoplatform.portal.pom.data.ComponentData;
-import org.exoplatform.portal.pom.data.ContainerData;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.exoplatform.portal.pom.spi.portlet.Portlet;
-import org.exoplatform.portal.pom.spi.portlet.Preference;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import static junit.framework.Assert.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class SiteLayoutMarshallerTest extends AbstractMarshallerTest
-{
- public void testPortalDataUnmarshalling()
- {
- SiteLayoutMarshaller marshaller = new SiteLayoutMarshaller();
- PortalConfig data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/portal.xml"));
- assertNotNull(data);
- assertEquals("classic", data.getName());
- assertEquals("site-label", data.getLabel());
- assertEquals("site-description", data.getDescription());
- assertEquals("en", data.getLocale());
- assertEquals("Everyone", Utils.join(";", data.getAccessPermissions()));
- assertEquals("*:/platform/administrators", data.getEditPermission());
- assertNotNull(data.getProperties());
- assertEquals(1, data.getProperties().size());
- assertTrue(data.getProperties().containsKey("sessionAlive"));
- assertEquals("onDemand", data.getProperties().get("sessionAlive"));
-
- // Verify portal layout container only has children
- assertNotNull(data.getPortalLayout());
- Container layout = data.getPortalLayout();
- assertNull(layout.getStorageId());
- assertNull(layout.getId());
- assertNull(layout.getName());
- assertNull(layout.getIcon());
- assertNull(layout.getTemplate());
- assertNull(layout.getFactoryId());
- assertNull(layout.getTitle());
- assertNull(layout.getDescription());
- assertNull(layout.getWidth());
- assertNull(layout.getHeight());
- assertNull(layout.getAccessPermissions());
- List<ModelObject> children = data.getPortalLayout().getChildren();
- assertEquals(5, children.size());
- int bodyCount = 0;
- for (ModelObject component : children)
- {
- if (component instanceof Application)
- {
- }
- else if (component instanceof PageBody)
- {
- bodyCount++;
- }
- else
- {
- fail("Only application data and one body data should be created for a portal layout.");
- }
- }
- assertEquals(1, bodyCount);
-
- // Verify banner portlet app
- {
- @SuppressWarnings("unchecked")
- Application<Portlet> application = (Application<Portlet>) children.get(0);
- assertTrue(application.getType() == ApplicationType.PORTLET);
- ApplicationState<Portlet> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
- assertEquals("web/BannerPortlet", tas.getContentId());
- Portlet portlet = tas.getContentState();
- int count = 0;
- for (Preference pref : portlet)
- {
- count++;
- }
- assertEquals(1, count);
- Preference pref = portlet.getPreference("template");
- assertNotNull(pref);
- assertEquals("template", pref.getName());
- assertEquals("par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl", pref.getValue());
- assertFalse(pref.isReadOnly());
-
- assertEquals("Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme", application.getTheme());
- assertEquals("Banner", application.getTitle());
- assertEquals("*:/platform/administrators;*:/organization/management/executive-board", Utils.join(";", application.getAccessPermissions()));
- assertFalse(application.getShowInfoBar());
- assertTrue(application.getShowApplicationState());
- assertFalse(application.getShowApplicationMode());
- assertEquals("Banner Portlet", application.getDescription());
- assertEquals("PortletIcon", application.getIcon());
- assertEquals("250px", application.getWidth());
- assertEquals("350px", application.getHeight());
- }
-
- // Verify navigation portlet app
- {
- @SuppressWarnings("unchecked")
- Application<Portlet> application = (Application<Portlet>) children.get(1);
- assertTrue(application.getType() == ApplicationType.PORTLET);
- ApplicationState<Portlet> state = application.getState();
- assertNotNull(state);
- assertTrue(state instanceof TransientApplicationState);
- TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
- assertEquals("web/NavigationPortlet", tas.getContentId());
- assertNull(tas.getContentState());
-
- assertNull(application.getTheme());
- assertNull(application.getTitle());
- assertEquals("Everyone", Utils.join(";", application.getAccessPermissions()));
- assertFalse(application.getShowInfoBar());
- assertTrue(application.getShowApplicationState());
- assertTrue(application.getShowApplicationMode());
- assertNull(application.getDescription());
- assertNull(application.getIcon());
- assertNull(application.getWidth());
- assertNull(application.getHeight());
- }
- }
-
- public void testPortalDataMarshalling()
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
-
- Portlet portlet = new Portlet();
- portlet.putPreference(new Preference("pref-1", "value-1", true));
- portlet.putPreference(new Preference("pref-2", "value-2", false));
- portlet.putPreference(new Preference("multi-value-pref", Arrays.asList("one", "two", "three"), false));
- portlet.putPreference(new Preference("no-value-pref", (String) null, true));
-
- ApplicationState<Portlet> state = new TransientApplicationState<Portlet>("app-ref/portlet-ref", portlet);
- ApplicationData<Portlet> application = new ApplicationData<Portlet>(null, null,
- ApplicationType.PORTLET, state, null, "app-title", "app-icon", "app-description", false, true, false,
- "app-theme", "app-wdith", "app-height", new HashMap<String,String>(),
- Collections.singletonList("app-edit-permissions"));
-
- List<ComponentData> children = new ArrayList<ComponentData>();
- children.add(application);
- children.add(new BodyData(null, BodyType.PAGE));
-
- ContainerData layout = new ContainerData(null, null, "container-name", "container-icon", "container-template",
- "factoryId", "title", "description", "width", "height", Collections.singletonList("blah"), children);
-
- Map<String,String> properties = new HashMap<String,String>();
- properties.put("key1", "value1");
- properties.put("key2", "value2");
-
- PortalData expectedData = new PortalData(null, "name", "type", "locale", "label", "description",
- Collections.singletonList("access-permissions"), "edit-permissions", properties, "skin", layout);
-
- PortalConfig expected = new PortalConfig(expectedData);
-
- SiteLayoutMarshaller marshaller = new SiteLayoutMarshaller();
- marshaller.marshal(expected, baos);
-
-// System.out.println(baos.toString());
-
- PortalConfig actual = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
- assertNotNull(actual);
- assertNull(actual.getStorageId());
- assertNull(actual.getStorageName());
- assertEquals("name", actual.getName());
- assertEquals("label", actual.getLabel());
- assertEquals("description", actual.getDescription());
- assertEquals("portal", actual.getType());
- assertEquals("locale", actual.getLocale());
- assertEquals("access-permissions", Utils.join(";", actual.getAccessPermissions()));
- assertEquals("edit-permissions", actual.getEditPermission());
- assertEquals(properties, actual.getProperties());
- assertEquals("skin", actual.getSkin());
- assertNotNull(actual.getPortalLayout());
- assertNotNull(actual.getPortalLayout().getChildren());
- assertEquals(2, actual.getPortalLayout().getChildren().size());
-
- compareComponents(expected.getPortalLayout().getChildren(), actual.getPortalLayout().getChildren());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java (from rev 6960, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/binding/xml/SiteLayoutMarshallerTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,225 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.binding.xml;
+
+import org.exoplatform.portal.config.model.Application;
+import org.exoplatform.portal.config.model.ApplicationState;
+import org.exoplatform.portal.config.model.ApplicationType;
+import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.ModelObject;
+import org.exoplatform.portal.config.model.PageBody;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.pom.config.Utils;
+import org.exoplatform.portal.pom.data.ApplicationData;
+import org.exoplatform.portal.pom.data.BodyData;
+import org.exoplatform.portal.pom.data.BodyType;
+import org.exoplatform.portal.pom.data.ComponentData;
+import org.exoplatform.portal.pom.data.ContainerData;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.exoplatform.portal.pom.spi.portlet.Portlet;
+import org.exoplatform.portal.pom.spi.portlet.Preference;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import static junit.framework.Assert.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutMarshallerTest extends AbstractMarshallerTest
+{
+ public void testPortalDataUnmarshalling()
+ {
+ SiteLayoutMarshaller marshaller = new SiteLayoutMarshaller();
+ PortalConfig data = marshaller.unmarshal(getClass().getResourceAsStream("/org/exoplatform/portal/mop/management/portal.xml"));
+ assertNotNull(data);
+ assertEquals("classic", data.getName());
+ assertEquals("site-label", data.getLabel());
+ assertEquals("site-description", data.getDescription());
+ assertEquals("en", data.getLocale());
+ assertEquals("Everyone", Utils.join(";", data.getAccessPermissions()));
+ assertEquals("*:/platform/administrators", data.getEditPermission());
+ assertNotNull(data.getProperties());
+ assertEquals(1, data.getProperties().size());
+ assertTrue(data.getProperties().containsKey("sessionAlive"));
+ assertEquals("onDemand", data.getProperties().get("sessionAlive"));
+
+ // Verify portal layout container only has children
+ assertNotNull(data.getPortalLayout());
+ Container layout = data.getPortalLayout();
+ assertNull(layout.getStorageId());
+ assertNull(layout.getId());
+ assertNull(layout.getName());
+ assertNull(layout.getIcon());
+ assertNull(layout.getTemplate());
+ assertNull(layout.getFactoryId());
+ assertNull(layout.getTitle());
+ assertNull(layout.getDescription());
+ assertNull(layout.getWidth());
+ assertNull(layout.getHeight());
+ assertNull(layout.getAccessPermissions());
+ List<ModelObject> children = data.getPortalLayout().getChildren();
+ assertEquals(5, children.size());
+ int bodyCount = 0;
+ for (ModelObject component : children)
+ {
+ if (component instanceof Application)
+ {
+ }
+ else if (component instanceof PageBody)
+ {
+ bodyCount++;
+ }
+ else
+ {
+ fail("Only application data and one body data should be created for a portal layout.");
+ }
+ }
+ assertEquals(1, bodyCount);
+
+ // Verify banner portlet app
+ {
+ @SuppressWarnings("unchecked")
+ Application<Portlet> application = (Application<Portlet>) children.get(0);
+ assertTrue(application.getType() == ApplicationType.PORTLET);
+ ApplicationState<Portlet> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
+ assertEquals("web/BannerPortlet", tas.getContentId());
+ Portlet portlet = tas.getContentState();
+ int count = 0;
+ for (Preference pref : portlet)
+ {
+ count++;
+ }
+ assertEquals(1, count);
+ Preference pref = portlet.getPreference("template");
+ assertNotNull(pref);
+ assertEquals("template", pref.getName());
+ assertEquals("par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl", pref.getValue());
+ assertFalse(pref.isReadOnly());
+
+ assertEquals("Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme", application.getTheme());
+ assertEquals("Banner", application.getTitle());
+ assertEquals("*:/platform/administrators;*:/organization/management/executive-board", Utils.join(";", application.getAccessPermissions()));
+ assertFalse(application.getShowInfoBar());
+ assertTrue(application.getShowApplicationState());
+ assertFalse(application.getShowApplicationMode());
+ assertEquals("Banner Portlet", application.getDescription());
+ assertEquals("PortletIcon", application.getIcon());
+ assertEquals("250px", application.getWidth());
+ assertEquals("350px", application.getHeight());
+ }
+
+ // Verify navigation portlet app
+ {
+ @SuppressWarnings("unchecked")
+ Application<Portlet> application = (Application<Portlet>) children.get(1);
+ assertTrue(application.getType() == ApplicationType.PORTLET);
+ ApplicationState<Portlet> state = application.getState();
+ assertNotNull(state);
+ assertTrue(state instanceof TransientApplicationState);
+ TransientApplicationState<Portlet> tas = (TransientApplicationState<Portlet>) state;
+ assertEquals("web/NavigationPortlet", tas.getContentId());
+ assertNull(tas.getContentState());
+
+ assertNull(application.getTheme());
+ assertNull(application.getTitle());
+ assertEquals("Everyone", Utils.join(";", application.getAccessPermissions()));
+ assertFalse(application.getShowInfoBar());
+ assertTrue(application.getShowApplicationState());
+ assertTrue(application.getShowApplicationMode());
+ assertNull(application.getDescription());
+ assertNull(application.getIcon());
+ assertNull(application.getWidth());
+ assertNull(application.getHeight());
+ }
+ }
+
+ public void testPortalDataMarshalling()
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+
+ Portlet portlet = new Portlet();
+ portlet.putPreference(new Preference("pref-1", "value-1", true));
+ portlet.putPreference(new Preference("pref-2", "value-2", false));
+ portlet.putPreference(new Preference("multi-value-pref", Arrays.asList("one", "two", "three"), false));
+ portlet.putPreference(new Preference("no-value-pref", (String) null, true));
+
+ ApplicationState<Portlet> state = new TransientApplicationState<Portlet>("app-ref/portlet-ref", portlet);
+ ApplicationData<Portlet> application = new ApplicationData<Portlet>(null, null,
+ ApplicationType.PORTLET, state, null, "app-title", "app-icon", "app-description", false, true, false,
+ "app-theme", "app-wdith", "app-height", new HashMap<String,String>(),
+ Collections.singletonList("app-edit-permissions"));
+
+ List<ComponentData> children = new ArrayList<ComponentData>();
+ children.add(application);
+ children.add(new BodyData(null, BodyType.PAGE));
+
+ ContainerData layout = new ContainerData(null, null, "container-name", "container-icon", "container-template",
+ "factoryId", "title", "description", "width", "height", Collections.singletonList("blah"), children);
+
+ Map<String,String> properties = new HashMap<String,String>();
+ properties.put("key1", "value1");
+ properties.put("key2", "value2");
+
+ PortalData expectedData = new PortalData(null, "name", "type", "locale", "label", "description",
+ Collections.singletonList("access-permissions"), "edit-permissions", properties, "skin", layout);
+
+ PortalConfig expected = new PortalConfig(expectedData);
+
+ SiteLayoutMarshaller marshaller = new SiteLayoutMarshaller();
+ marshaller.marshal(expected, baos);
+
+// System.out.println(baos.toString());
+
+ PortalConfig actual = marshaller.unmarshal(new ByteArrayInputStream(baos.toByteArray()));
+ assertNotNull(actual);
+ assertNull(actual.getStorageId());
+ assertNull(actual.getStorageName());
+ assertEquals("name", actual.getName());
+ assertEquals("label", actual.getLabel());
+ assertEquals("description", actual.getDescription());
+ assertEquals("portal", actual.getType());
+ assertEquals("locale", actual.getLocale());
+ assertEquals("access-permissions", Utils.join(";", actual.getAccessPermissions()));
+ assertEquals("edit-permissions", actual.getEditPermission());
+ assertEquals(properties, actual.getProperties());
+ assertEquals("skin", actual.getSkin());
+ assertNotNull(actual.getPortalLayout());
+ assertNotNull(actual.getPortalLayout().getChildren());
+ assertEquals(2, actual.getPortalLayout().getChildren().size());
+
+ compareComponents(expected.getPortalLayout().getChildren(), actual.getPortalLayout().getChildren());
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,492 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * 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.management.exportimport;
-
-
-import junit.framework.Assert;
-import junit.framework.TestCase;
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.portal.config.DataStorage;
-import org.exoplatform.portal.config.Query;
-import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.data.ComponentData;
-import org.exoplatform.portal.pom.data.PageData;
-import org.mockito.ArgumentMatcher;
-import org.mockito.Matchers;
-
-import java.util.ArrayList;
-import java.util.Collections;
-
-import static org.mockito.Mockito.*;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class PageImportTaskTest extends TestCase
-{
- private DataStorage dataStorage;
- private LazyPageList<Page> list;
- private SiteKey siteKey = new SiteKey("user", "foo");
-
- @Override
- @SuppressWarnings("unchecked")
- protected void setUp() throws Exception
- {
- dataStorage = mock(DataStorage.class);
- list = mock(LazyPageList.class);
- }
-
- public void testConserve_NoPages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(0); // no pages exist
-
- task.importData(ImportStrategy.CONSERVE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list, never()).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(3)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(importing, task.getRollbackDeletes());
- Assert.assertNull(task.getRollbackSaves());
- }
-
- public void testConserve_SamePages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- Page.PageSet existing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.CONSERVE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- assertNullOrEmpty(task.getRollbackDeletes());
- assertNullOrEmpty(task.getRollbackSaves());
- }
-
- public void testConserve_NewPages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- Page.PageSet existing = new Builder().addPage("foo").addPage("bar").addPage("baz").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.CONSERVE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(3)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(importing.getPages(), task.getRollbackDeletes().getPages());
- Assert.assertNull(task.getRollbackSaves());
- }
-
- public void testConserve_NewAndSamePages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").addPage("page4").build();
- Page.PageSet existing = new Builder().addPage("page2").addPage("bar").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.CONSERVE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- verify(dataStorage).save(importing.getPages().get(0));
- verify(dataStorage).save(importing.getPages().get(3));
-
- verify(dataStorage, times(2)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(2, task.getRollbackDeletes().getPages().size());
- Assert.assertEquals(importing.getPages().get(0), task.getRollbackDeletes().getPages().get(0));
- Assert.assertEquals(importing.getPages().get(3), task.getRollbackDeletes().getPages().get(1));
- Assert.assertNull(task.getRollbackSaves());
- }
-
- public void testMerge_NoPages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(0); // no pages exist
-
- task.importData(ImportStrategy.MERGE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list, never()).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(3)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(importing, task.getRollbackDeletes());
- Assert.assertNull(task.getRollbackSaves());
- }
-
- public void testMerge_SamePages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- Page.PageSet existing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.MERGE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(3)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- assertNullOrEmpty(task.getRollbackDeletes());
- Assert.assertNotNull(task.getRollbackSaves());
- Assert.assertEquals(3, task.getRollbackSaves().getPages().size());
- Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
- }
-
- public void testMerge_NewPages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- Page.PageSet existing = new Builder().addPage("foo").addPage("bar").addPage("baz").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.MERGE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(3)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(importing.getPages(), task.getRollbackDeletes().getPages());
- assertNullOrEmpty(task.getRollbackSaves());
- }
-
- public void testMerge_NewAndSamePages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").addPage("page4").build();
- Page.PageSet existing = new Builder().addPage("page2").addPage("bar").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.MERGE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(4)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(2, task.getRollbackDeletes().getPages().size());
- Assert.assertEquals(importing.getPages().get(0), task.getRollbackDeletes().getPages().get(0));
- Assert.assertEquals(importing.getPages().get(3), task.getRollbackDeletes().getPages().get(1));
-
- Assert.assertNotNull(task.getRollbackSaves());
- Assert.assertEquals(2, task.getRollbackSaves().getPages().size());
- Assert.assertEquals(existing.getPages().get(0), task.getRollbackSaves().getPages().get(0));
- Assert.assertEquals(existing.getPages().get(2), task.getRollbackSaves().getPages().get(1));
- }
-
- public void testOverwrite_NoPages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(0); // no pages exist
-
- task.importData(ImportStrategy.OVERWRITE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list, never()).getAll();
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(3)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(importing, task.getRollbackDeletes());
- Assert.assertNull(task.getRollbackSaves());
- }
-
- public void testOverwrite_SamePages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- Page.PageSet existing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.OVERWRITE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- int saveCount = importing.getPages().size() + existing.getPages().size();
- for (Page page : existing.getPages())
- {
- verify(dataStorage).remove(page);
- }
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(saveCount)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- assertNullOrEmpty(task.getRollbackDeletes());
- Assert.assertNotNull(task.getRollbackSaves());
- Assert.assertEquals(3, task.getRollbackSaves().getPages().size());
- Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
- }
-
- public void testOverwrite_NewPages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
- Page.PageSet existing = new Builder().addPage("foo").addPage("bar").addPage("baz").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.OVERWRITE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- int saveCount = importing.getPages().size() + existing.getPages().size();
- for (Page page : existing.getPages())
- {
- verify(dataStorage).remove(page);
- }
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(saveCount)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(importing.getPages(), task.getRollbackDeletes().getPages());
-
- Assert.assertNotNull(task.getRollbackSaves());
- Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
- }
-
- public void testOverwrite_NewAndSamePages() throws Exception
- {
- Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").addPage("page4").build();
- Page.PageSet existing = new Builder().addPage("page2").addPage("bar").addPage("page3").build();
- PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
-
- when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
- when(list.getAvailable()).thenReturn(3);
- when(list.getAll()).thenReturn(existing.getPages());
-
- task.importData(ImportStrategy.OVERWRITE);
-
- verify(dataStorage).find(query("user", "foo"));
- verify(list).getAvailable();
- verify(list).getAll();
-
- int saveCount = importing.getPages().size() + existing.getPages().size();
- for (Page page : existing.getPages())
- {
- verify(dataStorage).remove(page);
- }
-
- for (Page page : importing.getPages())
- {
- verify(dataStorage).save(page);
- }
- verify(dataStorage, times(saveCount)).save();
-
- verifyNoMoreInteractions(dataStorage, list);
-
- Assert.assertNotNull(task.getRollbackDeletes());
- Assert.assertEquals(2, task.getRollbackDeletes().getPages().size());
- Assert.assertEquals(importing.getPages().get(0), task.getRollbackDeletes().getPages().get(0));
- Assert.assertEquals(importing.getPages().get(3), task.getRollbackDeletes().getPages().get(1));
-
- Assert.assertNotNull(task.getRollbackSaves());
- Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
- }
-
- private void assertNullOrEmpty(Page.PageSet pages)
- {
- if (pages != null)
- {
- Assert.assertTrue(pages.getPages().isEmpty());
- }
- }
-
- private Query<Page> query(String ownerType, String ownerId)
- {
- return argThat(new QueryMatcher(new Query<Page>(ownerType, ownerId, Page.class)));
- }
-
- private class QueryMatcher extends ArgumentMatcher<Query<Page>>
- {
- private Query<Page> query;
-
- public QueryMatcher(Query<Page> query)
- {
- this.query = query;
- }
-
- @Override
- public boolean matches(Object o)
- {
- if (query == o) return true;
- if (!(o instanceof Query)) return false;
-
- Query that = (Query) o;
-
- if (!query.getClassType().equals(that.getClassType())) return false;
- if (!query.getOwnerType().equals(that.getOwnerType())) return false;
- if (!query.getOwnerId().equals(that.getOwnerId())) return false;
-
- if (query.getName() != null ? !query.getName().equals(that.getName()) : that.getName() != null) return false;
- if (query.getTitle() != null ? !query.getTitle().equals(that.getTitle()) : that.getTitle() != null) return false;
-
- return true;
- }
- }
-
- private static class Builder
- {
- private Page.PageSet pages;
- public Builder()
- {
- pages = new Page.PageSet();
- pages.setPages(new ArrayList<Page>());
- }
-
- public Builder addPage(String name)
- {
- PageData page= new PageData(null, "", name, null, null, null, null, null, null, null, Collections.<String>emptyList(), Collections.<ComponentData>emptyList(), "", "", null, false);
- pages.getPages().add(new Page(page));
-
- return this;
- }
-
- public Page.PageSet build()
- {
- return pages;
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java (from rev 6960, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/management/exportimport/PageImportTaskTest.java 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,492 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * 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.management.exportimport;
+
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.portal.config.DataStorage;
+import org.exoplatform.portal.config.Query;
+import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.data.ComponentData;
+import org.exoplatform.portal.pom.data.PageData;
+import org.mockito.ArgumentMatcher;
+import org.mockito.Matchers;
+
+import java.util.ArrayList;
+import java.util.Collections;
+
+import static org.mockito.Mockito.*;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class PageImportTaskTest extends TestCase
+{
+ private DataStorage dataStorage;
+ private LazyPageList<Page> list;
+ private SiteKey siteKey = new SiteKey("user", "foo");
+
+ @Override
+ @SuppressWarnings("unchecked")
+ protected void setUp() throws Exception
+ {
+ dataStorage = mock(DataStorage.class);
+ list = mock(LazyPageList.class);
+ }
+
+ public void testConserve_NoPages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(0); // no pages exist
+
+ task.importData(ImportStrategy.CONSERVE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list, never()).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(3)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(importing, task.getRollbackDeletes());
+ Assert.assertNull(task.getRollbackSaves());
+ }
+
+ public void testConserve_SamePages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ Page.PageSet existing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.CONSERVE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ assertNullOrEmpty(task.getRollbackDeletes());
+ assertNullOrEmpty(task.getRollbackSaves());
+ }
+
+ public void testConserve_NewPages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ Page.PageSet existing = new Builder().addPage("foo").addPage("bar").addPage("baz").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.CONSERVE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(3)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(importing.getPages(), task.getRollbackDeletes().getPages());
+ Assert.assertNull(task.getRollbackSaves());
+ }
+
+ public void testConserve_NewAndSamePages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").addPage("page4").build();
+ Page.PageSet existing = new Builder().addPage("page2").addPage("bar").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.CONSERVE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ verify(dataStorage).save(importing.getPages().get(0));
+ verify(dataStorage).save(importing.getPages().get(3));
+
+ verify(dataStorage, times(2)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(2, task.getRollbackDeletes().getPages().size());
+ Assert.assertEquals(importing.getPages().get(0), task.getRollbackDeletes().getPages().get(0));
+ Assert.assertEquals(importing.getPages().get(3), task.getRollbackDeletes().getPages().get(1));
+ Assert.assertNull(task.getRollbackSaves());
+ }
+
+ public void testMerge_NoPages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(0); // no pages exist
+
+ task.importData(ImportStrategy.MERGE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list, never()).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(3)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(importing, task.getRollbackDeletes());
+ Assert.assertNull(task.getRollbackSaves());
+ }
+
+ public void testMerge_SamePages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ Page.PageSet existing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.MERGE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(3)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ assertNullOrEmpty(task.getRollbackDeletes());
+ Assert.assertNotNull(task.getRollbackSaves());
+ Assert.assertEquals(3, task.getRollbackSaves().getPages().size());
+ Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
+ }
+
+ public void testMerge_NewPages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ Page.PageSet existing = new Builder().addPage("foo").addPage("bar").addPage("baz").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.MERGE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(3)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(importing.getPages(), task.getRollbackDeletes().getPages());
+ assertNullOrEmpty(task.getRollbackSaves());
+ }
+
+ public void testMerge_NewAndSamePages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").addPage("page4").build();
+ Page.PageSet existing = new Builder().addPage("page2").addPage("bar").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.MERGE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(4)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(2, task.getRollbackDeletes().getPages().size());
+ Assert.assertEquals(importing.getPages().get(0), task.getRollbackDeletes().getPages().get(0));
+ Assert.assertEquals(importing.getPages().get(3), task.getRollbackDeletes().getPages().get(1));
+
+ Assert.assertNotNull(task.getRollbackSaves());
+ Assert.assertEquals(2, task.getRollbackSaves().getPages().size());
+ Assert.assertEquals(existing.getPages().get(0), task.getRollbackSaves().getPages().get(0));
+ Assert.assertEquals(existing.getPages().get(2), task.getRollbackSaves().getPages().get(1));
+ }
+
+ public void testOverwrite_NoPages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(0); // no pages exist
+
+ task.importData(ImportStrategy.OVERWRITE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list, never()).getAll();
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(3)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(importing, task.getRollbackDeletes());
+ Assert.assertNull(task.getRollbackSaves());
+ }
+
+ public void testOverwrite_SamePages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ Page.PageSet existing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.OVERWRITE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ int saveCount = importing.getPages().size() + existing.getPages().size();
+ for (Page page : existing.getPages())
+ {
+ verify(dataStorage).remove(page);
+ }
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(saveCount)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ assertNullOrEmpty(task.getRollbackDeletes());
+ Assert.assertNotNull(task.getRollbackSaves());
+ Assert.assertEquals(3, task.getRollbackSaves().getPages().size());
+ Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
+ }
+
+ public void testOverwrite_NewPages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").build();
+ Page.PageSet existing = new Builder().addPage("foo").addPage("bar").addPage("baz").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.OVERWRITE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ int saveCount = importing.getPages().size() + existing.getPages().size();
+ for (Page page : existing.getPages())
+ {
+ verify(dataStorage).remove(page);
+ }
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(saveCount)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(importing.getPages(), task.getRollbackDeletes().getPages());
+
+ Assert.assertNotNull(task.getRollbackSaves());
+ Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
+ }
+
+ public void testOverwrite_NewAndSamePages() throws Exception
+ {
+ Page.PageSet importing = new Builder().addPage("page1").addPage("page2").addPage("page3").addPage("page4").build();
+ Page.PageSet existing = new Builder().addPage("page2").addPage("bar").addPage("page3").build();
+ PageImportTask task = new PageImportTask(importing, siteKey, dataStorage);
+
+ when(dataStorage.find(Matchers.<Query<Page>>any())).thenReturn(list);
+ when(list.getAvailable()).thenReturn(3);
+ when(list.getAll()).thenReturn(existing.getPages());
+
+ task.importData(ImportStrategy.OVERWRITE);
+
+ verify(dataStorage).find(query("user", "foo"));
+ verify(list).getAvailable();
+ verify(list).getAll();
+
+ int saveCount = importing.getPages().size() + existing.getPages().size();
+ for (Page page : existing.getPages())
+ {
+ verify(dataStorage).remove(page);
+ }
+
+ for (Page page : importing.getPages())
+ {
+ verify(dataStorage).save(page);
+ }
+ verify(dataStorage, times(saveCount)).save();
+
+ verifyNoMoreInteractions(dataStorage, list);
+
+ Assert.assertNotNull(task.getRollbackDeletes());
+ Assert.assertEquals(2, task.getRollbackDeletes().getPages().size());
+ Assert.assertEquals(importing.getPages().get(0), task.getRollbackDeletes().getPages().get(0));
+ Assert.assertEquals(importing.getPages().get(3), task.getRollbackDeletes().getPages().get(1));
+
+ Assert.assertNotNull(task.getRollbackSaves());
+ Assert.assertEquals(existing.getPages(), task.getRollbackSaves().getPages());
+ }
+
+ private void assertNullOrEmpty(Page.PageSet pages)
+ {
+ if (pages != null)
+ {
+ Assert.assertTrue(pages.getPages().isEmpty());
+ }
+ }
+
+ private Query<Page> query(String ownerType, String ownerId)
+ {
+ return argThat(new QueryMatcher(new Query<Page>(ownerType, ownerId, Page.class)));
+ }
+
+ private class QueryMatcher extends ArgumentMatcher<Query<Page>>
+ {
+ private Query<Page> query;
+
+ public QueryMatcher(Query<Page> query)
+ {
+ this.query = query;
+ }
+
+ @Override
+ public boolean matches(Object o)
+ {
+ if (query == o) return true;
+ if (!(o instanceof Query)) return false;
+
+ Query that = (Query) o;
+
+ if (!query.getClassType().equals(that.getClassType())) return false;
+ if (!query.getOwnerType().equals(that.getOwnerType())) return false;
+ if (!query.getOwnerId().equals(that.getOwnerId())) return false;
+
+ if (query.getName() != null ? !query.getName().equals(that.getName()) : that.getName() != null) return false;
+ if (query.getTitle() != null ? !query.getTitle().equals(that.getTitle()) : that.getTitle() != null) return false;
+
+ return true;
+ }
+ }
+
+ private static class Builder
+ {
+ private Page.PageSet pages;
+ public Builder()
+ {
+ pages = new Page.PageSet();
+ pages.setPages(new ArrayList<Page>());
+ }
+
+ public Builder addPage(String name)
+ {
+ PageData page= new PageData(null, "", name, null, null, null, null, null, null, null, Collections.<String>emptyList(), Collections.<ComponentData>emptyList(), "", "", null, false);
+ pages.getPages().add(new Page(page));
+
+ return this;
+ }
+
+ public Page.PageSet build()
+ {
+ return pages;
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <priority>3</priority>
- <page-nodes/>
-</node-navigation>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-empty.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <priority>3</priority>
+ <page-nodes/>
+</node-navigation>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,53 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <priority>1</priority>
- <page-nodes>
- <node>
- <name>hello-node</name>
- <label lang="cn">Dobrý den</label>
- <label lang="fr">Bonjour</label>
- <label lang="en">Hello</label>
- <label lang="es">Hola</label>
- <label lang="ja">こんにちは</label>
- <label lang="it">Ciào</label>
- <label lang="zh">你好</label>
- <label lang="zh-TW">Li-ho</label>
- </node>
- <node>
- <name>hello-node2</name>
- <label xml:lang="cn">Dobrý den</label>
- <label xml:lang="fr">Bonjour</label>
- <label xml:lang="en">Hello</label>
- <label xml:lang="es">Hola</label>
- <label xml:lang="ja">こんにちは</label>
- <label xml:lang="it">Ciào</label>
- <label xml:lang="zh">你好</label>
- <label lang="zh-tw">Li-ho</label>
- </node>
- </page-nodes>
-</node-navigation>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-extended.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <priority>1</priority>
+ <page-nodes>
+ <node>
+ <name>hello-node</name>
+ <label lang="cn">Dobrý den</label>
+ <label lang="fr">Bonjour</label>
+ <label lang="en">Hello</label>
+ <label lang="es">Hola</label>
+ <label lang="ja">こんにちは</label>
+ <label lang="it">Ciào</label>
+ <label lang="zh">你好</label>
+ <label lang="zh-TW">Li-ho</label>
+ </node>
+ <node>
+ <name>hello-node2</name>
+ <label xml:lang="cn">Dobrý den</label>
+ <label xml:lang="fr">Bonjour</label>
+ <label xml:lang="en">Hello</label>
+ <label xml:lang="es">Hola</label>
+ <label xml:lang="ja">こんにちは</label>
+ <label xml:lang="it">Ciào</label>
+ <label xml:lang="zh">你好</label>
+ <label lang="zh-tw">Li-ho</label>
+ </node>
+ </page-nodes>
+</node-navigation>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,53 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <priority>1</priority>
- <page-nodes>
- <parent-uri>home</parent-uri>
- <node>
- <name>home-1</name>
- <label>Home 1</label>
- <node>
- <name>home-1-1</name>
- <label>Home 1-1</label>
- </node>
- <node>
- <name>home-1-2</name>
- <label>Home 1-1</label>
- </node>
- </node>
- </page-nodes>
- <page-nodes>
- <parent-uri>foo-bar</parent-uri>
- <node>
- <name>foo</name>
- <label>Foo</label>
- </node>
- <node>
- <name>bar</name>
- <label>Bar</label>
- </node>
- </page-nodes>
-</node-navigation>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation-fragment.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,53 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <priority>1</priority>
+ <page-nodes>
+ <parent-uri>home</parent-uri>
+ <node>
+ <name>home-1</name>
+ <label>Home 1</label>
+ <node>
+ <name>home-1-1</name>
+ <label>Home 1-1</label>
+ </node>
+ <node>
+ <name>home-1-2</name>
+ <label>Home 1-1</label>
+ </node>
+ </node>
+ </page-nodes>
+ <page-nodes>
+ <parent-uri>foo-bar</parent-uri>
+ <node>
+ <name>foo</name>
+ <label>Foo</label>
+ </node>
+ <node>
+ <name>bar</name>
+ <label>Bar</label>
+ </node>
+ </page-nodes>
+</node-navigation>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,172 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <priority>111</priority>
- <page-nodes>
- <node>
- <uri>home</uri>
- <name>home</name>
- <label>#{portal.classic.home}</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::homepage</page-reference>
- <node>
- <uri>home/home-1</uri>
- <name>home-1</name>
- <label>Home 1</label>
- <icon>StarAward</icon>
- <start-publication-date>2011-01-10T12:13:55-05:00</start-publication-date>
- <end-publication-date>2011-01-17T17:14:00-05:00</end-publication-date>
- <visibility>TEMPORAL</visibility>
- <node>
- <uri>home/home-1/empty</uri>
- <name>empty</name>
- <label>Empty</label>
- <visibility>HIDDEN</visibility>
- <page-reference>portal::classic::empty-page</page-reference>
- </node>
- </node>
- </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>DISPLAYED</visibility>
- <page-reference>portal::classic::groupnavigation</page-reference>
- </node>
- <node>
- <uri>portalnavigation</uri>
- <name>portalnavigation</name>
- <label>#{portal.classic.portalnavigation}</label>
- <visibility>SYSTEM</visibility>
- <page-reference>portal::classic::portalnavigation</page-reference>
- </node>
- <node>
- <uri>register</uri>
- <name>register</name>
- <label>#{portal.classic.register}</label>
- <visibility>SYSTEM</visibility>
- <page-reference>portal::classic::register</page-reference>
- </node>
- <node>
- <uri>notfound</uri>
- <name>notfound</name>
- <label>NotFound</label>
- <visibility>SYSTEM</visibility>
- </node>
- <node>
- <uri>n0</uri>
- <name>n0</name>
- <label>n0</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0</page-reference>
- <node>
- <uri>n0/n0</uri>
- <name>n0</name>
- <label>n0</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0</page-reference>
- <node>
- <uri>n0/n0/n0</uri>
- <name>n0</name>
- <label>n0</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n0</page-reference>
- </node>
- <node>
- <uri>n0/n0/n1</uri>
- <name>n1</name>
- <label>n1</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n1</page-reference>
- </node>
- <node>
- <uri>n0/n0/n2</uri>
- <name>n2</name>
- <label>n2</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n2</page-reference>
- </node>
- <node>
- <uri>n0/n0/n3</uri>
- <name>n3</name>
- <label>n3</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n3</page-reference>
- </node>
- <node>
- <uri>n0/n0/n4</uri>
- <name>n4</name>
- <label>n4</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n4</page-reference>
- </node>
- <node>
- <uri>n0/n0/n5</uri>
- <name>n5</name>
- <label>n5</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n5</page-reference>
- </node>
- <node>
- <uri>n0/n0/n6</uri>
- <name>n6</name>
- <label>n6</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n6</page-reference>
- </node>
- <node>
- <uri>n0/n0/n7</uri>
- <name>n7</name>
- <label>n7</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n7</page-reference>
- </node>
- <node>
- <uri>n0/n0/n8</uri>
- <name>n8</name>
- <label>n8</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n8</page-reference>
- </node>
- <node>
- <uri>n0/n0/n9</uri>
- <name>n9</name>
- <label>n9</label>
- <visibility>DISPLAYED</visibility>
- <page-reference>portal::classic::n0_n0_n9</page-reference>
- </node>
- </node>
- </node>
- </page-nodes>
-</node-navigation>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/navigation.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,172 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <priority>111</priority>
+ <page-nodes>
+ <node>
+ <uri>home</uri>
+ <name>home</name>
+ <label>#{portal.classic.home}</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::homepage</page-reference>
+ <node>
+ <uri>home/home-1</uri>
+ <name>home-1</name>
+ <label>Home 1</label>
+ <icon>StarAward</icon>
+ <start-publication-date>2011-01-10T12:13:55-05:00</start-publication-date>
+ <end-publication-date>2011-01-17T17:14:00-05:00</end-publication-date>
+ <visibility>TEMPORAL</visibility>
+ <node>
+ <uri>home/home-1/empty</uri>
+ <name>empty</name>
+ <label>Empty</label>
+ <visibility>HIDDEN</visibility>
+ <page-reference>portal::classic::empty-page</page-reference>
+ </node>
+ </node>
+ </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>DISPLAYED</visibility>
+ <page-reference>portal::classic::groupnavigation</page-reference>
+ </node>
+ <node>
+ <uri>portalnavigation</uri>
+ <name>portalnavigation</name>
+ <label>#{portal.classic.portalnavigation}</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::classic::portalnavigation</page-reference>
+ </node>
+ <node>
+ <uri>register</uri>
+ <name>register</name>
+ <label>#{portal.classic.register}</label>
+ <visibility>SYSTEM</visibility>
+ <page-reference>portal::classic::register</page-reference>
+ </node>
+ <node>
+ <uri>notfound</uri>
+ <name>notfound</name>
+ <label>NotFound</label>
+ <visibility>SYSTEM</visibility>
+ </node>
+ <node>
+ <uri>n0</uri>
+ <name>n0</name>
+ <label>n0</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0</page-reference>
+ <node>
+ <uri>n0/n0</uri>
+ <name>n0</name>
+ <label>n0</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0</page-reference>
+ <node>
+ <uri>n0/n0/n0</uri>
+ <name>n0</name>
+ <label>n0</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n0</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n1</uri>
+ <name>n1</name>
+ <label>n1</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n1</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n2</uri>
+ <name>n2</name>
+ <label>n2</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n2</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n3</uri>
+ <name>n3</name>
+ <label>n3</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n3</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n4</uri>
+ <name>n4</name>
+ <label>n4</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n4</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n5</uri>
+ <name>n5</name>
+ <label>n5</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n5</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n6</uri>
+ <name>n6</name>
+ <label>n6</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n6</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n7</uri>
+ <name>n7</name>
+ <label>n7</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n7</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n8</uri>
+ <name>n8</name>
+ <label>n8</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n8</page-reference>
+ </node>
+ <node>
+ <uri>n0/n0/n9</uri>
+ <name>n9</name>
+ <label>n9</label>
+ <visibility>DISPLAYED</visibility>
+ <page-reference>portal::classic::n0_n0_n9</page-reference>
+ </node>
+ </node>
+ </node>
+ </page-nodes>
+</node-navigation>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,35 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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 xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <page>
- <name>empty-page</name>
- <title>Empty</title>
- <access-permissions>Everyone</access-permissions>
- <edit-permission>*:/platform/administrators</edit-permission>
- <show-max-window>false</show-max-window>
- </page>
-
-</page-set>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-empty.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,35 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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 xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <page>
+ <name>empty-page</name>
+ <title>Empty</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <show-max-window>false</show-max-window>
+ </page>
+
+</page-set>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,53 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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 xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
-
- <page>
- <name>homepage</name>
- <title>Home Page</title>
- <access-permissions>Everyone</access-permissions>
- <edit-permission>*:/platform/administrators</edit-permission>
- <portlet-application>
- <portlet>
- <application-ref>web</application-ref>
- <portlet-ref>HomePagePortlet</portlet-ref>
- <preferences>
- <preference>
- <name>template</name>
- <value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
- <read-only>false</read-only>
- </preference>
- </preferences>
- </portlet>
- <title>Home Page portlet</title>
- <access-permissions>Everyone</access-permissions>
- <show-info-bar>false</show-info-bar>
- <show-application-state>false</show-application-state>
- <show-application-mode>false</show-application-mode>
- </portlet-application>
- </page>
-
-</page-set>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-homepage.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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 xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+
+ <page>
+ <name>homepage</name>
+ <title>Home Page</title>
+ <access-permissions>Everyone</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>HomePagePortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+ <value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <title>Home Page portlet</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>false</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ </portlet-application>
+ </page>
+
+</page-set>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,123 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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 xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <page>
- <name>loaded-page</name>
- <title>Loaded Page</title>
- <access-permissions>manager:/platform/administrators;manager:/platform/users</access-permissions>
- <edit-permission>*:/platform/administrators</edit-permission>
- <show-max-window>false</show-max-window>
- <container id="rootContainer" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
- <access-permissions>Everyone</access-permissions>
- <container id="c1" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
- <access-permissions>*:/platform/users</access-permissions>
- <portlet-application>
- <portlet>
- <application-ref>web</application-ref>
- <portlet-ref>HomePagePortlet</portlet-ref>
- <preferences>
- <preference>
- <name>template</name>
- <value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
- <read-only>true</read-only>
- </preference>
- <preference>
- <name>empty-preference-value</name>
- <value></value>
- </preference>
- <preference>
- <name>no-preference-value</name>
- </preference>
- </preferences>
- </portlet>
- <theme>Mac:MacTheme::Default:DefaultTheme::Vista:VistaTheme</theme>
- <title>Home Page portlet</title>
- <access-permissions>Everyone</access-permissions>
- <show-info-bar>true</show-info-bar>
- <show-application-state>true</show-application-state>
- <show-application-mode>true</show-application-mode>
- </portlet-application>
- </container>
- <container id="c2" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
- <access-permissions>*:/platform/guests</access-permissions>
- <factory-id>TableColumnContainer</factory-id>
- <container id="c2-1" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" width="300px" height="400px">
- <access-permissions>Everyone</access-permissions>
- <portlet-application>
- <portlet>
- <application-ref>exoadmin</application-ref>
- <portlet-ref>ApplicationRegistryPortlet</portlet-ref>
- </portlet>
- <theme>Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme</theme>
- <title>Application Registry</title>
- <access-permissions>*:/platform/administrators;*:/organization/management/executive-board</access-permissions>
- <show-info-bar>false</show-info-bar>
- <show-application-state>true</show-application-state>
- <show-application-mode>false</show-application-mode>
- <description>Application Registry</description>
- <icon>PortletIcon</icon>
- <width>250px</width>
- <height>350px</height>
- </portlet-application>
- </container>
- <container id="c2-2" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" width="200px" height="300px">
- <access-permissions>/platform/users</access-permissions>
- <gadget-application>
- <gadget>
- <gadget-ref>Calendar</gadget-ref>
- </gadget>
- <theme>Vista:VistaTheme::Mac:MacTheme::Default:DefaultTheme</theme>
- <title>Calendar Title</title>
- <access-permissions>*:/platform/administrators;*:/organization/management/executive-board</access-permissions>
- <show-info-bar>true</show-info-bar>
- <show-application-state>false</show-application-state>
- <show-application-mode>false</show-application-mode>
- <description>Calendar Description</description>
- <icon>StarAwardIcon</icon>
- <width>100px</width>
- <height>200px</height>
- </gadget-application>
- </container>
- </container>
- <container id="c3" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
- <access-permissions>Everyone</access-permissions>
- <portlet-application>
- <portlet>
- <application-ref>web</application-ref>
- <portlet-ref>SiteMapPortlet</portlet-ref>
- </portlet>
- <theme>Default:DefaultTheme::Vista:VistaTheme::Mac:MacTheme</theme>
- <title>SiteMap</title>
- <access-permissions>*:/platform/users</access-permissions>
- <show-info-bar>true</show-info-bar>
- <show-application-state>true</show-application-state>
- <show-application-mode>false</show-application-mode>
- <description>SiteMap</description>
- </portlet-application>
- </container>
- </container>
- </page>
-</page-set>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/pages-loaded.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,123 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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 xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <page>
+ <name>loaded-page</name>
+ <title>Loaded Page</title>
+ <access-permissions>manager:/platform/administrators;manager:/platform/users</access-permissions>
+ <edit-permission>*:/platform/administrators</edit-permission>
+ <show-max-window>false</show-max-window>
+ <container id="rootContainer" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <access-permissions>Everyone</access-permissions>
+ <container id="c1" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <access-permissions>*:/platform/users</access-permissions>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>HomePagePortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+ <value>system:/templates/groovy/webui/component/UIHomePagePortlet.gtmpl</value>
+ <read-only>true</read-only>
+ </preference>
+ <preference>
+ <name>empty-preference-value</name>
+ <value></value>
+ </preference>
+ <preference>
+ <name>no-preference-value</name>
+ </preference>
+ </preferences>
+ </portlet>
+ <theme>Mac:MacTheme::Default:DefaultTheme::Vista:VistaTheme</theme>
+ <title>Home Page portlet</title>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </portlet-application>
+ </container>
+ <container id="c2" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
+ <access-permissions>*:/platform/guests</access-permissions>
+ <factory-id>TableColumnContainer</factory-id>
+ <container id="c2-1" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" width="300px" height="400px">
+ <access-permissions>Everyone</access-permissions>
+ <portlet-application>
+ <portlet>
+ <application-ref>exoadmin</application-ref>
+ <portlet-ref>ApplicationRegistryPortlet</portlet-ref>
+ </portlet>
+ <theme>Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme</theme>
+ <title>Application Registry</title>
+ <access-permissions>*:/platform/administrators;*:/organization/management/executive-board</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <description>Application Registry</description>
+ <icon>PortletIcon</icon>
+ <width>250px</width>
+ <height>350px</height>
+ </portlet-application>
+ </container>
+ <container id="c2-2" template="system:/groovy/portal/webui/container/UIContainer.gtmpl" width="200px" height="300px">
+ <access-permissions>/platform/users</access-permissions>
+ <gadget-application>
+ <gadget>
+ <gadget-ref>Calendar</gadget-ref>
+ </gadget>
+ <theme>Vista:VistaTheme::Mac:MacTheme::Default:DefaultTheme</theme>
+ <title>Calendar Title</title>
+ <access-permissions>*:/platform/administrators;*:/organization/management/executive-board</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>false</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <description>Calendar Description</description>
+ <icon>StarAwardIcon</icon>
+ <width>100px</width>
+ <height>200px</height>
+ </gadget-application>
+ </container>
+ </container>
+ <container id="c3" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
+ <access-permissions>Everyone</access-permissions>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>SiteMapPortlet</portlet-ref>
+ </portlet>
+ <theme>Default:DefaultTheme::Vista:VistaTheme::Mac:MacTheme</theme>
+ <title>SiteMap</title>
+ <access-permissions>*:/platform/users</access-permissions>
+ <show-info-bar>true</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <description>SiteMap</description>
+ </portlet-application>
+ </container>
+ </container>
+ </page>
+</page-set>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml 2011-07-30 02:53:38 UTC (rev 6960)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -1,100 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file in the
- ~ distribution for a full listing of individual contributors.
- ~
- ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
- 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">
- <portal-name>classic</portal-name>
- <label>site-label</label>
- <description>site-description</description>
- <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>BannerPortlet</portlet-ref>
- <preferences>
- <preference>
- <name>template</name>
- <value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
- <read-only>false</read-only>
- </preference>
- </preferences>
- </portlet>
- <theme>Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme</theme>
- <title>Banner</title>
- <access-permissions>*:/platform/administrators;*:/organization/management/executive-board</access-permissions>
- <show-info-bar>false</show-info-bar>
- <show-application-state>true</show-application-state>
- <show-application-mode>false</show-application-mode>
- <description>Banner Portlet</description>
- <icon>PortletIcon</icon>
- <width>250px</width>
- <height>350px</height>
- </portlet-application>
- <portlet-application>
- <portlet>
- <application-ref>web</application-ref>
- <portlet-ref>NavigationPortlet</portlet-ref>
- </portlet>
- <access-permissions>Everyone</access-permissions>
- <show-info-bar>false</show-info-bar>
- <show-application-state>true</show-application-state>
- <show-application-mode>true</show-application-mode>
- </portlet-application>
- <portlet-application>
- <portlet>
- <application-ref>web</application-ref>
- <portlet-ref>BreadcumbsPortlet</portlet-ref>
- </portlet>
- <access-permissions>Everyone</access-permissions>
- <show-info-bar>false</show-info-bar>
- <show-application-state>true</show-application-state>
- <show-application-mode>true</show-application-mode>
- </portlet-application>
- <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>
- <show-application-state>true</show-application-state>
- <show-application-mode>true</show-application-mode>
- </portlet-application>
- </portal-layout>
-</portal-config>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml (from rev 6960, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/management/portal.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -0,0 +1,100 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file in the
+ ~ distribution for a full listing of individual contributors.
+ ~
+ ~ 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="http://www.gatein.org/xml/ns/gatein_objects_1_2"
+ 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">
+ <portal-name>classic</portal-name>
+ <label>site-label</label>
+ <description>site-description</description>
+ <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>BannerPortlet</portlet-ref>
+ <preferences>
+ <preference>
+ <name>template</name>
+ <value>par:/groovy/groovy/webui/component/UIBannerPortlet.gtmpl</value>
+ <read-only>false</read-only>
+ </preference>
+ </preferences>
+ </portlet>
+ <theme>Default:DefaultTheme::Mac:MacTheme::Vista:VistaTheme</theme>
+ <title>Banner</title>
+ <access-permissions>*:/platform/administrators;*:/organization/management/executive-board</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>false</show-application-mode>
+ <description>Banner Portlet</description>
+ <icon>PortletIcon</icon>
+ <width>250px</width>
+ <height>350px</height>
+ </portlet-application>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>NavigationPortlet</portlet-ref>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </portlet-application>
+ <portlet-application>
+ <portlet>
+ <application-ref>web</application-ref>
+ <portlet-ref>BreadcumbsPortlet</portlet-ref>
+ </portlet>
+ <access-permissions>Everyone</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </portlet-application>
+ <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>
+ <show-application-state>true</show-application-state>
+ <show-application-mode>true</show-application-mode>
+ </portlet-application>
+ </portal-layout>
+</portal-config>
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-08-18 15:14:42 UTC (rev 7173)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-08-18 15:18:50 UTC (rev 7174)
@@ -50,6 +50,7 @@
<org.picketlink.idm>1.3.0.Alpha03</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.0-Beta04</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-Beta05</org.gatein.mop.version>
+ <org.gatein.mgmt.version>1.0.0-Beta01</org.gatein.mgmt.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
<commons-pool.version>1.5.5</commons-pool.version>
<rhino.version>1.6R5</rhino.version>
@@ -57,6 +58,7 @@
<javax.servlet.version>2.5</javax.servlet.version>
<version.chromattic>1.1.0-beta6</version.chromattic>
<version.reflect>1.1.0-beta12</version.reflect>
+ <org.staxnav.version>0.9.4</org.staxnav.version>
<jcip.version>1.0</jcip.version>
<!-- ************** -->
@@ -379,6 +381,27 @@
<artifactId>mop-core</artifactId>
<version>${org.gatein.mop.version}</version>
</dependency>
+ <!-- Gatein Mgmt -->
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-api</artifactId>
+ <version>${org.gatein.mgmt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-spi</artifactId>
+ <version>${org.gatein.mgmt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-core</artifactId>
+ <version>${org.gatein.mgmt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-rest</artifactId>
+ <version>${org.gatein.mgmt.version}</version>
+ </dependency>
<!-- WSRP -->
<dependency>
<groupId>org.gatein.wsrp</groupId>
@@ -853,7 +876,14 @@
<artifactId>log4j</artifactId>
<version>1.2.16</version>
</dependency>
+ <!-- Staxnav -->
+ <dependency>
+ <groupId>org.staxnav</groupId>
+ <artifactId>staxnav.core</artifactId>
+ <version>${org.staxnav.version}</version>
+ </dependency>
+ <!-- Picketlink -->
<dependency>
<groupId>com.google.javascript</groupId>
<artifactId>closure-compiler</artifactId>
13 years, 5 months
gatein SVN: r7173 - epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-08-18 11:14:42 -0400 (Thu, 18 Aug 2011)
New Revision: 7173
Modified:
epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
Log:
JBEPP-1079 Unknown error when edit category with empty description
Modified: epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
===================================================================
--- epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2011-08-18 12:57:23 UTC (rev 7172)
+++ epp/portal/branches/EPP_5_1_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2011-08-18 15:14:42 UTC (rev 7173)
@@ -43,6 +43,7 @@
import org.exoplatform.webui.organization.UIListPermissionSelector.EmptyIteratorValidator;
import org.gatein.common.text.EntityEncoder;
+import javax.mail.search.StringTerm;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@@ -105,7 +106,8 @@
category_ = category;
uiSetting.getUIStringInput(FIELD_NAME).setEditable(false).setValue(category_.getName());
uiSetting.getUIStringInput(FIELD_DISPLAY_NAME).setValue(category_.getDisplayName());
- uiSetting.getUIFormTextAreaInput(FIELD_DESCRIPTION).setValue( EntityEncoder.FULL.encode(category_.getDescription()) );
+ String description = category_.getDescription()==null?"":category_.getDescription();
+ uiSetting.getUIFormTextAreaInput(FIELD_DESCRIPTION).setValue( EntityEncoder.FULL.encode(description) );
List<String> accessPermissions = category_.getAccessPermissions();
String[] per = new String[accessPermissions.size()];
if (accessPermissions != null && accessPermissions.size() > 0)
13 years, 5 months
gatein SVN: r7172 - in epp/portal/branches/EPP_5_2_Branch/wsrp-integration: extension-config and 3 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-08-18 08:57:23 -0400 (Thu, 18 Aug 2011)
New Revision: 7172
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-config/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear-as5/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/
Log:
Ignore target directories
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component
___________________________________________________________________
Modified: svn:ignore
- *.iml
.idea
+ *.iml
.idea
target
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-config
___________________________________________________________________
Modified: svn:ignore
- *.iml
.idea
+ *.iml
.idea
target
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear
___________________________________________________________________
Modified: svn:ignore
- *.iml
.idea
+ *.iml
.idea
target
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-ear-as5
___________________________________________________________________
Added: svn:ignore
+ target
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war
___________________________________________________________________
Modified: svn:ignore
- *.iml
.idea
+ *.iml
.idea
target
13 years, 5 months
gatein SVN: r7171 - in epp/portal/branches/EPP_5_2_Branch: component and 123 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-08-18 08:48:30 -0400 (Thu, 18 Aug 2011)
New Revision: 7171
Added:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestBootstrap.java
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganization.java
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-picketlink-idm-config.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/jibx/fragment-navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelBootstrap.java
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelTestSuite.java
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/KernelBootstrapTestCase.java
Removed:
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/idm-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/organization-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/test-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/portal/
epp/portal/branches/EPP_5_2_Branch/component/test/organization/
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/application-registry/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/conf/gatein-nodetypes.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/test-mop-nodetypes.xml
epp/portal/branches/EPP_5_2_Branch/component/resources/pom.xml
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/GateInTestClassLoader.java
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/resources/conf/portal-configuration.xml
epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java
epp/portal/branches/EPP_5_2_Branch/component/test/pom.xml
epp/portal/branches/EPP_5_2_Branch/pom.xml
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UINavigationPortlet.java
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UISitemapPortlet.java
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
Log:
JBEPP-1055
The navigation import should be configurable some modes for particular requirement.
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6437,6440,6449,6452,6573,6783-6784,6912-6913
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913
Modified: epp/portal/branches/EPP_5_2_Branch/component/application-registry/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/application-registry/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/application-registry/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -71,7 +71,8 @@
<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>
@@ -103,4 +104,19 @@
<artifactId>pc-api</artifactId>
</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>
+ </build>
+
</project>
Modified: epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/test/java/org/exoplatform/application/AbstractApplicationRegistryTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -26,9 +26,9 @@
*/
@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.identity-configuration.xml"),
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.application-registry-configuration.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration1.xml")
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.portal-configuration.xml")
})
public abstract class AbstractApplicationRegistryTest extends AbstractKernelTest
{
Modified: epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/common/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -96,4 +96,19 @@
<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>
+ </build>
+
</project>
Modified: epp/portal/branches/EPP_5_2_Branch/component/identity/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -92,4 +92,35 @@
</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.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>package</phase>
+ <goals>
+ <goal>test-jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
</project>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestBootstrap.java (from rev 6913, portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestBootstrap.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestBootstrap.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestBootstrap.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,61 @@
+/*
+ * 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.services.organization;
+
+import org.exoplatform.component.test.AbstractKernelTest;
+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.services.database.HibernateService;
+import org.exoplatform.services.organization.impl.UserImpl;
+
+@ConfiguredBy({@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.identity-configuration.xml")})
+public class TestBootstrap extends AbstractKernelTest
+{
+
+ public void testWorkspace() throws Exception
+ {
+ PortalContainer container = PortalContainer.getInstance();
+ HibernateService hibernate = (HibernateService)container.getComponentInstanceOfType(HibernateService.class);
+ assertNotNull(hibernate);
+ OrganizationService organization = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
+ assertNotNull(organization);
+ }
+
+ public void testBasicOperation() throws Exception
+ {
+ PortalContainer container = PortalContainer.getInstance();
+ OrganizationService organization = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
+ assertNotNull(organization);
+
+ begin();
+ User test = new UserImpl("testUser");
+ organization.getUserHandler().createUser(test, false);
+
+ test = organization.getUserHandler().findUserByName("toto");
+ assertNull(test);
+ test = organization.getUserHandler().findUserByName("testUser");
+ assertNotNull(test);
+ end();
+ }
+
+}
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestConfigOrganizationService.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,157 +0,0 @@
-/*
-* JBoss, a division of Red Hat
-* Copyright 2010, Red Hat Middleware, LLC, and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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.services.organization;
-
-import org.exoplatform.commons.utils.PageList;
-import org.exoplatform.component.test.AbstractGateInTest;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.component.ComponentRequestLifecycle;
-import org.exoplatform.container.component.RequestLifeCycle;
-import org.exoplatform.services.organization.idm.Config;
-import org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by The eXo Platform SAS Author : Hoa Pham hoapham@exoplatform.com,phamvuxuanhoa(a)yahoo.com
- * Oct 27, 2005
- */
-
-public class TestConfigOrganizationService extends AbstractGateInTest
-{
-
- static String Group1 = "Group1";
-
- static String Group2 = "Group2";
-
- static String Group3 = "Group3";
-
- static String Benj = "Benj";
-
- static String Tuan = "Tuan";
-
- OrganizationService service_;
-
- UserHandler userHandler_;
-
- UserProfileHandler profileHandler_;
-
- GroupHandler groupHandler_;
-
- MembershipTypeHandler mtHandler_;
-
- MembershipHandler membershipHandler_;
-
- boolean runtest = true;
-
- private static final String USER = "test";
-
- private static final List<String> USERS;
-
- private static final int USERS_LIST_SIZE = 15;
-
- private PortalContainer manager;
-
- static
- {
- USERS = new ArrayList<String>(USERS_LIST_SIZE);
- for (int i = 0; i < USERS_LIST_SIZE; i++)
- USERS.add(USER + "_" + i);
- }
-
- public TestConfigOrganizationService(String s)
- {
- super(s);
- }
-
- public void setUp() throws Exception
- {
- if (!runtest)
- return;
-
- manager = PortalContainer.getInstance();
- service_ = (OrganizationService)manager.getComponentInstanceOfType(OrganizationService.class);
- userHandler_ = service_.getUserHandler();
- profileHandler_ = service_.getUserProfileHandler();
- groupHandler_ = service_.getGroupHandler();
- mtHandler_ = service_.getMembershipTypeHandler();
- membershipHandler_ = service_.getMembershipHandler();
-
-// ((ComponentRequestLifecycle)service_).startRequest(manager);
- RequestLifeCycle.begin((ComponentRequestLifecycle)service_);
-
- }
-
- public void tearDown() throws Exception
- {
- Query query = new Query();
- query.setUserName(USER + "*");
- PageList users = userHandler_.findUsers(query);
-
- List<User> allUsers = users.getAll();
-
- for (int i = allUsers.size() - 1; i >= 0; i--)
- {
- String userName = allUsers.get(i).getUserName();
- userHandler_.removeUser(userName, true);
- }
-
-// ((ComponentRequestLifecycle)service_).endRequest(manager);
- RequestLifeCycle.end();
- }
-
- public void testSimple() throws Exception
- {
- assertTrue(true);
- Config config = ((PicketLinkIDMOrganizationServiceImpl)service_).getConfiguration();
-
- assertNotNull(config);
- assertNotNull(config.getGroupTypeMappings());
- assertNotNull(config.getGroupTypeMappings().keySet());
-
- assertEquals(config.getGroupTypeMappings().keySet().size(), 5);
- assertEquals(config.getGroupTypeMappings().get("/"), "root_type");
-
- assertEquals(config.getGroupType("/"), "root_type");
- assertEquals(config.getGroupType(null), "root_type");
- assertEquals(config.getGroupType("/platform"), "platform_type");
- assertEquals(config.getGroupType("/platform/administrators"), "platform_type");
- assertEquals(config.getGroupType("/platform/guests"), "platform_type");
- assertEquals(config.getGroupType("/platform/users"), "users_type");
- assertEquals(config.getGroupType("/platform/users/john"), "platform_type");
- assertEquals(config.getGroupType("/organization/acme/france/offices"), ".organization.acme.france.offices");
- assertEquals(config.getGroupType("/organization/acme/france/offices/paris"), ".organization.acme.france.offices.paris");
- assertEquals(config.getGroupType("/organization/acme/france"), "france_type");
- assertEquals(config.getGroupType("/organization/acme"), ".organization.acme");
- assertEquals(config.getGroupType("/foo/bar"), ".foo.bar");
- assertEquals(config.getGroupType("/foo"), ".foo");
- assertEquals(config.getGroupType("/toto"), "toto_type");
- assertEquals(config.getGroupType("/toto/lolo"), "toto_type");
- assertEquals(config.getGroupType("/toto/lolo/tutu"), "toto_type");
-
-
- }
-
-
-
-}
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganization.java (from rev 6913, portal/trunk/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganization.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganization.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganization.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,238 @@
+/**
+ * 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.services.organization;
+
+import junit.framework.Assert;
+import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.component.test.AbstractKernelTest;
+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.services.organization.GroupHandler;
+import org.exoplatform.services.organization.OrganizationService;
+import org.exoplatform.services.organization.User;
+import org.exoplatform.services.organization.UserHandler;
+
+import java.util.Collection;
+import java.util.List;
+
+/**
+ * Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
+ * 13, 2007
+ */
+@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 = "org/exoplatform/services/organization/TestOrganization-configuration.xml")
+})
+public class TestOrganization extends AbstractKernelTest
+{
+
+ 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();
+ 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 allGroups = handler.findGroups(null);
+ Assert.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 users = uHandler.findUsersByGroup("/platform/administrators");
+ Assert.assertTrue(users.getAvailable() > 0);
+
+ List iterator = users.getAll();
+ for (Object test : iterator)
+ {
+ User a = (User)test;
+ System.out.println(a.getUserName());
+ }
+ }
+
+ public void testChangePassword() throws Exception
+ {
+ UserHandler uHandler = organizationService.getUserHandler();
+ User user = uHandler.findUserByName("root");
+ Assert.assertNotNull(user);
+ Assert.assertTrue(uHandler.authenticate("root", "gtn"));
+
+ // Test changing password
+ user.setPassword("newPassword");
+ uHandler.saveUser(user, false);
+ user = uHandler.findUserByName("root");
+ Assert.assertNotNull(user);
+ Assert.assertTrue(uHandler.authenticate("root", "newPassword"));
+
+ // Reset to default password
+ user.setPassword("gtn");
+ uHandler.saveUser(user, false);
+
+ }
+
+ 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)
+ {
+
+ }
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/java/org/exoplatform/services/organization/TestOrganizationService.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -21,9 +21,15 @@
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.component.test.AbstractGateInTest;
+import org.exoplatform.component.test.AbstractKernelTest;
+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.container.component.ComponentRequestLifecycle;
import org.exoplatform.container.component.RequestLifeCycle;
+import org.exoplatform.services.organization.idm.Config;
+import org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl;
import org.exoplatform.services.organization.idm.UserDAOImpl;
import java.util.ArrayList;
@@ -34,7 +40,11 @@
* Oct 27, 2005
*/
-public class TestOrganizationService extends AbstractGateInTest
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/services/organization/TestOrganizationService-configuration.xml")
+})
+public class TestOrganizationService extends AbstractKernelTest
{
static String Group1 = "Group1";
@@ -117,10 +127,34 @@
RequestLifeCycle.end();
}
- public void testSimle() throws Exception
+ public void testSimple() throws Exception
{
assertTrue(true);
+ Config config = ((PicketLinkIDMOrganizationServiceImpl)service_).getConfiguration();
+ assertNotNull(config);
+ assertNotNull(config.getGroupTypeMappings());
+ assertNotNull(config.getGroupTypeMappings().keySet());
+
+ assertEquals(config.getGroupTypeMappings().keySet().size(), 5);
+ assertEquals(config.getGroupTypeMappings().get("/"), "root_type");
+
+ assertEquals(config.getGroupType("/"), "root_type");
+ assertEquals(config.getGroupType(null), "root_type");
+ assertEquals(config.getGroupType("/platform"), "platform_type");
+ assertEquals(config.getGroupType("/platform/administrators"), "platform_type");
+ assertEquals(config.getGroupType("/platform/guests"), "platform_type");
+ assertEquals(config.getGroupType("/platform/users"), "users_type");
+ assertEquals(config.getGroupType("/platform/users/john"), "platform_type");
+ assertEquals(config.getGroupType("/organization/acme/france/offices"), ".organization.acme.france.offices");
+ assertEquals(config.getGroupType("/organization/acme/france/offices/paris"), ".organization.acme.france.offices.paris");
+ assertEquals(config.getGroupType("/organization/acme/france"), "france_type");
+ assertEquals(config.getGroupType("/organization/acme"), ".organization.acme");
+ assertEquals(config.getGroupType("/foo/bar"), ".foo.bar");
+ assertEquals(config.getGroupType("/foo"), ".foo");
+ assertEquals(config.getGroupType("/toto"), "toto_type");
+ assertEquals(config.getGroupType("/toto/lolo"), "toto_type");
+ assertEquals(config.getGroupType("/toto/lolo/tutu"), "toto_type");
}
public void testUserPageSize() throws Exception
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-configuration.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/exo.portal.component.identity-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,154 @@
+<?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">
+
+
+ <component>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>config</name>
+ <value>jar:/conf/exo.portal.component.identity-picketlink-idm-config.xml</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name"><string>default</string></field>
+ <field name="maxSize"><int>300</int></field>
+ <field name="liveTime"><long>60</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.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <property name="hibernate.show_sql" value="false"/>
+ <property name="hibernate.current_session_context_class" value="thread"/>
+ <property name="hibernate.cache.use_second_level_cache" value="true"/>
+ <property name="hibernate.cache.use_query_cache" value="true"/>
+ <!--CHANGEME HashtableCacheProvider shold not be used in production env-->
+ <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+ <property name="hibernate.connection.datasource" value="jdbcidm"/>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size" value="5"/>
+ <property name="hibernate.c3p0.max_size" value="20"/>
+ <property name="hibernate.c3p0.timeout" value="1800"/>
+ <property name="hibernate.c3p0.max_statements" value="50"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>conf/mappings/HibernateRealm.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObject.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectCredential.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectType.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcidm</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param profiles="hsqldb">
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:${gatein.test.tmp.dir}/db/data/jdbcidm"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
+ </properties-param>
+ <properties-param profiles="mysql">
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+ <property name="url" value="jdbc:mysql://10.37.129.4/jdbcidm?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8"/>
+ <property name="username" value="root"/>
+ <property name="password" value=""/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+</configuration>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-picketlink-idm-config.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/exo.portal.component.identity-picketlink-idm-config.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-picketlink-idm-config.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/exo.portal.component.identity-picketlink-idm-config.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_ga"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
+ <realms>
+ <realm>
+ <id>idm_realm</id>
+ <repository-id-ref>PortalRepository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>PortalRepository</id>
+ <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>HibernateStore</default-identity-store-id>
+ <default-attribute-store-id>HibernateStore</default-attribute-store-id>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>HibernateStore</id>
+ <class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+ <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>hibernateSessionFactoryRegistryName</name>
+ <value>hibernateSessionFactory</value>
+ </option>
+ <option>
+ <name>allowNotDefinedIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,114 +0,0 @@
-<?xml version="1.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.
- -->
-
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
- table="jbid_io">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <set name="attributes"
- inverse="true"
- cascade="all, delete-orphan"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key>
- <column name="IDENTITY_OBJECT_ID" />
- </key>
- <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute" />
- </set>
- <set name="credentials"
- inverse="true"
- cascade="all, delete-orphan"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key>
- <column name="IDENTITY_OBJECT_ID" />
- </key>
- <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential" />
- </set>
- <set name="fromRelationships"
- inverse="true"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key>
- <column name="FROM_IDENTITY" />
- </key>
- <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
- </set>
- <many-to-one name="identityType"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
- access="field"
- fetch="join"
- lazy="false">
- <column name="IDENTITY_TYPE"
- not-null="true"
- unique-key="id"/>
- </many-to-one>
- <property name="name"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="NAME"
- not-null="true"
- unique-key="id"/>
- </property>
- <map name="properties"
- table="jbid_io_props"
- cascade="all, delete-orphan"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key column="PROP_ID"/>
- <map-key type="string"
- column="PROP_NAME"/>
- <element type="string"
- column="PROP_VALUE"
- not-null="true"/>
- </map>
- <many-to-one name="realm"
- class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
- access="field"
- fetch="select">
- <column name="REALM"
- not-null="true"
- unique-key="id"/>
- </many-to-one>
- <set name="toRelationships"
- inverse="true"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key>
- <column name="TO_IDENTITY" />
- </key>
- <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
- </set>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObject.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,114 @@
+<?xml version="1.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.
+ -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ table="jbid_io">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <set name="attributes"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute" />
+ </set>
+ <set name="credentials"
+ inverse="true"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="IDENTITY_OBJECT_ID" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential" />
+ </set>
+ <set name="fromRelationships"
+ inverse="true"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="FROM_IDENTITY" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ <many-to-one name="identityType"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="IDENTITY_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <set name="toRelationships"
+ inverse="true"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key>
+ <column name="TO_IDENTITY" />
+ </key>
+ <one-to-many class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship" />
+ </set>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,55 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
- table="jbid_io_attr">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ATTRIBUTE_ID" />
- <generator class="native"/>
- </id>
- <many-to-one name="identityObject"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
- access="field"
- fetch="join">
- <column name="IDENTITY_OBJECT_ID" not-null="true" unique-key="id"/>
- </many-to-one>
- <property name="name"
- type="java.lang.String"
- access="property"
- lazy="false">
- <column name="NAME"
- unique-key="id" />
- </property>
- <property name="type"
- type="java.lang.String"
- access="field"
- lazy="false"
- not-null="true">
- <column name="ATTRIBUTE_TYPE"/>
- </property>
- <set name="textValues"
- table="jbid_io_attr_text_values"
- cascade="all, delete-orphan"
- access="field"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key column="TEXT_ATTR_VALUE_ID"/>
- <element type="string"
- column="ATTR_VALUE"/>
- </set>
- <many-to-one name="binaryValue"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
- not-null="false"
- column="BIN_VALUE_ID"
- unique="false"
- lazy="proxy"
- access="field"
- fetch="select"
- cascade="all"/>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttribute.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,55 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttribute"
+ table="jbid_io_attr">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ATTRIBUTE_ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="identityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="join">
+ <column name="IDENTITY_OBJECT_ID" not-null="true" unique-key="id"/>
+ </many-to-one>
+ <property name="name"
+ type="java.lang.String"
+ access="property"
+ lazy="false">
+ <column name="NAME"
+ unique-key="id" />
+ </property>
+ <property name="type"
+ type="java.lang.String"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="ATTRIBUTE_TYPE"/>
+ </property>
+ <set name="textValues"
+ table="jbid_io_attr_text_values"
+ cascade="all, delete-orphan"
+ access="field"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="TEXT_ATTR_VALUE_ID"/>
+ <element type="string"
+ column="ATTR_VALUE"/>
+ </set>
+ <many-to-one name="binaryValue"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="false"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
- table="jbid_attr_bin_value">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="BIN_VALUE_ID" />
- <generator class="native"/>
- </id>
- <property name="value"
- type="org.hibernate.type.PrimitiveByteArrayBlobType"
- access="field"
- lazy="false"
- not-null="true">
- <column name="VALUE" length="10240000"/>
- </property>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectAttributeBinaryValue"
+ table="jbid_attr_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.hibernate.type.PrimitiveByteArrayBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,62 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
- table="jbid_io_creden">
- <cache usage="read-write"/>
-
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <many-to-one name="binaryValue"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
- not-null="false"
- column="BIN_VALUE_ID"
- unique="false"
- lazy="proxy"
- access="field"
- fetch="select"
- cascade="all"/>
- <many-to-one name="identityObject"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
- access="field"
- fetch="select"
- lazy="proxy">
- <column name="IDENTITY_OBJECT_ID"
- not-null="true"
- unique-key="id" />
- </many-to-one>
- <map name="properties"
- table="jbid_io_creden_props"
- cascade="all, delete-orphan"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key column="PROP_ID"/>
- <map-key type="string"
- column="PROP_NAME"/>
- <element type="string"
- column="PROP_VALUE"
- not-null="true"/>
- </map>
- <property name="textValue"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="TEXT" />
- </property>
- <many-to-one name="type"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
- access="field"
- fetch="join"
- lazy="false">
- <column name="CREDENTIAL_TYPE"
- not-null="true"
- unique-key="id"/>
- </many-to-one>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredential.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredential"
+ table="jbid_io_creden">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="binaryValue"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ not-null="false"
+ column="BIN_VALUE_ID"
+ unique="false"
+ lazy="proxy"
+ access="field"
+ fetch="select"
+ cascade="all"/>
+ <many-to-one name="identityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="IDENTITY_OBJECT_ID"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_creden_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <property name="textValue"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="TEXT" />
+ </property>
+ <many-to-one name="type"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ access="field"
+ fetch="join"
+ lazy="false">
+ <column name="CREDENTIAL_TYPE"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,22 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
- table="jbid_creden_bin_value">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="BIN_VALUE_ID" />
- <generator class="native"/>
- </id>
- <property name="value"
- type="org.hibernate.type.PrimitiveByteArrayBlobType"
- access="field"
- lazy="false"
- not-null="true">
- <column name="VALUE" length="10240000"/>
- </property>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,22 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialBinaryValue"
+ table="jbid_creden_bin_value">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="BIN_VALUE_ID" />
+ <generator class="native"/>
+ </id>
+ <property name="value"
+ type="org.hibernate.type.PrimitiveByteArrayBlobType"
+ access="field"
+ lazy="false"
+ not-null="true">
+ <column name="VALUE" length="10240000"/>
+ </property>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
- table="jbid_io_creden_type">
- <cache usage="read-write"/>
-
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <property name="name"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="NAME"
- unique="true" />
- </property>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectCredentialType"
+ table="jbid_io_creden_type">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,63 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
- table="jbid_io_rel">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <many-to-one name="fromIdentityObject"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
- access="field"
- fetch="select"
- lazy="proxy">
- <column name="FROM_IDENTITY"
- not-null="true"
- unique-key="id"/>
- </many-to-one>
- <many-to-one name="name"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
- access="field"
- fetch="join"
- lazy="proxy">
- <column name="NAME"
- unique-key="id"/>
- </many-to-one>
- <many-to-one name="toIdentityObject"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
- access="field"
- fetch="select"
- lazy="proxy">
- <column name="TO_IDENTITY"
- not-null="true"
- unique-key="id"/>
- </many-to-one>
- <many-to-one name="type"
- class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
- access="field"
- fetch="select"
- lazy="proxy">
- <column name="REL_TYPE"
- not-null="true"
- unique-key="id" />
- </many-to-one>
- <map name="properties"
- table="jbid_io_rel_props"
- cascade="all, delete-orphan"
- fetch="subselect"
- lazy="extra">
- <cache usage="read-write"/>
- <key column="PROP_ID"/>
- <map-key type="string"
- column="PROP_NAME"/>
- <element type="string"
- column="PROP_VALUE"
- not-null="true"/>
- </map>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationship.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationship"
+ table="jbid_io_rel">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <many-to-one name="fromIdentityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="FROM_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="name"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ access="field"
+ fetch="join"
+ lazy="proxy">
+ <column name="NAME"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="toIdentityObject"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObject"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="TO_IDENTITY"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+ <many-to-one name="type"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REL_TYPE"
+ not-null="true"
+ unique-key="id" />
+ </many-to-one>
+ <map name="properties"
+ table="jbid_io_rel_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,48 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
- table="jbid_io_rel_name">
- <cache usage="read-write"/>
-
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID"/>
- <generator class="native"/>
- </id>
- <property name="name"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="NAME"
- not-null="true"
- unique="true"
- unique-key="id"/>
- </property>
- <map name="properties"
- table="jbid_io_rel_name_props"
- cascade="all, delete-orphan"
- lazy="extra"
- fetch="subselect">
- <cache usage="read-write"/>
- <key column="PROP_ID"/>
- <map-key type="string"
- column="PROP_NAME"/>
- <element type="string"
- column="PROP_VALUE"
- not-null="true"/>
- </map>
- <many-to-one name="realm"
- class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
- access="field"
- fetch="select"
- lazy="proxy">
- <column name="REALM"
- not-null="true"
- unique-key="id"/>
- </many-to-one>
-
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipName"
+ table="jbid_io_rel_name">
+ <cache usage="read-write"/>
+
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID"/>
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_io_rel_name_props"
+ cascade="all, delete-orphan"
+ lazy="extra"
+ fetch="subselect">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ <many-to-one name="realm"
+ class="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ access="field"
+ fetch="select"
+ lazy="proxy">
+ <column name="REALM"
+ not-null="true"
+ unique-key="id"/>
+ </many-to-one>
+
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
- table="jbid_io_rel_type">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <property name="name"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="NAME"
- not-null="true"
- unique="true" />
- </property>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectRelationshipType"
+ table="jbid_io_rel_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
- "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
- table="jbid_io_type">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <property name="name"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="NAME"
- not-null="true"
- unique="true" />
- </property>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateIdentityObjectType.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,23 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateIdentityObjectType"
+ table="jbid_io_type">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique="true" />
+ </property>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
-"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
-<hibernate-mapping>
- <class name="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
- table="jbid_realm">
- <cache usage="read-write"/>
- <id name="id"
- type="java.lang.Long"
- access="field">
- <column name="ID" />
- <generator class="native"/>
- </id>
- <property name="name"
- type="java.lang.String"
- access="field"
- lazy="false">
- <column name="NAME"
- not-null="true"
- unique-key="id"/>
- </property>
- <map name="properties"
- table="jbid_real_props"
- cascade="all, delete-orphan"
- fetch="subselect"
- lazy="extra">
- <cache usage="read-write"/>
- <key column="PROP_ID"/>
- <map-key type="string"
- column="PROP_NAME"/>
- <element type="string"
- column="PROP_VALUE"
- not-null="true"/>
- </map>
- </class>
-</hibernate-mapping>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/mappings/HibernateRealm.hbm.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<hibernate-mapping>
+ <class name="org.picketlink.idm.impl.model.hibernate.HibernateRealm"
+ table="jbid_realm">
+ <cache usage="read-write"/>
+ <id name="id"
+ type="java.lang.Long"
+ access="field">
+ <column name="ID" />
+ <generator class="native"/>
+ </id>
+ <property name="name"
+ type="java.lang.String"
+ access="field"
+ lazy="false">
+ <column name="NAME"
+ not-null="true"
+ unique-key="id"/>
+ </property>
+ <map name="properties"
+ table="jbid_real_props"
+ cascade="all, delete-orphan"
+ fetch="subselect"
+ lazy="extra">
+ <cache usage="read-write"/>
+ <key column="PROP_ID"/>
+ <map-key type="string"
+ column="PROP_NAME"/>
+ <element type="string"
+ column="PROP_VALUE"
+ not-null="true"/>
+ </map>
+ </class>
+</hibernate-mapping>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/idm-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/idm-configuration.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/idm-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,150 +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.organization.idm.PicketLinkIDMCacheService</key>
- <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
- <type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
- <init-params>
- <value-param>
- <name>config</name>
- <value>jar:/conf/portal/idm-config.xml</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
- <init-params>
- <object-param>
- <name>configuration</name>
- <object type="org.exoplatform.services.organization.idm.Config">
- <field name="useParentIdAsGroupType">
- <boolean>true</boolean>
- </field>
- <field name="groupTypeMappings">
- <map type="java.util.HashMap">
- <entry>
- <key><string>/</string></key>
- <value><string>root_type</string></value>
- </entry>
- <entry>
- <key><string>/platform/*</string></key>
- <value><string>platform_type</string></value>
- </entry>
- <entry>
- <key><string>/platform/users</string></key>
- <value><string>users_type</string></value>
- </entry>
- <entry>
- <key><string>/organization/acme/france</string></key>
- <value><string>france_type</string></value>
- </entry>
- <entry>
- <key><string>/toto/*</string></key>
- <value><string>toto_type</string></value>
- </entry>
- </map>
- </field>
- <!-- If this option is used then each Membership created with MembrshipType that is
- equal to value specified here will be stored in PicketLink IDM as simple
- Group-User association-->
- <field name="associationMembershipType">
- <string>member</string>
- </field>
- <!-- if "associationMembershipType" option is used and this option is set to true
- then Membership with MembershipType configured to be stored as PicketLink IDM association
- will not be stored as PicketLink IDM Role -->
- <field name="ignoreMappedMembershipType">
- <boolean>false</boolean>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
- <!--<property name="hibernate.show_sql" value="true"/>-->
- <!--<property name="hibernate.use_sql_comments" value="true"/>-->
- <!--<property name="hibernate.format_sql" value="true"/>-->
- <property name="hibernate.current_session_context_class" value="thread"/>
- <property name="hibernate.jdbc.batch_size" value="0"/>
- <property name="hibernate.cache.use_second_level_cache" value="true"/>
- <property name="hibernate.cache.use_query_cache" value="true"/>
- <!--CHANGEME HashtableCacheProvider shold not be used in production env-->
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:${basedir}/target/temp/data/exodb${container.name.suffix}"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit" value="true"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements" value="50"/>
- </properties-param>
- </init-params>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>mappings/HibernateRealm.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>mappings/HibernateIdentityObject.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectCredential.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectType.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
- <value>mappings/HibernateIdentityObjectRelationshipName.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/organization-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/organization-configuration.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/organization-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,124 +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.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>empty</value>
- </value-param>
- <value-param>
- <name>printInformation</name>
- <description>Print information init database</description>
- <value>true</value>
- </value-param>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.OrganizationConfig">
- <field name="membershipType">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>member</string></field>
- <field name="description"><string>member membershipt 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>users</string></field>
- <field name="parentId"><string></string></field>
- <!--<field name="type"><string>hierachy</string></field>-->
- <field name="description"><string>the /users group</string></field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="user">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>demo</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>demo</string></field>
- <field name="lastName"><string>demo</string></field>
- <field name="email"><string>demo@localhost</string></field>
- <field name="groups">
- <string>member:/users</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field name="groupId"><string>/users</string></field>
- <field name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
- <value><string>demo</string></value>
- <value><string>admin</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/test-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/test-configuration.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/conf/portal/test-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,88 +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.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
- <value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="DEBUG, stdout" />
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender" />
- <property name="log4j.appender.stdout.threshold" value="INFO" />
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout" />
- <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field name="name"><string>default</string></field>
- <field name="maxSize"><int>300</int></field>
- <field name="liveTime"><long>300</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.database.DatabaseService</key>
- <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
- <init-params>
- <properties-param>
- <name>default</name>
- <description>Connection configuration</description>
- <property name='connection.driver' value='org.hsqldb.jdbcDriver' />
- <property name='connection.url' value='jdbc:hsqldb:mem:db/default' />
- <property name='connection.login' value='sa' />
- <property name='connection.password' value='' />
- <property name='connection.min-size' value='3' />
- <property name='connection.max-size' value='5' />
- </properties-param>
- </init-params>
- </component>
-
- <import>classpath:/conf/portal/idm-configuration.xml</import>
- <import>classpath:/conf/portal/organization-configuration.xml</import>
-</configuration>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,316 +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.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>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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganization-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,316 @@
+<?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.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>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>
Deleted: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml
===================================================================
--- portal/trunk/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml 2011-07-22 04:52:05 UTC (rev 6913)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,309 +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.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
- <value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="DEBUG, stdout" />
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender" />
- <property name="log4j.appender.stdout.threshold" value="INFO" />
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout" />
- <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.cache.CacheService</key>
- <jmx-name>cache:type=CacheService</jmx-name>
- <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
- <init-params>
- <object-param>
- <name>cache.config.default</name>
- <description>The default cache configuration</description>
- <object type="org.exoplatform.services.cache.ExoCacheConfig">
- <field name="name"><string>default</string></field>
- <field name="maxSize"><int>300</int></field>
- <field name="liveTime"><long>300</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.database.DatabaseService</key>
- <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
- <init-params>
- <properties-param>
- <name>default</name>
- <description>Connection configuration</description>
- <property name='connection.driver' value='org.hsqldb.jdbcDriver' />
- <property name='connection.url' value='jdbc:hsqldb:mem:db/default' />
- <property name='connection.login' value='sa' />
- <property name='connection.password' value='' />
- <property name='connection.min-size' value='3' />
- <property name='connection.max-size' value='5' />
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</key>
- <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
- <type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
- <init-params>
- <value-param>
- <name>config</name>
- <value>jar:/conf/portal/idm-config.xml</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
- <init-params>
- <object-param>
- <name>configuration</name>
- <object type="org.exoplatform.services.organization.idm.Config">
- <field name="useParentIdAsGroupType">
- <boolean>true</boolean>
- </field>
- <field name="groupTypeMappings">
- <map type="java.util.HashMap">
- <entry>
- <key><string>/</string></key>
- <value><string>root_type</string></value>
- </entry>
- <entry>
- <key><string>/platform/*</string></key>
- <value><string>platform_type</string></value>
- </entry>
- <entry>
- <key><string>/platform/users</string></key>
- <value><string>users_type</string></value>
- </entry>
- <entry>
- <key><string>/organization/acme/france</string></key>
- <value><string>france_type</string></value>
- </entry>
- <entry>
- <key><string>/toto/*</string></key>
- <value><string>toto_type</string></value>
- </entry>
- </map>
- </field>
- <!-- If this option is used then each Membership created with MembrshipType that is
- equal to value specified here will be stored in PicketLink IDM as simple
- Group-User association-->
- <field name="associationMembershipType">
- <string>member</string>
- </field>
- <!-- if "associationMembershipType" option is used and this option is set to true
- then Membership with MembershipType configured to be stored as PicketLink IDM association
- will not be stored as PicketLink IDM Role -->
- <field name="ignoreMappedMembershipType">
- <boolean>false</boolean>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
- <!--<property name="hibernate.show_sql" value="true"/>-->
- <!--<property name="hibernate.use_sql_comments" value="true"/>-->
- <!--<property name="hibernate.format_sql" value="true"/>-->
- <property name="hibernate.current_session_context_class" value="thread"/>
- <property name="hibernate.jdbc.batch_size" value="0"/>
- <property name="hibernate.cache.use_second_level_cache" value="true"/>
- <property name="hibernate.cache.use_query_cache" value="true"/>
- <!--CHANGEME HashtableCacheProvider shold not be used in production env-->
- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:${basedir}/target/temp/data/exodb${container.name.suffix}"/>
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
- <property name="hibernate.connection.autocommit" value="true"/>
- <property name="hibernate.connection.username" value="sa"/>
- <property name="hibernate.connection.password" value=""/>
- <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
- <property name="hibernate.c3p0.min_size" value="5"/>
- <property name="hibernate.c3p0.max_size" value="20"/>
- <property name="hibernate.c3p0.timeout" value="1800"/>
- <property name="hibernate.c3p0.max_statements" value="50"/>
- </properties-param>
- </init-params>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>conf/mappings/HibernateRealm.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObject.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectCredential.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectType.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
- <value>conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml</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>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>empty</value>
- </value-param>
- <value-param>
- <name>printInformation</name>
- <description>Print information init database</description>
- <value>true</value>
- </value-param>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.OrganizationConfig">
- <field name="membershipType">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type"><string>member</string></field>
- <field name="description"><string>member membershipt 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>users</string></field>
- <field name="parentId"><string></string></field>
- <!--<field name="type"><string>hierachy</string></field>-->
- <field name="description"><string>the /users group</string></field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="user">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName"><string>demo</string></field>
- <field name="password"><string>exo</string></field>
- <field name="firstName"><string>demo</string></field>
- <field name="lastName"><string>demo</string></field>
- <field name="email"><string>demo@localhost</string></field>
- <field name="groups">
- <string>member:/users</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>new.user.event.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
- <description>this listener assign group and membership to a new created user</description>
- <init-params>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig">
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
- <field name="groupId"><string>/users</string></field>
- <field name="membership"><string>member</string></field>
- </object>
- </value>
- </collection>
- </field>
- <field name="ignoredUser">
- <collection type="java.util.HashSet">
- <value><string>demo</string></value>
- <value><string>admin</string></value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-</configuration>
Copied: epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml (from rev 6913, portal/trunk/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/identity/src/test/resources/org/exoplatform/services/organization/TestOrganizationService-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,309 @@
+<?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.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+ <value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="DEBUG, stdout" />
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender" />
+ <property name="log4j.appender.stdout.threshold" value="INFO" />
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout" />
+ <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.cache.CacheService</key>
+ <jmx-name>cache:type=CacheService</jmx-name>
+ <type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>cache.config.default</name>
+ <description>The default cache configuration</description>
+ <object type="org.exoplatform.services.cache.ExoCacheConfig">
+ <field name="name"><string>default</string></field>
+ <field name="maxSize"><int>300</int></field>
+ <field name="liveTime"><long>300</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.database.DatabaseService</key>
+ <type>org.exoplatform.services.database.impl.XAPoolTxSupportDatabaseService</type>
+ <init-params>
+ <properties-param>
+ <name>default</name>
+ <description>Connection configuration</description>
+ <property name='connection.driver' value='org.hsqldb.jdbcDriver' />
+ <property name='connection.url' value='jdbc:hsqldb:mem:db/default' />
+ <property name='connection.login' value='sa' />
+ <property name='connection.password' value='' />
+ <property name='connection.min-size' value='3' />
+ <property name='connection.max-size' value='5' />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMCacheService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.idm.PicketLinkIDMService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>config</name>
+ <value>jar:/conf/portal/idm-config.xml</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.idm.PicketLinkIDMOrganizationServiceImpl</type>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <object type="org.exoplatform.services.organization.idm.Config">
+ <field name="useParentIdAsGroupType">
+ <boolean>true</boolean>
+ </field>
+ <field name="groupTypeMappings">
+ <map type="java.util.HashMap">
+ <entry>
+ <key><string>/</string></key>
+ <value><string>root_type</string></value>
+ </entry>
+ <entry>
+ <key><string>/platform/*</string></key>
+ <value><string>platform_type</string></value>
+ </entry>
+ <entry>
+ <key><string>/platform/users</string></key>
+ <value><string>users_type</string></value>
+ </entry>
+ <entry>
+ <key><string>/organization/acme/france</string></key>
+ <value><string>france_type</string></value>
+ </entry>
+ <entry>
+ <key><string>/toto/*</string></key>
+ <value><string>toto_type</string></value>
+ </entry>
+ </map>
+ </field>
+ <!-- If this option is used then each Membership created with MembrshipType that is
+ equal to value specified here will be stored in PicketLink IDM as simple
+ Group-User association-->
+ <field name="associationMembershipType">
+ <string>member</string>
+ </field>
+ <!-- if "associationMembershipType" option is used and this option is set to true
+ then Membership with MembershipType configured to be stored as PicketLink IDM association
+ will not be stored as PicketLink IDM Role -->
+ <field name="ignoreMappedMembershipType">
+ <boolean>false</boolean>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.hbm2ddl.auto" value="create-drop"/>
+ <!--<property name="hibernate.show_sql" value="true"/>-->
+ <!--<property name="hibernate.use_sql_comments" value="true"/>-->
+ <!--<property name="hibernate.format_sql" value="true"/>-->
+ <property name="hibernate.current_session_context_class" value="thread"/>
+ <property name="hibernate.jdbc.batch_size" value="0"/>
+ <property name="hibernate.cache.use_second_level_cache" value="true"/>
+ <property name="hibernate.cache.use_query_cache" value="true"/>
+ <!--CHANGEME HashtableCacheProvider shold not be used in production env-->
+ <property name="hibernate.cache.provider_class" value="org.hibernate.cache.HashtableCacheProvider"/>
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:file:${basedir}/target/temp/data/exodb${container.name.suffix}"/>
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.autocommit" value="true"/>
+ <property name="hibernate.connection.username" value="sa"/>
+ <property name="hibernate.connection.password" value=""/>
+ <property name="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"/>
+ <property name="hibernate.c3p0.min_size" value="5"/>
+ <property name="hibernate.c3p0.max_size" value="20"/>
+ <property name="hibernate.c3p0.timeout" value="1800"/>
+ <property name="hibernate.c3p0.max_statements" value="50"/>
+ </properties-param>
+ </init-params>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>conf/mappings/HibernateRealm.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectCredentialBinaryValue.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectAttributeBinaryValue.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObject.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectCredential.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectCredentialType.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectAttribute.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectType.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectRelationship.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectRelationshipType.hbm.xml</value>
+ <value>conf/mappings/HibernateIdentityObjectRelationshipName.hbm.xml</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>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>empty</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <description>Print information init database</description>
+ <value>true</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.OrganizationConfig">
+ <field name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type"><string>member</string></field>
+ <field name="description"><string>member membershipt 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>users</string></field>
+ <field name="parentId"><string></string></field>
+ <!--<field name="type"><string>hierachy</string></field>-->
+ <field name="description"><string>the /users group</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName"><string>demo</string></field>
+ <field name="password"><string>exo</string></field>
+ <field name="firstName"><string>demo</string></field>
+ <field name="lastName"><string>demo</string></field>
+ <field name="email"><string>demo@localhost</string></field>
+ <field name="groups">
+ <string>member:/users</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+
+ <component-plugin>
+ <name>new.user.event.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.impl.NewUserEventListener</type>
+ <description>this listener assign group and membership to a new created user</description>
+ <init-params>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.impl.NewUserConfig">
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.impl.NewUserConfig$JoinGroup">
+ <field name="groupId"><string>/users</string></field>
+ <field name="membership"><string>member</string></field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ <field name="ignoredUser">
+ <collection type="java.util.HashSet">
+ <value><string>demo</string></value>
+ <value><string>admin</string></value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+</configuration>
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/conf/gatein-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/conf/gatein-nodetypes.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/conf/gatein-nodetypes.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/gatein_objects_1_2.xsd 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfig.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/ImportMode.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/importer/NavigationImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
- }
- }
- }
- });
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NString.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/I18NValue.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
+ }
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedString.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/LocalizedValue.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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 + "]";
+ }
}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/NavigationFragment.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNavigation.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNode.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PageNodeContainer.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/serialize/LocalizedValueMapper.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
}
//
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,63 +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.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;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportConfig.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,57 +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.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;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/ImportMode.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,46 +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.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);
-
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/Imported.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
+
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,365 +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.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;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationFragmentImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,158 +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.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();
- }
- }
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/importer/NavigationImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/GenericScope.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NodeContext.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/Scope.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/TreeUpdate.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNode.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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)
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java (from rev 6912, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserNodeListener.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/user/UserPortalImpl.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/resources/binding.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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">
@@ -96,10 +96,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"/>
@@ -107,7 +107,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">
@@ -130,11 +130,18 @@
<structure name="owner-type" usage="optional"/>
<structure name="owner-id" 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"
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/AbstractPortalTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/TestXSDCorruption.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -60,6 +60,6 @@
{
assertHash("d0591b0a022a0c2929e1aed8979857cd", "gatein_objects_1_0.xsd");
assertHash("99ae24c9bbfe1b59e066756a29ab6c79", "gatein_objects_1_1.xsd");
- assertHash("8bb0cd234fc32e11149e38f689dd7cef", "gatein_objects_1_2.xsd");
+ assertHash("4aab6cc6bf86236de80deaed72170c5f", "gatein_objects_1_2.xsd");
}
}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractConfigTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportFragmentTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportNavigationTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/AbstractPortalTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -30,7 +30,7 @@
* Nov 10, 2010
*/
-public class TestConcurrencyDataStorage extends AbstractPortalTest
+public class TestConcurrencyDataStorage extends AbstractConfigTest
{
private DataStorage storage_;
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -27,7 +27,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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestGadget.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestHandleMixin.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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();
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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();
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentConserve.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentInsert.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportFragmentOverwrite.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationConserve.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationInsert.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationMerge.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestImportNavigationOverwrite.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestJIBXXmlMapping.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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,11 +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::classic::homepage", pageNavigation.getFragment().getNode("home").getPageReference());
/*
IMarshallingContext mctx = bfact.createMarshallingContext();
@@ -110,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();
@@ -140,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
@@ -157,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());
@@ -168,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());
@@ -194,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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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);
}
*/
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestOrganization.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,103 +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.utils.PageList;
-import org.exoplatform.container.PortalContainer;
-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.Collection;
-import java.util.List;
-
-/**
- * Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
- * 13, 2007
- */
-public class TestOrganization extends AbstractPortalTest
-{
-
- private OrganizationService organizationService;
-
- @Override
- protected void setUp() throws Exception
- {
- super.setUp();
- begin();
- PortalContainer container = getContainer();
- organizationService = (OrganizationService)container.getComponentInstance(OrganizationService.class);
- }
-
- @Override
- protected void tearDown() throws Exception
- {
- end();
- super.tearDown();
- }
-
- public void testFindGroups() throws Exception
- {
- GroupHandler handler = organizationService.getGroupHandler();
- Collection allGroups = handler.findGroups(null);
- assertTrue(allGroups.size() > 0);
- }
-
- public void testFindGroupById() throws Exception
- {
- GroupHandler uHandler = organizationService.getGroupHandler();
- Collection group = uHandler.findGroupsOfUser("root");
- }
-
- public void testFindUserByGroup() throws Exception
- {
- UserHandler uHandler = organizationService.getUserHandler();
- PageList users = uHandler.findUsersByGroup("/platform/administrators");
- assertTrue(users.getAvailable() > 0);
-
- List iterator = users.getAll();
- for (Object test : iterator)
- {
- User a = (User)test;
- System.out.println(a.getUserName());
- }
- }
-
- public void testChangePassword() throws Exception
- {
- UserHandler uHandler = organizationService.getUserHandler();
- User user = uHandler.findUserByName("root");
- assertNotNull(user);
- assertTrue(uHandler.authenticate("root", "gtn"));
-
- // Test changing password
- user.setPassword("newPassword");
- uHandler.saveUser(user, false);
- user = uHandler.findUserByName("root");
- assertNotNull(user);
- assertTrue(uHandler.authenticate("root", "newPassword"));
-
- // Reset to default password
- user.setPassword("gtn");
- uHandler.saveUser(user, false);
-
- }
-}
Deleted: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortalConfig.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestPortletPreferences.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSavedPOM.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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());
- }
-}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/TestWSRP.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/Builder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/config/importer/TestNavigationImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
{
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,98 +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.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();
-
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/Builder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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();
+
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,42 +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.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;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/FragmentBuilder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,44 +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.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;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/NodeBuilder.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,130 +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.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"));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationFragmentImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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"));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,380 +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.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());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java (from rev 6912, portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/importer/TestNavigationImporter.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestScope.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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()
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration1.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration2.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/test-mop-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/test-mop-nodetypes.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/conf/test-mop-nodetypes.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/jibx/fragment-navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/jibx/fragment-navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/jibx/fragment-navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/jibx/fragment-navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,65 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport1-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,66 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/TestImport2-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,310 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,51 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,50 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,57 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set />
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/organization/management/executive-board/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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 />
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,54 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,70 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,86 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set />
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/administrators/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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 />
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,51 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,52 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,73 +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.
-
--->
-
-<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>
-
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
+
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/guests/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,51 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,70 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,121 +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.
-
--->
-
-<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>
-
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
+
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,57 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/platform/users/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,88 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/template/group/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,31 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,39 +0,0 @@
-<?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>
-
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
+
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,34 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/legacy/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,31 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,39 +0,0 @@
-<?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>
-
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
+
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,34 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/group/test/normalized/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,42 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,61 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,53 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,68 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/classic/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,47 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,22 +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.
- -->
-
-<page-set>
-</page-set>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,31 +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.
- -->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/system/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,34 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,42 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,55 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,57 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/classic/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,34 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,34 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,41 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/template/test/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,72 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,98 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,58 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,69 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/portal/test/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,32 +0,0 @@
-<?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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,48 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/four-columns/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,30 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/one-column/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,42 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/three-columns/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/containers/two-columns/container.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/dashboard/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,27 +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.
-
--->
-
-<page>
- <owner-type></owner-type>
- <owner-id></owner-id>
- <name></name>
-</page>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/empty/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,32 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/one-row-two-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,32 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,30 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,34 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-rows-two-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/three-tabs/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,31 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,32 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-columns-one-row/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,29 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set/>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-rows/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,55 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/page.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,45 +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.
-
--->
-
-<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
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/template/pages/two-tabs/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,38 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/overwritelayout/user.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,27 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<page-set />
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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 />
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,46 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/conf/user/template/user/user.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,32 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment1-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,33 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/fragment2-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,40 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation1-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/config/navigation2-conf/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,67 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,42 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,59 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,53 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/large/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,72 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,96 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/navigation/portal/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,260 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,51 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,50 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,57 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set />
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/organization/management/executive-board/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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 />
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,54 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,70 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,86 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,23 +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.
-
--->
-
-<portlet-preferences-set />
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/administrators/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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 />
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,51 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,52 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,73 +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.
-
--->
-
-<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>
-
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
+
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,36 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/guests/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,51 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/group.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,70 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,121 +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.
-
--->
-
-<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>
-
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
+
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,57 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/group/platform/users/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,42 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,61 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,53 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,68 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/classic/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,39 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,28 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/extended/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,50 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,48 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,30 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/limited/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,47 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,22 +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.
- -->
-
-<page-set>
-</page-set>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,31 +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.
- -->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/system/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,72 +0,0 @@
-<?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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/navigation.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,98 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/pages.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,58 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portal.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Deleted: epp/portal/branches/EPP_5_2_Branch/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 2011-07-22 03:13:14 UTC (rev 6912)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -1,69 +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.
-
--->
-
-<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>
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml (from rev 6912, portal/trunk/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/test/resources/org/exoplatform/portal/mop/user/portal/test/portlet-preferences.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -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>
Modified: epp/portal/branches/EPP_5_2_Branch/component/resources/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/resources/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/resources/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -54,4 +54,19 @@
</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>
+ </build>
+
</project>
Modified: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/AbstractKernelTest.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -19,15 +19,13 @@
package org.exoplatform.component.test;
-import junit.framework.AssertionFailedError;
+import junit.framework.TestSuite;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.RequestLifeCycle;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.EnumMap;
-import java.util.HashSet;
-import java.util.Set;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicLong;
/**
* An abstract test that takes care of running the unit tests with the semantic described by the
@@ -39,14 +37,11 @@
public class AbstractKernelTest extends AbstractGateInTest
{
- /** The system property for gatein tmp dir. */
- private static final String TMP_DIR = "gatein.test.tmp.dir";
-
/** . */
- private PortalContainer container;
+ private static KernelBootstrap bootstrap;
/** . */
- private ClassLoader realClassLoader;
+ private static final Map<Class<?>, AtomicLong> counters = new HashMap<Class<?>, AtomicLong>();
protected AbstractKernelTest()
{
@@ -60,12 +55,12 @@
public PortalContainer getContainer()
{
- return container;
+ return bootstrap != null ? bootstrap.getContainer() : null;
}
protected void begin()
{
- RequestLifeCycle.begin(container);
+ RequestLifeCycle.begin(getContainer());
}
protected void end()
@@ -76,104 +71,41 @@
@Override
protected void beforeRunBare() throws Exception
{
- realClassLoader = Thread.currentThread().getContextClassLoader();
+ Class<?> key = getClass();
//
- Set<String> rootConfigPaths = new HashSet<String>();
- rootConfigPaths.add("conf/root-configuration.xml");
-
- //
- Set<String> portalConfigPaths = new HashSet<String>();
- portalConfigPaths.add("conf/portal-configuration.xml");
-
- //
- EnumMap<ContainerScope, Set<String>> configs = new EnumMap<ContainerScope, Set<String>>(ContainerScope.class);
- configs.put(ContainerScope.ROOT, rootConfigPaths);
- configs.put(ContainerScope.PORTAL, portalConfigPaths);
-
- //
- ConfiguredBy cfBy = getClass().getAnnotation(ConfiguredBy.class);
- if (cfBy != null)
+ if (!counters.containsKey(key))
{
- for (ConfigurationUnit src : cfBy.value())
- {
- configs.get(src.scope()).add(src.path());
- }
- }
+ counters.put(key, new AtomicLong(new TestSuite(getClass()).testCount()));
- // Take care of creating tmp directory for unit test
- if (System.getProperty(TMP_DIR) == null)
- {
- // Get base dir set by maven or die
- File targetDir = new File(new File(System.getProperty("basedir")), "target");
- if (!targetDir.exists())
- {
- throw new AssertionFailedError("Target dir for unit test does not exist");
- }
- if (!targetDir.isDirectory())
- {
- throw new AssertionFailedError("Target dir is not a directory");
- }
- if (!targetDir.canWrite())
- {
- throw new AssertionFailedError("Target dir is not writable");
- }
-
//
- Set<String> fileNames = new HashSet<String>();
- for (File child : targetDir.listFiles(new FilenameFilter()
- {
- public boolean accept(File dir, String name)
- {
- return name.startsWith("gateintest-");
- }
- }))
- {
- fileNames.add(child.getName());
- }
+ bootstrap = new KernelBootstrap(Thread.currentThread().getContextClassLoader());
- //
- String fileName;
- int count = 0;
- while (true)
- {
- fileName = "gateintest-" + count;
- if (!fileNames.contains(fileName)) {
- break;
- }
- count++;
- }
+ // Configure ourselves
+ bootstrap.addConfiguration(getClass());
//
- File tmp = new File(targetDir, fileName);
- if (!tmp.mkdirs())
- {
- throw new AssertionFailedError("Could not create directory " + tmp.getCanonicalPath());
- }
-
- //
- System.setProperty(TMP_DIR, tmp.getCanonicalPath());
+ bootstrap.boot();
}
//
- ClassLoader testClassLoader = new GateInTestClassLoader(realClassLoader, rootConfigPaths, portalConfigPaths);
- Thread.currentThread().setContextClassLoader(testClassLoader);
-
- // Boot the container
- container = PortalContainer.getInstance();
-
- //
// List<Throwable> failures = new ArrayList<Throwable>();
}
@Override
protected void afterRunBare()
{
- container = null;
+ Class<?> key = getClass();
//
- Thread.currentThread().setContextClassLoader(realClassLoader);
+ if (counters.get(key).decrementAndGet() == 0)
+ {
+ bootstrap.dispose();
+ //
+ bootstrap = null;
+ }
+
/*
if (failures.size() > 0)
{
Modified: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/GateInTestClassLoader.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/GateInTestClassLoader.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/GateInTestClassLoader.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -42,7 +42,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-public final class GateInTestClassLoader extends ClassLoader
+final class GateInTestClassLoader extends ClassLoader
{
/** . */
Copied: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelBootstrap.java (from rev 6913, portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/KernelBootstrap.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelBootstrap.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelBootstrap.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,259 @@
+/*
+ * 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.component.test;
+
+import junit.framework.AssertionFailedError;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.RootContainer;
+
+import java.io.File;
+import java.io.FilenameFilter;
+import java.lang.reflect.Field;
+import java.util.EnumMap;
+import java.util.HashSet;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+public class KernelBootstrap
+{
+
+ /** The system property for gatein tmp dir. */
+ private static final String TMP_DIR = "gatein.test.tmp.dir";
+
+ /** . */
+ private File tmpDir;
+
+ /** . */
+ private File targetDir;
+
+ /** . */
+ private EnumMap<ContainerScope, Set<String>> configs;
+
+ /** . */
+ private ClassLoader realClassLoader;
+
+ /** The portal container available once the kernel is booted. */
+ private PortalContainer container;
+
+ public KernelBootstrap()
+ {
+ this(Thread.currentThread().getContextClassLoader());
+ }
+
+ public KernelBootstrap(ClassLoader realClassLoader)
+ {
+
+ //
+ Set<String> rootConfigPaths = new LinkedHashSet<String>();
+ rootConfigPaths.add("conf/root-configuration.xml");
+ Set<String> portalConfigPaths = new LinkedHashSet<String>();
+ portalConfigPaths.add("conf/portal-configuration.xml");
+ EnumMap<ContainerScope, Set<String>> configs = new EnumMap<ContainerScope, Set<String>>(ContainerScope.class);
+ configs.put(ContainerScope.ROOT, rootConfigPaths);
+ configs.put(ContainerScope.PORTAL, portalConfigPaths);
+
+ //
+ File targetDir = new File(new File(System.getProperty("basedir")), "target");
+ if (!targetDir.exists())
+ {
+ throw new AssertionFailedError("Target dir for unit test does not exist");
+ }
+ if (!targetDir.isDirectory())
+ {
+ throw new AssertionFailedError("Target dir is not a directory");
+ }
+ if (!targetDir.canWrite())
+ {
+ throw new AssertionFailedError("Target dir is not writable");
+ }
+
+
+ //
+ this.configs = configs;
+ this.targetDir = targetDir;
+ this.tmpDir = findTmpDir(targetDir);
+ this.realClassLoader = realClassLoader;
+ }
+
+ private static File findTmpDir(File dir)
+ {
+ Set<String> fileNames = new HashSet<String>();
+ for (File child : dir.listFiles(new FilenameFilter()
+ {
+ public boolean accept(File dir, String name)
+ {
+ return name.startsWith("gateintest-");
+ }
+ }))
+ {
+ fileNames.add(child.getName());
+ }
+
+ //
+ String fileName;
+ int count = 0;
+ while (true)
+ {
+ fileName = "gateintest-" + count;
+ if (!fileNames.contains(fileName)) {
+ break;
+ }
+ count++;
+ }
+
+ //
+ return new File(dir, fileName);
+ }
+
+ public File getTargetDir()
+ {
+ return targetDir;
+ }
+
+ public File getTmpDir()
+ {
+ return tmpDir;
+ }
+
+ /**
+ * Set the tmp dir of the test to a new file location. The new tmp dir must be a strict descendant of the
+ * {@link #targetDir} file.
+ *
+ * @param tmpDir the new tmp dir
+ * @throws IllegalArgumentException if the tmp dir is not a descendant of the target dir
+ */
+ public void setTmpDir(File tmpDir) throws IllegalArgumentException
+ {
+ for (File parent = tmpDir.getParentFile();!targetDir.equals(parent);parent = parent.getParentFile())
+ {
+ if (parent == null)
+ {
+ throw new IllegalArgumentException("Wrong tmp dir " + tmpDir);
+ }
+ }
+
+ //
+ this.tmpDir = tmpDir;
+ }
+
+ public PortalContainer getContainer()
+ {
+ return container;
+ }
+
+ public void addConfiguration(ContainerScope scope, String path)
+ {
+ configs.get(scope).add(path);
+ }
+
+ public void addConfiguration(ConfigurationUnit unit)
+ {
+ addConfiguration(unit.scope(), unit.path());
+ }
+
+ public void addConfiguration(ConfiguredBy configuredBy)
+ {
+ for (ConfigurationUnit unit : configuredBy.value())
+ {
+ addConfiguration(unit);
+ }
+ }
+
+ public void addConfiguration(Class<?> clazz)
+ {
+ ConfiguredBy cfBy = clazz.getAnnotation(ConfiguredBy.class);
+ if (cfBy != null)
+ {
+ addConfiguration(cfBy);
+ }
+ }
+
+ /**
+ * Boot the kernel.
+ *
+ * @throws IllegalStateException if the kernel is already booted
+ */
+ public void boot() throws IllegalStateException
+ {
+ if (container != null)
+ {
+ throw new IllegalStateException("Already booted");
+ }
+ try
+ {
+ // Must clear the top container first otherwise it's not going to work well
+ // it's a bit ugly but I don't want to change anything in the ExoContainerContext class for now
+ // and this is for unit testing
+ Field topContainerField = ExoContainerContext.class.getDeclaredField("topContainer");
+ topContainerField.setAccessible(true);
+ topContainerField.set(null, null);
+
+ // Same remark than above
+ Field singletonField = RootContainer.class.getDeclaredField("singleton_");
+ singletonField.setAccessible(true);
+ singletonField.set(null, null);
+
+ if (!tmpDir.exists())
+ {
+ if (!tmpDir.mkdirs())
+ {
+ throw new AssertionFailedError("Could not create directory " + tmpDir.getAbsolutePath());
+ }
+ }
+
+ // Set property globally available for configuration XML
+ System.setProperty(TMP_DIR, tmpDir.getCanonicalPath());
+
+ //
+ ClassLoader testClassLoader = new GateInTestClassLoader(
+ realClassLoader,
+ configs.get(ContainerScope.ROOT),
+ configs.get(ContainerScope.PORTAL));
+ Thread.currentThread().setContextClassLoader(testClassLoader);
+
+ // Boot the container
+ this.container = PortalContainer.getInstance();
+ }
+ catch (Exception e)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(e);
+ throw afe;
+ }
+ finally
+ {
+ Thread.currentThread().setContextClassLoader(realClassLoader);
+ }
+ }
+
+ public void dispose()
+ {
+ if (container != null)
+ {
+ RootContainer.getInstance().stop();
+ container = null;
+ ExoContainerContext.setCurrentContainer(null);
+ }
+ }
+}
Copied: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelTestSuite.java (from rev 6913, portal/trunk/component/test/core/src/main/java/org/exoplatform/component/test/KernelTestSuite.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelTestSuite.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/java/org/exoplatform/component/test/KernelTestSuite.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,64 @@
+/*
+ * 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.component.test;
+
+import junit.framework.TestResult;
+import junit.framework.TestSuite;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+final class KernelTestSuite extends TestSuite
+{
+
+ /** . */
+ private final Class<? extends AbstractKernelTest> testClass;
+
+ KernelTestSuite(Class<? extends AbstractKernelTest> testClass)
+ {
+ super(testClass);
+
+ //
+ this.testClass = testClass;
+ }
+
+ @Override
+ public void run(TestResult result)
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap(Thread.currentThread().getContextClassLoader());
+
+ //
+ try
+ {
+ // Configure ourselves
+ bootstrap.addConfiguration(testClass);
+
+ //
+ bootstrap.boot();
+
+ //
+ super.run(result);
+ }
+ finally
+ {
+ bootstrap.dispose();
+ }
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/resources/conf/portal-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/resources/conf/portal-configuration.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/main/resources/conf/portal-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -21,8 +21,8 @@
-->
<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">
+ 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">
<component>
<key>org.exoplatform.services.naming.InitialContextInitializer</key>
@@ -55,14 +55,22 @@
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</value-param>
- <properties-param>
+ <properties-param profiles="hsqldb">
<name>ref-addresses</name>
<description>ref-addresses</description>
- <property name="driverClassName" value="${gatein.test.datasource.driver}"/>
- <property name="url" value="${gatein.test.datasource.url}"/>
- <property name="username" value="${gatein.test.datasource.username}"/>
- <property name="password" value="${gatein.test.datasource.password}"/>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
+ <property name="url" value="jdbc:hsqldb:file:${gatein.test.tmp.dir}/db/data/jdbcjcr"/>
+ <property name="username" value="sa"/>
+ <property name="password" value=""/>
</properties-param>
+ <properties-param profiles="mysql">
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
+ <property name="url" value="jdbc:mysql://10.37.129.4/jdbcjcr?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8"/>
+ <property name="username" value="root"/>
+ <property name="password" value=""/>
+ </properties-param>
</init-params>
</component-plugin>
</external-component-plugins>
Modified: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/BootstrapTestCase.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -32,10 +32,7 @@
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
* @version $Revision$
*/
-@ConfiguredBy({
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/jcr/jcr-configuration.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/test-configuration.xml")
-})
+@ConfiguredBy({@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/test-configuration.xml")})
public class BootstrapTestCase extends AbstractKernelTest
{
@@ -100,6 +97,5 @@
assertTrue(f.exists());
assertTrue(f.isDirectory());
assertTrue(f.canWrite());
- assertEquals(0, f.list().length);
}
}
Copied: epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/KernelBootstrapTestCase.java (from rev 6913, portal/trunk/component/test/core/src/test/java/org/exoplatform/component/test/KernelBootstrapTestCase.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/KernelBootstrapTestCase.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/core/src/test/java/org/exoplatform/component/test/KernelBootstrapTestCase.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -0,0 +1,119 @@
+/*
+ * 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.component.test;
+
+import junit.framework.TestCase;
+import org.exoplatform.container.PortalContainer;
+
+import java.io.File;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+public class KernelBootstrapTestCase extends TestCase
+{
+
+ public void testReboot()
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ bootstrap.boot();
+ PortalContainer container1 = bootstrap.getContainer();
+ bootstrap.dispose();
+ bootstrap.boot();
+ PortalContainer container2 = bootstrap.getContainer();
+ assertNotSame(container1, container2);
+ }
+
+ public void testGetTmpDir()
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ assertEquals(bootstrap.getTargetDir(), bootstrap.getTmpDir().getParentFile());
+ }
+
+ public void testSetTmpDir()
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ try
+ {
+ bootstrap.setTmpDir(new File("a"));
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
+ try
+ {
+ bootstrap.setTmpDir(bootstrap.getTargetDir());
+ fail();
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
+ try
+ {
+ bootstrap.setTmpDir(new File(bootstrap.getTargetDir(), "a"));
+ }
+ catch (IllegalArgumentException e)
+ {
+ }
+ }
+
+ public void testTmpDirLifeCycle()
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ try
+ {
+ File tmp = bootstrap.getTmpDir();
+ assertFalse(tmp.exists());
+ tmp = bootstrap.getTmpDir();
+ bootstrap.boot();
+ assertTrue(tmp.exists());
+ }
+ finally
+ {
+ bootstrap.dispose();
+ }
+ }
+
+ public void testUseExistingTmpDir()
+ {
+ KernelBootstrap bootstrap = new KernelBootstrap();
+ File tmp;
+ try
+ {
+ bootstrap.boot();
+ tmp = bootstrap.getTmpDir();
+ }
+ finally
+ {
+ bootstrap.dispose();
+ }
+ try
+ {
+ bootstrap = new KernelBootstrap();
+ bootstrap.setTmpDir(tmp);
+ bootstrap.boot();
+ }
+ finally
+ {
+ bootstrap.dispose();
+ }
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/component/test/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/test/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/component/test/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -33,7 +33,6 @@
<modules>
<module>core</module>
<module>jcr</module>
- <module>organization</module>
</modules>
</project>
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -500,6 +500,12 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.identity</artifactId>
+ <version>5.2.0-epp-DEV03-SNAPSHOT</version>
+ <type>test-jar</type>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.component.resources</artifactId>
<version>5.2.0-epp-DEV03-SNAPSHOT</version>
</dependency>
@@ -670,11 +676,6 @@
<dependency>
<groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>${org.slf4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${org.slf4j.version}</version>
</dependency>
@@ -1049,21 +1050,9 @@
<value>${project.build.directory}</value>
</property>
<property>
- <name>gatein.test.datasource.driver</name>
- <value>org.hsqldb.jdbcDriver</value>
+ <name>exo.profiles</name>
+ <value>hsqldb</value>
</property>
- <property>
- <name>gatein.test.datasource.url</name>
- <value>jdbc:hsqldb:mem:gateindb</value>
- </property>
- <property>
- <name>gatein.test.datasource.username</name>
- <value>sa</value>
- </property>
- <property>
- <name>gatein.test.datasource.password</name>
- <value />
- </property>
</systemProperties>
</configuration>
</plugin>
@@ -1102,21 +1091,9 @@
<value>${project.build.directory}</value>
</property>
<property>
- <name>gatein.test.datasource.driver</name>
- <value>com.mysql.jdbc.Driver</value>
+ <name>exo.profiles</name>
+ <value>mysql</value>
</property>
- <property>
- <name>gatein.test.datasource.url</name>
- <value>jdbc:mysql://10.37.129.4/gatein?createDatabaseIfNotExist=true&useUnicode=true&characterEncoding=utf-8</value>
- </property>
- <property>
- <name>gatein.test.datasource.username</name>
- <value>root</value>
- </property>
- <property>
- <name>gatein.test.datasource.password</name>
- <value>a</value>
- </property>
</systemProperties>
</configuration>
</plugin>
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/BasePartialUpdateToolbar.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -79,7 +79,7 @@
}
else
{
- toolbarScope = new GenericScope(level);
+ toolbarScope = GenericScope.treeShape(level);
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UINavigationPortlet.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UINavigationPortlet.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UINavigationPortlet.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -80,7 +80,7 @@
}
else
{
- portalNavigation.setScope(new GenericScope(level));
+ portalNavigation.setScope(GenericScope.treeShape(level));
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UISitemapPortlet.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UISitemapPortlet.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UISitemapPortlet.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -90,7 +90,7 @@
}
else
{
- uiPortalNavigation.setScope(new GenericScope(level));
+ uiPortalNavigation.setScope(GenericScope.treeShape(level));
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-08-18 12:48:30 UTC (rev 7171)
@@ -180,6 +180,7 @@
</field>
<field name="ownerType"><string>portal</string></field>
<field name="templateLocation"><string>war:/conf/portal/</string></field>
+ <field name="importMode"><string>conserve</string></field>
</object>
</object-param>
<object-param>
@@ -194,8 +195,9 @@
<value><string>/organization/management/executive-board</string></value>
</collection>
</field>
- <field name="ownerType"><string>group</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
+ <field name="ownerType"><string>group</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ <field name="importMode"><string>conserve</string></field>
</object>
</object-param>
<object-param>
@@ -211,8 +213,9 @@
<value><string>user</string></value>
</collection>
</field>
- <field name="ownerType"><string>user</string></field>
- <field name="templateLocation"><string>war:/conf/portal</string></field>
+ <field name="ownerType"><string>user</string></field>
+ <field name="templateLocation"><string>war:/conf/portal</string></field>
+ <field name="importMode"><string>conserve</string></field>
</object>
</object-param>
</init-params>
@@ -251,6 +254,8 @@
</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>
@@ -281,6 +286,8 @@
<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>
@@ -291,6 +298,7 @@
<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>
</values-param>
<properties-param>
<name>options</name>
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2011-08-18 11:13:41 UTC (rev 7170)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2011-08-18 12:48:30 UTC (rev 7171)
@@ -27,8 +27,10 @@
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserNode;
+import org.exoplatform.portal.mop.user.UserNodeFilterConfig;
import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.portal.webui.application.UIGadget;
import org.exoplatform.portal.webui.portal.PageNodeEvent;
@@ -62,7 +64,9 @@
UserPortal userPortal = uiPortalApp.getUserPortalConfig().getUserPortal();
String uri = ((PageNodeEvent<UIPortal>)event).getTargetNodeUri();
- UserNode naviPath = userPortal.resolvePath(null, uri);
+ UserNodeFilterConfig.Builder builder = UserNodeFilterConfig.builder();
+ builder.withAuthorizationCheck();
+ UserNode naviPath = userPortal.resolvePath(builder.build(), uri);
UserNavigation targetNav = naviPath.getNavigation();
UserNode currentNavPath = showedUIPortal.getNavPath();
13 years, 5 months
gatein SVN: r7170 - in portal/trunk: web/eXoResources/src/main/webapp/javascript/eXo/portal and 1 other directory.
by do-not-reply@jboss.org
Author: trong.tran
Date: 2011-08-18 07:13:41 -0400 (Thu, 18 Aug 2011)
New Revision: 7170
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
Log:
GTNPORTAL-2030 Show message when delete application in page
GTNPORTAL-2029 Can't drag & drop container when edit page or layout
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-17 22:44:43 UTC (rev 7169)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-18 11:13:41 UTC (rev 7170)
@@ -226,7 +226,7 @@
String gadgetUrl = GadgetUtil.reproduceUrl(gadget.getUrl(), gadget.isLocal());
String metadataUrl = gadgetServerUrl + (gadgetServerUrl.endsWith("/") ? "" : "/") + "metadata";
String queryString = "{\"context\":{\"ignoreCache\":\"true\"},\"gadgets\":[" + "{\"url\":\"" + gadgetUrl + "\"}]}";
- event.getRequestContext().getJavascriptManager().addJavascript("ajaxAsyncRequest('" + metadataUrl + "', true, 'POST', '" + queryString + "');");
+ event.getRequestContext().getJavascriptManager().addJavascript("ajaxRequest('" + metadataUrl + "', true, 'POST', '" + queryString + "');");
}
}
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-17 22:44:43 UTC (rev 7169)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-18 11:13:41 UTC (rev 7170)
@@ -724,28 +724,35 @@
} ;
/**
- * Create a ajax GET request
+ * Create an ajax GET request
* @param {String} url - Url
* @param {boolean} async - asynchronous or none
* @return {String} response text if request is not async
*/
function ajaxAsyncGetRequest(url, async) {
- ajaxAsyncRequest("GET", url, async);
+ ajaxRequest("GET", url, async);
}
/**
- * Create a ajax request
+ * Create an ajax request
* @param {String} method - GET, POST, etc
* @param {String} url - Url
* @param {boolean} async - asynchronous or none
* @return {String} response text if request is not async
*/
-function ajaxAsyncRequest(url, async, method, queryString) {
+function ajaxRequest(method, url, async, queryString) {
if(async == undefined) async = true ;
var request = eXo.core.Browser.createHttpRequest() ;
request.open(method, url, async) ;
request.setRequestHeader("Cache-Control", "max-age=86400") ;
- request.send((queryString != undefined && queryString != null) ? queryString : null) ;
+ if(queryString)
+ {
+ request.send(queryString) ;
+ }
+ else
+ {
+ request.send(null);
+ }
eXo.session.itvDestroy() ;
if(eXo.session.canKeepState && eXo.session.isOpen && eXo.env.portal.accessMode == 'private') {
eXo.session.itvInit() ;
13 years, 5 months
gatein SVN: r7169 - in epp/portal/branches/EPP_5_2_Branch: component/web/resources/src/main/java/org/exoplatform/portal/resource and 7 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-08-17 18:44:43 -0400 (Wed, 17 Aug 2011)
New Revision: 7169
Added:
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/gatein_resources_1_2.xsd
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_2.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SimpleSkin.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinConfig.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java
epp/portal/branches/EPP_5_2_Branch/examples/skins/simpleskin/src/main/webapp/WEB-INF/gatein-resources.xml
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
JBEPP-1016: merge in skin priority patches
Added: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/gatein_resources_1_2.xsd
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/gatein_resources_1_2.xsd (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/gatein_resources_1_2.xsd 2011-08-17 22:44:43 UTC (rev 7169)
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<xs:schema
+ targetNamespace="http://www.gatein.org/xml/ns/gatein_resources_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_2"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0">
+
+ <!-- The root element type that contains the various resource declarations -->
+ <xs:element name="gatein-resources">
+ <xs:complexType>
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="portal-skin" type="portal-skin" />
+ <xs:element name="portlet-skin" type="portlet-skin" />
+ <xs:element name="window-style" type="window-style" />
+ <xs:element name="javascript" type="javascript" />
+ <xs:element name="resource-bundle" type="resource-bundle" />
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+
+ <!-- Declares a portal skin resource -->
+ <xs:complexType name="portal-skin">
+ <xs:sequence>
+ <xs:element name="skin-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="skin-module" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="css-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="css-priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="overwrite" type="xs:integer" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a portlet skin resource -->
+ <xs:complexType name="portlet-skin">
+ <xs:sequence>
+ <!-- The portlet application name -->
+ <xs:element name="application-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The portlet name -->
+ <xs:element name="portlet-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The name of the skin to load -->
+ <xs:element name="skin-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The css path of the skin relative to the application context -->
+ <xs:element name="css-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- Overwrite -->
+ <xs:element name="overwrite" type="xs:string" minOccurs="0" maxOccurs="1"/>
+
+ <!-- The css priority of the skin to indicate condition for sorting -->
+ <xs:element name="css-priority" type="xs:integer" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a window style -->
+ <xs:complexType name="window-style" mixed="true">
+ <xs:sequence>
+
+ <!-- The window style name -->
+ <xs:element name="style-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The window style theme -->
+ <xs:element name="style-theme" type="style-theme" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- The window style theme -->
+ <xs:complexType name="style-theme">
+ <xs:sequence>
+ <!-- The theme name -->
+ <xs:element name="theme-name" type="xs:string" minOccurs="1" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a javascript resource -->
+ <xs:complexType name="javascript">
+ <xs:sequence>
+ <xs:element name="param" type="param" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <xs:complexType name="param">
+ <xs:sequence>
+ <!-- The javascript module -->
+ <xs:element name="js-module" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript path -->
+ <xs:element name="js-path" type="xs:string" minOccurs="1" maxOccurs="1"/>
+
+ <!-- The javascript priority -->
+ <xs:element name="js-priority" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ </xs:complexType>
+
+ <!-- Declares a resource bundle -->
+ <xs:complexType name="resource-bundle">
+ </xs:complexType>
+
+</xs:schema>
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SimpleSkin.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SimpleSkin.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SimpleSkin.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -39,6 +39,8 @@
private final String cssPath_;
private final String id_;
+
+ private final int cssPriority_;
public SimpleSkin(SkinService service, String module, String name, String cssPath)
{
@@ -47,8 +49,24 @@
name_ = name;
cssPath_ = cssPath;
id_ = module.replace('/', '_');
+ cssPriority_ = -1;
}
+ public SimpleSkin(SkinService service, String module, String name, String cssPath, Integer cssPriority)
+ {
+ service_ = service;
+ module_ = module;
+ name_ = name;
+ cssPath_ = cssPath;
+ id_ = module.replace('/', '_');
+ cssPriority_ = cssPriority != null ? cssPriority : -1;
+ }
+
+ public int getCSSPriority()
+ {
+ return cssPriority_;
+ }
+
public String getId()
{
return id_;
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinConfig.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinConfig.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinConfig.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -48,5 +48,12 @@
* @return the css path
*/
String getCSSPath();
+
+ /**
+ * Returns the priority number
+ *
+ * @return the priority number
+ */
+ int getCSSPriority();
}
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/SkinService.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -51,6 +51,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
+import java.util.Comparator;
import java.util.Date;
import java.util.EnumMap;
import java.util.HashMap;
@@ -191,7 +192,7 @@
/**
* add category into portletThemes_ if portletThemes does not contain one
- * @param categoryName: category's name that want to add into portletThemes
+ * @param categoryName: category's name that wangt to add into portletThemes
*/
public void addCategoryTheme(String categoryName)
{
@@ -281,9 +282,102 @@
rtCache.remove(cssPath);
}
+ /**
+ * Register the stylesheet for a portal Skin. Do not replace any previous skin. Support priority
+ *
+ * @param module
+ * skin module identifier
+ * @param skinName
+ * skin name
+ * @param cssPath
+ * path uri to the css file. This is relative to the root context,
+ * use leading '/'
+ * @param scontext
+ * the webapp's {@link javax.servlet.ServletContext}
+ * @param cssPriority
+ * priority to support sorting in skin list
+ */
+ public void addPortalSkin(String module, String skinName, String cssPath, ServletContext scontext, Integer cssPriority)
+ {
+ addPortalSkin(module, skinName, cssPath, scontext, false, cssPriority);
+ }
/**
+ * Register the stylesheet for a portal Skin. Support priority
*
+ * @param module
+ * skin module identifier
+ * @param skinName
+ * skin name
+ * @param cssPath
+ * path uri to the css file. This is relative to the root context,
+ * use leading '/'
+ * @param scontext
+ * the webapp's {@link javax.servlet.ServletContext}
+ * @param overwrite
+ * if any previous skin should be replaced by that one
+ * @param cssPriority
+ * priority to support sorting in skin list
+ */
+ public void addPortalSkin(String module, String skinName, String cssPath, ServletContext scontext, boolean overwrite, Integer cssPrioriry)
+ {
+ availableSkins_.add(skinName);
+ SkinKey key = new SkinKey(module, skinName);
+ SkinConfig skinConfig = portalSkins_.get(key);
+ if (skinConfig == null || overwrite)
+ {
+ skinConfig = new SimpleSkin(this, module, skinName, cssPath, cssPrioriry);
+ portalSkins_.put(key, skinConfig);
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("Adding Portal skin : Bind " + key + " to " + skinConfig);
+ }
+ }
+ }
+
+ /**
+ * Register the stylesheet for a portal Skin. Support priority
+ *
+ * @param module
+ * skin module identifier
+ * @param skinName
+ * skin name
+ * @param cssPath
+ * path uri to the css file. This is relative to the root context,
+ * use leading '/'
+ * @param cssData
+ * the content of css
+ * @param cssPriority
+ * priority to support sorting in skin list
+ */
+ public void addPortalSkin(String module, String skinName, String cssPath, String cssData, Integer cssPriority)
+ {
+ SkinKey key = new SkinKey(module, skinName);
+ SkinConfig skinConfig = portalSkins_.get(key);
+ if (skinConfig == null)
+ {
+ portalSkins_.put(key, new SimpleSkin(this, module, skinName, cssPath, cssPriority));
+
+ if (log.isDebugEnabled())
+ {
+ log.debug("Adding Portal skin : Bind " + key + " to " + skinConfig);
+ }
+ }
+ try
+ {
+ StringWriter output = new StringWriter();
+ compressor.compress(new StringReader(cssData), output, ResourceType.STYLESHEET);
+ cssData = output.toString();
+ }
+ catch (Exception e)
+ {
+ log.debug("Error when compressing CSS, will use normal CSS instead", e);
+ }
+ }
+
+ /**
+ *
* Register the Skin for available portal Skins. Do not override previous skin
*
* @param module
@@ -351,6 +445,36 @@
skinConfigs_.put(key, skinConfig);
}
}
+
+ /**
+ *
+ * Register the Skin for available portal Skins. Support priority
+ *
+ * @param module
+ * skin module identifier
+ * @param skinName
+ * skin name
+ * @param cssPath
+ * path uri to the css file. This is relative to the root context,
+ * use leading '/'
+ * @param scontext
+ * the webapp's {@link javax.servlet.ServletContext}
+ * @param overwrite
+ * if any previous skin should be replaced by that one
+ * @param cssPriority
+ * priority to support sorting in skin list
+ */
+ public void addSkin(String module, String skinName, String cssPath, ServletContext scontext, boolean overwrite, Integer cssPriority)
+ {
+ availableSkins_.add(skinName);
+ SkinKey key = new SkinKey(module, skinName);
+ SkinConfig skinConfig = skinConfigs_.get(key);
+ if (skinConfig == null || overwrite)
+ {
+ skinConfig = new SimpleSkin(this, module, skinName, cssPath, cssPriority);
+ skinConfigs_.put(key, skinConfig);
+ }
+ }
/**
*
@@ -508,12 +632,26 @@
public Collection<SkinConfig> getPortalSkins(String skinName)
{
Set<SkinKey> keys = portalSkins_.keySet();
- Collection<SkinConfig> portalSkins = new ArrayList<SkinConfig>();
+ List<SkinConfig> portalSkins = new ArrayList<SkinConfig>();
for (SkinKey key : keys)
{
if (key.getName().equals(skinName))
portalSkins.add(portalSkins_.get(key));
}
+ Collections.sort(portalSkins, new Comparator<SkinConfig>()
+ {
+ public int compare(SkinConfig o1, SkinConfig o2)
+ {
+ if (o1.getCSSPriority() == o2.getCSSPriority())
+ return 1;//Can indicate others condition here
+ else if (o1.getCSSPriority() < 0)
+ return 1;
+ else if (o2.getCSSPriority() < 0)
+ return -1;
+ else
+ return o1.getCSSPriority() - o2.getCSSPriority();
+ }
+ });
return portalSkins;
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/AbstractSkinModule.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -33,6 +33,7 @@
protected String skinName;
protected String cssPath;
protected boolean overwrite;
+ protected String cssPriority;
public AbstractSkinModule(String name)
{
@@ -70,6 +71,16 @@
setOverwrite("true".equals(overwrite));
}
+ protected void bindingCSSPriority(Element element)
+ {
+ NodeList nodes = element.getElementsByTagName(SkinConfigParser.CSS_PRIORITY_TAG);
+ if (nodes == null || nodes.getLength() < 1)
+ {
+ return;
+ }
+ this.cssPriority = nodes.item(0).getFirstChild().getNodeValue();
+ }
+
public void setSkinName(String name)
{
this.skinName = name;
@@ -85,4 +96,9 @@
{
this.overwrite = _overwrite;
}
+
+ public void setCSSPriority(String _cssPriority)
+ {
+ this.cssPriority = _cssPriority;
+ }
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortalSkinTask.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -67,6 +67,7 @@
bindingSkinName(elemt);
bindingModuleName(elemt);
bindingOverwrite(elemt);
+ bindingCSSPriority(elemt);
}
public void execute(SkinService skinService, ServletContext scontext)
@@ -77,7 +78,14 @@
}
String contextPath = scontext.getContextPath();
String fullCSSPath = contextPath + cssPath;
- skinService.addPortalSkin(moduleName, skinName, fullCSSPath, scontext, overwrite);
+ Integer iCssPriority = null;
+ try
+ {
+ iCssPriority = Integer.valueOf(cssPriority);
+ } catch (Exception e) {
+ //Don't set cssPriority when it is not a numarical
+ }
+ skinService.addPortalSkin(moduleName, skinName, fullCSSPath, scontext, overwrite, iCssPriority);
updateSkinDependentManager(contextPath, moduleName, skinName);
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/tasks/PortletSkinTask.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -93,7 +93,14 @@
String moduleName = applicationName + "/" + portletName;
String contextPath = scontext.getContextPath();
String fullCSSPath = contextPath + cssPath;
- skinService.addSkin(moduleName, skinName, fullCSSPath, scontext, overwrite);
+ Integer iCSSPriority = null;
+ try
+ {
+ iCSSPriority = Integer.valueOf(cssPriority);
+ } catch (Exception e) {
+ //Don't set cssPriority when it is not a numarical
+ }
+ skinService.addSkin(moduleName, skinName, fullCSSPath, scontext, overwrite, iCSSPriority);
updateSkinDependentManager(contextPath, moduleName, skinName);
}
@@ -109,7 +116,8 @@
bindingPortletName(elemt);
bindingCSSPath(elemt);
bindingSkinName(elemt);
- bindingOverwrite(elemt);
+ bindingOverwrite(elemt);
+ bindingCSSPriority(elemt);
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/main/java/org/exoplatform/portal/resource/config/xml/SkinConfigParser.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -52,10 +52,16 @@
public static final String GATEIN_RESOURCES_1_1_SYSTEM_ID = "http://www.gatein.org/xml/ns/gatein_resources_1_1";
/** . */
+ public static final String GATEIN_RESOURCES_1_2_SYSTEM_ID = "http://www.gatein.org/xml/ns/gatein_resources_1_2";
+
+ /** . */
private static final String GATEIN_RESOURCE_1_0_XSD_PATH = "gatein_resources_1_0.xsd";
/** . */
private static final String GATEIN_RESOURCE_1_1_XSD_PATH = "gatein_resources_1_1.xsd";
+
+ /** . */
+ private static final String GATEIN_RESOURCE_1_2_XSD_PATH = "gatein_resources_1_2.xsd";
/** . */
private static final XMLValidator VALIDATOR;
@@ -83,6 +89,9 @@
/** . */
final public static String CSS_PATH_TAG = "css-path";
+
+ /** . */
+ final public static String CSS_PRIORITY_TAG = "css-priority";
/** . */
final public static String WINDOW_STYLE_TAG = "window-style";
@@ -101,6 +110,7 @@
Map<String, String> systemIdToResourcePath = new HashMap<String, String>();
systemIdToResourcePath.put(GATEIN_RESOURCES_1_0_SYSTEM_ID, GATEIN_RESOURCE_1_0_XSD_PATH);
systemIdToResourcePath.put(GATEIN_RESOURCES_1_1_SYSTEM_ID, GATEIN_RESOURCE_1_1_XSD_PATH);
+ systemIdToResourcePath.put(GATEIN_RESOURCES_1_2_SYSTEM_ID, GATEIN_RESOURCE_1_2_XSD_PATH);
VALIDATOR = new XMLValidator(SkinConfigParser.class, systemIdToResourcePath);
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestGateInResourceParser.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -27,6 +27,10 @@
assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_1.xml");
}
+ public void testResources1_2() throws MalformedURLException
+ {
+ assertDescriptorCanBeLoaded("org/exoplatform/portal/resource/gatein-resources-1_2.xml");
+ }
private void assertDescriptorCanBeLoaded(String descriptorPath) throws MalformedURLException
{
URL url = Thread.currentThread().getContextClassLoader().getResource(descriptorPath);
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/java/org/exoplatform/portal/resource/TestXSDCorruption.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -55,9 +55,10 @@
assertEquals(expected, sb.toString());
}
- public void testGateInResources1_0() throws Exception
+ public void testGateInResources1_x() throws Exception
{
assertHash("c68ea6831c3d24a242f63abd2db261a6", "gatein_resources_1_0.xsd");
assertHash("c55b7e0dc8ae23e2d34430b38260cd96", "gatein_resources_1_1.xsd");
+ assertHash("378178d66c1efacf87619c3c60a4cbf6", "gatein_resources_1_2.xsd");
}
}
\ No newline at end of file
Added: epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_2.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_2.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/resources/src/test/resources/org/exoplatform/portal/resource/gatein-resources-1_2.xml 2011-08-17 22:44:43 UTC (rev 7169)
@@ -0,0 +1,331 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+<gatein-resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_2 http://www.gatein.org/xml/ns/gatein_resources_1_2" xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_2">
+
+ <!-- Portal skins -->
+ <portal-skin>
+ <skin-name>Default</skin-name>
+ <skin-module>MyModule</skin-module>
+ <css-path>/skin/Stylesheet.css</css-path>
+ <css-priority>0</css-priority>
+ </portal-skin>
+
+ <!-- BannerPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>BannerPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIBannerPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- FooterPortlet skins -->
+
+ <portlet-skin>
+ <application-name>web</application-name>
+ <portlet-name>FooterPortlet</portlet-name>
+ <skin-name>Default</skin-name>
+ <css-path>/skin/portal/webui/component/UIFooterPortlet/DefaultStylesheet.css</css-path>
+ </portlet-skin>
+
+ <!-- Simple window style -->
+ <window-style>
+ <style-name>Simple</style-name>
+ <style-theme>
+ <theme-name>SimpleBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimplePink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>SimpleGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- RoundConer window style -->
+ <window-style>
+ <style-name>RoundConer</style-name>
+ <style-theme>
+ <theme-name>RoundConerBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>RoundConerGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- Shadow window style -->
+ <window-style>
+ <style-name>Shadow</style-name>
+ <style-theme>
+ <theme-name>ShadowBlue</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowViolet</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowOrange</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowPink</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>ShadowGreen</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- MacStyle window style -->
+ <window-style>
+ <style-name>MacStyle</style-name>
+ <style-theme>
+ <theme-name>MacTheme</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGray</theme-name>
+ </style-theme>
+ <style-theme>
+ <theme-name>MacGreenSteel</theme-name>
+ </style-theme>
+ </window-style>
+
+ <!-- VistaStyle window style -->
+ <window-style>
+ <style-name>VistaStyle</style-name>
+ <style-theme>
+ <theme-name>VistaTheme</theme-name>
+ </style-theme>
+ </window-style>
+
+ <javascript>
+ <param>
+ <js-module>eXo</js-module>
+ <js-path>/javascript/eXo.js</js-path>
+ <js-priority>0</js-priority>
+ </param>
+ </javascript>
+
+ <!-- CORE Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.core.Utils</js-module>
+ <js-path>/javascript/eXo/core/Util.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.DOMUtil</js-module>
+ <js-path>/javascript/eXo/core/DOMUtil.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.Browser</js-module>
+ <js-path>/javascript/eXo/core/Browser.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.MouseEventManager</js-module>
+ <js-path>/javascript/eXo/core/MouseEventManager.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.UIMaskLayer</js-module>
+ <js-path>/javascript/eXo/core/UIMaskLayer.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Skin</js-module>
+ <js-path>/javascript/eXo/core/Skin.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop</js-module>
+ <js-path>/javascript/eXo/core/DragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.DragDrop2</js-module>
+ <js-path>/javascript/eXo/core/DragDrop2.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Topic</js-module>
+ <js-path>/javascript/eXo/core/Topic.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.JSON</js-module>
+ <js-path>/javascript/eXo/core/JSON.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Cometd</js-module>
+ <js-path>/javascript/eXo/core/Cometd.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Spliter</js-module>
+ <js-path>/javascript/eXo/core/Spliter.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Notification</js-module>
+ <js-path>/javascript/eXo/core/Notification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.Loader</js-module>
+ <js-path>/javascript/eXo/core/Loader.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.core.I18n</js-module>
+ <js-path>/javascript/eXo/core/I18n.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Gadget Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.gadget.UIGadget</js-module>
+ <js-path>/javascript/eXo/gadget/UIGadget.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- WebUI Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIItemSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIItemSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIForm</js-module>
+ <js-path>/javascript/eXo/webui/UIForm.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopup</js-module>
+ <js-path>/javascript/eXo/webui/UIPopup.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupSelectCategory</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupSelectCategory.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupWindow</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupWindow.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIHorizontalTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIHorizontalTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDropDownControl</js-module>
+ <js-path>/javascript/eXo/webui/UIDropDownControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIRightClickPopupMenu</js-module>
+ <js-path>/javascript/eXo/webui/UIRightClickPopupMenu.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIVerticalSlideTabs</js-module>
+ <js-path>/javascript/eXo/webui/UIVerticalSlideTabs.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIPermissionSelectorTab</js-module>
+ <js-path>/javascript/eXo/webui/UIPermissionSelectorTab.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboard</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboard.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIDashboardUtil</js-module>
+ <js-path>/javascript/eXo/webui/UIDashboardUtil.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UINotification</js-module>
+ <js-path>/javascript/eXo/webui/UINotification.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIUserSelector</js-module>
+ <js-path>/javascript/eXo/webui/UIUserSelector.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UICombobox.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UICombobox</js-module>
+ <js-path>/javascript/eXo/webui/UIVirtualList.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.webui.UIColorPicker</js-module>
+ <js-path>/javascript/eXo/webui/UIColorPicker.js</js-path>
+ </param>
+ </javascript>
+
+ <!-- Portal Javascripts -->
+ <javascript>
+ <param>
+ <js-module>eXo.portal.PortalHttpRequest</js-module>
+ <js-path>/javascript/eXo/portal/PortalHttpRequest.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortal</js-module>
+ <js-path>/javascript/eXo/portal/UIPortal.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalControl</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalControl.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.PortalDragDrop</js-module>
+ <js-path>/javascript/eXo/portal/PortalDragDrop.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIPortalNavigation</js-module>
+ <js-path>/javascript/eXo/portal/UIPortalNavigation.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIMaskWorkspace</js-module>
+ <js-path>/javascript/eXo/portal/UIMaskWorkspace.js</js-path>
+ </param>
+ <param>
+ <js-module>eXo.portal.UIBrowseContent</js-module>
+ <js-path>/javascript/eXo/portal/UIBrowseContent.js</js-path>
+ </param>
+ </javascript>
+
+ <javascript>
+ <param>
+ <js-module>eXo.webui.UIPortlet</js-module>
+ <js-path>/javascript/eXo/webui/UIPortlet.js</js-path>
+ </param>
+ </javascript>
+</gatein-resources>
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/examples/skins/simpleskin/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/examples/skins/simpleskin/src/main/webapp/WEB-INF/gatein-resources.xml 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/examples/skins/simpleskin/src/main/webapp/WEB-INF/gatein-resources.xml 2011-08-17 22:44:43 UTC (rev 7169)
@@ -21,12 +21,13 @@
-->
<gatein-resources
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0 http://www.gatein.org/xml/ns/gatein_resources_1_0"
- xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_2 http://www.gatein.org/xml/ns/gatein_resources_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_2">
<portal-skin>
<skin-name>SimpleSkin</skin-name>
<css-path>/skin/Stylesheet.css</css-path>
+ <css-priority>0</css-priority>
</portal-skin>
<!-- Skins for portlets in 'web' application -->
@@ -150,4 +151,4 @@
</style-theme>
</window-style>
-</gatein-resources>
\ No newline at end of file
+</gatein-resources>
Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2011-08-17 22:44:43 UTC (rev 7169)
@@ -21,12 +21,13 @@
-->
<gatein-resources
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_0 http://www.gatein.org/xml/ns/gatein_resources_1_0"
- xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_0">
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_resources_1_2 http://www.gatein.org/xml/ns/gatein_resources_1_2"
+ xmlns="http://www.gatein.org/xml/ns/gatein_resources_1_2">
<portal-skin>
<skin-name>Default</skin-name>
<css-path>/skin/Stylesheet.css</css-path>
+ <css-priority>0</css-priority>
</portal-skin>
<!-- Simple window style -->
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2011-08-17 21:37:09 UTC (rev 7168)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2011-08-17 22:44:43 UTC (rev 7169)
@@ -59,6 +59,8 @@
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
@@ -377,9 +379,6 @@
*/
public Set<Skin> getPortletSkins()
{
- // Set to avoid repetition
- Set<Skin> skins = new HashSet<Skin>();
-
// Determine portlets visible on the page
List<UIPortlet> uiportlets = new ArrayList<UIPortlet>();
UIWorkingWorkspace uiWorkingWS = getChildById(UI_WORKING_WS_ID);
@@ -394,7 +393,8 @@
// Get portal portlets to filter since they are already in the portal
// skins
Set<SkinConfig> portletConfigs = getPortalPortletSkins();
-
+ List<SkinConfig> portletSkins = new ArrayList<SkinConfig>();
+
//
for (UIPortlet uiPortlet : uiportlets)
{
@@ -405,12 +405,28 @@
}
if (skinConfig != null && !portletConfigs.contains(skinConfig))
{
- skins.add(skinConfig);
+ portletSkins.add(skinConfig);
}
}
+ //Sort skins by priority
+ Collections.sort(portletSkins, new Comparator<SkinConfig>()
+ {
+ public int compare(SkinConfig o1, SkinConfig o2)
+ {
+ if (o1.getCSSPriority() == o2.getCSSPriority())
+ return 1;//Can indicate others condition here
+ else if (o1.getCSSPriority() < 0)
+ return 1;
+ else if (o2.getCSSPriority() < 0)
+ return -1;
+ else
+ return o1.getCSSPriority() - o2.getCSSPriority();
+ }
+ });
+
//
- return skins;
+ return (new HashSet<Skin>(portletSkins));
}
private SkinConfig getDefaultPortletSkinConfig(UIPortlet portlet)
13 years, 5 months