gatein SVN: r1464 - portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2010-01-28 22:50:59 -0500 (Thu, 28 Jan 2010)
New Revision: 1464
Modified:
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
Log:
GTNPORTAL-530 - Don't change language of user when edit language of user in User and Groups management
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-01-29 03:22:48 UTC (rev 1463)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-01-29 03:50:59 UTC (rev 1464)
@@ -161,7 +161,7 @@
displayLanguage = language;
}
option = new SelectItemOption<String>(displayLanguage, language, displayName);
- if (lang.equals(selectedLang))
+ if (language.equals(selectedLang))
{
option.setSelected(true);
}
14 years, 11 months
gatein SVN: r1463 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page.
by do-not-reply@jboss.org
Author: truong.le
Date: 2010-01-28 22:22:48 -0500 (Thu, 28 Jan 2010)
New Revision: 1463
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
Log:
GTNPORTAL-547: Unknown error when delete page created in Manage Page
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-01-29 02:53:23 UTC (rev 1462)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-01-29 03:22:48 UTC (rev 1463)
@@ -21,6 +21,7 @@
import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.commons.utils.PageList;
+import org.exoplatform.commons.utils.PageListAccess;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.Query;
@@ -41,7 +42,7 @@
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.webui.application.replication.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -262,7 +263,7 @@
UIVirtualList virtualList = uiPageBrowser.getChild(UIVirtualList.class);
UIRepeater repeater = (UIRepeater)virtualList.getDataFeed();
- LazyPageList datasource = (LazyPageList)repeater.getDataSource();
+ PageListAccess datasource = (PageListAccess)repeater.getDataSource();
int currentPage = datasource.getCurrentPage();
service.remove(page);
14 years, 11 months
gatein SVN: r1462 - in portal/trunk: webui/portal/src/main/java/org/exoplatform/portal/webui/portal and 1 other directory.
by do-not-reply@jboss.org
Author: liem_nguyen
Date: 2010-01-28 21:53:23 -0500 (Thu, 28 Jan 2010)
New Revision: 1462
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
Log:
GTNPORTAL-398 Unknown error when change position of portlet in Edit layout of Dashboard
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-01-28 21:54:36 UTC (rev 1461)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/data/Mapper.java 2010-01-29 02:53:23 UTC (rev 1462)
@@ -688,14 +688,6 @@
// We manufacture one name
name = UUID.randomUUID().toString();
}
-
- // Remove to prevent DuplicateNameException (GTNPORTAL-398)
- UIComponent uiComponent = dst.get(name);
- if (uiComponent != null) {
- dst.remove(uiComponent);
- }
-
-
if (srcChild instanceof ContainerData)
{
dstChild = dst.add(ObjectType.CONTAINER, name);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-01-28 21:54:36 UTC (rev 1461)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-01-29 02:53:23 UTC (rev 1462)
@@ -20,6 +20,7 @@
package org.exoplatform.portal.webui.portal;
import org.exoplatform.portal.application.PortalRequestContext;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserPortalConfig;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Page;
@@ -216,7 +217,7 @@
SkinService skinService = getApplicationComponent(SkinService.class);
skinService.invalidatePortalSkinCache(editPortal.getName(), editPortal.getSkin());
}
-
+
public boolean isPortalExist(UIPortal editPortal) throws Exception
{
String remoteUser = Util.getPortalRequestContext().getRemoteUser();
@@ -232,7 +233,7 @@
}
UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
-
+
return configService.getUserPortalConfig(portalOwner, remoteUser) != null;
}
@@ -415,18 +416,31 @@
{
uri = uiPortal.getSelectedNode() != null ? uiPortal.getSelectedNode().getUri() : null;
}
-
- if(uiComposer.isPortalExist(editPortal))
+
+ if (uiComposer.isPortalExist(editPortal))
{
- PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
+ // Update portalconfig from db
+ DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
+ PortalConfig pConfig =
+ storage.getPortalConfig(uiPortal.getSelectedNavigation().getOwnerType(), uiPortal
+ .getSelectedNavigation().getOwnerId());
+ if (pConfig != null)
+ {
+ uiPortalApp.getUserPortalConfig().setPortal(pConfig);
+ }
+ uiPortal.getChildren().clear();
+ PortalDataMapper.toUIPortal(uiPortal, uiPortalApp.getUserPortalConfig());
+
+ PageNodeEvent<UIPortal> pnevent =
+ new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, uri);
uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
prContext.addUIComponentToUpdateByAjax(uiWorkingWS);
JavascriptManager jsManager = prContext.getJavascriptManager();
jsManager.addJavascript("eXo.portal.portalMode=" + UIPortalApplication.NORMAL_MODE + ";");
}
else
- {
- if(editPortal.getOwner().equals(prContext.getPortalOwner()))
+ {
+ if (editPortal.getOwner().equals(prContext.getPortalOwner()))
{
HttpServletRequest request = prContext.getRequest();
request.getSession().invalidate();
@@ -496,19 +510,19 @@
switch (portalMode)
{
- case UIPortalApplication.APP_BLOCK_EDIT_MODE:
+ case UIPortalApplication.APP_BLOCK_EDIT_MODE :
uiPortalApp.setModeState(UIPortalApplication.APP_VIEW_EDIT_MODE);
break;
- case UIPortalApplication.APP_VIEW_EDIT_MODE:
+ case UIPortalApplication.APP_VIEW_EDIT_MODE :
uiPortalApp.setModeState(UIPortalApplication.APP_BLOCK_EDIT_MODE);
break;
- case UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE:
+ case UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE :
uiPortalApp.setModeState(UIPortalApplication.CONTAINER_VIEW_EDIT_MODE);
break;
- case UIPortalApplication.CONTAINER_VIEW_EDIT_MODE:
+ case UIPortalApplication.CONTAINER_VIEW_EDIT_MODE :
uiPortalApp.setModeState(UIPortalApplication.CONTAINER_BLOCK_EDIT_MODE);
break;
- default:
+ default :
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
return;
}
@@ -592,11 +606,11 @@
UIEditInlineWorkspace editInlineWS = event.getSource().getParent();
UIWorkingWorkspace uiWorkingWS = editInlineWS.getParent();
UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
-
+
UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
String pageId = page.getPageId();
-
+
UserPortalConfigService portalConfigService =
uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
if (page.getStorageId() != null && portalConfigService.getPage(pageId) == null)
@@ -627,10 +641,10 @@
// Perform mop update
portalConfigService.update(page);
uiToolPanel.setUIComponent(null);
-
+
// Update UIPage cache on UIPortal
uiPortal.setUIPage(pageId, uiPage);
-
+
if (PortalProperties.SESSION_ALWAYS.equals(uiPortal.getSessionAlive()))
{
uiPortalApp.setSessionOpen(true);
14 years, 11 months
gatein SVN: r1461 - components/mop/trunk/api/src/main/java/org/gatein/mop/api/content.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-28 16:54:36 -0500 (Thu, 28 Jan 2010)
New Revision: 1461
Modified:
components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/Customization.java
Log:
minor
Modified: components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/Customization.java
===================================================================
--- components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/Customization.java 2010-01-28 17:46:52 UTC (rev 1460)
+++ components/mop/trunk/api/src/main/java/org/gatein/mop/api/content/Customization.java 2010-01-28 21:54:36 UTC (rev 1461)
@@ -38,7 +38,11 @@
*/
String getId();
- /** Returns the content this customization refers to. */
+ /**
+ * Returns the content this customization refers to.
+ *
+ * @return the content
+ */
Content<S> getContent();
/**
14 years, 11 months
gatein SVN: r1460 - in portal/trunk: component/common/src/main/java/org/exoplatform/commons/serialization and 27 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-01-28 12:46:52 -0500 (Thu, 28 Jan 2010)
New Revision: 1460
Added:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/SerializationContext.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/DefaultTypeConverter.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/DefaultObjectFactory.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModelBuilder.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/
Removed:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/SerializationContext.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api/
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/impl/
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial/
portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/
Modified:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/TypeConverter.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/annotations/Converted.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/annotations/Serialized.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/CreateException.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/ObjectFactory.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/ClassTypeModel.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/ConvertedTypeModel.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/FieldModel.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/SerializationMode.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeDomain.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeException.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModel.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/ClassTypeMetaData.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/ConvertedTypeMetaData.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/DomainMetaData.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/TypeMetaData.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/DataContainer.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/DataKind.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/ObjectReader.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/ObjectWriter.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/SerializationStatus.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/A.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/B.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/C1.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/C2.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/D.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/E1.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/E2.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/F.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/G.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/MapBuilder.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/SetBuilder.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A1.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A2.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A3.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B1.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B2.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B3.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/A1.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/A2.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/B.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/ArrayListTypeConverter.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/ThreadTypeConverter.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddGadget.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationInfo.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIFormTableIteratorInputSet.java
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/UIGadgetInfo.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageManagementPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupDetail.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupEditMembershipForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupExplorer.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupInfo.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListMembershipType.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserManagement.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiApplication.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/bean/ReflectionDataMapping.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/ComponentConfigConverter.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIApplication.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIBreadcumbs.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIGrid.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupWindow.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIRepeater.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UISearch.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIVirtualList.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/model/SelectItemOption.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormGrid.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputContainer.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputInfo.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPageIterator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPopupWindow.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormRadioBoxInput.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormSelectBox.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTableInputSet.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UISearchForm.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PasswordStringLengthValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/SpecialCharacterValidator.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UISelector.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserMembershipSelector.java
portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/ApplicationState.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/SerializationContextSingleton.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/UIComponentFactory.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
Log:
- move the serialization framework to the common module
- remove a nasty system out println set by me previously
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/SerializationContext.java (from rev 1458, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/SerializationContext.java)
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/SerializationContext.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/SerializationContext.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -0,0 +1,130 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.commons.serialization;
+
+import org.exoplatform.commons.serialization.api.factory.DefaultObjectFactory;
+import org.exoplatform.commons.serialization.api.factory.ObjectFactory;
+import org.exoplatform.commons.serialization.model.TypeDomain;
+import org.exoplatform.commons.serialization.serial.ObjectReader;
+import org.exoplatform.commons.serialization.serial.ObjectWriter;
+
+import java.io.*;
+import java.lang.reflect.ParameterizedType;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class SerializationContext
+{
+
+ /** . */
+ private final TypeDomain typeDomain;
+
+ /** . */
+ private final Map<Class<?>, ObjectFactory<?>> factories;
+
+ public SerializationContext(TypeDomain typeDomain)
+ {
+ HashMap<Class<?>, ObjectFactory<?>> factories = new HashMap<Class<?>, ObjectFactory<?>>();
+ factories.put(Object.class, new DefaultObjectFactory());
+
+ //
+ this.typeDomain = typeDomain;
+ this.factories = factories;
+ }
+
+ public <O> void addFactory(ObjectFactory<O> factory)
+ {
+ // OK
+ Class<ObjectFactory<O>> factoryClass = (Class<ObjectFactory<O>>)factory.getClass();
+
+ //
+ ParameterizedType pt = (ParameterizedType)factoryClass.getGenericSuperclass();
+
+ // OK
+ Class<?> objectType = (Class<Object>)pt.getActualTypeArguments()[0];
+
+ //
+ factories.put(objectType, factory);
+ }
+
+ public TypeDomain getTypeDomain()
+ {
+ return typeDomain;
+ }
+
+ public <O>ObjectFactory<? super O> getFactory(Class<O> type)
+ {
+ // OK
+ ObjectFactory<O> factory = (ObjectFactory<O>)factories.get(type);
+
+ //
+ if (factory == null)
+ {
+ return getFactory(type.getSuperclass());
+ }
+
+ //
+ return factory;
+ }
+
+ public <O> O clone(O o) throws IOException, ClassNotFoundException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectWriter writer = new ObjectWriter(this, baos);
+ writer.writeObject(o);
+ writer.close();
+ ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
+ ObjectReader in = new ObjectReader(this, bais);
+ return (O)in.readObject();
+ }
+
+ public void write(Object o, OutputStream out) throws IOException
+ {
+ ObjectWriter writer = new ObjectWriter(this, out);
+ writer.writeObject(o);
+ writer.flush();
+ }
+
+ public byte[] write(Object o) throws IOException
+ {
+ ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ ObjectWriter writer = new ObjectWriter(this, baos);
+ writer.writeObject(o);
+ writer.close();
+ return baos.toByteArray();
+ }
+
+ public Object read(byte[] bytes) throws IOException, ClassNotFoundException
+ {
+ ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
+ ObjectReader in = new ObjectReader(this, bais);
+ return in.readObject();
+ }
+
+ public Object read(InputStream in ) throws IOException, ClassNotFoundException
+ {
+ ObjectReader or = new ObjectReader(this, in);
+ return or.readObject();
+ }
+}
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api (from rev 1458, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api)
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/DefaultTypeConverter.java (from rev 1458, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/impl/api/DefaultTypeConverter.java)
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/DefaultTypeConverter.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/DefaultTypeConverter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.commons.serialization.api;
+
+import org.exoplatform.commons.serialization.api.TypeConverter;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class DefaultTypeConverter<O> extends TypeConverter<O, O>
+{
+ @Override
+ public O write(O input) throws Exception
+ {
+ return input;
+ }
+
+ @Override
+ public O read(O output) throws Exception
+ {
+ return output;
+ }
+}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/TypeConverter.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api/TypeConverter.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/TypeConverter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.api;
+package org.exoplatform.commons.serialization.api;
/**
* A type converter that performs a bidirectional conversion between an external
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/annotations/Converted.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api/annotations/Converted.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/annotations/Converted.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,10 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.api.annotations;
+package org.exoplatform.commons.serialization.api.annotations;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
-import org.exoplatform.webui.application.replication.impl.api.DefaultTypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/annotations/Serialized.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api/annotations/Serialized.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/annotations/Serialized.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.api.annotations;
+package org.exoplatform.commons.serialization.api.annotations;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/CreateException.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api/factory/CreateException.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/CreateException.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.api.factory;
+package org.exoplatform.commons.serialization.api.factory;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/DefaultObjectFactory.java (from rev 1458, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/impl/api/factory/DefaultObjectFactory.java)
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/DefaultObjectFactory.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/DefaultObjectFactory.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.commons.serialization.api.factory;
+
+import org.exoplatform.commons.serialization.api.factory.CreateException;
+import org.exoplatform.commons.serialization.api.factory.ObjectFactory;
+import org.exoplatform.commons.serialization.model.FieldModel;
+
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public final class DefaultObjectFactory extends ObjectFactory<Object>
+{
+ @Override
+ public <S> S create(Class<S> type, Map<FieldModel<? super S, ?>, ?> state) throws CreateException
+ {
+ try
+ {
+ S instance = type.newInstance();
+
+ //
+ for (Map.Entry<FieldModel<? super S, ?>, ?> entry : state.entrySet())
+ {
+ FieldModel<?, ?> fieldModel = entry.getKey();
+ Object value = entry.getValue();
+ fieldModel.castAndSet(instance, value);
+ }
+
+ //
+ return instance;
+ }
+ catch (Exception e)
+ {
+ throw new CreateException(e);
+ }
+ }
+}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/ObjectFactory.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/api/factory/ObjectFactory.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/api/factory/ObjectFactory.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.api.factory;
+package org.exoplatform.commons.serialization.api.factory;
-import org.exoplatform.webui.application.replication.model.FieldModel;
+import org.exoplatform.commons.serialization.model.FieldModel;
import java.util.Map;
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model (from rev 1458, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model)
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/ClassTypeModel.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/ClassTypeModel.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/ClassTypeModel.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
import java.util.Collection;
import java.util.Collections;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/ConvertedTypeModel.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/ConvertedTypeModel.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/ConvertedTypeModel.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/FieldModel.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/FieldModel.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/FieldModel.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/SerializationMode.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/SerializationMode.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/SerializationMode.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeDomain.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/TypeDomain.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeDomain.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,22 +17,12 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
-import org.exoplatform.webui.application.replication.api.annotations.Converted;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
-import org.exoplatform.webui.application.replication.model.metadata.ClassTypeMetaData;
-import org.exoplatform.webui.application.replication.model.metadata.ConvertedTypeMetaData;
-import org.exoplatform.webui.application.replication.model.metadata.DomainMetaData;
-import org.exoplatform.webui.application.replication.model.metadata.TypeMetaData;
+import org.exoplatform.commons.serialization.model.metadata.DomainMetaData;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.ParameterizedType;
import java.util.*;
import java.util.concurrent.ConcurrentHashMap;
@@ -47,21 +37,6 @@
private static final Logger log = LoggerFactory.getLogger(TypeDomain.class);
/** . */
- private static final Map<Class<?>, Class<?>> primitiveToWrapperMap = new HashMap<Class<?>, Class<?>>();
-
- static
- {
- primitiveToWrapperMap.put(byte.class, Byte.class);
- primitiveToWrapperMap.put(short.class, Short.class);
- primitiveToWrapperMap.put(int.class, Integer.class);
- primitiveToWrapperMap.put(long.class, Long.class);
- primitiveToWrapperMap.put(float.class, Float.class);
- primitiveToWrapperMap.put(double.class, Double.class);
- primitiveToWrapperMap.put(boolean.class, Boolean.class);
- primitiveToWrapperMap.put(char.class, Character.class);
- }
-
- /** . */
private final DomainMetaData metaData;
/** . */
@@ -76,6 +51,9 @@
/** . */
private final boolean buildIfAbsent;
+ /** . */
+ private final Object lock;
+
public TypeDomain(boolean putIfAbsent)
{
this(new DomainMetaData(), putIfAbsent);
@@ -103,6 +81,7 @@
this.immutableTypeModelSet = immutableTypeModelSet;
this.buildIfAbsent = buildIfAbsent;
this.metaData = new DomainMetaData(metaData);
+ this.lock = new Object();
}
public Map<String, TypeModel<?>> getTypeModelMap()
@@ -131,235 +110,48 @@
public <O> TypeModel<O> getTypeModel(Class<O> javaType)
{
- if (javaType == null)
- {
- throw new NullPointerException();
- }
+ return get(javaType, buildIfAbsent);
+ }
- // Cast OK
- TypeModel<O> typeModel = (TypeModel<O>)typeModelMap.get(javaType.getName());
-
- //
- if (typeModel == null && buildIfAbsent)
- {
- typeModel = add(javaType);
- }
-
- //
- return typeModel;
+ public <O> TypeModel<O> addTypeModel(Class<O> javaType)
+ {
+ return get(javaType, true);
}
// For now that operation is synchronized
- public synchronized <O> TypeModel<O> add(Class<O> javaType)
+ private <O> TypeModel<O> get(Class<O> javaType, boolean create)
{
if (javaType == null)
{
throw new NullPointerException();
}
- // Build the missing types required to have knowledge about the
- // provided java type
- Map<String, TypeModel<?>> addedTypeModels = new HashMap<String, TypeModel<?>>();
+ // Cast OK
+ TypeModel<O> model = (TypeModel<O>)typeModelMap.get(javaType.getName());
//
- TypeModel<O> model = build(javaType, addedTypeModels);
-
- // Perform merge
- typeModelMap.putAll(addedTypeModels);
-
- //
-// System.out.println("Added types " + addedTypeModels.values() + " to replication domain");
-
- //
- return model;
- }
-
- public int getSize()
- {
- return typeModelMap.size();
- }
-
- private <O> TypeModel<O> build(Class<O> javaType, Map<String, TypeModel<?>> addedTypeModels)
- {
- if (javaType.isPrimitive())
+ if (model == null && create)
{
- throw new IllegalArgumentException("No primitive type accepted");
- }
-
- //
- TypeModel<O> typeModel = get(javaType, addedTypeModels);
-
- //
- if (typeModel == null)
- {
- TypeMetaData typeMetaData = metaData.getTypeMetaData(javaType);
-
- //
- if (typeMetaData == null)
+ synchronized (lock)
{
- boolean serialized = javaType.getAnnotation(Serialized.class) != null;
- Converted converted = javaType.getAnnotation(Converted.class);
- if (serialized)
- {
- if (converted != null)
- {
- throw new TypeException();
- }
- typeMetaData = new ClassTypeMetaData(true);
- }
- else if (converted != null)
- {
- typeMetaData = new ConvertedTypeMetaData(converted.value());
- }
- else
- {
- typeMetaData = new ClassTypeMetaData(false);
- }
- }
- //
- if (typeMetaData instanceof ClassTypeMetaData)
- {
- typeModel = buildClassType(javaType, addedTypeModels, (ClassTypeMetaData)typeMetaData);
- }
- else
- {
- typeModel = buildConvertedType(javaType, addedTypeModels, (ConvertedTypeMetaData)typeMetaData);
- }
- }
+ TypeModelBuilder builder = new TypeModelBuilder(metaData, immutableTypeModelMap);
- //
- return typeModel;
- }
+ //
+ model = builder.build(javaType);
- private <O> ConvertedTypeModel<O, ?> buildConvertedType(
- Class<O> javaType,
- Map<String, TypeModel<?>> addedTypeModels,
- ConvertedTypeMetaData typeMetaData)
- {
- Class<? extends TypeConverter<?, ?>> converterClass = typeMetaData.getConverterClass();
- ParameterizedType converterParameterizedType = (ParameterizedType)converterClass.getGenericSuperclass();
-
- //
- if (!converterParameterizedType.getActualTypeArguments()[0].equals(javaType))
- {
- throw new TypeException();
- }
-
- //
- Class<? extends TypeConverter<O, ?>> converterJavaType = (Class<TypeConverter<O, ?>>)typeMetaData.getConverterClass();
-
- //
- return buildConvertedType(javaType, addedTypeModels, converterJavaType);
- }
-
- private <O, T> ConvertedTypeModel<O, T> buildConvertedType(
- Class<O> javaType,
- Map<String, TypeModel<?>> addedTypeModels,
- Class<? extends TypeConverter<O, ? /* This is a bit funky and nasty, need to investigate*/ >> converterJavaType)
- {
- Class<T> outputClass = (Class<T>)((ParameterizedType)converterJavaType.getGenericSuperclass()).getActualTypeArguments()[1];
-
- //
- ClassTypeModel<T> targetType = (ClassTypeModel<T>)build(outputClass, addedTypeModels);
-
- //
- TypeModel<? super O> superType = null;
- Class<? super O> superJavaType = javaType.getSuperclass();
- if (superJavaType != null)
- {
- superType = build(superJavaType, addedTypeModels);
- }
-
- //
- ConvertedTypeModel<O, T> typeModel = new ConvertedTypeModel<O, T>(javaType, superType, targetType, (Class<TypeConverter<O, T>>) converterJavaType);
-
- //
- addedTypeModels.put(typeModel.getName(), typeModel);
-
- //
- return typeModel;
- }
-
- private <O> ClassTypeModel<O> buildClassType(Class<O> javaType, Map<String, TypeModel<?>> addedTypeModels, ClassTypeMetaData typeMetaData)
- {
- ClassTypeModel<? super O> superTypeModel = null;
- if (javaType.getSuperclass() != null)
- {
- TypeModel<? super O> builtType = build(javaType.getSuperclass(), addedTypeModels);
- if (builtType instanceof ClassTypeModel)
- {
- superTypeModel = (ClassTypeModel<? super O>)builtType;
+ // Perform merge
+ typeModelMap.putAll(builder.getAddedTypeModels());
}
- else
- {
- throw new TypeException();
- }
}
//
- TreeMap<String, FieldModel<O, ?>> fieldModels = new TreeMap<String, FieldModel<O, ?>>();
-
- //
- SerializationMode serializationMode;
- if (typeMetaData.isSerialized())
- {
- serializationMode = SerializationMode.SERIALIZED;
- }
- else if (Serializable.class.isAssignableFrom(javaType))
- {
- serializationMode = SerializationMode.SERIALIZABLE;
- }
- else
- {
- serializationMode = SerializationMode.NONE;
- }
-
- //
- ClassTypeModel<O> typeModel = new ClassTypeModel<O>(javaType, superTypeModel, fieldModels, serializationMode);
-
- //
- addedTypeModels.put(javaType.getName(), typeModel);
-
- // Now build fields
- for (Field field : javaType.getDeclaredFields())
- {
- if (!Modifier.isStatic(field.getModifiers()))
- {
- field.setAccessible(true);
- Class<?> fieldJavaType = field.getType();
-
- // Replace if a primitive
- if (fieldJavaType.isPrimitive())
- {
- fieldJavaType = primitiveToWrapperMap.get(fieldJavaType);
- }
-
- TypeModel<?> fieldTypeModel = build(fieldJavaType, addedTypeModels);
- if (fieldTypeModel != null)
- {
- fieldModels.put(field.getName(), createField(typeModel, field, fieldTypeModel));
- }
- }
- }
-
- //
- return typeModel;
+ return model;
}
- private <O, V> FieldModel<O, V> createField(TypeModel<O> owner, Field field, TypeModel<V> fieldTypeModel)
+ public int getSize()
{
- return new FieldModel<O, V>(owner, field, fieldTypeModel);
+ return typeModelMap.size();
}
- private <O> TypeModel<O> get(Class<O> javaType, Map<String, TypeModel<?>> addedTypeModels)
- {
- TypeModel<?> typeModel = typeModelMap.get(javaType.getName());
- if (typeModel == null)
- {
- typeModel = addedTypeModels.get(javaType.getName());
- }
- // Cast OK
- return (TypeModel<O>)typeModel;
- }
}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeException.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/TypeException.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeException.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModel.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/TypeModel.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModel.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model;
+package org.exoplatform.commons.serialization.model;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModelBuilder.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModelBuilder.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/TypeModelBuilder.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -0,0 +1,284 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.commons.serialization.model;
+
+import org.exoplatform.commons.serialization.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.annotations.Converted;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.model.metadata.ClassTypeMetaData;
+import org.exoplatform.commons.serialization.model.metadata.ConvertedTypeMetaData;
+import org.exoplatform.commons.serialization.model.metadata.DomainMetaData;
+import org.exoplatform.commons.serialization.model.metadata.TypeMetaData;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.ParameterizedType;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+class TypeModelBuilder
+{
+
+ /** . */
+ private static final Logger log = LoggerFactory.getLogger(TypeModelBuilder.class);
+
+ /** . */
+ private static final Map<Class<?>, Class<?>> primitiveToWrapperMap = new HashMap<Class<?>, Class<?>>();
+
+ static
+ {
+ primitiveToWrapperMap.put(byte.class, Byte.class);
+ primitiveToWrapperMap.put(short.class, Short.class);
+ primitiveToWrapperMap.put(int.class, Integer.class);
+ primitiveToWrapperMap.put(long.class, Long.class);
+ primitiveToWrapperMap.put(float.class, Float.class);
+ primitiveToWrapperMap.put(double.class, Double.class);
+ primitiveToWrapperMap.put(boolean.class, Boolean.class);
+ primitiveToWrapperMap.put(char.class, Character.class);
+ }
+
+ // Build the missing types required to have knowledge about the
+ // provided java type
+ private final Map<String, TypeModel<?>> addedTypeModels = new HashMap<String, TypeModel<?>>();
+
+ /** . */
+ private final DomainMetaData metaData;
+
+ /** . */
+ private final Map<String, TypeModel<?>> existingTypeModels;
+
+ public TypeModelBuilder(DomainMetaData metaData, Map<String, TypeModel<?>> existingTypeModels)
+ {
+ this.metaData = metaData;
+ this.existingTypeModels = existingTypeModels;
+ }
+
+ Map<String, TypeModel<?>> getAddedTypeModels()
+ {
+ return addedTypeModels;
+ }
+
+ <O> TypeModel<O> build(Class<O> javaType)
+ {
+ if (javaType.isPrimitive())
+ {
+ throw new IllegalArgumentException("No primitive type accepted");
+ }
+
+ //
+ TypeModel<O> typeModel = get(javaType);
+
+ //
+ if (typeModel != null)
+ {
+ log.debug("Found type model " + typeModel + " for java type " + javaType);
+ return typeModel;
+ }
+
+
+ //
+ log.debug("About to build type model for java type " + javaType);
+ TypeMetaData typeMetaData = metaData.getTypeMetaData(javaType);
+
+ //
+ if (typeMetaData == null)
+ {
+ log.debug("No meta data found for java type " + javaType + " about to build it");
+ boolean serialized = javaType.getAnnotation(Serialized.class) != null;
+ Converted converted = javaType.getAnnotation(Converted.class);
+ if (serialized)
+ {
+ if (converted != null)
+ {
+ throw new TypeException();
+ }
+ typeMetaData = new ClassTypeMetaData(javaType.getName(), true);
+ }
+ else if (converted != null)
+ {
+ typeMetaData = new ConvertedTypeMetaData(javaType.getName(), converted.value());
+ }
+ else
+ {
+ typeMetaData = new ClassTypeMetaData(javaType.getName(), false);
+ }
+ }
+ log.debug("Built type meta data " + typeMetaData + " for java type " + javaType);
+
+ //
+ return build(javaType, typeMetaData);
+ }
+
+ private <O> TypeModel<O> build(Class<O> javaType, TypeMetaData typeMetaData)
+ {
+ if (typeMetaData instanceof ClassTypeMetaData)
+ {
+ return buildClassType(javaType, (ClassTypeMetaData)typeMetaData);
+ }
+ else
+ {
+ return buildConvertedType(javaType, (ConvertedTypeMetaData)typeMetaData);
+ }
+ }
+
+ private <O> ConvertedTypeModel<O, ?> buildConvertedType(Class<O> javaType, ConvertedTypeMetaData typeMetaData)
+ {
+ log.debug("About to build type model from type type metadata " + typeMetaData);
+
+ //
+ Class<? extends TypeConverter<?, ?>> converterClass = typeMetaData.getConverterClass();
+ ParameterizedType converterParameterizedType = (ParameterizedType)converterClass.getGenericSuperclass();
+ if (!converterParameterizedType.getActualTypeArguments()[0].equals(javaType))
+ {
+ throw new TypeException("The declared type parameter in the converter " + converterClass.getName() +
+ " does not match the type it is related to " + javaType.getName());
+ }
+
+ //
+ Class<? extends TypeConverter<O, ?>> converterJavaType = (Class<TypeConverter<O, ?>>)converterClass;
+
+ //
+ return buildConvertedType(javaType, converterJavaType);
+ }
+
+ private <O, T> ConvertedTypeModel<O, T> buildConvertedType(
+ Class<O> javaType,
+ Class<? extends TypeConverter<O, ? /* This is a bit funky and nasty, need to investigate*/ >> converterJavaType)
+ {
+ Class<T> outputClass = (Class<T>)((ParameterizedType)converterJavaType.getGenericSuperclass()).getActualTypeArguments()[1];
+
+ //
+ ClassTypeModel<T> targetType = (ClassTypeModel<T>)build(outputClass);
+
+ //
+ TypeModel<? super O> superType = null;
+ Class<? super O> superJavaType = javaType.getSuperclass();
+ if (superJavaType != null)
+ {
+ superType = build(superJavaType);
+ }
+
+ //
+ ConvertedTypeModel<O, T> typeModel = new ConvertedTypeModel<O, T>(
+ javaType,
+ superType,
+ targetType,
+ (Class<TypeConverter<O, T>>) converterJavaType);
+
+ //
+ addedTypeModels.put(typeModel.getName(), typeModel);
+
+ //
+ return typeModel;
+ }
+
+ private <O> ClassTypeModel<O> buildClassType(
+ Class<O> javaType,
+ ClassTypeMetaData typeMetaData)
+ {
+ ClassTypeModel<? super O> superTypeModel = null;
+ if (javaType.getSuperclass() != null)
+ {
+ TypeModel<? super O> builtType = build(javaType.getSuperclass());
+ if (builtType instanceof ClassTypeModel)
+ {
+ superTypeModel = (ClassTypeModel<? super O>)builtType;
+ }
+ else
+ {
+ throw new TypeException();
+ }
+ }
+
+ //
+ TreeMap<String, FieldModel<O, ?>> fieldModels = new TreeMap<String, FieldModel<O, ?>>();
+
+ //
+ SerializationMode serializationMode;
+ if (typeMetaData.isSerialized())
+ {
+ serializationMode = SerializationMode.SERIALIZED;
+ }
+ else if (Serializable.class.isAssignableFrom(javaType))
+ {
+ serializationMode = SerializationMode.SERIALIZABLE;
+ }
+ else
+ {
+ serializationMode = SerializationMode.NONE;
+ }
+
+ //
+ ClassTypeModel<O> typeModel = new ClassTypeModel<O>(javaType, superTypeModel, fieldModels, serializationMode);
+
+ //
+ addedTypeModels.put(javaType.getName(), typeModel);
+
+ // Now build fields
+ for (Field field : javaType.getDeclaredFields())
+ {
+ if (!Modifier.isStatic(field.getModifiers()))
+ {
+ field.setAccessible(true);
+ Class<?> fieldJavaType = field.getType();
+
+ // Replace if a primitive
+ if (fieldJavaType.isPrimitive())
+ {
+ fieldJavaType = primitiveToWrapperMap.get(fieldJavaType);
+ }
+
+ TypeModel<?> fieldTypeModel = build(fieldJavaType);
+ if (fieldTypeModel != null)
+ {
+ fieldModels.put(field.getName(), createField(typeModel, field, fieldTypeModel));
+ }
+ }
+ }
+
+ //
+ return typeModel;
+ }
+
+ private <O, V> FieldModel<O, V> createField(TypeModel<O> owner, Field field, TypeModel<V> fieldTypeModel)
+ {
+ return new FieldModel<O, V>(owner, field, fieldTypeModel);
+ }
+
+ private <O> TypeModel<O> get(Class<O> javaType)
+ {
+ TypeModel<?> typeModel = existingTypeModels.get(javaType.getName());
+ if (typeModel == null)
+ {
+ typeModel = addedTypeModels.get(javaType.getName());
+ }
+
+ // Cast OK
+ return (TypeModel<O>)typeModel;
+ }
+}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/ClassTypeMetaData.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/metadata/ClassTypeMetaData.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/ClassTypeMetaData.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model.metadata;
+package org.exoplatform.commons.serialization.model.metadata;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -29,8 +29,11 @@
/** . */
private final boolean serialized;
- public ClassTypeMetaData(boolean serialized)
+ public ClassTypeMetaData(String name, boolean serialized)
{
+ super(name);
+
+ //
this.serialized = serialized;
}
@@ -38,4 +41,10 @@
{
return serialized;
}
+
+ @Override
+ public String toString()
+ {
+ return "ClassTypeMetaData[name=" + name + ",serialized=" + serialized + "]";
+ }
}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/ConvertedTypeMetaData.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/metadata/ConvertedTypeMetaData.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/ConvertedTypeMetaData.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model.metadata;
+package org.exoplatform.commons.serialization.model.metadata;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -31,8 +31,11 @@
/** . */
private final Class<? extends TypeConverter<?, ?>> converterClass;
- public ConvertedTypeMetaData(Class<? extends TypeConverter<?, ?>> converterClass)
+ public ConvertedTypeMetaData(String name, Class<? extends TypeConverter<?, ?>> converterClass)
{
+ super(name);
+
+ //
if (converterClass == null)
{
throw new NullPointerException();
@@ -46,4 +49,10 @@
{
return converterClass;
}
+
+ @Override
+ public String toString()
+ {
+ return "ConvertedTypeMetaData[name=" + name + ",converterClass=" + converterClass + "]";
+ }
}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/DomainMetaData.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/metadata/DomainMetaData.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/DomainMetaData.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model.metadata;
+package org.exoplatform.commons.serialization.model.metadata;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
import java.util.HashMap;
import java.util.Map;
@@ -74,7 +74,7 @@
{
throw new NullPointerException();
}
- state.put(clazz.getName(), new ConvertedTypeMetaData(converterClass));
+ state.put(clazz.getName(), new ConvertedTypeMetaData(clazz.getName(), converterClass));
}
public void addClassType(Class<?> clazz, boolean serialized)
@@ -83,7 +83,7 @@
{
throw new NullPointerException();
}
- state.put(clazz.getName(), new ClassTypeMetaData(serialized));
+ state.put(clazz.getName(), new ClassTypeMetaData(clazz.getName(), serialized));
}
public void addConvertedType(String name, Class<? extends TypeConverter<?, ?>> converterClass)
@@ -92,7 +92,7 @@
{
throw new NullPointerException();
}
- state.put(name, new ConvertedTypeMetaData(converterClass));
+ state.put(name, new ConvertedTypeMetaData(name, converterClass));
}
public void addClassType(String name, boolean serialized)
@@ -101,6 +101,6 @@
{
throw new NullPointerException();
}
- state.put(name, new ClassTypeMetaData(serialized));
+ state.put(name, new ClassTypeMetaData(name, serialized));
}
}
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/TypeMetaData.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/model/metadata/TypeMetaData.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/model/metadata/TypeMetaData.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.model.metadata;
+package org.exoplatform.commons.serialization.model.metadata;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -25,4 +25,23 @@
*/
public abstract class TypeMetaData
{
+
+ /** . */
+ protected final String name;
+
+ protected TypeMetaData(String name)
+ {
+ if (name == null)
+ {
+ throw new NullPointerException();
+ }
+
+ //
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
}
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial (from rev 1458, portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial)
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/DataContainer.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial/DataContainer.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/DataContainer.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.serial;
+package org.exoplatform.commons.serialization.serial;
import java.io.Externalizable;
import java.io.IOException;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/DataKind.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial/DataKind.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/DataKind.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.serial;
+package org.exoplatform.commons.serialization.serial;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/ObjectReader.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial/ObjectReader.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/ObjectReader.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,14 +17,14 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.serial;
+package org.exoplatform.commons.serialization.serial;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
-import org.exoplatform.webui.application.replication.api.factory.ObjectFactory;
-import org.exoplatform.webui.application.replication.model.ClassTypeModel;
-import org.exoplatform.webui.application.replication.model.ConvertedTypeModel;
-import org.exoplatform.webui.application.replication.model.FieldModel;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.factory.ObjectFactory;
+import org.exoplatform.commons.serialization.model.ClassTypeModel;
+import org.exoplatform.commons.serialization.model.ConvertedTypeModel;
+import org.exoplatform.commons.serialization.model.FieldModel;
import java.io.*;
import java.util.*;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/ObjectWriter.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial/ObjectWriter.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/ObjectWriter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,11 +17,11 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.serial;
+package org.exoplatform.commons.serialization.serial;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
-import org.exoplatform.webui.application.replication.model.*;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.api.TypeConverter;
+import org.exoplatform.commons.serialization.model.*;
import java.io.*;
import java.util.IdentityHashMap;
Modified: portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/SerializationStatus.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/serial/SerializationStatus.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/serialization/serial/SerializationStatus.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.application.replication.serial;
+package org.exoplatform.commons.serialization.serial;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Copied: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization (from rev 1458, portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication)
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/A.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/A.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/A.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/B.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/B.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/B.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/C1.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/C1.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/C1.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/C2.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/C2.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/C2.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/D.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/D.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/D.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/E1.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/E1.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/E1.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/E2.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/E2.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/E2.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/F.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/F.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/F.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import java.util.ArrayList;
import java.util.List;
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/G.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/G.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/G.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/MapBuilder.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/MapBuilder.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/MapBuilder.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
import java.util.HashMap;
import java.util.Map;
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/SetBuilder.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/SetBuilder.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/SetBuilder.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,7 +17,7 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
import java.util.HashSet;
import java.util.Set;
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/TestSerialization.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestSerialization.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,14 +17,13 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
import junit.framework.TestCase;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.model.TypeDomain;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.model.TypeDomain;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.io.NotSerializableException;
/**
@@ -37,7 +36,7 @@
public void testState() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A.class);
+ domain.addTypeModel(A.class);
A a = new A();
a.a = "foo";
a.b = 2;
@@ -52,7 +51,7 @@
public void testMultipleReference1() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(B.class);
+ domain.addTypeModel(B.class);
B b = new B();
b.ref = new B(b);
SerializationContext context = new SerializationContext(domain);
@@ -64,7 +63,7 @@
public void testStaticField() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(D.class);
+ domain.addTypeModel(D.class);
D d = new D();
d.b = "bar";
SerializationContext context = new SerializationContext(domain);
@@ -78,7 +77,7 @@
public void testMultipleReference2() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(E2.class);
+ domain.addTypeModel(E2.class);
E2 e = new E2();
e.left = new E2();
((E2)e.left).left = new E1();
@@ -95,7 +94,7 @@
public void testListOfReplicatable() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(F.class);
+ domain.addTypeModel(F.class);
//
F f1 = new F();
@@ -118,7 +117,7 @@
public void testNotSerializable() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(ByteArrayInputStream.class);
+ domain.addTypeModel(ByteArrayInputStream.class);
SerializationContext context = new SerializationContext(domain);
try
@@ -134,7 +133,7 @@
public void testTransientField() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(G.class);
+ domain.addTypeModel(G.class);
SerializationContext context = new SerializationContext(domain);
G g = new G();
g.a = "foo";
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/TestTypeModel.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/TestTypeModel.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,12 +17,11 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication;
+package org.exoplatform.commons.serialization;
import junit.framework.TestCase;
-import org.exoplatform.webui.application.replication.model.*;
+import org.exoplatform.commons.serialization.model.*;
-import java.io.Serializable;
import java.util.Map;
/**
@@ -42,7 +41,7 @@
public void testFoo()
{
TypeDomain domain = new TypeDomain();
- assertType(String.class, domain.add(String.class));
+ assertType(String.class, domain.addTypeModel(String.class));
assertEquals(5, domain.getSize());
assertType(String.class, domain.getTypeModel(String.class));
assertType(Object.class, domain.getTypeModel(Object.class));
@@ -54,7 +53,7 @@
public void testJuu()
{
TypeDomain domain = new TypeDomain();
- ClassTypeModel<A> aTM = (ClassTypeModel<A>)domain.add(A.class);
+ ClassTypeModel<A> aTM = (ClassTypeModel<A>)domain.addTypeModel(A.class);
assertEquals(A.class.getName(), aTM.getName());
/*
assertEquals(SetBuilder.
@@ -80,6 +79,14 @@
assertEquals(domain.getTypeModel(Boolean.class), cFM.getType());
}
+ public void testDoubleAdd()
+ {
+ TypeDomain domain = new TypeDomain();
+ ClassTypeModel<A> aTM1 = (ClassTypeModel<A>)domain.addTypeModel(A.class);
+ ClassTypeModel<A> aTM2 = (ClassTypeModel<A>)domain.addTypeModel(A.class);
+ assertSame(aTM2, aTM1);
+ }
+
private void assertType(Class<?> javaType, TypeModel typeModel)
{
assertTrue(typeModel instanceof ClassTypeModel);
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A1.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/A1.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A1.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
-import org.exoplatform.webui.application.replication.api.annotations.Converted;
+import org.exoplatform.commons.serialization.api.annotations.Converted;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A2.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/A2.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A2.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A3.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/A3.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/A3.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,10 +17,10 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
import junit.framework.AssertionFailedError;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B1.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/B1.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B1.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
-import org.exoplatform.webui.application.replication.api.annotations.Converted;
+import org.exoplatform.commons.serialization.api.annotations.Converted;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B2.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/B2.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B2.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,10 +17,8 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
-
import java.io.Serializable;
/**
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B3.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/B3.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/B3.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,10 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
-import junit.framework.AssertionFailedError;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/converter/TestConverter.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/converter/TestConverter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,15 +17,14 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.converter;
+package org.exoplatform.commons.serialization.converter;
import junit.framework.AssertionFailedError;
import junit.framework.TestCase;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
-import org.exoplatform.webui.application.replication.model.TypeDomain;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.api.TypeConverter;
+import org.exoplatform.commons.serialization.model.TypeDomain;
-import java.io.IOException;
import java.io.InvalidObjectException;
/**
@@ -38,7 +37,7 @@
public void testConvertSerializedType() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A1.class);
+ domain.addTypeModel(A1.class);
A1 a = new A1("foo");
//
@@ -63,7 +62,7 @@
public void testConvertSerializableType() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(B1.class);
+ domain.addTypeModel(B1.class);
B1 b = new B1("foo");
//
@@ -75,7 +74,7 @@
public void testConverterWriteThrowsException() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A1.class);
+ domain.addTypeModel(A1.class);
A1 a = new A1("foo");
//
@@ -108,7 +107,7 @@
public void testConverterWriteReturnsNull() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A1.class);
+ domain.addTypeModel(A1.class);
A1 a = new A1("foo");
//
@@ -139,7 +138,7 @@
public void testConverterReadReturnsNull() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A1.class);
+ domain.addTypeModel(A1.class);
A1 a = new A1("foo");
//
@@ -170,7 +169,7 @@
public void testConverterReadThrowsException() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A1.class);
+ domain.addTypeModel(A1.class);
A1 a = new A1("foo");
//
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/A1.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/factory/A1.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/A1.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,11 +17,11 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.factory;
+package org.exoplatform.commons.serialization.factory;
-import org.exoplatform.webui.application.replication.api.factory.ObjectFactory;
-import org.exoplatform.webui.application.replication.api.factory.CreateException;
-import org.exoplatform.webui.application.replication.model.FieldModel;
+import org.exoplatform.commons.serialization.api.factory.ObjectFactory;
+import org.exoplatform.commons.serialization.api.factory.CreateException;
+import org.exoplatform.commons.serialization.model.FieldModel;
import java.util.Map;
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/A2.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/factory/A2.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/A2.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.factory;
+package org.exoplatform.commons.serialization.factory;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/B.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/factory/B.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/B.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.factory;
+package org.exoplatform.commons.serialization.factory;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/factory/TestObjectFactory.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/factory/TestObjectFactory.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,12 +17,11 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.factory;
+package org.exoplatform.commons.serialization.factory;
import junit.framework.TestCase;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.model.TypeDomain;
-import org.exoplatform.webui.application.replication.model.TypeException;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.model.TypeDomain;
import java.io.InvalidClassException;
@@ -36,7 +35,7 @@
public void testCustomFactory() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(A2.class);
+ domain.addTypeModel(A2.class);
SerializationContext context = new SerializationContext(domain);
context.addFactory(new A1());
A2 a2 = new A2();
@@ -46,7 +45,7 @@
public void testFactoryThrowsException() throws Exception
{
TypeDomain domain = new TypeDomain();
- domain.add(B.class);
+ domain.addTypeModel(B.class);
SerializationContext context = new SerializationContext(domain);
B b = new B(false);
try
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/ArrayListTypeConverter.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/metadata/ArrayListTypeConverter.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/ArrayListTypeConverter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.metadata;
+package org.exoplatform.commons.serialization.metadata;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
import java.util.ArrayList;
import java.util.LinkedList;
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/metadata/TestMetaData.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/TestMetaData.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,14 +17,14 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.metadata;
+package org.exoplatform.commons.serialization.metadata;
import junit.framework.TestCase;
-import org.exoplatform.webui.application.replication.model.ClassTypeModel;
-import org.exoplatform.webui.application.replication.model.ConvertedTypeModel;
-import org.exoplatform.webui.application.replication.model.SerializationMode;
-import org.exoplatform.webui.application.replication.model.TypeDomain;
-import org.exoplatform.webui.application.replication.model.metadata.DomainMetaData;
+import org.exoplatform.commons.serialization.model.ClassTypeModel;
+import org.exoplatform.commons.serialization.model.ConvertedTypeModel;
+import org.exoplatform.commons.serialization.model.SerializationMode;
+import org.exoplatform.commons.serialization.model.TypeDomain;
+import org.exoplatform.commons.serialization.model.metadata.DomainMetaData;
import java.util.ArrayList;
import java.util.LinkedList;
@@ -41,7 +41,7 @@
DomainMetaData domainMD = new DomainMetaData();
domainMD.addClassType(Object.class, true);
TypeDomain typeDomain = new TypeDomain(domainMD);
- ClassTypeModel<Object> objectTM = (ClassTypeModel<Object>) typeDomain.add(Object.class);
+ ClassTypeModel<Object> objectTM = (ClassTypeModel<Object>) typeDomain.addTypeModel(Object.class);
assertEquals(SerializationMode.SERIALIZED, objectTM.getSerializationMode());
}
@@ -50,7 +50,7 @@
DomainMetaData domainMD = new DomainMetaData();
domainMD.addClassType(Object.class, false);
TypeDomain typeDomain = new TypeDomain(domainMD);
- ClassTypeModel<Object> objectTM = (ClassTypeModel<Object>)typeDomain.add(Object.class);
+ ClassTypeModel<Object> objectTM = (ClassTypeModel<Object>)typeDomain.addTypeModel(Object.class);
assertEquals(SerializationMode.NONE, objectTM.getSerializationMode());
}
@@ -59,7 +59,7 @@
DomainMetaData domainMD = new DomainMetaData();
domainMD.addClassType(String.class, true);
TypeDomain typeDomain = new TypeDomain(domainMD);
- ClassTypeModel<String> stringTM = (ClassTypeModel<String>)typeDomain.add(String.class);
+ ClassTypeModel<String> stringTM = (ClassTypeModel<String>)typeDomain.addTypeModel(String.class);
assertEquals(SerializationMode.SERIALIZED, stringTM.getSerializationMode());
}
@@ -68,7 +68,7 @@
DomainMetaData domainMD = new DomainMetaData();
domainMD.addClassType(String.class, false);
TypeDomain typeDomain = new TypeDomain(domainMD);
- ClassTypeModel<String> stringTM = (ClassTypeModel<String>)typeDomain.add(String.class);
+ ClassTypeModel<String> stringTM = (ClassTypeModel<String>)typeDomain.addTypeModel(String.class);
assertEquals(SerializationMode.SERIALIZABLE, stringTM.getSerializationMode());
}
@@ -77,7 +77,7 @@
DomainMetaData domainMD = new DomainMetaData();
domainMD.addConvertedType(Thread.class, ThreadTypeConverter.class);
TypeDomain typeDomain = new TypeDomain(domainMD);
- ConvertedTypeModel<Thread, String> objectTM = (ConvertedTypeModel<Thread, String>)typeDomain.add(Thread.class);
+ ConvertedTypeModel<Thread, String> objectTM = (ConvertedTypeModel<Thread, String>)typeDomain.addTypeModel(Thread.class);
assertEquals(ThreadTypeConverter.class, objectTM.getConverterJavaType());
}
@@ -86,7 +86,7 @@
DomainMetaData domainMD = new DomainMetaData();
domainMD.addConvertedType(ArrayList.class, ArrayListTypeConverter.class);
TypeDomain typeDomain = new TypeDomain(domainMD);
- ConvertedTypeModel<ArrayList, LinkedList> arrayListTM = (ConvertedTypeModel<ArrayList, LinkedList>)typeDomain.add(ArrayList.class);
+ ConvertedTypeModel<ArrayList, LinkedList> arrayListTM = (ConvertedTypeModel<ArrayList, LinkedList>)typeDomain.addTypeModel(ArrayList.class);
assertEquals(ArrayListTypeConverter.class, arrayListTM.getConverterJavaType());
}
}
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/ThreadTypeConverter.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/replication/metadata/ThreadTypeConverter.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/serialization/metadata/ThreadTypeConverter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -17,9 +17,9 @@
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.exoplatform.webui.replication.metadata;
+package org.exoplatform.commons.serialization.metadata;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/account/webui/component/UIAccountPortlet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.account.webui.component;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/PortletExtraSerializer.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
import org.gatein.pc.api.Portlet;
import org.gatein.pc.api.PortletContext;
import org.gatein.pc.api.PortletInvoker;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddApplicationForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -25,14 +25,13 @@
import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.applicationregistry.webui.Util;
-import org.exoplatform.commons.utils.LazyPageList;
import org.exoplatform.commons.utils.SerializablePageList;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddGadget.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddGadget.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIAddGadget.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -24,7 +24,7 @@
import org.exoplatform.portal.webui.application.GadgetUtil;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -23,7 +23,7 @@
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationInfo.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationInfo.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationInfo.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIContainer;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationOrganizer.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -31,7 +31,7 @@
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryEditMode.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.portal.webui.workspace.UIPortalApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIApplicationRegistryPortlet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.ViewChildActionListener;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIPortletApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -24,7 +24,7 @@
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategorySelector.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -3,10 +3,8 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.application.registry.ApplicationCategory;
import org.exoplatform.application.registry.ApplicationRegistryService;
-import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.commons.utils.PageListAccess;
import org.exoplatform.commons.utils.SerializablePageList;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIFormTableIteratorInputSet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIFormTableIteratorInputSet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIFormTableIteratorInputSet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.applicationregistry.webui.component;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.form.UIFormInputBase;
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 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -26,10 +26,9 @@
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.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+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;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetInfo.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -33,7 +33,7 @@
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.gadget.GadgetApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetManagement.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -31,7 +31,7 @@
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.gadget.GadgetApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPermissionForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -23,7 +23,7 @@
import org.exoplatform.application.registry.ApplicationRegistryService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletInfo.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.applicationregistry.webui.component;
import org.exoplatform.applicationregistry.webui.component.UIPortletManagement.PortletExtra;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIPortletManagement.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -23,8 +23,8 @@
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Converted;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Converted;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIContainer;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageManagementPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageManagementPortlet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIPageManagementPortlet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.navigation.webui.component;
import org.exoplatform.portal.webui.page.UIPageBrowser;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIAccountEditInputSet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -25,7 +25,7 @@
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.form.UIFormCheckBoxInput;
import org.exoplatform.webui.form.UIFormInputBase;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupDetail.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupDetail.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupDetail.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.organization.webui.component;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIContainer;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupEditMembershipForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupEditMembershipForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupEditMembershipForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -26,7 +26,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupExplorer.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupExplorer.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupExplorer.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.services.organization.Group;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIBreadcumbs;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -25,7 +25,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupInfo.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupInfo.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupInfo.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.organization.webui.component;
import org.exoplatform.services.organization.Group;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIContainer;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupManagement.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupManagement.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -25,7 +25,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIGroupMembershipForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -26,7 +26,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListMembershipType.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListMembershipType.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListMembershipType.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,13 +19,12 @@
package org.exoplatform.organization.webui.component;
-import org.exoplatform.commons.utils.*;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.services.organization.MembershipType;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
@@ -36,7 +35,6 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
-import java.io.Serializable;
import java.io.Writer;
import java.util.List;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIListUsers.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -24,7 +24,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.Query;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipManagement.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.services.organization.MembershipType;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIContainer;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIMembershipTypeForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.services.organization.MembershipType;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIOrganizationPortlet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.ViewChildActionListener;
import org.exoplatform.services.organization.Query;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIPortletApplication;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInGroup.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -28,7 +28,7 @@
import org.exoplatform.services.organization.User;
import org.exoplatform.services.organization.UserHandler;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserInfo.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -23,7 +23,7 @@
import org.exoplatform.services.organization.Query;
import org.exoplatform.services.organization.User;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIPopupWindow;
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserManagement.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/organization/webui/component/UIUserManagement.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.organization.webui.component;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIContainer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiApplication.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiApplication.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/WebuiApplication.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -110,7 +110,6 @@
throw new Exception("Cannot find the configuration for the component " + type.getName() + ", configId "
+ configId);
}
- System.out.println("Created component " + type.getName() + " with configId=" + configId + " and id=" + id + " and config=" + config);
T uicomponent = Util.createObject(type, config.getInitParams());
uicomponent.setComponentConfig(id, config);
return uicomponent;
Deleted: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/SerializationContext.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/SerializationContext.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/application/replication/SerializationContext.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -1,130 +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.webui.application.replication;
-
-import org.exoplatform.webui.application.replication.impl.api.factory.DefaultObjectFactory;
-import org.exoplatform.webui.application.replication.api.factory.ObjectFactory;
-import org.exoplatform.webui.application.replication.model.TypeDomain;
-import org.exoplatform.webui.application.replication.serial.ObjectReader;
-import org.exoplatform.webui.application.replication.serial.ObjectWriter;
-
-import java.io.*;
-import java.lang.reflect.ParameterizedType;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class SerializationContext
-{
-
- /** . */
- private final TypeDomain typeDomain;
-
- /** . */
- private final Map<Class<?>, ObjectFactory<?>> factories;
-
- public SerializationContext(TypeDomain typeDomain)
- {
- HashMap<Class<?>, ObjectFactory<?>> factories = new HashMap<Class<?>, ObjectFactory<?>>();
- factories.put(Object.class, new DefaultObjectFactory());
-
- //
- this.typeDomain = typeDomain;
- this.factories = factories;
- }
-
- public <O> void addFactory(ObjectFactory<O> factory)
- {
- // OK
- Class<ObjectFactory<O>> factoryClass = (Class<ObjectFactory<O>>)factory.getClass();
-
- //
- ParameterizedType pt = (ParameterizedType)factoryClass.getGenericSuperclass();
-
- // OK
- Class<?> objectType = (Class<Object>)pt.getActualTypeArguments()[0];
-
- //
- factories.put(objectType, factory);
- }
-
- public TypeDomain getTypeDomain()
- {
- return typeDomain;
- }
-
- public <O>ObjectFactory<? super O> getFactory(Class<O> type)
- {
- // OK
- ObjectFactory<O> factory = (ObjectFactory<O>)factories.get(type);
-
- //
- if (factory == null)
- {
- return getFactory(type.getSuperclass());
- }
-
- //
- return factory;
- }
-
- public <O> O clone(O o) throws IOException, ClassNotFoundException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectWriter writer = new ObjectWriter(this, baos);
- writer.writeObject(o);
- writer.close();
- ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
- ObjectReader in = new ObjectReader(this, bais);
- return (O)in.readObject();
- }
-
- public void write(Object o, OutputStream out) throws IOException
- {
- ObjectWriter writer = new ObjectWriter(this, out);
- writer.writeObject(o);
- writer.flush();
- }
-
- public byte[] write(Object o) throws IOException
- {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- ObjectWriter writer = new ObjectWriter(this, baos);
- writer.writeObject(o);
- writer.close();
- return baos.toByteArray();
- }
-
- public Object read(byte[] bytes) throws IOException, ClassNotFoundException
- {
- ByteArrayInputStream bais = new ByteArrayInputStream(bytes);
- ObjectReader in = new ObjectReader(this, bais);
- return in.readObject();
- }
-
- public Object read(InputStream in ) throws IOException, ClassNotFoundException
- {
- ObjectReader or = new ObjectReader(this, in);
- return or.readObject();
- }
-}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/bean/ReflectionDataMapping.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/bean/ReflectionDataMapping.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/bean/ReflectionDataMapping.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,6 @@
package org.exoplatform.webui.bean;
import org.exoplatform.util.ReflectionUtil;
-import org.exoplatform.webui.application.replication.api.annotations.Converted;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormInput;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/Component.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.config;
import org.exoplatform.webui.Util;
-import org.exoplatform.webui.application.replication.api.annotations.Converted;
+import org.exoplatform.commons.serialization.api.annotations.Converted;
import org.exoplatform.webui.config.metadata.ComponentMetaData;
import org.exoplatform.webui.core.lifecycle.Lifecycle;
import org.exoplatform.webui.event.EventListener;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/ComponentConfigConverter.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/ComponentConfigConverter.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/config/ComponentConfigConverter.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.webui.application.ConfigurationManager;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.TypeConverter;
+import org.exoplatform.commons.serialization.api.TypeConverter;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIApplication.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIApplication.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIApplication.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -23,7 +23,7 @@
import org.exoplatform.services.log.Log;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.exception.MessageException;
import java.io.Writer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIBreadcumbs.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIBreadcumbs.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIBreadcumbs.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIBreadcumbs.SelectPathActionListener;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponent.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -27,7 +27,7 @@
import org.exoplatform.web.application.URLBuilder;
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.Component;
import org.exoplatform.webui.core.lifecycle.Lifecycle;
import org.exoplatform.webui.core.renderers.ValueRenderer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIComponentDecorator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.core;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.lifecycle.Lifecycle;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.lifecycle.UIContainerLifecycle;
import org.exoplatform.webui.event.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIGrid.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIGrid.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIGrid.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.core;
import org.exoplatform.util.ReflectionUtil;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import java.lang.reflect.Method;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPageIterator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.commons.utils.EmptySerializablePageList;
import org.exoplatform.commons.utils.PageList;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.event.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupMessages.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.event.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupWindow.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupWindow.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPopupWindow.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.core;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.event.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIPortletApplication.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.webui.application.WebuiApplication;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import java.io.Writer;
import java.util.Set;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIRepeater.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIRepeater.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIRepeater.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.portal.config.NoSuchDataException;
import org.exoplatform.util.ReflectionUtil;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.bean.UIDataFeed;
import org.exoplatform.webui.config.annotation.ComponentConfig;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UISearch.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UISearch.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UISearch.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.webui.core;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.model.SelectItemOption;
import org.exoplatform.webui.form.UIFormInputSet;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UITree.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.util.ReflectionUtil;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.event.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIVirtualList.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIVirtualList.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIVirtualList.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.portal.config.NoSuchDataException;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.bean.UIDataFeed;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/model/SelectItemOption.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/model/SelectItemOption.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/model/SelectItemOption.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.webui.core.model;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
/**
* Created by The eXo Platform SARL
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -21,7 +21,7 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.bean.BeanDataMapping;
import org.exoplatform.webui.bean.ReflectionDataMapping;
import org.exoplatform.webui.config.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormCheckBoxInput.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import java.io.Writer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormGrid.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormGrid.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormGrid.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.webui.form;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIGrid;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputBase.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.UIContainer;
import org.exoplatform.webui.event.Event;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputContainer.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputContainer.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputContainer.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.webui.form;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIContainer;
import org.exoplatform.webui.form.validator.Validator;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputInfo.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputInfo.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputInfo.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import java.io.Writer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputSet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.bean.BeanDataMapping;
import org.exoplatform.webui.bean.ReflectionDataMapping;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormInputWithActions.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPageIterator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPageIterator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPageIterator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -28,7 +28,7 @@
* Represents a multi page iterator
*/
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPopupWindow.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPopupWindow.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormPopupWindow.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormRadioBoxInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormRadioBoxInput.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormRadioBoxInput.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.model.SelectItemOption;
import java.io.Writer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormSelectBox.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormSelectBox.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormSelectBox.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.core.model.SelectItemOption;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormStringInput.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import java.io.Writer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTableInputSet.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTableInputSet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTableInputSet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import java.io.Writer;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UISearchForm.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UISearchForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/UISearchForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.webui.form;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UISearch;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/EmailAddressValidator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ExpressionValidator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PasswordStringLengthValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PasswordStringLengthValidator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/PasswordStringLengthValidator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/ResourceValidator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/SpecialCharacterValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/SpecialCharacterValidator.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/SpecialCharacterValidator.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,7 @@
package org.exoplatform.webui.form.validator;
import org.exoplatform.web.application.ApplicationMessage;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.exception.MessageException;
import org.exoplatform.webui.form.UIForm;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountForm.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -22,7 +22,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.InitParams;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIAccountInputSet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -25,7 +25,7 @@
import org.exoplatform.services.organization.User;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.form.UIFormInputWithActions;
import org.exoplatform.webui.form.UIFormStringInput;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIGroupMembershipSelector.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -24,7 +24,7 @@
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIListPermissionSelector.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -28,7 +28,7 @@
import org.exoplatform.portal.config.UserACL.Permission;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIBreadcumbs;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UISelector.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UISelector.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UISelector.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,7 +19,7 @@
package org.exoplatform.webui.organization;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIComponent;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserMembershipSelector.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserMembershipSelector.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserMembershipSelector.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -26,7 +26,7 @@
import org.exoplatform.services.organization.MembershipTypeHandler;
import org.exoplatform.services.organization.OrganizationService;
import org.exoplatform.services.organization.User;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIGrid;
Modified: portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java
===================================================================
--- portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/eXo/src/main/java/org/exoplatform/webui/organization/UIUserProfileInputSet.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -27,7 +27,7 @@
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIApplication;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/ApplicationState.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/ApplicationState.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/ApplicationState.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -19,8 +19,8 @@
package org.exoplatform.portal.application.replication;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.core.UIApplication;
import java.io.*;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/SerializationContextSingleton.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/SerializationContextSingleton.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/SerializationContextSingleton.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,9 +20,9 @@
package org.exoplatform.portal.application.replication;
import org.exoplatform.services.organization.Query;
-import org.exoplatform.webui.application.replication.SerializationContext;
-import org.exoplatform.webui.application.replication.model.TypeDomain;
-import org.exoplatform.webui.application.replication.model.metadata.DomainMetaData;
+import org.exoplatform.commons.serialization.SerializationContext;
+import org.exoplatform.commons.serialization.model.TypeDomain;
+import org.exoplatform.commons.serialization.model.metadata.DomainMetaData;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/UIComponentFactory.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/UIComponentFactory.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/replication/UIComponentFactory.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,12 +20,9 @@
package org.exoplatform.portal.application.replication;
import org.exoplatform.webui.Util;
-import org.exoplatform.webui.application.ConfigurationManager;
-import org.exoplatform.webui.application.WebuiApplication;
-import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.factory.CreateException;
-import org.exoplatform.webui.application.replication.api.factory.ObjectFactory;
-import org.exoplatform.webui.application.replication.model.FieldModel;
+import org.exoplatform.commons.serialization.api.factory.CreateException;
+import org.exoplatform.commons.serialization.api.factory.ObjectFactory;
+import org.exoplatform.commons.serialization.model.FieldModel;
import org.exoplatform.webui.config.Component;
import org.exoplatform.webui.core.UIComponent;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-01-28 13:10:29 UTC (rev 1459)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBrowser.java 2010-01-28 17:46:52 UTC (rev 1460)
@@ -20,7 +20,6 @@
package org.exoplatform.portal.webui.page;
import org.exoplatform.commons.utils.LazyPageList;
-import org.exoplatform.commons.utils.ObjectPageList;
import org.exoplatform.commons.utils.PageList;
import org.exoplatform.portal.application.PortalRequestContext;
import org.exoplatform.portal.config.DataStorage;
@@ -42,7 +41,7 @@
import org.exoplatform.portal.webui.workspace.UIWorkingWorkspace;
import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.webui.application.WebuiRequestContext;
-import org.exoplatform.webui.application.replication.api.annotations.Serialized;
+import org.exoplatform.commons.serialization.api.annotations.Serialized;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.ComponentConfigs;
import org.exoplatform.webui.config.annotation.EventConfig;
@@ -66,12 +65,9 @@
import org.exoplatform.webui.form.UISearchForm;
import java.util.ArrayList;
-import java.util.Comparator;
import java.util.List;
import java.util.ResourceBundle;
-import javax.jcr.RepositoryException;
-
@ComponentConfigs({
@ComponentConfig(template = "system:/groovy/portal/webui/page/UIPageBrowser.gtmpl", events = {
@EventConfig(listeners = UIPageBrowser.DeleteActionListener.class, confirm = "UIPageBrowse.deletePage"),
14 years, 11 months
gatein SVN: r1459 - in components/wsrp/trunk: admin-gui and 2 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-28 08:10:29 -0500 (Thu, 28 Jan 2010)
New Revision: 1459
Modified:
components/wsrp/trunk/admin-gui/pom.xml
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
components/wsrp/trunk/pom.xml
Log:
- Started updating admin-gui module so that it'd work with GateIn:
+ Updated dependencies to be in line with the GateIn ones.
+ Added provided scope on admin-gui dependencies to avoid bundling the world.
+ Added PortletBridge dependencies.
+ Added temporary eXo kernel dependency until a cleaner way to inject services can be found.
Modified: components/wsrp/trunk/admin-gui/pom.xml
===================================================================
--- components/wsrp/trunk/admin-gui/pom.xml 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/pom.xml 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ 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.
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.gatein.wsrp</groupId>
<artifactId>wsrp-parent</artifactId>
@@ -33,31 +34,59 @@
<name>GateIn WSRP Admin GUI</name>
<dependencies>
- <dependency>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-consumer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.wsrp</groupId>
- <artifactId>wsrp-producer-lib</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.gatein.pc</groupId>
- <artifactId>pc-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-common</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-consumer</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.wsrp</groupId>
+ <artifactId>wsrp-producer-lib</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-common</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.pc</groupId>
+ <artifactId>pc-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
- <dependency>
- <groupId>javax.faces</groupId>
- <artifactId>jsf-api</artifactId>
- </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.portletbridge</groupId>
+ <artifactId>portletbridge-api</artifactId>
+ <version>2.0.0.CR1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.portletbridge</groupId>
+ <artifactId>portletbridge-impl</artifactId>
+ <version>2.0.0.CR1</version>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.facelets</groupId>
+ <artifactId>jsf-facelets</artifactId>
+ <version>1.1.15</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <scope>provided</scope>
+ <version>2.2.0-Beta06</version>
+ </dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.admin.ui;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.consumer.EndpointConfigurationInfo;
import org.gatein.wsrp.consumer.ProducerInfo;
@@ -123,7 +124,7 @@
info.setId(id);
// properly update the registry after change of id
- registry.updateProducerInfo(info);
+ getRegistry().updateProducerInfo(info);
// we're not using modifyIfNeeded here to avoid double equality check, so we need to set modified manually
modified = true;
@@ -133,7 +134,7 @@
else
{
// initialization scenario
- consumer = registry.getConsumer(id);
+ consumer = getRegistry().getConsumer(id);
if (consumer != null)
{
EndpointConfigurationInfo endpoint = getProducerInfo().getEndpointConfigurationInfo();
@@ -174,7 +175,7 @@
}
catch (Exception e)
{
- registry.deactivateConsumerWith(getId());
+ getRegistry().deactivateConsumerWith(getId());
beanContext.createErrorMessageFrom("wsdl", e);
}
}
@@ -345,7 +346,7 @@
private void saveToRegistry(ProducerInfo prodInfo)
{
- registry.updateProducerInfo(prodInfo);
+ getRegistry().updateProducerInfo(prodInfo);
modified = false;
}
@@ -514,6 +515,15 @@
public boolean isAlreadyExisting(String objectName)
{
- return registry.getConsumer(objectName) != null;
+ return getRegistry().getConsumer(objectName) != null;
}
+
+ public ConsumerRegistry getRegistry()
+ {
+ if (registry == null)
+ {
+ registry = (ConsumerRegistry)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ConsumerRegistry.class);
+ }
+ return registry;
+ }
}
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.admin.ui;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.PortletInvokerException;
import org.gatein.wsrp.WSRPConsumer;
@@ -62,6 +63,10 @@
public ConsumerRegistry getRegistry()
{
+ if (registry == null)
+ {
+ registry = (ConsumerRegistry)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ConsumerRegistry.class);
+ }
return registry;
}
@@ -83,22 +88,22 @@
public WSRPConsumer getSelectedConsumer()
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(selectedId, "consumer id", null);
- return registry.getConsumer(selectedId);
+ return getRegistry().getConsumer(selectedId);
}
public boolean isConsumersEmpty()
{
- return registry.getConfiguredConsumers().isEmpty();
+ return getRegistry().getConfiguredConsumers().isEmpty();
}
public List<WSRPConsumer> getConsumers()
{
- return registry.getConfiguredConsumers();
+ return getRegistry().getConfiguredConsumers();
}
public String reload()
{
- registry.reloadConsumers();
+ getRegistry().reloadConsumers();
return CONSUMERS;
}
@@ -117,17 +122,17 @@
RefreshResult result = internalRefresh(consumer);
if (result != null && !result.hasIssues())
{
- registry.activateConsumerWith(selectedId);
+ getRegistry().activateConsumerWith(selectedId);
}
}
else
{
- registry.activateConsumerWith(selectedId);
+ getRegistry().activateConsumerWith(selectedId);
}
}
else
{
- registry.deactivateConsumerWith(selectedId);
+ getRegistry().deactivateConsumerWith(selectedId);
}
}
catch (Exception e)
@@ -152,7 +157,7 @@
try
{
- registry.registerOrDeregisterConsumerWith(selectedId, register);
+ getRegistry().registerOrDeregisterConsumerWith(selectedId, register);
// show consumer configuration
setConsumerIdInSession(false);
return CONFIGURE_CONSUMER;
@@ -177,7 +182,7 @@
{
try
{
- registry.createConsumer(selectedId, null, null);
+ getRegistry().createConsumer(selectedId, null, null);
setConsumerIdInSession(false);
return CONFIGURE_CONSUMER;
}
@@ -197,7 +202,7 @@
{
try
{
- registry.destroyConsumer(selectedId);
+ getRegistry().destroyConsumer(selectedId);
return listConsumers();
}
catch (Exception e)
@@ -259,18 +264,18 @@
beanContext.createErrorMessage(statusMessage);
// refresh had issues, we should deactivate this consumer
- registry.deactivateConsumerWith(consumer.getProducerId());
+ getRegistry().deactivateConsumerWith(consumer.getProducerId());
}
else
{
// activate the consumer if it's supposed to be active
if (consumer.isActive())
{
- registry.activateConsumerWith(consumer.getProducerId());
+ getRegistry().activateConsumerWith(consumer.getProducerId());
}
else
{
- registry.deactivateConsumerWith(consumer.getProducerId());
+ getRegistry().deactivateConsumerWith(consumer.getProducerId());
}
beanContext.createInfoMessage(statusMessage);
@@ -374,6 +379,6 @@
public boolean isAlreadyExisting(String objectName)
{
- return registry.getConsumer(objectName) != null;
+ return getRegistry().getConsumer(objectName) != null;
}
}
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2009, Red Hat Middleware, LLC, and individual
+ * 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.
@@ -23,6 +23,7 @@
package org.gatein.wsrp.admin.ui;
+import org.exoplatform.container.ExoContainerContext;
import org.gatein.registration.RegistrationPolicy;
import org.gatein.registration.policies.DefaultRegistrationPolicy;
import org.gatein.wsrp.producer.config.ProducerConfiguration;
@@ -56,6 +57,10 @@
public ProducerConfigurationService getConfigurationService()
{
+ if (configurationService == null)
+ {
+ configurationService = (ProducerConfigurationService)ExoContainerContext.getCurrentContainer().getComponentInstanceOfType(ProducerConfigurationService.class);
+ }
return configurationService;
}
@@ -66,7 +71,7 @@
public ProducerConfiguration getConfiguration()
{
- return configurationService.getConfiguration();
+ return getConfigurationService().getConfiguration();
}
public boolean isRegistrationRequiredForFullDescription()
@@ -175,7 +180,7 @@
{
getRegRequirements().reloadPolicyFrom(policyClassName, validatorClassName);
}
- configurationService.saveConfiguration();
+ getConfigurationService().saveConfiguration();
beanContext.createInfoMessage("bean_producer_save_success");
}
catch (Exception e)
@@ -190,7 +195,7 @@
{
try
{
- configurationService.reloadConfiguration();
+ getConfigurationService().reloadConfiguration();
beanContext.createInfoMessage("bean_producer_cancel_success");
}
catch (Exception e)
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ 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.
@@ -30,11 +30,9 @@
<!-- Facelet portlet view handler-->
<application>
- <view-handler>
- org.jboss.portletbridge.application.PortletViewHandler
- </view-handler>
- <navigation-handler>org.gatein.wsrp.admin.ui.RedirectOnNoConsumerNavigationHandler</navigation-handler>
+ <view-handler>org.jboss.portletbridge.application.PortletViewHandler</view-handler>
<state-manager>org.jboss.portletbridge.application.PortletStateManager</state-manager>
+ <navigation-handler>org.gatein.wsrp.admin.ui.RedirectOnNoConsumerNavigationHandler</navigation-handler>
<locale-config>
<default-locale>en</default-locale>
<supported-locale>fr</supported-locale>
Modified: components/wsrp/trunk/pom.xml
===================================================================
--- components/wsrp/trunk/pom.xml 2010-01-28 10:43:54 UTC (rev 1458)
+++ components/wsrp/trunk/pom.xml 2010-01-28 13:10:29 UTC (rev 1459)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ 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.
@@ -21,7 +21,8 @@
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
@@ -46,9 +47,9 @@
</scm>
<properties>
- <version.gatein.pc>2.1.0-Beta02</version.gatein.pc>
- <version.gatein.common>2.0.0-CR1</version.gatein.common>
- <version.gatein.wci>2.0.0-Beta02</version.gatein.wci>
+ <version.gatein.pc>2.1.0-CR02</version.gatein.pc>
+ <version.gatein.common>2.0.0-CR03</version.gatein.common>
+ <version.gatein.wci>2.0.0-CR02</version.gatein.wci>
<version.jsf>1.2_12</version.jsf>
<version.apache.commons-fileupload>1.2.1</version.apache.commons-fileupload>
@@ -64,7 +65,7 @@
<dependency>
<groupId>org.gatein</groupId>
<artifactId>gatein-dep</artifactId>
- <version>1.0.0-Beta02</version>
+ <version>1.0.0-Beta03</version>
<type>pom</type>
<scope>import</scope>
</dependency>
14 years, 11 months
gatein SVN: r1458 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-01-28 05:43:54 -0500 (Thu, 28 Jan 2010)
New Revision: 1458
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UISetPropertyValueForm.java
Log:
- Forgot to commit this change.
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UISetPropertyValueForm.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UISetPropertyValueForm.java 2010-01-28 10:09:29 UTC (rev 1457)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/wsrp/webui/component/consumer/UISetPropertyValueForm.java 2010-01-28 10:43:54 UTC (rev 1458)
@@ -29,8 +29,9 @@
import org.exoplatform.webui.core.lifecycle.UIFormLifecycle;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
-import org.exoplatform.webui.form.UIForm;
import org.exoplatform.webui.form.UIFormStringInput;
+import org.exoplatform.wsrp.webui.component.UIMappedForm;
+import org.gatein.wsrp.consumer.RegistrationProperty;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -43,10 +44,11 @@
@EventConfig(listeners = UISetPropertyValueForm.SaveActionListener.class),
@EventConfig(listeners = UISetPropertyValueForm.CancelActionListener.class)
})
-public class UISetPropertyValueForm extends UIForm
+public class UISetPropertyValueForm extends UIMappedForm
{
private UIFormStringInput value;
private static final String[] ACTIONS = new String[]{"Save", "Cancel"};
+ private RegistrationProperty prop;
public UISetPropertyValueForm()
{
@@ -54,6 +56,19 @@
setActions(ACTIONS);
}
+ public void setProperty(RegistrationProperty prop)
+ {
+ this.prop = prop;
+ try
+ {
+ setBackingBean(prop);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ }
+ }
+
static public class CancelActionListener extends EventListener<UISetPropertyValueForm>
{
@Override
14 years, 11 months
gatein SVN: r1457 - in portal/trunk: component/portal/src/main/java/org/exoplatform/portal/config/model and 9 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-01-28 05:09:29 -0500 (Thu, 28 Jan 2010)
New Revision: 1457
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/SiteConfig.java
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java
portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarDashboardPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
portal/trunk/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBody.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
Log:
GTNPORTAL-540: Create multiple UIPortal object within a session
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/UserPortalConfig.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -31,6 +31,9 @@
private PortalConfig portal;
private List<PageNavigation> navigations;
+
+ /** Added by Minh Hoang TO */
+ private PageNavigation selectedNavigation;
public UserPortalConfig()
{
@@ -52,7 +55,21 @@
{
this.portal = portal;
}
+
+ public void setSelectedNavigation(PageNavigation _selectedNavigation)
+ {
+ this.selectedNavigation = _selectedNavigation;
+ }
+ public PageNavigation getSelectedNavigation()
+ {
+ if(this.selectedNavigation != null)
+ {
+ return this.selectedNavigation;
+ }
+ return navigations.get(0);
+ }
+
public void setNavigations(List<PageNavigation> navs)
{
navigations = navs;
Added: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/SiteConfig.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/SiteConfig.java (rev 0)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/model/SiteConfig.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -0,0 +1,40 @@
+package org.exoplatform.portal.config.model;
+
+import org.exoplatform.portal.pom.data.ModelData;
+
+/**
+ *
+ * @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
+ * @version $Id$
+ *
+ */
+public class SiteConfig extends ModelObject
+{
+
+ private String ownerType;
+
+ private String ownerId;
+
+ private Container layout;
+
+ private PageNavigation navigation;
+
+ private String[] accessPermissions;
+
+ private String editPermission;
+
+ public SiteConfig(String _ownerType, String _ownerId, String storageId)
+ {
+ super(storageId);
+ this.ownerType = _ownerType;
+ this.ownerId = _ownerId;
+ }
+
+ @Override
+ public ModelData build()
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}
Modified: portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java
===================================================================
--- portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/dashboard/src/main/java/org/exoplatform/dashboard/webui/component/UITabPaneDashboard.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -24,7 +24,6 @@
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
-import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.webui.page.UIPageBody;
import org.exoplatform.portal.webui.portal.UIPortal;
import org.exoplatform.portal.webui.util.Util;
@@ -87,10 +86,13 @@
private void initPageNavigation() throws Exception
{
- String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- pageNavigation = getPageNavigation(PortalConfig.USER_TYPE + "::" + remoteUser);
+ //String remoteUser = Util.getPortalRequestContext().getRemoteUser();
+ //pageNavigation = getPageNavigation(PortalConfig.USER_TYPE + "::" + remoteUser);
+ //TODO: Check this part carefully
+ this.pageNavigation = uiPortal.getSelectedNavigation();
}
+ /*
private PageNavigation getPageNavigation(String owner) throws Exception
{
List<PageNavigation> allNavigations = uiPortal.getNavigations();
@@ -102,6 +104,8 @@
return null;
}
+ */
+
public int getCurrentNumberOfTabs() throws Exception
{
@@ -128,7 +132,7 @@
public List<PageNode> getSameSiblingsNode() throws Exception
{
List<PageNode> siblings = getPageNavigation().getNodes();
- List<PageNode> selectedPath = Util.getUIPortal().getSelectedPaths();
+ List<PageNode> selectedPath = Util.getUIPortal().getSelectedPath();
if (selectedPath != null && selectedPath.size() > 1)
{
PageNode currentParent = selectedPath.get(selectedPath.size() - 2);
@@ -223,7 +227,7 @@
pageNavigation.getOwnerId());
page.setTitle(nodeLabel);
- List<PageNode> selectedPath = uiPortal.getSelectedPaths();
+ List<PageNode> selectedPath = uiPortal.getSelectedPath();
PageNode parentNode = null;
if (selectedPath != null && selectedPath.size() > 1)
{
@@ -308,7 +312,7 @@
try
{
List<PageNode> nodes = pageNavigation.getNodes();
- List<PageNode> selectedPath = uiPortal.getSelectedPaths();
+ List<PageNode> selectedPath = uiPortal.getSelectedPath();
PageNode parentNode = null;
if (selectedPath != null && selectedPath.size() > 1)
{
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UISiteManagement.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -289,7 +289,7 @@
{
editPortal.setSelectedNode(uiPortal.getSelectedNode());
editPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
- editPortal.setSelectedPaths(uiPortal.getSelectedPaths());
+ editPortal.setSelectedPath(uiPortal.getSelectedPath());
UISiteBody siteBody = uiWorkingWS.findFirstComponentOfType(UISiteBody.class);
siteBody.setUIComponent(null);
}
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIAdminToolbarPortlet.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -47,12 +47,16 @@
public PageNavigation getSelectedNavigation() throws Exception
{
+ return Util.getUIPortal().getSelectedNavigation();
+
+ /*
PageNavigation nav = Util.getUIPortal().getSelectedNavigation();
if (nav != null)
return nav;
if (Util.getUIPortal().getNavigations().size() < 1)
return null;
return Util.getUIPortal().getNavigations().get(0);
+ */
}
@Override
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarDashboardPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarDashboardPortlet.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarDashboardPortlet.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -62,7 +62,8 @@
private PageNavigation getPageNavigation(String owner) throws Exception
{
- List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
+ //List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
+ List<PageNavigation> allNavigations = Util.getUIPortalApplication().getNavigations();
for (PageNavigation nav : allNavigations)
{
if (nav.getOwner().equals(owner))
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarGroupPortlet.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -48,7 +48,8 @@
public List<PageNavigation> getGroupNavigations() throws Exception
{
String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
+ //List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
+ List<PageNavigation> allNavigations = Util.getUIPortalApplication().getNavigations();
List<PageNavigation> navigations = new ArrayList<PageNavigation>();
for (PageNavigation navigation : allNavigations)
{
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/toolbar/webui/component/UIUserToolBarSitePortlet.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -72,7 +72,8 @@
private PageNavigation getPageNavigation(String owner) throws Exception
{
- List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
+ //List<PageNavigation> allNavigations = Util.getUIPortal().getNavigations();
+ List<PageNavigation> allNavigations = Util.getUIPortalApplication().getUserPortalConfig().getNavigations();
for (PageNavigation nav : allNavigations)
{
if (nav.getOwner().equals(owner))
Modified: portal/trunk/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
===================================================================
--- portal/trunk/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -64,7 +64,7 @@
public void loadSelectedPath()
{
- List<PageNode> nodes = Util.getUIPortal().getSelectedPaths();
+ List<PageNode> nodes = Util.getUIPortal().getSelectedPath();
List<LocalPath> paths = new ArrayList<LocalPath>();
for (PageNode node : nodes)
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/PageNavigationUtils.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -23,10 +23,14 @@
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.PageNavigation;
import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.portal.config.model.PortalConfig;
+import org.exoplatform.services.resources.ResourceBundleManager;
import org.exoplatform.webui.application.WebuiRequestContext;
import java.util.ArrayList;
import java.util.List;
+import java.util.Locale;
+import java.util.ResourceBundle;
/**
* Created by The eXo Platform SARL
@@ -173,4 +177,26 @@
return null;
return copyNode;
}
+
+ public static void localizePageNavigation(PageNavigation nav,Locale locale, ResourceBundleManager i18nManager)
+ {
+ if (nav.getOwnerType().equals(PortalConfig.USER_TYPE))
+ return;
+ ResourceBundle res = i18nManager.getNavigationResourceBundle(locale.getLanguage(), nav.getOwnerType(), nav.getOwnerId());
+ for (PageNode node : nav.getNodes())
+ {
+ resolveLabel(res, node);
+ }
+ }
+
+ private static void resolveLabel(ResourceBundle res, PageNode node)
+ {
+ node.setResolvedLabel(res);
+ if (node.getChildren() == null)
+ return;
+ for (PageNode childNode : node.getChildren())
+ {
+ resolveLabel(res, childNode);
+ }
+ }
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -125,7 +125,7 @@
{
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
treeNode_ = new TreeNode(new PageNode(), new PageNavigation(), true);
- for (PageNavigation nav : Util.getUIPortal().getNavigations())
+ for (PageNavigation nav : Util.getUIPortalApplication().getNavigations())
{
if (!showUserNavigation && nav.getOwnerType().equals("user"))
{
@@ -224,7 +224,8 @@
else
{
String navId = uri.substring(0, index);
- selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
+ //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
+ selectNav = uiPortal.getSelectedNavigation();
}
PageNode selectNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
uiNavigation.selectedNode_ = selectNode;
@@ -271,8 +272,11 @@
PageNavigation selectNav = null;
String navId = uri.substring(0, index);
- selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
-
+
+ //TODO: Minh Hoang TO
+ //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
+ selectNav = uiPortal.getSelectedNavigation();
+
// get PageNode by uri
PageNode expandNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
@@ -307,8 +311,11 @@
PageNavigation selectNav = null;
String navId = uri.substring(0, index);
- selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
-
+
+ //TODO: Minh Hoang TO
+ //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
+ selectNav = uiPortal.getSelectedNavigation();
+
// get PageNode by uri
PageNode expandNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/navigation/UIPortalNavigation2.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -162,7 +162,10 @@
else
{
String navId = uri.substring(0, index);
- selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
+
+ //TODO: Minh Hoang TO
+ //selectNav = uiPortal.getPageNavigation(Integer.parseInt(navId));
+ selectNav = uiPortal.getSelectedNavigation();
}
PageNode selectNode = PageNavigationUtils.searchPageNodeByUri(selectNav, id);
uiNavigation.selectedNode_ = selectNode;
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageActionListener.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -57,285 +57,254 @@
static public class ChangePageNodeActionListener extends EventListener<UIPortal>
{
+ @Override
public void execute(Event<UIPortal> event) throws Exception
{
- PageNodeEvent<UIPortal> pnevent = (PageNodeEvent<UIPortal>)event;
- UIPortal uiPortal = pnevent.getSource();
- UIPageBody uiPageBody = uiPortal.findFirstComponentOfType(UIPageBody.class);
- UIPortalApplication uiPortalApp = uiPortal.getAncestorOfType(UIPortalApplication.class);
- if (uiPortalApp.getModeState() != UIPortalApplication.NORMAL_MODE)
- {
- UserPortalConfigService configService = uiPortalApp.getApplicationComponent(UserPortalConfigService.class);
- String remoteUser = Util.getPortalRequestContext().getRemoteUser();
- UserPortalConfig portalConfig =
- configService.getUserPortalConfig(Util.getPortalRequestContext().getPortalOwner(), remoteUser);
- uiPortal.getChildren().clear();
- PortalDataMapper.toUIPortal(uiPortal, portalConfig);
- uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
- uiPortal.broadcast(event, event.getExecutionPhase());
- return;
- }
+ UIPortal showedUIPortal = event.getSource();
+ UIPortalApplication uiPortalApp = showedUIPortal.getAncestorOfType(UIPortalApplication.class);
+
+ //This code snippet is to make sure that Javascript/Skin is fully loaded at the first request
UIWorkingWorkspace uiWorkingWS = uiPortalApp.getChildById(UIPortalApplication.UI_WORKING_WS_ID);
PortalRequestContext pcontext = Util.getPortalRequestContext();
pcontext.addUIComponentToUpdateByAjax(uiWorkingWS);
uiWorkingWS.setRenderedChild(UIPortalApplication.UI_VIEWING_WS_ID);
pcontext.setFullRender(true);
-
- String currentUri = (uiPortal.getSelectedNode() == null) ? null : uiPortal.getSelectedNode().getUri();
- PageNavigation currentNav = uiPortal.getSelectedNavigation();
-
- uiPortal.setSelectedNavigation(null);
- uiPortal.setSelectedNode(null);
- List<PageNode> selectedPaths_ = new ArrayList<PageNode>(5);
-
- List<PageNavigation> navigations = uiPortal.getNavigations();
- String uri = pnevent.getTargetNodeUri();
- if (uri == null || (uri = uri.trim()).length() < 1)
+
+ PageNavigation currentNav = showedUIPortal.getSelectedNavigation();
+ String currentUri = showedUIPortal.getSelectedNode().getUri();
+ if(currentUri.startsWith("/"))
{
- return;
+ currentUri = currentUri.substring(1);
}
- if (uri.length() == 1 && uri.charAt(0) == '/')
+
+ //This if branche is to make sure that the first time user logs in, showedUIPortal has selectedPaths
+ //Otherwise, there will be NPE on BreadcumbsPortlet
+ if(showedUIPortal.getSelectedPath() == null)
{
- for (PageNavigation nav : navigations)
- {
- for (PageNode child : nav.getNodes())
- {
- if (PageNavigationUtils.filter(child, pcontext.getRemoteUser()) != null)
- {
- selectedPaths_.add(child);
- uiPortal.setSelectedNode(child);
- uiPortal.setSelectedPaths(selectedPaths_);
- String selectedUri =
- (uiPortal.getSelectedNode() == null) ? null : uiPortal.getSelectedNode().getUri();
-
- if (!currentUri.equals(selectedUri))
- {
- updateLayout(uiPortal, currentNav, uiPortal.getSelectedNavigation(), uiPortalApp);
- uiPageBody = uiPortal.findFirstComponentOfType(UIPageBody.class);
- if (uiPageBody.getMaximizedUIComponent() != null)
- {
- UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
- currentPortlet.setCurrentWindowState(WindowState.NORMAL);
- uiPageBody.setMaximizedUIComponent(null);
- }
- }
- uiPageBody.setPageBody(uiPortal.getSelectedNode(), uiPortal);
- return;
- }
- }
- }
+ List<PageNode> currentSelectedPath = findPath(currentNav, currentUri.split("/"));
+ showedUIPortal.setSelectedPath(currentSelectedPath);
}
- if (uri.charAt(0) == '/')
+
+ String targetedUri = ((PageNodeEvent<UIPortal>)event).getTargetNodeUri();
+ if(targetedUri.startsWith("/"))
{
- uri = uri.substring(1);
+ targetedUri = targetedUri.substring(1);
}
-
- int idx = uri.lastIndexOf("::");
- if (idx < 0)
+
+ PageNavigation targetedNav = getTargetedNav(uiPortalApp, targetedUri);
+
+ if(targetedNav == null)
{
- PageNode selectedNode = null;
- for (PageNavigation nav : navigations)
+ return;
+ }
+
+ String formerNavType = currentNav.getOwnerType();
+ String formerNavId = currentNav.getOwnerId();
+ String newNavType = targetedNav.getOwnerType();
+ String newNavId = targetedNav.getOwnerId();
+
+ String[] targetPath = targetedUri.split("/");
+ PageNode targetPageNode = getTargetedNode(targetedNav, targetPath);
+ List<PageNode> targetedPathNodes = findPath(targetedNav, targetPath);
+
+ if(formerNavType.equals(newNavType) && formerNavId.equals(newNavId))
+ {
+ //Case 1: Both navigation type and id are not changed, but current page node is changed
+ if(!currentUri.equals(targetedUri))
{
- String[] nodeNames = uri.split("/");
- int i = 0;
- PageNode tempNode = nav.getNode(nodeNames[i]);
- selectedNode = tempNode;
- while (tempNode != null && ++i < nodeNames.length)
- {
- selectedPaths_.add(selectedNode = tempNode);
- tempNode = tempNode.getChild(nodeNames[i]);
- }
- if (tempNode != null)
- {
- selectedPaths_.add(selectedNode = tempNode);
- }
-
- if (selectedNode != null)
- {
- uiPortal.setSelectedNavigation(nav);
- break;
- }
+ showedUIPortal.setSelectedNode(targetPageNode);
+ showedUIPortal.setSelectedPath(targetedPathNodes);
+ showedUIPortal.refreshUIPage();
+ return;
}
- // TODO tam.nguyen: filter navigation, select navigation up to user
- if (selectedNode == null)
+ }
+ else
+ {
+ // Case 2: Either navigation type or id has been changed
+ // First, we try to find a cached UIPortal
+ UIPortal cachedUIPortal = uiPortalApp.getCachedUIPortal(newNavType, newNavId);
+ if (cachedUIPortal != null)
{
- filter : for (PageNavigation nav : navigations)
- {
- for (PageNode child : nav.getNodes())
- {
- if (PageNavigationUtils.filter(child, pcontext.getRemoteUser()) != null)
- {
- selectedNode = child;
- break filter;
- }
- }
- }
+ System.out.println("Found UIPortal with OWNERTYPE: " + newNavType + " OWNERID " + newNavId);
+ cachedUIPortal.setSelectedNode(targetPageNode);
+ cachedUIPortal.setSelectedPath(targetedPathNodes);
+ uiPortalApp.setShowedUIPortal(cachedUIPortal);
+ cachedUIPortal.refreshUIPage();
+ return;
}
- uiPortal.setSelectedNode(selectedNode);
- if (selectedNode == null)
+ else
{
- selectedPaths_.add(uiPortal.getSelectedNode());
- }
- uiPortal.setSelectedPaths(selectedPaths_);
- String selectedUri = (uiPortal.getSelectedNode() == null) ? null : uiPortal.getSelectedNode().getUri();
- if (currentUri != null && !currentUri.equals(selectedUri))
- {
- updateLayout(uiPortal, currentNav, uiPortal.getSelectedNavigation(), uiPortalApp);
- uiPageBody = uiPortal.findFirstComponentOfType(UIPageBody.class);
- if (uiPageBody.getMaximizedUIComponent() != null)
+ UIPortal newUIPortal = buildUIPortal(targetedNav, uiPortalApp, uiPortalApp.getUserPortalConfig());
+ if(newUIPortal == null)
{
- UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
- currentPortlet.setCurrentWindowState(WindowState.NORMAL);
- uiPageBody.setMaximizedUIComponent(null);
+ return;
}
+ newUIPortal.setSelectedNode(targetPageNode);
+ newUIPortal.setSelectedPath(targetedPathNodes);
+ uiPortalApp.setShowedUIPortal(newUIPortal);
+ uiPortalApp.addUIPortal(newUIPortal);
+ newUIPortal.refreshUIPage();
+ return;
}
-
- uiPageBody.setPageBody(uiPortal.getSelectedNode(), uiPortal);
- return;
}
- String navId = uri.substring(0, idx);
- uri = uri.substring(idx + 2, uri.length());
- PageNavigation nav = null;
- for (PageNavigation ele : navigations)
+ }
+
+ /**
+ * Get the targeted <code>PageNavigation</code>
+ *
+ * @param uiPortalApp
+ * @param targetedUri
+ * @return
+ */
+ private PageNavigation getTargetedNav(UIPortalApplication uiPortalApp, String targetedUri)
+ {
+ List<PageNavigation> allNavs = uiPortalApp.getUserPortalConfig().getNavigations();
+
+ //That happens when user browses to an empty-nodeUri URL like ../portal/public/classic/
+ //In this case, we returns default navigation
+ if(targetedUri.length() == 0)
{
- if (ele.getId() == Integer.parseInt(navId))
+ return uiPortalApp.getNavigations().get(0);
+ }
+
+ String[] pathNodes = targetedUri.split("/");
+
+ //We check the first navigation in the list containing all descendants corresponding to pathNodes
+ for(PageNavigation nav : allNavs)
+ {
+ if(containingDescendantNodes(nav, pathNodes))
{
- nav = ele;
- break;
+ return nav;
}
}
- if (nav != null)
- {
- String[] nodeNames = uri.split("/");
- int i = 0;
- PageNode tempNode = nav.getNode(nodeNames[i]);
- PageNode selecttedNode = tempNode;
- while (tempNode != null && ++i < nodeNames.length)
+ return null;
+ }
+
+ /**
+ * Check if a given <code>PageNavigation</code> contains all the descendants corresponding to the pathNodes
+ *
+ * @param navigation
+ * @param pathNodes
+ * @return
+ */
+ private static boolean containingDescendantNodes(PageNavigation navigation, String[] pathNodes)
+ {
+ PageNode firstLevelNode = navigation.getNode(pathNodes[0]);
+ if(firstLevelNode == null)
+ {
+ return false;
+ }
+
+ //Recursive code snippet with two variables
+ PageNode tempNode = firstLevelNode;
+ PageNode currentNode;
+
+ for(int i = 1; i < pathNodes.length; i++)
+ {
+ currentNode = tempNode.getChild(pathNodes[i]);
+
+ //If the navigation does not support an intermediate pathNode, then returns false
+ if (currentNode == null)
{
- selectedPaths_.add(selecttedNode = tempNode);
- tempNode = tempNode.getChild(nodeNames[i]);
+ return false;
}
- if (tempNode != null)
+ else
{
- selectedPaths_.add(selecttedNode = tempNode);
+ tempNode = currentNode;
}
-
- uiPortal.setSelectedNode(selecttedNode);
- uiPortal.setSelectedNavigation(nav);
+ }
+ return true;
+ }
+
+ /**
+ * Fetch the currently selected pageNode under a PageNavigation. It is the last node encountered
+ * while descending the pathNodes
+ *
+ * @param targetedNav
+ * @param pathNodes
+ * @return
+ */
+ private static PageNode getTargetedNode(PageNavigation targetedNav, String[] pathNodes)
+ {
+ //Case users browses to a URL of the form */portal/public/classic
+ if(pathNodes.length == 0)
+ {
+ return targetedNav.getNodes().get(0);
}
-
- pcontext.getJavascriptManager().addCustomizedOnLoadScript(
- "document.title='" + uiPortal.getSelectedNode().getResolvedLabel().replaceAll("'", "\\\\'") + "';");
- uiPortal.setSelectedPaths(selectedPaths_);
- String selectedUri = (uiPortal.getSelectedNode() == null) ? null : uiPortal.getSelectedNode().getUri();
-
- if (!currentUri.equals(selectedUri))
+
+ PageNode currentNode = targetedNav.getNode(pathNodes[0]);
+ PageNode tempNode = null;
+
+ for(int i = 1; i < pathNodes.length; i++)
{
- if (uiPageBody.getMaximizedUIComponent() != null)
+ tempNode = currentNode.getChild(pathNodes[i]);
+ if (tempNode == null)
{
- UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
- currentPortlet.setCurrentWindowState(WindowState.NORMAL);
- uiPageBody.setMaximizedUIComponent(null);
+ return null;
}
+ else
+ {
+ currentNode = tempNode;
+ }
}
- uiPageBody.setPageBody(uiPortal.getSelectedNode(), uiPortal);
+
+ return currentNode;
}
-
- /**
- * Update the layout of UIPortal if both ownerType and ownerId of
- * navigation are changed
- *
- * @param uiPortal
- * @param formerNav
- * @param newNav
- * @param uiPortalApp
- * @throws Exception
- */
- private void updateLayout(UIPortal uiPortal, PageNavigation formerNav, PageNavigation newNav,
- UIPortalApplication uiPortalApp) throws Exception
+
+ private static List<PageNode> findPath(PageNavigation nav, String[] pathNodes)
{
- if (formerNav == null || newNav == null)
+ List<PageNode> nodes = new ArrayList<PageNode>(4);
+
+ //That happens when user browses to a URL like */portal/public/classic
+ if(pathNodes.length == 0)
{
- return;
+ nodes.add(nav.getNodes().get(0));
+ return nodes;
}
- String newOwnerType = newNav.getOwnerType();
- String newOwnerId = newNav.getOwnerId();
- String formerOwnerType = formerNav.getOwnerType();
- String formerOwnerId = formerNav.getOwnerId();
-
- if (newOwnerId.equals(formerOwnerId) && formerOwnerType.equals(newOwnerType))
+ PageNode startNode = nav.getNode(pathNodes[0]);
+ if (startNode == null)
{
- return;
+ return nodes;
}
+ nodes.add(startNode);
- DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
- PortalConfig pConfig = storage.getPortalConfig(newOwnerType, newOwnerId);
- Container container = pConfig.getPortalLayout();
- if (container != null)
+ for (int i = 1; i < pathNodes.length; i++)
{
- UserPortalConfig portalConfig = uiPortalApp.getUserPortalConfig();
- portalConfig.setPortal(pConfig);
- rebuildUIPortal(uiPortal, portalConfig);
+ startNode = startNode.getChild(pathNodes[i]);
+ if (startNode == null)
+ {
+ return nodes;
+ }
+ else
+ {
+ nodes.add(startNode);
+ }
}
+ return nodes;
}
- /**
- * Rebuild UIPortal with updated UserPortalConfig
- *
- * @param uiPortal
- * @param portalConfig
- * @throws Exception
- */
- private void rebuildUIPortal(UIPortal uiPortal, UserPortalConfig portalConfig) throws Exception
+ private static UIPortal buildUIPortal(PageNavigation newPageNav, UIPortalApplication uiPortalApp, UserPortalConfig userPortalConfig) throws Exception
{
- PageNode backupSelectedNode = uiPortal.getSelectedNode();
- PageNavigation backupSelectedNavigation = uiPortal.getSelectedNavigation();
- List<PageNode> backupSelectedPaths = uiPortal.getSelectedPaths();
- uiPortal.getChildren().clear();
- PortalDataMapper.toUIPortal(uiPortal, portalConfig);
- uiPortal.setSelectedNode(backupSelectedNode);
- uiPortal.setSelectedNavigation(backupSelectedNavigation);
- uiPortal.setSelectedPaths(backupSelectedPaths);
+ DataStorage storage = uiPortalApp.getApplicationComponent(DataStorage.class);
+ if(storage == null){
+ return null;
+ }
+ PortalConfig portalConfig = storage.getPortalConfig(newPageNav.getOwnerType(), newPageNav.getOwnerId());
+ Container layout = portalConfig.getPortalLayout();
+ if(layout != null)
+ {
+ userPortalConfig.setPortal(portalConfig);
+ }
+ UIPortal uiPortal = uiPortalApp.createUIComponent(UIPortal.class, null, null);
+ //Reset selected navigation on userPortalConfig
+ userPortalConfig.setSelectedNavigation(newPageNav);
+ System.out.println("Build new UIPortal with OWNERTYPE: " + newPageNav.getOwnerType() + " OWNERID: " + newPageNav.getOwnerId());
+ PortalDataMapper.toUIPortal(uiPortal, userPortalConfig);
+ return uiPortal;
}
}
- //
- // static public class DeleteWidgetActionListener extends
- // EventListener<UIPage> {
- // public void execute(Event<UIPage> event) throws Exception {
- // WebuiRequestContext pContext = event.getRequestContext();
- // String id = pContext.getRequestParameter(UIComponent.OBJECTID);
- // UIPage uiPage = event.getSource();
- // List<UIWidget> uiWidgets = new ArrayList<UIWidget>();
- // uiPage.findComponentOfType(uiWidgets, UIWidget.class);
- // for(UIWidget uiWidget : uiWidgets) {
- // if(uiWidget.getApplicationInstanceUniqueId().equals(id)) {
- // uiPage.getChildren().remove(uiWidget);
- // String userName = pContext.getRemoteUser() ;
- // if(userName != null && userName.trim().length() > 0) {
- // UserWidgetStorage widgetDataService =
- // uiPage.getApplicationComponent(UserWidgetStorage.class) ;
- // widgetDataService.delete(userName, uiWidget.getApplicationName(),
- // uiWidget.getApplicationInstanceUniqueId()) ;
- // }
- // if(uiPage.isModifiable()) {
- // Page page = PortalDataMapper.toPageModel(uiPage);
- // UserPortalConfigService configService =
- // uiPage.getApplicationComponent(UserPortalConfigService.class);
- // if(page.getChildren() == null) page.setChildren(new ArrayList<Object>());
- // configService.update(page);
- // }
- // break;
- // }
- // }
- // PortalRequestContext pcontext =
- // (PortalRequestContext)event.getRequestContext();
- // pcontext.setFullRender(false);
- // pcontext.setResponseComplete(true) ;
- // pcontext.getWriter().write(EventListener.RESULT_OK) ;
- // }
- // }
- //
+
static public class DeleteGadgetActionListener extends EventListener<UIPage>
{
public void execute(Event<UIPage> event) throws Exception
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBody.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBody.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/page/UIPageBody.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -80,14 +80,18 @@
UserPortalConfigService userPortalConfigService =
(UserPortalConfigService)appContainer.getComponentInstanceOfType(UserPortalConfigService.class);
Page page = null;
- UIPage uiPage = null;
+ UIPage uiPage;
+
+ String pageReference = null;
+
if (pageNode != null)
{
+ pageReference = pageNode.getPageReference();
try
{
- if (pageNode.getPageReference() != null)
+ if (pageReference != null)
{
- page = userPortalConfigService.getPage(pageNode.getPageReference(), context.getRemoteUser());
+ page = userPortalConfigService.getPage(pageReference, context.getRemoteUser());
}
}
catch (Exception e)
@@ -96,41 +100,66 @@
uiApp.addMessage(new ApplicationMessage(e.getMessage(), new Object[]{}));
}
}
-
+
uiPortal.setMaximizedUIComponent(null);
- if (page != null)
+
+ uiPage = getUIPage(pageReference, page, uiPortal, context);
+
+ if (uiPage.isShowMaxWindow())
{
- if (Page.DESKTOP_PAGE.equals(page.getFactoryId()))
+ uiPortal.setMaximizedUIComponent(uiPage);
+ }
+ else
+ {
+ UIComponent maximizedComponent = uiPortal.getMaximizedUIComponent();
+ if (maximizedComponent != null && maximizedComponent instanceof UIPage)
{
- uiPage = createUIComponent(context, UIDesktopPage.class, null, null);
+ uiPortal.setMaximizedUIComponent(null);
}
- else
+ maximizedComponent = this.getMaximizedUIComponent();
+ if (maximizedComponent != null && maximizedComponent instanceof UIPage)
{
- uiPage = createUIComponent(context, UIPage.class, null, null);
+ this.setMaximizedUIComponent(null);
}
- PortalDataMapper.toUIPage(uiPage, page);
- if (uiPage.isShowMaxWindow())
- {
- uiPortal.setMaximizedUIComponent(uiPage);
- }
- else
- {
- UIComponent maximizedComponent = uiPortal.getMaximizedUIComponent();
- if (maximizedComponent != null && maximizedComponent instanceof UIPage)
- {
- uiPortal.setMaximizedUIComponent(null);
- }
- maximizedComponent = this.getMaximizedUIComponent();
- if (maximizedComponent != null && maximizedComponent instanceof UIPage)
- {
- this.setMaximizedUIComponent(null);
- }
- }
-
}
setUIComponent(uiPage);
}
+ /**
+ * Return cached UIPage or a newly built UIPage
+ *
+ * @param pageReference
+ * @param page
+ * @param uiPortal
+ * @return
+ */
+ private UIPage getUIPage(String pageReference, Page page, UIPortal uiPortal, WebuiRequestContext context)
+ throws Exception
+ {
+ UIPage uiPage = uiPortal.getUIPage(pageReference);
+ if (uiPage != null)
+ {
+ return uiPage;
+ }
+
+ if(page == null)
+ {
+ return null;
+ }
+
+ if (Page.DESKTOP_PAGE.equals(page.getFactoryId()))
+ {
+ uiPage = createUIComponent(context, UIDesktopPage.class, null, null);
+ }
+ else
+ {
+ uiPage = createUIComponent(context, UIPage.class, null, null);
+ }
+ PortalDataMapper.toUIPage(uiPage, page);
+
+ return uiPage;
+ }
+
public void renderChildren() throws Exception
{
uicomponent_.processRender((WebuiRequestContext)WebuiRequestContext.getCurrentInstance());
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UILanguageSelector.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -131,8 +131,7 @@
localeConfig = localeConfigService.getDefaultLocaleConfig();
uiApp.setLocale(localeConfig.getLocale());
uiApp.setOrientation(localeConfig.getOrientation());
- UIPortal uiPortal = uiApp.findFirstComponentOfType(UIPortal.class);
- uiPortal.refreshNavigation(localeConfig.getLocale());
+ uiApp.localizeNavigations();
OrganizationService orgService = event.getSource().getApplicationComponent(OrganizationService.class);
String remoteUser = event.getRequestContext().getRemoteUser();
if (remoteUser != null)
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -29,6 +29,7 @@
import org.exoplatform.portal.config.model.Properties;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UIContainer;
+import org.exoplatform.portal.webui.page.UIPage;
import org.exoplatform.portal.webui.page.UIPageBody;
import org.exoplatform.portal.webui.page.UIPageActionListener.ChangePageNodeActionListener;
import org.exoplatform.portal.webui.portal.UIPortalComponentActionListener.ChangeApplicationListActionListener;
@@ -60,6 +61,7 @@
import java.util.Map;
import java.util.ResourceBundle;
+import javax.portlet.WindowState;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
@@ -67,8 +69,6 @@
@EventConfig(listeners = ChangePageNodeActionListener.class),
@EventConfig(listeners = ChangeApplicationListActionListener.class),
@EventConfig(listeners = MoveChildActionListener.class),
- // @EventConfig(listeners =
- // RemoveJSApplicationToDesktopActionListener.class),
@EventConfig(listeners = UIPortal.ChangeWindowStateActionListener.class),
@EventConfig(listeners = UIPortal.LogoutActionListener.class),
@EventConfig(listeners = ShowLoginFormActionListener.class),
@@ -98,14 +98,19 @@
private Properties properties;
- private List<PageNavigation> navigations;
+ //private List<PageNavigation> navigations;
- private List<PageNode> selectedPaths_;
+ private PageNavigation navigation;
+
+ private List<PageNode> selectedPath;
private PageNode selectedNode_;
-
- private PageNavigation selectedNavigation_;
-
+
+ private UIPage showedUIPage;
+
+ //private Map<UIPageKey, UIPage> all_UIPages;
+ private Map<String, UIPage> all_UIPages;
+
private Map<String, String[]> publicParameters_ = new HashMap<String, String[]>();
private UIComponent maximizedUIComponent;
@@ -189,7 +194,35 @@
{
publicParameters_ = publicParams;
}
+
+ /** At the moment, this method ensure compatibility with legacy code */
+ public List<PageNavigation> getNavigations() throws Exception
+ {
+ List<PageNavigation> listNavs = new ArrayList<PageNavigation>();
+ listNavs.add(navigation);
+ return listNavs;
+ }
+
+ public UIPage getUIPage(String pageReference)
+ {
+ if(all_UIPages == null)
+ {
+ this.all_UIPages = new HashMap<String, UIPage>(5);
+ return null;
+ }
+ return this.all_UIPages.get(pageReference);
+ }
+
+ public void setUIPage(String pageReference, UIPage uiPage)
+ {
+ if(this.all_UIPages == null)
+ {
+ this.all_UIPages = new HashMap<String, UIPage>(5);
+ }
+ this.all_UIPages.put(pageReference, uiPage);
+ }
+ /*
public List<PageNavigation> getNavigations() throws Exception
{
UserPortalConfigService serv = getApplicationComponent(UserPortalConfigService.class);
@@ -205,7 +238,9 @@
return navigations;
}
-
+ */
+
+ /*
public void setNavigation(List<PageNavigation> navs) throws Exception
{
navigations = navs;
@@ -241,11 +276,46 @@
refreshNavigation(uiApp.getLocale());
}
- public void setSelectedNode(PageNode node)
+ */
+
+ public void setNavigation(PageNavigation _navigation)
{
+ this.navigation = _navigation;
+ }
+
+ /** Refresh the UIPage under UIPortal */
+ public void refreshUIPage() throws Exception
+ {
+ if(selectedNode_ == null)
+ {
+ selectedNode_ = navigation.getNodes().get(0);
+ }
+
+ UIPageBody uiPageBody = findFirstComponentOfType(UIPageBody.class);
+ if(uiPageBody == null)
+ {
+ return;
+ }
+
+ if (uiPageBody.getMaximizedUIComponent() != null)
+ {
+ UIPortlet currentPortlet = (UIPortlet)uiPageBody.getMaximizedUIComponent();
+ currentPortlet.setCurrentWindowState(WindowState.NORMAL);
+ uiPageBody.setMaximizedUIComponent(null);
+ }
+ uiPageBody.setPageBody(selectedNode_, this);
+
+ //Refresh locale
+ Locale locale = Util.getUIPortalApplication().getLocale();
+ refreshNavigation(locale);
+ }
+
+ public synchronized void setSelectedNode(PageNode node)
+ {
selectedNode_ = node;
}
+ /*
public PageNode getSelectedNode() throws Exception
{
if (selectedNode_ != null)
@@ -256,17 +326,32 @@
selectedNode_ = selectedNavigation_.getNodes().get(0);
return selectedNode_;
}
+ */
+
+ public PageNode getSelectedNode() throws Exception
+ {
+ if(selectedNode_ != null)
+ {
+ return selectedNode_;
+ }
+ if(navigation == null || navigation.getNodes() == null || navigation.getNodes().size() < 1)
+ {
+ return null;
+ }
+ return navigation.getNodes().get(0);
+ }
- public List<PageNode> getSelectedPaths()
+ public List<PageNode> getSelectedPath()
{
- return selectedPaths_;
+ return selectedPath;
}
- public void setSelectedPaths(List<PageNode> nodes)
+ public void setSelectedPath(List<PageNode> nodes)
{
- selectedPaths_ = nodes;
+ selectedPath = nodes;
}
+ /*
public PageNavigation getSelectedNavigation() throws Exception
{
if (selectedNavigation_ != null && selectedNavigation_.getNodes() != null
@@ -292,7 +377,19 @@
setSelectedNavigation(pNav);
return pNav;
}
+ */
+
+ public PageNavigation getSelectedNavigation() throws Exception
+ {
+ return navigation;
+ }
+
+ public void setSelectedNavigation(PageNavigation _navigation)
+ {
+ this.navigation = _navigation;
+ }
+ /**
public PageNavigation getPageNavigation(int id)
{
for (PageNavigation nav : navigations)
@@ -303,11 +400,15 @@
return null;
}
+*/
+ /*
public void setSelectedNavigation(PageNavigation selectedNavigation)
{
selectedNavigation_ = selectedNavigation;
}
+ */
+
public UIComponent getMaximizedUIComponent()
{
return maximizedUIComponent;
@@ -372,6 +473,7 @@
setProperty(PortalProperties.SESSION_ALIVE, type);
}
+ /*
@Deprecated
public void refreshNavigation()
{
@@ -387,7 +489,9 @@
}
}
}
-
+ */
+
+ /*
public void refreshNavigation(Locale locale)
{
for (PageNavigation nav : navigations)
@@ -395,6 +499,11 @@
localizePageNavigation(nav,locale);
}
}
+ */
+ public void refreshNavigation(Locale locale)
+ {
+ localizePageNavigation(navigation, locale);
+ }
private void localizePageNavigation(PageNavigation nav,Locale locale)
{
@@ -490,5 +599,32 @@
event.getRequestContext().addUIComponentToUpdateByAjax(uiMaskWS);
}
}
+
+ private static class UIPageKey
+ {
+ private String ownerType;
+
+ private String ownerId;
+
+ UIPageKey(String _ownerType, String _ownerId)
+ {
+ this.ownerType = _ownerType;
+ this.ownerId = _ownerId;
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if(this == null || obj == null)
+ {
+ return this == null && obj == null;
+ }
+ if(!(obj instanceof UIPageKey))
+ {
+ return false;
+ }
+ return this.ownerType.equals(((UIPageKey)obj).ownerType) && this.ownerId.equals(((UIPageKey)obj).ownerId);
+ }
+ }
}
\ No newline at end of file
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComposer.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -207,7 +207,8 @@
if (!portalAppLanguage.equals(userLanguage) && !portalAppLanguage.equals(browserLanguage))
{
uiPortalApp.setLocale(localeConfig.getLocale());
- editPortal.refreshNavigation(localeConfig.getLocale());
+ //editPortal.refreshNavigation(localeConfig.getLocale());
+ uiPortalApp.localizeNavigations();
}
uiPortalApp.setSkin(editPortal.getSkin());
}
@@ -587,18 +588,20 @@
public void execute(Event<UIPortalComposer> event) throws Exception
{
UIPortalApplication uiPortalApp = Util.getUIPortalApplication();
- UIPortal uiPortal = Util.getUIPortal();
+ UIPortal uiPortal = uiPortalApp.getShowedUIPortal();
UIEditInlineWorkspace editInlineWS = event.getSource().getParent();
UIWorkingWorkspace uiWorkingWS = editInlineWS.getParent();
UIPortalToolPanel uiToolPanel = uiWorkingWS.findFirstComponentOfType(UIPortalToolPanel.class);
+
UIPage uiPage = uiToolPanel.findFirstComponentOfType(UIPage.class);
Page page = (Page)PortalDataMapper.buildModelObject(uiPage);
+ String pageId = page.getPageId();
+
UserPortalConfigService portalConfigService =
uiWorkingWS.getApplicationComponent(UserPortalConfigService.class);
- if (page.getStorageId() != null && portalConfigService.getPage(page.getPageId()) == null)
+ if (page.getStorageId() != null && portalConfigService.getPage(pageId) == null)
{
- uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", new String[]{page
- .getPageId()}, 1));
+ uiPortalApp.addMessage(new ApplicationMessage("UIPageBrowser.msg.PageNotExist", new String[]{pageId}, 1));
uiPortalApp.setModeState(UIPortalApplication.NORMAL_MODE);
PageNodeEvent<UIPortal> pnevent =
new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE,
@@ -624,6 +627,10 @@
// Perform mop update
portalConfigService.update(page);
uiToolPanel.setUIComponent(null);
+
+ // Update UIPage cache on UIPortal
+ uiPortal.setUIPage(pageId, uiPage);
+
if (PortalProperties.SESSION_ALWAYS.equals(uiPortal.getSessionAlive()))
{
uiPortalApp.setSessionOpen(true);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/PortalDataMapper.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -369,7 +369,8 @@
buildUIContainer(uiPortal, child, false);
}
}
- uiPortal.setNavigation(userPortalConfig.getNavigations());
+ //uiPortal.setNavigation(userPortalConfig.getNavigations());
+ uiPortal.setNavigation(userPortalConfig.getSelectedNavigation());
}
private static void buildUIContainer(UIContainer uiContainer, Object model, boolean dashboard) throws Exception
@@ -422,4 +423,5 @@
}
uiContainer.addChild(uiComponent);
}
+
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/util/Util.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -62,8 +62,9 @@
static public UIPortal getUIPortal()
{
- return getUIPortalApplication().<UIWorkingWorkspace> getChildById(UIPortalApplication.UI_WORKING_WS_ID)
- .findFirstComponentOfType(UIPortal.class);
+ //return getUIPortalApplication().<UIWorkingWorkspace> getChildById(UIPortalApplication.UI_WORKING_WS_ID)
+ // .findFirstComponentOfType(UIPortal.class);
+ return getUIPortalApplication().getShowedUIPortal();
}
static public UIPortalToolPanel getUIPortalToolPanel()
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIMainActionListener.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -122,8 +122,8 @@
{
public void execute(Event<UIWorkingWorkspace> event) throws Exception
{
- UIPortal uiPortal = Util.getUIPortal();
UIPortalApplication uiApp = Util.getUIPortalApplication();
+ UIPortal uiPortal = uiApp.getShowedUIPortal();
PortalConfig portalConfig = uiApp.getUserPortalConfig().getPortalConfig();
UserACL userACL = uiPortal.getApplicationComponent(UserACL.class);
if (!userACL.hasEditPermission(portalConfig))
@@ -141,7 +141,7 @@
PortalDataMapper.toUIPortal(newPortal, uiApp.getUserPortalConfig());
newPortal.setSelectedNode(uiPortal.getSelectedNode());
newPortal.setSelectedNavigation(uiPortal.getSelectedNavigation());
- newPortal.setSelectedPaths(uiPortal.getSelectedPaths());
+ newPortal.setSelectedPath(uiPortal.getSelectedPath());
UIEditInlineWorkspace uiEditWS = uiWorkingWS.getChild(UIEditInlineWorkspace.class);
uiEditWS.setUIComponent(newPortal);
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-01-28 07:00:24 UTC (rev 1456)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/workspace/UIPortalApplication.java 2010-01-28 10:09:29 UTC (rev 1457)
@@ -26,6 +26,9 @@
import org.exoplatform.portal.config.UserPortalConfig;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.Container;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
+import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.resource.Skin;
@@ -33,6 +36,7 @@
import org.exoplatform.portal.resource.SkinService;
import org.exoplatform.portal.resource.SkinURL;
import org.exoplatform.portal.webui.application.UIPortlet;
+import org.exoplatform.portal.webui.navigation.PageNavigationUtils;
import org.exoplatform.portal.webui.page.UISiteBody;
import org.exoplatform.portal.webui.portal.PageNodeEvent;
import org.exoplatform.portal.webui.portal.UIPortal;
@@ -44,6 +48,7 @@
import org.exoplatform.services.resources.LocaleConfig;
import org.exoplatform.services.resources.LocaleConfigService;
import org.exoplatform.services.resources.Orientation;
+import org.exoplatform.services.resources.ResourceBundleManager;
import org.exoplatform.web.application.javascript.JavascriptConfigService;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
@@ -56,19 +61,23 @@
import java.io.Writer;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
import java.util.Set;
+
/**
* This extends the UIApplication and hence is a sibling of UIPortletApplication
* (used by any eXo Portlets as the Parent class to build the portlet component
* tree). The UIPortalApplication is responsible to build its subtree according
* to some configuration parameters. If all components are displayed it is
- * composed of 2 UI components: -UIWorkingWorkSpace: the right part that can
- * display the normal or webos portal layouts
- * - UIPopupWindow: a popup window that display or not
+ * composed of 2 UI components: -UIWorkingWorkSpace: the right part that can
+ * display the normal or webos portal layouts - UIPopupWindow: a popup window
+ * that display or not
*/
@ComponentConfig(lifecycle = UIPortalApplicationLifecycle.class, template = "system:/groovy/portal/webui/workspace/UIPortalApplication.gtmpl")
public class UIPortalApplication extends UIApplication
@@ -104,17 +113,23 @@
private UserPortalConfig userPortalConfig_;
private boolean isSessionOpen = false;
-
+
+ private Map<UIPortalKey, UIPortal> all_UIPortals;
+
+ private List<PageNavigation> all_Navigations;
+
+ private UIPortal showedUIPortal;
+
/**
* The constructor of this class is used to build the tree of UI components
* that will be aggregated in the portal page. 1) The component is stored in
* the current PortalRequestContext ThreadLocal 2) The configuration for the
* portal associated with the current user request is extracted from the
- * PortalRequestContext 3) Then according to the context path, either a public
- * or private portal is initiated. Usually a public portal does not contain
- * the left column and only the private one has it. 4) The skin to use is
- * setup 5) Finally, the current component is associated with the current
- * portal owner
+ * PortalRequestContext 3) Then according to the context path, either a
+ * public or private portal is initiated. Usually a public portal does not
+ * contain the left column and only the private one has it. 4) The skin to
+ * use is setup 5) Finally, the current component is associated with the
+ * current portal owner
*
* @throws Exception
*/
@@ -122,11 +137,17 @@
{
log = ExoLogger.getLogger("portal:UIPortalApplication");
PortalRequestContext context = PortalRequestContext.getCurrentInstance();
+
userPortalConfig_ = (UserPortalConfig)context.getAttribute(UserPortalConfig.class);
if (userPortalConfig_ == null)
throw new Exception("Can't load user portal config");
- // dang.tung - set portal language by user preference -> browser -> default
+ //TODO: Check if we need to clone page node
+ this.all_Navigations = userPortalConfig_.getNavigations();
+ localizeNavigations();
+
+ // dang.tung - set portal language by user preference -> browser ->
+ // default
// ------------------------------------------------------------------------------
String portalLanguage = null;
LocaleConfigService localeConfigService = getApplicationComponent(LocaleConfigService.class);
@@ -149,7 +170,8 @@
localeConfig = localeConfigService.getLocaleConfig(portalLanguage);
if (portalLanguage == null || !portalLanguage.equals(localeConfig.getLanguage()))
{
- // if user language no support by portal -> get browser language if no ->
+ // if user language no support by portal -> get browser language if no
+ // ->
// get portal
portalLanguage = context.getRequest().getLocale().getLanguage();
localeConfig = localeConfigService.getLocaleConfig(portalLanguage);
@@ -163,6 +185,7 @@
// -------------------------------------------------------------------------------
context.setUIApplication(this);
+ setupUIPortalCache();
addWorkingWorkspace();
String currentSkin = userPortalConfig_.getPortalConfig().getSkin();
@@ -171,6 +194,52 @@
setOwner(context.getPortalOwner());
}
+ public void setShowedUIPortal(UIPortal uiPortal)
+ {
+ this.showedUIPortal = uiPortal;
+
+ UISiteBody siteBody = this.findFirstComponentOfType(UISiteBody.class);
+ if(siteBody != null)
+ {
+ //TODO: Check this part carefully
+ siteBody.setUIComponent(uiPortal);
+ }
+ }
+
+ public UIPortal getShowedUIPortal()
+ {
+ return showedUIPortal;
+ }
+
+ public UIPortal getCachedUIPortal(String ownerType, String ownerId)
+ {
+ if(ownerType == null || ownerId == null)
+ {
+ return null;
+ }
+ return this.all_UIPortals.get(new UIPortalKey(ownerType, ownerId));
+ }
+
+ public void addUIPortal(UIPortal uiPortal)
+ {
+ String ownerType = uiPortal.getOwnerType();
+ String ownerId = uiPortal.getOwner();
+
+ if(ownerType != null && ownerId != null)
+ {
+ this.all_UIPortals.put(new UIPortalKey(ownerType, ownerId), uiPortal);
+ }
+ }
+
+ public void removeUIPortal(String ownerType, String ownerId)
+ {
+ if(ownerType == null || ownerId == null)
+ {
+ return;
+ }
+ this.all_UIPortals.remove(new UIPortalKey(ownerType, ownerId));
+ }
+
public boolean isSessionOpen()
{
return isSessionOpen;
@@ -286,12 +355,12 @@
}
/**
- * Returns a list of portlets skin that have to be added in the HTML head tag.
- * The skin can directly point to a real css file (this is the case of all the
- * porlet included in a page) or point to a servlet that agregates different
- * portlet CSS files into one to lower the number of HTTP calls (this is the
- * case in production as all the portlets included in a portal, and hence
- * there on everypage are merged into a single CSS file)
+ * Returns a list of portlets skin that have to be added in the HTML head
+ * tag. The skin can directly point to a real css file (this is the case of
+ * all the porlet included in a page) or point to a servlet that agregates
+ * different portlet CSS files into one to lower the number of HTTP calls
+ * (this is the case in production as all the portlets included in a portal,
+ * and hence there on everypage are merged into a single CSS file)
*
* @return the portlet skins
*/
@@ -311,7 +380,8 @@
toolPanel.findComponentOfType(uiportlets, UIPortlet.class);
}
- // Get portal portlets to filter since they are already in the portal skins
+ // Get portal portlets to filter since they are already in the portal
+ // skins
Set<SkinConfig> portletConfigs = getPortalPortletSkins();
//
@@ -340,7 +410,22 @@
return null;
}
}
-
+
+ private void setupUIPortalCache()
+ {
+ this.all_UIPortals = new HashMap<UIPortalKey, UIPortal>(5);
+ }
+
+ private void setupSkin()
+ {
+
+ }
+
+ private void setupLocale()
+ {
+
+ }
+
/**
* The central area is called the WorkingWorkspace. It is composed of: 1) A
* UIPortal child which is filled with portal data using the PortalDataMapper
@@ -359,6 +444,10 @@
Container container = dataStorage.getSharedLayout();
UIPortal uiPortal = createUIComponent(UIPortal.class, null, null);
PortalDataMapper.toUIPortal(uiPortal, userPortalConfig_);
+
+ this.addUIPortal(uiPortal);
+ this.showedUIPortal = uiPortal;
+
uiWorkingWorkspace.addChild(UIEditInlineWorkspace.class, null, UI_EDITTING_WS_ID).setRendered(false);
if (container != null)
{
@@ -367,16 +456,20 @@
uiContainer.setStorageId(container.getStorageId());
PortalDataMapper.toUIContainer(uiContainer, container);
UISiteBody uiSiteBody = uiContainer.findFirstComponentOfType(UISiteBody.class);
- uiSiteBody.setUIComponent(uiPortal);
+ //uiSiteBody.setUIComponent(uiPortal);
+ uiSiteBody.setUIComponent(this.showedUIPortal);
uiContainer.setRendered(true);
uiViewWS.setUIComponent(uiContainer);
}
else
{
- uiViewWS.setUIComponent(uiPortal);
+ //uiViewWS.setUIComponent(uiPortal);
+ uiViewWS.setUIComponent(this.showedUIPortal);
}
- //uiWorkingWorkspace.addChild(UIPortalToolPanel.class, null, null).setRendered(false);
- //editInlineWS.addChild(UIPortalToolPanel.class, null, null).setRendered(false);
+ // uiWorkingWorkspace.addChild(UIPortalToolPanel.class, null,
+ // null).setRendered(false);
+ // editInlineWS.addChild(UIPortalToolPanel.class, null,
+ // null).setRendered(false);
addChild(UIMaskWorkspace.class, UIPortalApplication.UI_MASK_WS_ID, null);
}
@@ -398,33 +491,31 @@
if (!nodePath.equals(nodePath_) || !isPageExist())
{
nodePath_ = nodePath;
- UIPortal uiPortal = findFirstComponentOfType(UIPortal.class);
- PageNodeEvent<UIPortal> pnevent =
- new PageNodeEvent<UIPortal>(uiPortal, PageNodeEvent.CHANGE_PAGE_NODE, nodePath_);
- uiPortal.broadcast(pnevent, Event.Phase.PROCESS);
+ PageNodeEvent<UIPortal> pnevent = new PageNodeEvent<UIPortal>(showedUIPortal, PageNodeEvent.CHANGE_PAGE_NODE, nodePath_);
+ showedUIPortal.broadcast(pnevent, Event.Phase.PROCESS);
}
super.processDecode(context);
}
/**
- * The processrender() method handles the creation of the returned HTML either
- * for a full page render or in the case of an AJAX call The first request,
- * Ajax is not enabled (means no ajaxRequest parameter in the request) and
- * hence the super.processRender() method is called. This will hence call the
- * processrender() of the Lifecycle object as this method is not overidden in
- * UIPortalApplicationLifecycle. There we simply render the bounded template
- * (groovy usually). Note that bounded template are also defined in component
- * annotations, so for the current class it is UIPortalApplication.gtmpl On
- * second calls, request have the "ajaxRequest" parameter set to true in the
- * URL. In that case the algorithm is a bit more complex: a) The list of
- * components that should be updated is extracted using the
- * context.getUIComponentToUpdateByAjax() method. That list was setup during
- * the process action phase b) Portlets and other UI components to update are
- * split in 2 different lists c) Portlets full content are returned and set
- * with the tag <div class="PortalResponse"> d) Block to updates (which are UI
- * components) are set within the <div class="PortalResponseData"> tag e) Then
- * the scripts and the skins to reload are set in the <div
- * class="PortalResponseScript">
+ * The processrender() method handles the creation of the returned HTML
+ * either for a full page render or in the case of an AJAX call The first
+ * request, Ajax is not enabled (means no ajaxRequest parameter in the
+ * request) and hence the super.processRender() method is called. This will
+ * hence call the processrender() of the Lifecycle object as this method is
+ * not overidden in UIPortalApplicationLifecycle. There we simply render the
+ * bounded template (groovy usually). Note that bounded template are also
+ * defined in component annotations, so for the current class it is
+ * UIPortalApplication.gtmpl On second calls, request have the "ajaxRequest"
+ * parameter set to true in the URL. In that case the algorithm is a bit more
+ * complex: a) The list of components that should be updated is extracted
+ * using the context.getUIComponentToUpdateByAjax() method. That list was
+ * setup during the process action phase b) Portlets and other UI components
+ * to update are split in 2 different lists c) Portlets full content are
+ * returned and set with the tag <div class="PortalResponse"> d) Block to
+ * updates (which are UI components) are set within the <div
+ * class="PortalResponseData"> tag e) Then the scripts and the skins to
+ * reload are set in the <div class="PortalResponseScript">
*/
public void processRender(WebuiRequestContext context) throws Exception
{
@@ -483,10 +574,10 @@
w.append("<div class=\"PortletResponseData\">");
/*
- * If the portlet is using our UI framework or supports it then it
- * will return a set of block to updates. If there is not block to
- * update the javascript client will see that as a full refresh of the
- * content part
+ * If the portlet is using our UI framework or supports it then
+ * it will return a set of block to updates. If there is not
+ * block to update the javascript client will see that as a full
+ * refresh of the content part
*/
uiPortlet.processRender(context);
@@ -589,4 +680,67 @@
return (page != null);
}
+ public void localizeNavigations()
+ {
+ ResourceBundleManager i18nManager = getApplicationComponent(ResourceBundleManager.class);
+ Locale locale = getLocale();
+
+ for(PageNavigation nav : this.getNavigations())
+ {
+ PageNavigationUtils.localizePageNavigation(nav, locale, i18nManager);
+ }
+ }
+
+ public void setNavigations(List<PageNavigation> navs)
+ {
+ this.all_Navigations = navs;
+ }
+
+ public List<PageNavigation> getNavigations()
+ {
+ return this.all_Navigations;
+ }
+
+ private static class UIPortalKey
+ {
+ private String ownerType;
+
+ private String ownerId;
+
+ private final int hashCode;
+
+ UIPortalKey(String _ownerType, String _ownerId)
+ {
+ this.ownerType = _ownerType;
+ this.ownerId = _ownerId;
+ this.hashCode = this.ownerType.hashCode() * 2 + this.ownerId.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (this == null || obj == null)
+ {
+ return this == null && obj == null;
+ }
+ if (!(obj instanceof UIPortalKey))
+ {
+ return false;
+ }
+ return this.ownerType.equals(((UIPortalKey)obj).ownerType) && this.ownerId.equals(((UIPortalKey)obj).ownerId);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return this.hashCode;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "OWNERTYPE: " + ownerType + " OWNERID: " + ownerId;
+ }
+ }
+
}
14 years, 11 months
gatein SVN: r1456 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget.
by do-not-reply@jboss.org
Author: tuancn
Date: 2010-01-28 02:00:24 -0500 (Thu, 28 Jan 2010)
New Revision: 1456
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/ExoBasedUserPrefStore.js
Log:
GTNPORTAL-424: Add ajaxRequest=true parameter for savePrefs action
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/ExoBasedUserPrefStore.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/ExoBasedUserPrefStore.js 2010-01-28 06:51:43 UTC (rev 1455)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/ExoBasedUserPrefStore.js 2010-01-28 07:00:24 UTC (rev 1456)
@@ -41,13 +41,14 @@
var href = eXo.env.server.portalBaseURL + "?portal:componentId=" + compId;
href += "&portal:type=action&uicomponent=" + uiGadget.id.replace(/^content-/,"");
href += "&op=SaveUserPref";
+ href += "&ajaxRequest=true";
href += "&userPref=" + prefs;
- ajaxAsyncGetRequest(href,true);
+ ajaxGet(href,true);
} else {
var params = [
{name : "userPref", value : prefs}
] ;
- ajaxAsyncGetRequest(eXo.env.server.createPortalURL(uiGadget.id.replace(/^content-/,""), "SaveUserPref", true, params),true) ;
+ ajaxGet(eXo.env.server.createPortalURL(uiGadget.id.replace(/^content-/,""), "SaveUserPref", true, params),true) ;
}
}
};
14 years, 11 months
gatein SVN: r1455 - portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application.
by do-not-reply@jboss.org
Author: tuancn
Date: 2010-01-28 01:51:43 -0500 (Thu, 28 Jan 2010)
New Revision: 1455
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
GTNPORTAL-424: Update portlet and show a message when save a deleted gadget
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-01-27 10:49:38 UTC (rev 1454)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-01-28 06:51:43 UTC (rev 1455)
@@ -26,20 +26,22 @@
import org.exoplatform.portal.config.model.ApplicationState;
import org.exoplatform.portal.config.model.ApplicationType;
import org.exoplatform.portal.config.model.Properties;
-import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.data.ModelDataStorage;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.web.WebAppController;
+import org.exoplatform.web.application.ApplicationMessage;
import org.exoplatform.web.application.gadget.GadgetApplication;
+import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.config.annotation.EventConfig;
import org.exoplatform.webui.core.UIComponent;
+import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.exception.MessageException;
import org.json.JSONException;
import org.json.JSONObject;
-import java.util.Iterator;
import java.util.Random;
import java.util.UUID;
@@ -419,7 +421,14 @@
UIGadget uiGadget = event.getSource();
//
- uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
+ try{
+ uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
+ } catch(Exception e){
+ WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
+ UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
+ context.addUIComponentToUpdateByAjax(uiPortlet);
+ throw new MessageException(new ApplicationMessage("UIDashboard.msg.ApplicationNotExisted", null, ApplicationMessage.ERROR));
+ }
//
if (uiGadget.isLossData())
14 years, 11 months