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"),