gatein SVN: r7198 - in portal/trunk: component/common/src/main/java/org/exoplatform/commons/scope and 14 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-08-23 06:00:39 -0400 (Tue, 23 Aug 2011)
New Revision: 7198
Added:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/
portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/AbstractScopedKey.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopeManager.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopedKey.java
portal/trunk/component/common/src/test/java/org/exoplatform/commons/scope/
portal/trunk/component/common/src/test/java/org/exoplatform/commons/scope/ScopeTestCase.java
portal/trunk/component/common/src/test/resources/org/
portal/trunk/component/common/src/test/resources/org/exoplatform/
portal/trunk/component/common/src/test/resources/org/exoplatform/commons/
portal/trunk/component/common/src/test/resources/org/exoplatform/commons/chromattic/
portal/trunk/component/common/src/test/resources/org/exoplatform/commons/chromattic/configuration.xml
portal/trunk/component/common/src/test/resources/org/exoplatform/commons/scope/
portal/trunk/component/common/src/test/resources/org/exoplatform/commons/scope/configuration.xml
Removed:
portal/trunk/component/common/src/test/resources/conf/
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
Modified:
portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/CacheKey.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
Log:
GTNPORTAL-2042 : ScopeManager to take care of repository scoping life cycle
GTNPORTAL-2043 : DescriptionService cache not properly configured
GTNPORTAL-2044 : NavigationService and DescriptionService scope aware
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/AbstractScopedKey.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/AbstractScopedKey.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/AbstractScopedKey.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.scope;
+
+import java.io.Serializable;
+
+/**
+ * The abstract scoped key should be subclasses to create scoped key.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public abstract class AbstractScopedKey implements Serializable
+{
+
+ /** . */
+ private final String scope;
+
+ protected AbstractScopedKey()
+ {
+ String scope = ScopeManager.getCurrentScope();
+ if (scope == null)
+ {
+ scope = "";
+ }
+
+ //
+ this.scope = scope;
+ }
+
+ protected AbstractScopedKey(String scope) throws NullPointerException
+ {
+ if (scope == null)
+ {
+ throw new NullPointerException();
+ }
+
+ //
+ this.scope = scope;
+ }
+
+ public final String getScope()
+ {
+ return scope;
+ }
+
+ /**
+ * Returns the scope value hashCode.
+ *
+ * @return the hash code
+ */
+ @Override
+ public int hashCode()
+ {
+ return scope.hashCode();
+ }
+
+ /**
+ * Returns true when:
+ * <ul>
+ * <li>the obj argument has the same reference than this object</li>
+ * <li>or the obj has class equality (<code>getClass().equals(obj.getClass())</code>) and scope equality</li>
+ * </ul>
+ *
+ * Subclasses should override this method and call the super method to ensure that the objects are of the same
+ * class and have the same scope. When this method returns true, the obj argument can be safely casted to
+ * the same sub class for performing more state equality checks.
+ */
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof AbstractScopedKey)
+ {
+ AbstractScopedKey that = (AbstractScopedKey)obj;
+ return getClass().equals(that.getClass()) && scope.equals(that.scope);
+ }
+ return false;
+ }
+}
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopeManager.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopeManager.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopeManager.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -0,0 +1,107 @@
+/**
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.commons.scope;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.exoplatform.services.jcr.RepositoryService;
+import org.exoplatform.services.jcr.core.ManageableRepository;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * <p></p>The scope manager manages the life cycle of a scope value (which means a mere string) associated with the current
+ * thread aimed to scope state. The scope manager takes it values from the current repository service name when
+ * it is associated with a request on a container containing the repository service.</p>
+ *
+ * <p>The manager implements the {@link ComponentRequestLifecycle}</p> interface to be aware of the request life cycle.</p>
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+public class ScopeManager implements ComponentRequestLifecycle
+{
+
+ /** The scope thread local. */
+ private static final ThreadLocal<String> currentScope = new ThreadLocal<String>();
+
+ /** . */
+ private static final Logger log = LoggerFactory.getLogger(ScopeManager.class);
+
+ /**
+ * Returns the current scope value or null if no value is associated with the current thread.
+ *
+ * @return the current scope
+ */
+ public static String getCurrentScope()
+ {
+ return currentScope.get();
+ }
+
+ public void startRequest(ExoContainer container)
+ {
+ if (currentScope.get() != null)
+ {
+ throw new IllegalStateException("Detected scope reentrancy " + currentScope.get());
+ }
+
+ //
+ RepositoryService repositoryService = (RepositoryService)container.getComponentInstanceOfType(RepositoryService.class);
+
+ //
+ String scope = null;
+ if (repositoryService != null)
+ {
+ try
+ {
+ ManageableRepository currentRepository = repositoryService.getCurrentRepository();
+ if (currentRepository != null)
+ {
+ scope = currentRepository.getConfiguration().getName();
+ }
+ }
+ catch (RepositoryException e)
+ {
+ log.error("Could not obtain scope value from repository", e);
+ }
+ }
+
+ //
+ if (scope == null)
+ {
+ scope = "";
+ }
+
+ //
+ currentScope.set(scope);
+ log.debug("Starting scope request \"" + scope + "\"");
+ }
+
+ public void endRequest(ExoContainer container)
+ {
+ if (currentScope.get() == null)
+ {
+ throw new IllegalStateException("Detected unscoped unscoping ");
+ }
+
+ //
+ currentScope.set(null);
+ }
+}
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopedKey.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopedKey.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/scope/ScopedKey.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.scope;
+
+import java.io.Serializable;
+
+/**
+ * A scoped key wrapping a key including the a scope. The scoped key implements the {@link #hashCode()} and
+ * {@link #equals(Object)} method based on the scope and the current value.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ScopedKey<S extends Serializable> extends AbstractScopedKey
+{
+
+ /**
+ * Create a scoped key from a key, the scope value is obtained from the {@link ScopeManager#getCurrentScope()} method.
+ *
+ * @param key the local key
+ * @param <S> the key generic serializable type
+ * @return the scoped key
+ * @throws NullPointerException if the key argument is null
+ */
+ public static <S extends Serializable> ScopedKey<S> create(S key) throws NullPointerException
+ {
+ return new ScopedKey<S>(key);
+ }
+
+ /**
+ * Creates a new scoped key with an explicit scope value.
+ *
+ * @param scope the scope value
+ * @param key the key
+ * @param <S> the key generic serializable type
+ * @return the scoped key
+ * @throws NullPointerException if any argument is null
+ */
+ public static <S extends Serializable> ScopedKey<S> create(String scope, S key) throws NullPointerException
+ {
+ return new ScopedKey<S>(scope, key);
+ }
+
+ /** . */
+ private final S key;
+
+ public ScopedKey(S key) throws NullPointerException
+ {
+ if (key == null)
+ {
+ throw new NullPointerException();
+ }
+
+ //
+ this.key = key;
+ }
+
+ public ScopedKey(String scope, S key) throws NullPointerException
+ {
+ super(scope);
+
+ if (key == null)
+ {
+ throw new NullPointerException();
+ }
+
+ //
+ this.key = key;
+ }
+
+ public S getKey()
+ {
+ return key;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return super.hashCode() ^ key.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return super.equals(obj) && ((ScopedKey)obj).key.equals(key);
+ }
+
+ @Override
+ public String toString()
+ {
+ return "ScopedKey[scope=" + getScope() + ",key=" + key + "]";
+ }
+}
Modified: portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/chromattic/ChromatticIntegrationTestCase.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -32,7 +32,7 @@
*/
@ConfiguredBy({
@ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
- @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.common-configuration.xml")
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/commons/chromattic/configuration.xml")
})
public class ChromatticIntegrationTestCase extends AbstractKernelTest
{
Added: portal/trunk/component/common/src/test/java/org/exoplatform/commons/scope/ScopeTestCase.java
===================================================================
--- portal/trunk/component/common/src/test/java/org/exoplatform/commons/scope/ScopeTestCase.java (rev 0)
+++ portal/trunk/component/common/src/test/java/org/exoplatform/commons/scope/ScopeTestCase.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -0,0 +1,78 @@
+package org.exoplatform.commons.scope;
+
+import org.exoplatform.component.test.AbstractKernelTest;
+import org.exoplatform.component.test.ConfigurationUnit;
+import org.exoplatform.component.test.ConfiguredBy;
+import org.exoplatform.component.test.ContainerScope;
+
+/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
+@ConfiguredBy({
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "conf/exo.portal.component.test.jcr-configuration.xml"),
+ @ConfigurationUnit(scope = ContainerScope.PORTAL, path = "org/exoplatform/commons/scope/configuration.xml")
+})
+public class ScopeTestCase extends AbstractKernelTest
+{
+
+ public void testKey()
+ {
+ ScopedKey<String> k1 = ScopedKey.create("foo", "bar");
+ assertEquals("foo", k1.getScope());
+ assertEquals("bar", k1.getKey());
+
+ //
+ ScopedKey<String> k2 = ScopedKey.create("foo", "bar");
+ assertEquals("foo", k1.getScope());
+ assertEquals("bar", k1.getKey());
+
+ //
+ ScopedKey<String> k3 = ScopedKey.create("juu", "bar");
+ assertEquals("juu", k3.getScope());
+ assertEquals("bar", k3.getKey());
+
+ //
+ ScopedKey<String> k4 = ScopedKey.create("juu", "daa");
+ assertEquals("juu", k4.getScope());
+ assertEquals("daa", k4.getKey());
+
+ //
+ assertTrue(k1.equals(k2));
+ assertTrue(k2.equals(k1));
+ assertEquals(k1.hashCode(), k2.hashCode());
+ assertFalse(k1.equals(k3));
+ assertFalse(k3.equals(k1));
+ assertFalse(k3.equals(k4));
+ assertFalse(k4.equals(k3));
+ }
+
+ public void testLifeCycle()
+ {
+ assertNull(ScopeManager.getCurrentScope());
+ ScopedKey<String> key = ScopedKey.create("foo");
+ assertEquals("", key.getScope());
+ assertEquals("foo", key.getKey());
+
+ //
+ assertNull(ScopeManager.getCurrentScope());
+ key = ScopedKey.create("foo");
+ assertEquals("", key.getScope());
+ assertEquals("foo", key.getKey());
+
+ //
+ begin();
+
+ //
+ assertEquals("repository", ScopeManager.getCurrentScope());
+ key = ScopedKey.create("foo");
+ assertEquals("repository", key.getScope());
+ assertEquals("foo", key.getKey());
+
+ //
+ end();
+
+ //
+ assertNull(ScopeManager.getCurrentScope());
+ key = ScopedKey.create("foo");
+ assertEquals("", key.getScope());
+ assertEquals("foo", key.getKey());
+ }
+}
Added: portal/trunk/component/common/src/test/resources/org/exoplatform/commons/chromattic/configuration.xml
===================================================================
--- portal/trunk/component/common/src/test/resources/org/exoplatform/commons/chromattic/configuration.xml (rev 0)
+++ portal/trunk/component/common/src/test/resources/org/exoplatform/commons/chromattic/configuration.xml 2011-08-23 10:00:39 UTC (rev 7198)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+ <key>org.exoplatform.commons.chromattic.ChromatticManager</key>
+ <type>org.exoplatform.commons.chromattic.ChromatticManager</type>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
+ <component-plugin>
+ <name>chromattic</name>
+ <set-method>addLifeCycle</set-method>
+ <type>org.exoplatform.commons.chromattic.ChromatticLifeCycle</type>
+ <init-params>
+ <value-param>
+ <name>domain-name</name>
+ <value>test1</value>
+ </value-param>
+ <value-param>
+ <name>workspace-name</name>
+ <value>portal-test</value>
+ </value-param>
+ <values-param>
+ <name>entities</name>
+ <value>org.exoplatform.commons.chromattic.FooEntity</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>chromattic</name>
+ <set-method>addLifeCycle</set-method>
+ <type>org.exoplatform.commons.chromattic.ChromatticLifeCycle</type>
+ <init-params>
+ <value-param>
+ <name>domain-name</name>
+ <value>test2</value>
+ </value-param>
+ <value-param>
+ <name>workspace-name</name>
+ <value>portal-test</value>
+ </value-param>
+ <values-param>
+ <name>entities</name>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Added: portal/trunk/component/common/src/test/resources/org/exoplatform/commons/scope/configuration.xml
===================================================================
--- portal/trunk/component/common/src/test/resources/org/exoplatform/commons/scope/configuration.xml (rev 0)
+++ portal/trunk/component/common/src/test/resources/org/exoplatform/commons/scope/configuration.xml 2011-08-23 10:00:39 UTC (rev 7198)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+ <component>
+ <key>org.exoplatform.commons.scope.ScopeManager</key>
+ <type>org.exoplatform.commons.scope.ScopeManager</type>
+ </component>
+</configuration>
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/CacheKey.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/CacheKey.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/CacheKey.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -19,13 +19,15 @@
package org.exoplatform.portal.mop.description;
+import org.exoplatform.commons.scope.AbstractScopedKey;
+
import java.io.Serializable;
import java.util.Locale;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
*/
-public final class CacheKey implements Serializable
+public final class CacheKey extends AbstractScopedKey implements Serializable
{
/** . */
@@ -53,12 +55,8 @@
@Override
public boolean equals(Object obj)
{
- if (obj == this)
+ if (super.equals(obj))
{
- return true;
- }
- if (obj instanceof CacheKey)
- {
CacheKey that = (CacheKey)obj;
return locale.equals(that.locale) && id.equals(that.id);
}
@@ -68,6 +66,6 @@
@Override
public int hashCode()
{
- return locale.hashCode() ^ id.hashCode();
+ return super.hashCode() ^ locale.hashCode() ^ id.hashCode();
}
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -23,6 +23,7 @@
import org.exoplatform.portal.mop.i18n.I18NAdapter;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.services.cache.CacheService;
import org.gatein.mop.api.workspace.WorkspaceObject;
import java.util.Collection;
@@ -53,6 +54,11 @@
this.cache = cache;
}
+ public DescriptionServiceImpl(POMSessionManager manager, CacheService cacheService)
+ {
+ this(manager, new ExoDataCache(cacheService));
+ }
+
public Described.State resolveDescription(String id, Locale locale) throws NullPointerException
{
return resolveDescription(id, null, locale);
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -49,7 +49,7 @@
public ExoDataCache(CacheService cacheService)
{
- this.cache = cacheService.getCacheInstance("NavigationService");
+ this.cache = cacheService.getCacheInstance(DescriptionService.class.getSimpleName());
this.values = new FutureExoCache<CacheKey, CacheValue, POMSession>(valueLoader, cache)
{
@Override
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -21,6 +21,7 @@
import org.exoplatform.commons.cache.future.FutureExoCache;
import org.exoplatform.commons.cache.future.Loader;
+import org.exoplatform.commons.scope.ScopedKey;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.pom.config.POMSession;
import org.exoplatform.services.cache.CacheService;
@@ -38,16 +39,17 @@
{
/** . */
- protected ExoCache<Serializable, Serializable> cache;
+ protected ExoCache<ScopedKey<?>, Serializable> cache;
/** . */
- protected FutureExoCache<Serializable, Serializable, POMSession> objects;
+ protected FutureExoCache<ScopedKey<?>, Serializable, POMSession> objects;
/** . */
- private Loader<Serializable, Serializable, POMSession> navigationLoader = new Loader<Serializable, Serializable, POMSession>()
+ private Loader<ScopedKey<?>, Serializable, POMSession> navigationLoader = new Loader<ScopedKey<?>, Serializable, POMSession>()
{
- public Serializable retrieve(POMSession session, Serializable key) throws Exception
+ public Serializable retrieve(POMSession session, ScopedKey<?> scopedKey) throws Exception
{
+ Object key = scopedKey.getKey();
if (key instanceof SiteKey)
{
return loadNavigation(session, (SiteKey)key);
@@ -61,8 +63,8 @@
public ExoDataCache(CacheService cacheService)
{
- this.cache = cacheService.getCacheInstance("NavigationService");
- this.objects = new FutureExoCache<Serializable, Serializable, POMSession>(navigationLoader, cache);
+ this.cache = cacheService.getCacheInstance(NavigationService.class.getSimpleName());
+ this.objects = new FutureExoCache<ScopedKey<?>, Serializable, POMSession>(navigationLoader, cache);
}
@Override
@@ -70,26 +72,26 @@
{
for (String key : keys)
{
- cache.remove(key);
+ cache.remove(ScopedKey.create(key));
}
}
@Override
protected NodeData getNode(POMSession session, String key)
{
- return (NodeData)objects.get(session, key);
+ return (NodeData)objects.get(session, ScopedKey.create(key));
}
@Override
protected void removeNavigation(SiteKey key)
{
- cache.remove(key);
+ cache.remove(ScopedKey.create(key));
}
@Override
protected NavigationData getNavigation(POMSession session, SiteKey key)
{
- return (NavigationData)objects.get(session, key);
+ return (NavigationData)objects.get(session, ScopedKey.create(key));
}
@Override
Deleted: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.exoplatform.portal.pom.config;
-
-import java.io.Serializable;
-
-/**
- * A global key wrapping a local key including the current repository id.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class GlobalKey implements Serializable
-{
-
- public static GlobalKey wrap(String repositoryName, Serializable localKey)
- {
- return new GlobalKey(repositoryName, localKey);
- }
-
- /** . */
- private final String repositoryId;
-
- /** . */
- private final Serializable localKey;
-
- public GlobalKey(String repositoryId, Serializable localKey)
- {
- if (repositoryId == null)
- {
- throw new NullPointerException();
- }
- if (localKey == null)
- {
- throw new NullPointerException();
- }
- this.repositoryId = repositoryId;
- this.localKey = localKey;
- }
-
- public String getRepositoryId()
- {
- return repositoryId;
- }
-
- public Serializable getLocalKey()
- {
- return localKey;
- }
-
- @Override
- public int hashCode()
- {
- return repositoryId.hashCode() ^ localKey.hashCode();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (obj == this)
- {
- return true;
- }
- if (obj instanceof GlobalKey)
- {
- GlobalKey that = (GlobalKey)obj;
- return repositoryId.equals(that.repositoryId) && localKey.equals(that.localKey);
- }
- return false;
- }
-
- @Override
- public String toString()
- {
- return "GlobalKey[repositoryId=" + repositoryId + ",localKey=" + localKey + "]";
- }
-}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-08-23 10:00:39 UTC (rev 7198)
@@ -22,6 +22,7 @@
import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
import org.exoplatform.commons.chromattic.ChromatticManager;
import org.exoplatform.commons.chromattic.SessionContext;
+import org.exoplatform.commons.scope.ScopedKey;
import org.exoplatform.portal.pom.config.cache.DataCache;
import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
import org.exoplatform.portal.pom.data.OwnerKey;
@@ -53,7 +54,7 @@
private MOPService pomService;
/** . */
- private final ExoCache<GlobalKey, Object> cache;
+ private final ExoCache<ScopedKey<?>, Object> cache;
/** . */
final ChromatticManager manager;
@@ -84,7 +85,7 @@
public void cachePut(Serializable key, Object value)
{
- GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+ ScopedKey<?> globalKey = ScopedKey.create(key);
//
if (log.isTraceEnabled())
@@ -98,7 +99,7 @@
public Object cacheGet(Serializable key)
{
- GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+ ScopedKey globalKey = ScopedKey.create(key);
//
Object value = cache.get(globalKey);
@@ -115,7 +116,7 @@
public void cacheRemove(Serializable key)
{
- final GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+ final ScopedKey<?> globalKey = ScopedKey.create(key);
//
if (log.isTraceEnabled())
@@ -132,13 +133,13 @@
final PortalKey portalKey = (PortalKey)key;
try
{
- cache.select(new CachedObjectSelector<GlobalKey, Object>()
+ cache.select(new CachedObjectSelector<ScopedKey<?>, Object>()
{
- public boolean select(GlobalKey selectedGlobalKey, ObjectCacheInfo<?> ocinfo)
+ public boolean select(ScopedKey<?> selectedGlobalKey, ObjectCacheInfo<?> ocinfo)
{
- if (globalKey.getRepositoryId().equals(selectedGlobalKey.getRepositoryId()))
+ if (globalKey.getScope().equals(selectedGlobalKey.getScope()))
{
- Serializable selectedLocalKey = selectedGlobalKey.getLocalKey();
+ Serializable selectedLocalKey = selectedGlobalKey.getKey();
if (selectedLocalKey instanceof OwnerKey)
{
OwnerKey selectedOwnerKey = (OwnerKey)selectedLocalKey;
@@ -150,7 +151,8 @@
}
return false;
}
- public void onSelect(ExoCache<? extends GlobalKey, ?> exoCache, GlobalKey key, ObjectCacheInfo<?> ocinfo) throws Exception
+
+ public void onSelect(ExoCache<? extends ScopedKey<?>, ?> exoCache, ScopedKey<?> key, ObjectCacheInfo<?> ocinfo) throws Exception
{
cache.remove(key);
}
Modified: portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-23 10:00:39 UTC (rev 7198)
@@ -25,6 +25,11 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
<component>
+ <key>org.exoplatform.commons.scope.ScopeManager</key>
+ <type>org.exoplatform.commons.scope.ScopeManager</type>
+ </component>
+
+ <component>
<key>org.exoplatform.services.cache.CacheService</key>
<jmx-name>cache:type=CacheService</jmx-name>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2011-08-23 05:28:05 UTC (rev 7197)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2011-08-23 10:00:39 UTC (rev 7198)
@@ -103,6 +103,11 @@
</component>
<component>
+ <key>org.exoplatform.commons.scope.ScopeManager</key>
+ <type>org.exoplatform.commons.scope.ScopeManager</type>
+ </component>
+
+ <component>
<key>org.exoplatform.services.cache.CacheService</key>
<jmx-name>cache:type=CacheService</jmx-name>
<type>org.exoplatform.services.cache.impl.CacheServiceImpl</type>
13 years, 4 months
gatein SVN: r7197 - in epp/docs/branches/5.1/Release_Notes: en-US and 1 other directory.
by do-not-reply@jboss.org
Author: smumford
Date: 2011-08-23 01:28:05 -0400 (Tue, 23 Aug 2011)
New Revision: 7197
Modified:
epp/docs/branches/5.1/Release_Notes/en-US/5.1.1_Release_Notes.xml
epp/docs/branches/5.1/Release_Notes/en-US/Book_Info.xml
epp/docs/branches/5.1/Release_Notes/en-US/Revision_History.xml
epp/docs/branches/5.1/Release_Notes/en-US/known_issues.xml
epp/docs/branches/5.1/Release_Notes/en-US/need_info.xml
epp/docs/branches/5.1/Release_Notes/en-US/resolved_issues.xml
epp/docs/branches/5.1/Release_Notes/publican.cfg
Log:
reinstated NEEDINFO section after 5.1.1 slide #2
Modified: epp/docs/branches/5.1/Release_Notes/en-US/5.1.1_Release_Notes.xml
===================================================================
--- epp/docs/branches/5.1/Release_Notes/en-US/5.1.1_Release_Notes.xml 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/en-US/5.1.1_Release_Notes.xml 2011-08-23 05:28:05 UTC (rev 7197)
@@ -25,7 +25,7 @@
<term>eXo Kernel</term>
<listitem>
<para>
- The eXo Kernel component has been upgraded to version 2.2.9-GA
+ The eXo Kernel component has been upgraded to version 2.2.9-GA.
</para>
</listitem>
</varlistentry>
@@ -33,7 +33,7 @@
<term>eXo Core</term>
<listitem>
<para>
- The eXo Core component has been upgraded to version 2.3.9-GA
+ The eXo Core component has been upgraded to version 2.3.9-GA.
</para>
</listitem>
</varlistentry>
@@ -49,7 +49,7 @@
<term>JBoss Portlet Bridge</term>
<listitem>
<para>
- The JBoss Portlet Bridge component has been upgraded to version 2.1.1.GA.EPP51. <!--JBEPP-888-->
+ The JBoss Portlet Bridge component has been upgraded to version 2.1.2.GA.EPP51.
</para>
</listitem>
</varlistentry>
@@ -93,14 +93,6 @@
</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>Portlet Bridge</term>
- <listitem>
- <para>
- The Portlet Bridge component has been upgraded to version 2.1.2.GA.EPP51
- </para>
- </listitem>
- </varlistentry>
</variablelist>
<para>
More details about the component versions that make up JBoss Enterprise Portal Platform 5.1.1 can be found in <xref linkend="sect-5.1.1_Release_Notes-Component_Versions"/>
@@ -379,7 +371,7 @@
<xi:include href="known_issues.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
- <!--<section>
+ <section>
<title><remark>NEEDINFO Issues</remark></title>
<xi:include href="need_info.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</section>
@@ -387,7 +379,7 @@
<section>
<title><remark>Not Documented Issues</remark></title>
<xi:include href="not_documented.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
- </section> -->
+ </section>
<section>
<title>Security Related Issues</title>
<variablelist>
@@ -397,17 +389,18 @@
<term>XSS Issues</term>
<listitem>
<para>
- This release of JBoss Enterprise Portal Platform resolves a number of Cross Site Scripting found in the user creation and new page creation forms.
+ This release of JBoss Enterprise Portal Platform resolves a number of Cross Site Scripting issues found in the user creation and new page creation forms.
</para>
<para>
The following issues have been resolved:
</para>
<simplelist>
- <member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-598" /></member>
+ <member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-365"></ulink></member>
+ <member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-598"></ulink></member> <!--RN Here-->
+ <member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-595"></ulink></member>
<member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-847"></ulink></member>
<member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-997"></ulink></member>
<member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-914"></ulink></member>
- <member><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-365"></ulink></member>
</simplelist>
<para>
Work to address further XSS issues is ongoing.
Modified: epp/docs/branches/5.1/Release_Notes/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/5.1/Release_Notes/en-US/Book_Info.xml 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/en-US/Book_Info.xml 2011-08-23 05:28:05 UTC (rev 7197)
@@ -9,7 +9,7 @@
<productname>JBoss Enterprise Portal Platform</productname>
<productnumber>5.1</productnumber>
<edition>2.1</edition>
- <pubsnumber>5.1.8</pubsnumber>
+ <pubsnumber>5.1.9</pubsnumber>
<abstract>
<para>
These release notes contain important information related to JBoss Enterprise Portal Platform &VX; that may not be currently available in the Product Manuals. You should read these Release Notes in their entirety before installing the product.
Modified: epp/docs/branches/5.1/Release_Notes/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/5.1/Release_Notes/en-US/Revision_History.xml 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/en-US/Revision_History.xml 2011-08-23 05:28:05 UTC (rev 7197)
@@ -8,6 +8,21 @@
<simpara>
<revhistory>
<revision>
+ <revnumber>2.1-5.1.9</revnumber>
+ <date>Tue Aug 23 2011</date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email></email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Restored NEEDINFO section.</member>
+ <member>Corrected typographical grammatical errors.</member>
+ </simplelist>
+ </revdescription>
+ </revision>
+ <!--<revision>
<revnumber>2.1-5.1.8</revnumber>
<date>Fri Aug 12 2011</date>
<author>
@@ -20,7 +35,7 @@
<member>Prepared for 5.1.1 release.</member>
</simplelist>
</revdescription>
- </revision>
+ </revision> -->
<revision>
<revnumber>2.1-5.1.7</revnumber>
<date>Wed Aug 10 2011</date>
Modified: epp/docs/branches/5.1/Release_Notes/en-US/known_issues.xml
===================================================================
--- epp/docs/branches/5.1/Release_Notes/en-US/known_issues.xml 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/en-US/known_issues.xml 2011-08-23 05:28:05 UTC (rev 7197)
@@ -1,20 +1,29 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-<!ENTITY % BOOK_ENTITIES SYSTEM "Book_Name.ent">
-%BOOK_ENTITIES;
+<?xml version='1.0'?>
+<!DOCTYPE variablelist PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
]>
+
<variablelist>
- <title></title>
- <varlistentry>
- <term><ulink type="http" url="https://issues.jboss.org/browse/JBEPP-927"></ulink></term>
- <listitem>
- <para>
- Administrators and users should be aware that adding a gadget to any portal page other than the dashboard, will result in any user set preferences or modifications (adding entries to the TODO gadget, for example) <emphasis role="bold">not</emphasis> being saved in a persistent manner.
- </para>
- <para>
- This limitation will be corrected in a later version of JBoss Enterprise Portal Platform.
- </para>
- </listitem>
- </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-1079 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1079" /></term>
+ <listitem>
+
+
+ <warning>
+ <title>Not Public Yet - RHT+eXo</title>
+ <para>
+ Pre-release testing has found that attempting to edit a category that does not have a description will produce the following error:
+<screen>IllegalArgumentException: Must pass a non null String
+</screen>
+ </para>
+ <para>
+ A patch that corrects this behavior is available from <CSP>, as are the required installation instructions.
+ </para>
+ </warning>
+
+ </listitem>
+ </varlistentry>
+
</variablelist>
Modified: epp/docs/branches/5.1/Release_Notes/en-US/need_info.xml
===================================================================
--- epp/docs/branches/5.1/Release_Notes/en-US/need_info.xml 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/en-US/need_info.xml 2011-08-23 05:28:05 UTC (rev 7197)
@@ -5,6 +5,19 @@
<variablelist>
+ <!-- https://issues.jboss.org/browse/JBEPP-764 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-764" /></term>
+ <listitem>
+
+
+ <para>
+ To isolate multiple clusters running on the same network, the JBoss Cache and JGroups configuration files used in JBoss Enterprise Portal Platform have been updated to include partition name (-g) and multicast address (-u) properties used in JBoss Enterprise Application Platform.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
<!-- https://issues.jboss.org/browse/JBEPP-874 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-874" /></term>
@@ -31,4 +44,82 @@
</listitem>
</varlistentry>
+ <!-- https://issues.jboss.org/browse/JBEPP-961 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-961" /></term>
+ <listitem>
+
+
+ <para>
+ Release Notes need more information about the issue and how it was fixed.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-1010 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1010" /></term>
+ <listitem>
+
+
+ <para>
+ This issue requires more information to be included in the 5.1.1 Release Notes.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-1013 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1013" /></term>
+ <listitem>
+
+
+ <para>
+ This issue needs more information to be provided for the 5.1.1 Release Notes.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-1018 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1018" /></term>
+ <listitem>
+
+
+ <para>
+ If this issue requires a Release Note, more information (about how the problem presented to users and how it was fixed) is required.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-1023 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1023" /></term>
+ <listitem>
+
+
+ <para>
+ This issue requires more information about how it was resolved if it requires a 5.1.1 Release Note.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-1036 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1036" /></term>
+ <listitem>
+
+
+ <para>
+ This issue requires more information about the underlying cause and the fix implemented if it requires a 5.1.1 Release Note.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
</variablelist>
Modified: epp/docs/branches/5.1/Release_Notes/en-US/resolved_issues.xml
===================================================================
--- epp/docs/branches/5.1/Release_Notes/en-US/resolved_issues.xml 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/en-US/resolved_issues.xml 2011-08-23 05:28:05 UTC (rev 7197)
@@ -25,7 +25,7 @@
<para>
- A thread safety issue in the breadcrumb portlet could lead to NullPointerException under load.The issue has been fixed.
+ A thread safety issue in the breadcrumb portlet could lead to <literal>NullPointerException</literal> under load. The issue has been fixed in this release.
</para>
</listitem>
@@ -38,7 +38,7 @@
<para>
- A bug which prompted users to "Save and Close" an Edit Portlet dialogue if a tab in the window was clicked but the mouse cursor was removed from the tab before the mouse button was released has been corrected in this release.
+ A bug which prompted users to <guilabel>Save and Close</guilabel> an <emphasis>Edit Portlet</emphasis> dialog if a tab in the window was clicked but the mouse cursor was removed from the tab before the mouse button was released has been corrected in this release.
</para>
</listitem>
@@ -51,49 +51,53 @@
<para>
- In previous releases of JBoss Enterprise Portal Platform, users found that, when creating sub-nodes of system nodes (portal navigation, group navigation, register etc.), these new nodes where not visible once created. This issue, and a related issue encountered when attempting to 'cut' sub-nodes of system nodes, have been resolved in this latest release.
+ In previous releases of JBoss Enterprise Portal Platform, users found that, when creating sub-nodes of system nodes (<literal>portal navigation</literal>, <literal>group navigation</literal>, <literal>register</literal> etc.), these new nodes were not visible once created. This issue, and a related issue encountered when attempting to '<emphasis>Cut</emphasis>' sub-nodes of system nodes, have been resolved in this latest release.
</para>
</listitem>
</varlistentry>
- <!-- https://issues.jboss.org/browse/JBEPP-723 -->
+ <!-- https://issues.jboss.org/browse/JBEPP-597 -->
<varlistentry>
- <term><ulink url="https://issues.jboss.org/browse/JBEPP-723" /></term>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-597" /></term>
<listitem>
- <para>
- A bug in the UIUserInGroup.setValues() code caused previous versions of JBoss Enterprise Portal Platform to throw an error when users attempted to navigate to a new page withing the Group management view of the Organization portlet by any method other than the page indicator buttons. This release includes a patch which resolves this issue and allows users to navigate between pages using various UI elements.
- </para>
- <para>
- Further details can be found in <ulink type="http" url="https://issues.jboss.org/browse/GTNPORTAL-1356"></ulink>
- </para>
+ <warning>
+ <title>Not Public Yet - RHT+eXo</title>
+ <para>
+ The name of a dashboard page entered by user was not properly encoded before being returned on the web browser. This allowed javascript snippets to be executed when creating a new page through the Portal Dashboard. The name of the page is now properly HTML encoded before being returned and javascript is no longer invoked when entered into page fields.
+ </para>
+ </warning>
</listitem>
</varlistentry>
- <!-- https://issues.jboss.org/browse/JBEPP-733 -->
+ <!-- https://issues.jboss.org/browse/JBEPP-723 -->
<varlistentry>
- <term><ulink url="https://issues.jboss.org/browse/JBEPP-733" /></term>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-723" /></term>
<listitem>
<para>
- A bug cause the JBoss Enterprise Portal Platform upload service to not work properly with Internet Explorer 7. As a result, any application using the upload service (such as Site Publisher) would not behave correctly with this web browser unless a name was provided. The bug has been fixed and the upload service now works as expected in all browsers (including IE7).
+ A bug in the <code>UIUserInGroup.setValues()</code> code caused previous versions of JBoss Enterprise Portal Platform to throw an error when users attempted to navigate to a new page within the Group management view of the Organization portlet by any method other than the page indicator buttons. This release includes a patch which resolves this issue and allows users to navigate between pages using various UI elements.
</para>
+ <para>
+ Further details can be found in <ulink type="http" url="https://issues.jboss.org/browse/GTNPORTAL-1356"></ulink>
+
+ </para>
</listitem>
</varlistentry>
- <!-- https://issues.jboss.org/browse/JBEPP-764 -->
+ <!-- https://issues.jboss.org/browse/JBEPP-733 -->
<varlistentry>
- <term><ulink url="https://issues.jboss.org/browse/JBEPP-764" /></term>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-733" /></term>
<listitem>
<para>
- To isolate multiple clusters running on the same network, the JBoss Cache and JGroups configuration files used in JBoss Enterprise Portal Platform have been updated to include <emphasis role="bold">partition name</emphasis> and <emphasis role="bold">multicast address</emphasis> properties.
+ A bug caused the JBoss Enterprise Portal Platform upload service to not work properly with Internet Explorer 7. As a result, any application using the upload service (such as Site Publisher) would not behave correctly with this web browser unless a name was provided. The bug has been fixed and the upload service now works as expected in all browsers (including IE7).
</para>
</listitem>
@@ -106,7 +110,7 @@
<para>
- An issue with the FileUpload demo not populating file information fields has been corrected with an upgrade to the Portlet Bridge component.
+ An issue with the <emphasis role="bold">FileUpload</emphasis> demo not populating file information fields has been corrected with an upgrade to the Portlet Bridge component.
</para>
</listitem>
@@ -119,7 +123,7 @@
<para>
- Prior to this release, CAS ticket validation failed when the JBoss Enterprise Portal Platform instance was set up with SSL. This has been fixed with an upgrade to the SSO component. CAS ticket validation now works as expected with http and https addresses.
+ Prior to this release, CAS ticket validation failed when the JBoss Enterprise Portal Platform instance was set up with SSL. This has been fixed with an upgrade to the SSO component. CAS ticket validation now works as expected with <literal>http</literal> and <literal>https</literal> addresses.
</para>
</listitem>
@@ -132,7 +136,7 @@
<para>
- In this release of JBoss Enterprise Portal Platform, JndiMultiplexedJBossCacheRegionFactory is used for IDM second level caching. This makes it easier to switch to TCP.
+ In this release of JBoss Enterprise Portal Platform, <systemitem>JndiMultiplexedJBossCacheRegionFactory</systemitem> is used for IDM second level caching. This makes it easier to switch to TCP.
</para>
</listitem>
@@ -145,8 +149,11 @@
<para>
- A bug prevented the 'Preferences' tab from appearing in some portlets. The tab would only appear in portlets that were customized during the first deployment through the portal.xml descriptor. Non-customized portlets would not show a 'Preferences' tab. The UIFormInputSet.java and UIPortletForm.java files have been patched to fix the issue and now the tab now appears in all portlets that have configurable preferences.
+ A bug prevented the '<emphasis>Preferences</emphasis>' tab from appearing in some portlets. The tab would only appear in portlets that were customized during the first deployment through the <literal>portal.xml</literal> descriptor.
</para>
+ <para>
+ Non-customized portlets would not show a '<emphasis>Preferences</emphasis>' tab. The <filename>UIFormInputSet.java</filename> and <filename>UIPortletForm.java</filename> files have been patched to fix the issue and now the tab now appears in all portlets that have configurable preferences.
+ </para>
</listitem>
</varlistentry>
@@ -158,8 +165,11 @@
<para>
- The two JBoss Cache instances created by PicketLink were calling on the same configuration file in idm-configuration.xml and, as a result, were using the same cluster names. This could lead to conflicts as the same JBoss Cache instance could join the same channel twice. Separate configuration files were added to the distribution package and the Portal configuration was customized to call on the different files. JBoss Cache instances can now run simultaneously without conflict.
+ The two JBoss Cache instances created by PicketLink were calling on the same configuration file in <filename>idm-configuration.xml</filename> and, as a result, were using the same cluster names. This could lead to conflicts as the same JBoss Cache instance could join the same channel twice.
</para>
+ <para>
+ Separate configuration files were added to the distribution package and the Portal configuration was customized to call on the different files. JBoss Cache instances can now run simultaneously without conflict.
+ </para>
</listitem>
</varlistentry>
@@ -171,8 +181,11 @@
<para>
- It was found that separate instances of JBoss Enterprise Portal Platform 5.1 deployed on the same network and started with the 'Default' server profile would communicate as if in a cluster. This behavior has been resolved with new cluster configuration.
+ It was found that separate instances of JBoss Enterprise Portal Platform 5.1 deployed on the same network and started with the '<literal>Default</literal>' server profile would communicate as if in a cluster.
</para>
+ <para>
+ This behavior has been resolved with new cluster configuration.
+ </para>
</listitem>
</varlistentry>
@@ -184,8 +197,11 @@
<para>
- An error in the XML definition in the gatein_objects_1_0 file was found to cause errors in Eclipse environments when using the default pages.xml or navigation.xml files. This was because the file did not include 'VISIBLE' in the allowed values of the 'visibility' element. This error has been corrected.
+ An error in the XML definition in the <filename>gatein_objects_1_0</filename> file was found to cause errors in Eclipse environments when using the default <filename>pages.xml</filename> or <filename>navigation.xml</filename> files.
</para>
+ <para>
+ This was because the file did not include '<literal>VISIBLE</literal>' in the allowed values of the '<parameter>visibility</parameter>' element. This error has been corrected.
+ </para>
</listitem>
</varlistentry>
@@ -197,9 +213,11 @@
<para>
- Custom WSRP RegistrationPolicy implementations were not properly handled in previous versions of JBoss Enterprise Portal Platform.
-This caused an exception when the product was started. This issue has been resolved.
+ Custom WSRP <systemitem>RegistrationPolicy</systemitem> implementations were not properly handled in previous versions of JBoss Enterprise Portal Platform.
</para>
+ <para>
+ This caused an exception when the product was started. This issue has been resolved.
+ </para>
</listitem>
</varlistentry>
@@ -211,12 +229,12 @@
<para>
- When adding resources (js, css, etc) to the Head of the HTML response with the doHeaders method a bug was encountered which caused those resources to be added twice. A patch has been applied to fix the bug and new resources are now only linked once.
+ When adding resources (js, css, etc) to the Head of the HTML response with the <literal>doHeaders</literal> method a bug was encountered which caused those resources to be added twice. A patch has been applied to fix the bug and new resources are now only linked once.
</para>
</listitem>
</varlistentry>
-
+
<!-- https://issues.jboss.org/browse/JBEPP-811 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-811" /></term>
@@ -224,7 +242,7 @@
<para>
- A race condition encountered when more than one portal user attempts to create a page at the same time has been addressed in this release. The issue presented if two pages were created simultaneously, with one process finishing slightly after the first but before the first process had redirected to the new page. This scenario would result in the second page overwriting the first.
+ A race condition, encountered when more than one portal user attempts to create a page at the same time has been adressed in this release. The issue presented if two pages were created simultaneously, with one process finishing slightly after the first, but before the first process had redirected to the new page. This scenario would result in the second page overwriting the first.
</para>
<para>
Patches which resolve the page creation issue have been applied to this release. However, further development will be required in later iterations to resolve concurrency issues completely.
@@ -232,7 +250,7 @@
</listitem>
</varlistentry>
-
+
<!-- https://issues.jboss.org/browse/JBEPP-813 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-813" /></term>
@@ -253,12 +271,28 @@
<para>
- A bug in data caching prevented some changes to Portal navigation from reloading in real time. When changing a group navigation priority, the reordering of the groups was only happening after a log-out. The UIPageNavigationForm.java has been patched to correct this and navigation changes now update immediately, without the user needing to log-out.
+ A bug in data caching prevented some changes to Portal navigation from reloading in real time. When changing a group navigation priority, the reordering of the groups was only happening after a log-out. The <filename>UIPageNavigationForm.java</filename> file has been patched to correct this and navigation changes now update immediately, without the user needing to log-out.
</para>
</listitem>
</varlistentry>
+ <!-- https://issues.jboss.org/browse/JBEPP-854 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-854" /></term>
+ <listitem>
+
+
+ <warning>
+ <title>Not Public Yet - RHT+eXo</title>
+ <para>
+ In previous versions of JBoss Enterprise Portal Platform, an error would be encountered when slashes were used in the context path of a portlet. This issue has been corrected in this release.
+ </para>
+ </warning>
+
+ </listitem>
+ </varlistentry>
+
<!-- https://issues.jboss.org/browse/JBEPP-856 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-856" /></term>
@@ -266,7 +300,7 @@
<para>
- Problems encountered when trying to run various gadgets (including the RSS Reader) in a portal instance using secure https mode has been resolved in this release. All gadgets should now render and behave as expect in both http and https modes.
+ Problems encountered when trying to run various gadgets (including the RSS Reader) in a portal instance using secure https mode has been resolved in this release. All gadgets should now render and behave as expect in both <literal>http</literal> and <literal>https</literal> modes.
</para>
</listitem>
@@ -279,7 +313,7 @@
<para>
- WSRP Strict mode was previously set only via listeners, which were not triggered at start up since they don't yet exist at that time. This meant that WSRP Strict Mode was not properly restored when JBoss Enterprise Portal Platform was started. An upgrade to WSRP 2.0.1 GA corrects this issue and WSRP Strict Mode is now properly restored from persistent state at start up.
+ WSRP Strict mode was previously set only via listeners, which were not triggered when the service started since they did not yet exist at that time. This meant that WSRP Strict Mode was not properly restored when JBoss Enterprise Portal Platform was started. An upgrade to WSRP 2.0.1 GA corrects this issue and WSRP Strict Mode is now properly restored from persistent state at start up.
</para>
</listitem>
@@ -305,7 +339,7 @@
<para>
- Some mistranslations in webui_ja.properties have been corrected in this release of JBoss Enterprise Portal Platform.
+ Some mistranslations in <systemitem>webui_ja.properties</systemitem> have been corrected in this release of JBoss Enterprise Portal Platform.
</para>
</listitem>
@@ -318,7 +352,7 @@
<para>
- A conflict between the javax.portlet.faces.extension.resetModeViewId the portlet.xml configuration file and the error page specified by the error-page tag in web.xml has been resolved in an upgrade to the JBoss Portlet Bridge component.
+ A conflict between the <systemitem>javax.portlet.faces.extension.resetModeViewId</systemitem> the portlet.xml configuration file and the error page specified by the error-page tag in web.xml has been resolved in an upgrade of the JBoss Portlet Bridge component.
</para>
</listitem>
@@ -331,12 +365,25 @@
<para>
- Exceptions thrown by the handleFaceletNotFound method (when a facelet file was not found) were being obscured by FaceletViewHandler as the response object was not a subtype of HttpServletResponse (it is a instance of PortletResponse). FaceletPortletViewHandler.java has been updated to handle instances of both HttpServletResponse and PortletResponse response objects.
+ Exceptions thrown by the <systemitem>handleFaceletNotFound</systemitem> method (when a facelet file was not found) were being obscured by <systemitem>FaceletViewHandler</systemitem> as the response object was not a subtype of <systemitem>HttpServletResponse</systemitem> (it is an instance of <systemitem>PortletResponse</systemitem>). <filename>FaceletPortletViewHandler.java</filename> has been updated to handle instances of both HttpServletResponse and PortletResponse response objects.
</para>
</listitem>
</varlistentry>
+ <!-- https://issues.jboss.org/browse/JBEPP-893 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-893" /></term>
+ <listitem>
+
+
+ <para>
+ An issue with PicketLink cache never evicting cached items has been resolved with an upgrade to PicketLink IDM 1.1.9.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
<!-- https://issues.jboss.org/browse/JBEPP-896 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-896" /></term>
@@ -344,12 +391,31 @@
<para>
- The Single Sign On (SSO) AbstractLogoutFilter in JBoss Enterprise Portal Platform would read request parameters before setting the character encoding. When a form was submitted with non-UTF-8 characters (while SSO was enabled) the values could be garbled on output. An upgrade of the SSO component to version 1.0.2-EPP-GA (which includes a patch to the AbstractLogoutFilter code) resolves this issue and Non-UTF-8 characters are now specified correctly.
+ The Single Sign On (SSO) <systemitem>AbstractLogoutFilter</systemitem> in JBoss Enterprise Portal Platform would read request parameters before setting the character encoding. When a form was submitted with non-UTF-8 characters (while SSO was enabled) the values could be garbled on output. An upgrade of the SSO component to version 1.0.2-epp-GA (which includes a patch to the <systemitem>AbstractLogoutFilter</systemitem> code) resolves this issue and Non-UTF-8 characters are now specified correctly.
</para>
</listitem>
</varlistentry>
+ <!-- https://issues.jboss.org/browse/JBEPP-899 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-899" /></term>
+ <listitem>
+
+
+ <para>
+ <systemitem>MOPPortalStructuralAccess</systemitem> was improperly closing the <systemitem>POMSession</systemitem> that was under control of another Portal component, leaving that component unable to properly access JCR state.
+ </para>
+ <para>
+ An NPE was thrown when other components tried to access the closed <systemitem>POMSession</systemitem>. <systemitem>MOPPortalStructureAccess</systemitem> now saves the session instead of saving <emphasis role="bold">and</emphasis> closing it.
+ </para>
+ <para>
+ Since <systemitem>MOPPortalStructuralAccess</systemitem> no longer closes the POMSession, it can still be used by components upstream without issue.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
<!-- https://issues.jboss.org/browse/JBEPP-902 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-902" /></term>
@@ -376,6 +442,58 @@
</listitem>
</varlistentry>
+ <!-- https://issues.jboss.org/browse/JBEPP-945 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-945" /></term>
+ <listitem>
+
+
+ <para>
+ An error that caused IntegrationCache to not be invalidated when calling invalidateAll() on PicketlinkIDMCacheService MBean has been corrected in this release.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-954 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-954" /></term>
+ <listitem>
+
+
+ <para>
+ Attempting to remove an inexistent ConsumerGroup would cause a NullPointerException. JCRRegistrationPersistenceManager now properly handles the situation.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-955 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-955" /></term>
+ <listitem>
+
+
+ <para>
+ Local state was improperly initialized causing a NullPointerException when attempting to insert a new ConsumerGroup. Properly retrieving the state from the JCR persistence fixed the issue.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
+ <!-- https://issues.jboss.org/browse/JBEPP-958 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-958" /></term>
+ <listitem>
+
+
+ <para>
+ In previous JBoss Enterprise Portal Platform versions, calling org.exoplatform.webui.form.UIFormCheckBoxInput.setValue() with a String value of 'true', would result in the value being interpreted as 'false' as only Boolean values (not String values) were parsed. This behavior has been corrected by recognizing string values when entered and converting them to boolean values.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
<!-- https://issues.jboss.org/browse/JBEPP-966 -->
<varlistentry>
<term><ulink url="https://issues.jboss.org/browse/JBEPP-966" /></term>
@@ -397,17 +515,27 @@
<para>
The JCR cache configuration files in JBoss Enterprise Portal Platform 5.1.1 have been moved from the /JBOSS_HOME/server/PROFILE/deploy/gatein.ear/lib/exo.portal.component.common-<version>.jar to /JBOSS_HOME/server/PROFILE/deploy/gatein.ear/02portal.war/WEB-INF/conf/.
- </para>
- <para>
- This change created problems when attempting to start upgraded versions of JBoss Enterprise Portal Platform that had the original file path stored in the JCR_CONFIG table in the database. To resolve the issue, duplicates of the configuration files have been retained in the original location. This also ensures backward compatibility, without the need to change the database.
+
+This change created problems when attempting to start upgraded versions of JBoss Enterprise Portal Platform that had the original file path stored in the JCR_CONFIG table in the database. To resolve the issue, duplicates of the configuration files have been retained in the original location. This also ensures backward compatibility, without the need to change the database.
+
+Note:
+After this change, if configuration changes to the JCR cache are required, it is important that the JCR_CONFIG table be updated to use the "war:" prefix instead of "classpath:" (for example; file:war:/conf/jcr/jbosscache/local/config.xml).
</para>
- <note>
- <title>JCR_CONFIG Prefixes:</title>
- <para>
- After this change, if configuration changes to the JCR cache are required, it is important that the JCR_CONFIG table be updated to use the "war:" prefix instead of "classpath:" (for example; file:war:/conf/jcr/jbosscache/local/config.xml).
- </para>
- </note>
+
</listitem>
</varlistentry>
+ <!-- https://issues.jboss.org/browse/JBEPP-1019 -->
+ <varlistentry>
+ <term><ulink url="https://issues.jboss.org/browse/JBEPP-1019" /></term>
+ <listitem>
+
+
+ <para>
+ A bug which caused the day of the month in the calendar pop-up to not be translated has been corrected in this release.
+ </para>
+
+ </listitem>
+ </varlistentry>
+
</variablelist>
Modified: epp/docs/branches/5.1/Release_Notes/publican.cfg
===================================================================
--- epp/docs/branches/5.1/Release_Notes/publican.cfg 2011-08-22 22:12:56 UTC (rev 7196)
+++ epp/docs/branches/5.1/Release_Notes/publican.cfg 2011-08-23 05:28:05 UTC (rev 7197)
@@ -4,7 +4,7 @@
debug: 1
xml_lang: en-US
brand: JBoss
-#show_remarks: 1
+show_remarks: 1
cvs_branch: DOCS-RHEL-6
cvs_root: :ext:cvs.devel.redhat.com:/cvs/dist
cvs_pkg: JBoss_Enterprise_Portal_Platform-5.1.1_Release_Notes-5.1-web-__LANG__
\ No newline at end of file
13 years, 4 months
gatein SVN: r7196 - in portal/trunk: component/common/src/main/java/org/exoplatform/commons/cache and 17 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-08-22 18:12:56 -0400 (Mon, 22 Aug 2011)
New Revision: 7196
Added:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
Removed:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java
Modified:
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java
Log:
rolling back GTNPORTAL-2037 for now to come up with a better solution
Modified: portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -33,7 +33,7 @@
import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.gatein.common.i18n.LocalizedString;
@@ -83,13 +83,13 @@
private final Logger log = LoggerFactory.getLogger(ApplicationRegistryServiceImpl.class);
/** . */
- final MOPSessionManager mopManager;
+ final POMSessionManager mopManager;
/** Should match WSRPPortletInfo.PRODUCER_NAME_META_INFO_KEY */
private static final String PRODUCER_NAME_META_INFO_KEY = "producer-name";
public static final String PRODUCER_CATEGORY_NAME_SUFFIX = " Producer";
- public ApplicationRegistryServiceImpl(ChromatticManager manager, MOPSessionManager mopManager)
+ public ApplicationRegistryServiceImpl(ChromatticManager manager, POMSessionManager mopManager)
{
ApplicationRegistryChromatticLifeCycle lifeCycle = (ApplicationRegistryChromatticLifeCycle)manager.getLifeCycle("app");
lifeCycle.registry = this;
Deleted: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -1,111 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.commons.cache;
-
-import org.exoplatform.container.ExoContainer;
-import org.exoplatform.container.component.ComponentRequestLifecycle;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.jcr.RepositoryService;
-
-/**
- * Manages the life cycle of {@link CacheProvider} with the current thread. The class implements the
- * {@link ComponentRequestLifecycle} interface to associate the thread with a provider.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- */
-public class CacheManager implements ComponentRequestLifecycle
-{
-
- /** . */
- final RepositoryService repositoryService;
-
- /** . */
- final CacheService cacheService;
-
- /** . */
- final ThreadLocal<CacheProvider> current;
-
- public CacheManager(RepositoryService repositoryService, CacheService cacheService) throws NullPointerException
- {
- if (repositoryService == null)
- {
- throw new NullPointerException("No null repository service accepted");
- }
- if (cacheService == null)
- {
- throw new NullPointerException("No null cache service accepted");
- }
-
- //
- this.repositoryService = repositoryService;
- this.cacheService = cacheService;
- this.current = new ThreadLocal<CacheProvider>();
- }
-
- /**
- * Returns the current provider or return null if no such provider exist.
- *
- * @return the current provider
- */
- public CacheProvider getCurrentProvider()
- {
- return current.get();
- }
-
- public void startRequest(ExoContainer exoContainer)
- {
- begin();
- }
-
- public void endRequest(ExoContainer exoContainer)
- {
- end();
- }
-
- /**
- * Attempt to begin a request.
- *
- * @return true if the request was begun, false if a provider was already associated
- */
- public boolean begin()
- {
- if (current.get() != null)
- {
- return false;
- }
- CacheProvider provider = new CacheProvider(this);
- current.set(provider);
- return true;
- }
-
- /**
- * Attempt to end a request.
- *
- * @return true if the request was stopped, false if no request was previously associated
- */
- public boolean end()
- {
- if (current.get() == null)
- {
- return false;
- }
- current.set(null);
- return true;
- }
-}
Deleted: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -1,167 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.commons.cache;
-
-import org.chromattic.api.UndeclaredRepositoryException;
-import org.exoplatform.services.cache.ExoCache;
-
-import javax.jcr.RepositoryException;
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * Provides caches according to types (classes). The provider is scope to the current request and is managed
- * by a component request life cycle, it is made available through the {@link CacheManager#getCurrentProvider()} method.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- */
-public class CacheProvider
-{
-
- /** . */
- private final CacheManager manager;
-
- /** . */
- private Map<Class<?>, ExoCache> caches;
-
- CacheProvider(CacheManager manager)
- {
- this.manager = manager;
- this.caches = new HashMap<Class<?>, ExoCache>();
- }
-
- /**
- * Returns a cache for a specified cache type or null if such cache does not exist.
- *
- * @param cacheType the cache type
- * @return the corresponding cache
- * @throws NullPointerException if the cache type is null
- */
- public ExoCache<?, ?> getCache(Class<?> cacheType) throws NullPointerException
- {
- if (cacheType == null)
- {
- throw new NullPointerException("No null cache type accepted");
- }
-
- //
- return caches.get(cacheType);
- }
-
- /**
- * Returns a value for a key for a given cache type. When the value does not exist, null is returned.
- *
- * @param cacheType the cache type
- * @param key the key
- * @param <K> the key generic type
- * @param <S> the value generic type
- * @return the value
- */
- public <K extends Serializable, S> S get(Class<?> cacheType, K key) throws NullPointerException
- {
- if (key == null)
- {
- throw new NullPointerException("No null key accepted");
- }
-
- //
- ExoCache<K, S> cache = (ExoCache<K, S>)getCache(cacheType);
-
- //
- if (cache != null)
- {
- return cache.get(key);
- }
-
- //
- return null;
- }
-
- /**
- * Associates a value and a key for a given cache type. When the provided value is null, the value is instead
- * removed from the cache.
- *
- * @param cacheType the cache type
- * @param key the key
- * @param value the value
- * @param <K> the key generic type
- * @param <S> the value generic type
- */
- public <K extends Serializable, S> void put(Class<?> cacheType, K key, S value) throws NullPointerException
- {
- if (key == null)
- {
- throw new NullPointerException("No null key accepted");
- }
-
- //
- ExoCache<K, S> cache = (ExoCache<K, S>)getCache(cacheType);
-
- //
- if (value == null)
- {
- if (cache != null)
- {
- cache.remove(key);
- }
- }
- else
- {
- if (cache == null)
- {
- String ckey = cacheType.getSimpleName() + "." + getRepositoryName();
- cache = manager.cacheService.getCacheInstance(ckey);
- caches.put(cacheType, cache);
- }
-
- //
- cache.put(key, value);
- }
- }
-
- /**
- * Clear a cache for a given type.
- *
- * @param cacheType the cache type
- * @throws NullPointerException when the cache type is null
- */
- public void clear(Class<?> cacheType) throws NullPointerException
- {
- ExoCache<?, ?> cache = getCache(cacheType);
-
- //
- if (cache != null)
- {
- cache.clearCache();
- }
- }
-
- private String getRepositoryName()
- {
- try
- {
- return manager.repositoryService.getCurrentRepository().getConfiguration().getName();
- }
- catch (RepositoryException e)
- {
- throw new UndeclaredRepositoryException("JCR exceptions are really bad", e);
- }
- }
-}
Deleted: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2011 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.exoplatform.commons.cache.future;
-
-import org.exoplatform.commons.cache.CacheManager;
-import org.exoplatform.services.cache.ExoCache;
-
-import java.io.Serializable;
-
-/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
-public class FutureCacheManager<K extends Serializable, V, C> extends FutureCache<K, V, C>
-{
-
- /** . */
- private final CacheManager manager;
-
- /** . */
- private final Class<?> cacheType;
-
- public FutureCacheManager(Class<?> cacheType, Loader<K, V, C> loader, CacheManager manager)
- {
- super(loader);
-
- //
- this.cacheType = cacheType;
- this.manager = manager;
- }
-
- public void clear()
- {
- ExoCache<?, ?> cache = manager.getCurrentProvider().getCache(cacheType);
-
- //
- if (cache != null)
- {
- cache.clearCache();
- }
- }
-
- public void remove(K key)
- {
- manager.getCurrentProvider().put(cacheType, key, null);
- }
-
- @Override
- public V get(K key)
- {
- return manager.getCurrentProvider().get(cacheType, key);
- }
-
- @Override
- public void put(K key, V entry)
- {
- manager.getCurrentProvider().put(cacheType, key, entry);
- }
-}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -44,7 +44,7 @@
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.mop.api.workspace.Workspace;
@@ -106,7 +106,7 @@
private Logger log = LoggerFactory.getLogger(getClass());
/** . */
- private final MOPSessionManager pomMgr;
+ private final POMSessionManager pomMgr;
/** . */
private NavigationService navigationService_;
@@ -115,7 +115,7 @@
private DescriptionService descriptionService_;
public NewPortalConfigListener(
- MOPSessionManager pomMgr,
+ POMSessionManager pomMgr,
DataStorage dataStorage,
ConfigurationManager cmanager,
InitParams params,
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -19,11 +19,10 @@
package org.exoplatform.portal.mop.description;
-import org.exoplatform.commons.cache.CacheManager;
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.i18n.I18NAdapter;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.mop.api.workspace.WorkspaceObject;
import java.util.Collection;
@@ -38,23 +37,18 @@
{
/** . */
- private final MOPSessionManager manager;
+ private final POMSessionManager manager;
/** . */
private DataCache cache;
- public DescriptionServiceImpl(MOPSessionManager manager)
+ public DescriptionServiceImpl(POMSessionManager manager)
{
this(manager, new SimpleDataCache());
}
- public DescriptionServiceImpl(MOPSessionManager manager, CacheManager cacheManager)
+ public DescriptionServiceImpl(POMSessionManager manager, DataCache cache)
{
- this(manager, new ExoDataCache(cacheManager));
- }
-
- public DescriptionServiceImpl(MOPSessionManager manager, DataCache cache)
- {
this.manager = manager;
this.cache = cache;
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -19,11 +19,12 @@
package org.exoplatform.portal.mop.description;
-import org.exoplatform.commons.cache.CacheManager;
-import org.exoplatform.commons.cache.future.FutureCacheManager;
+import org.exoplatform.commons.cache.future.FutureExoCache;
import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.ExoCache;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -32,10 +33,10 @@
{
/** . */
- protected CacheManager cacheManager;
+ protected ExoCache<CacheKey, CacheValue> cache;
/** . */
- protected FutureCacheManager<CacheKey, CacheValue, POMSession> values;
+ protected FutureExoCache<CacheKey, CacheValue, POMSession> values;
/** . */
private Loader<CacheKey, CacheValue, POMSession> valueLoader = new Loader<CacheKey, CacheValue, POMSession>()
@@ -46,16 +47,25 @@
}
};
- public ExoDataCache(CacheManager cacheManager)
+ public ExoDataCache(CacheService cacheService)
{
- this.cacheManager = cacheManager;
- this.values = new FutureCacheManager<CacheKey, CacheValue, POMSession>(DescriptionService.class, valueLoader, cacheManager);
+ this.cache = cacheService.getCacheInstance("NavigationService");
+ this.values = new FutureExoCache<CacheKey, CacheValue, POMSession>(valueLoader, cache)
+ {
+ @Override
+ protected void put(CacheKey key, CacheValue entry)
+ {
+ // Do nothing on purpose
+ // as data in inserted with the putValue method
+ // during the getValue method
+ }
+ };
}
@Override
protected void removeState(CacheKey key)
{
- values.remove(key);
+ cache.remove(key);
}
@Override
@@ -68,7 +78,6 @@
@Override
protected void putValue(CacheKey key, CacheValue value)
{
- // Do nothing on purpose
- // as data was inserted with the put(CacheKey, CacheValue) method
+ cache.put(key, value);
}
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -25,7 +25,7 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.management.api.PathAddress;
import org.gatein.management.api.exceptions.OperationException;
import org.gatein.management.api.exceptions.ResourceNotFoundException;
@@ -57,7 +57,7 @@
throw new ResourceNotFoundException("No site type found for " + siteType);
}
- MOPSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(MOPSessionManager.class);
+ POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
POMSession session = mgr.getSession();
if (session == null) throw new OperationException(operationName, "MOP session was null");
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -37,7 +37,7 @@
import org.exoplatform.portal.mop.management.exportimport.SiteLayoutImportTask;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.management.api.ContentType;
@@ -80,7 +80,7 @@
InputStream inputStream = attachment.getStream();
if (inputStream == null) throw new OperationException(operationContext.getOperationName(), "No data stream available for import.");
- MOPSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(MOPSessionManager.class);
+ POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
POMSession session = mgr.getSession();
if (session == null) throw new OperationException(operationName, "MOP session was null");
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -26,6 +26,9 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.management.exportimport.SiteLayoutExportTask;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.data.PortalData;
import org.gatein.management.api.ContentType;
import org.gatein.management.api.binding.BindingProvider;
import org.gatein.management.api.exceptions.OperationException;
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -25,6 +25,10 @@
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
+import org.exoplatform.portal.pom.data.PortalData;
+import org.exoplatform.portal.pom.data.PortalKey;
import org.gatein.management.api.exceptions.OperationException;
import org.gatein.management.api.exceptions.ResourceNotFoundException;
import org.gatein.management.api.operation.OperationContext;
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -19,8 +19,6 @@
package org.exoplatform.portal.mop.navigation;
-import org.exoplatform.commons.cache.CacheManager;
-import org.exoplatform.commons.cache.future.FutureCacheManager;
import org.exoplatform.commons.cache.future.FutureExoCache;
import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.portal.mop.SiteKey;
@@ -40,10 +38,10 @@
{
/** . */
- protected CacheManager cacheManager;
+ protected ExoCache<Serializable, Serializable> cache;
/** . */
- protected FutureCacheManager<Serializable, Serializable, POMSession> objects;
+ protected FutureExoCache<Serializable, Serializable, POMSession> objects;
/** . */
private Loader<Serializable, Serializable, POMSession> navigationLoader = new Loader<Serializable, Serializable, POMSession>()
@@ -61,10 +59,10 @@
}
};
- public ExoDataCache(CacheManager cacheManager)
+ public ExoDataCache(CacheService cacheService)
{
- this.cacheManager = cacheManager;
- this.objects = new FutureCacheManager<Serializable, Serializable, POMSession>(NavigationService.class, navigationLoader, cacheManager);
+ this.cache = cacheService.getCacheInstance("NavigationService");
+ this.objects = new FutureExoCache<Serializable, Serializable, POMSession>(navigationLoader, cache);
}
@Override
@@ -72,7 +70,7 @@
{
for (String key : keys)
{
- objects.remove(key);
+ cache.remove(key);
}
}
@@ -85,7 +83,7 @@
@Override
protected void removeNavigation(SiteKey key)
{
- objects.remove(key);
+ cache.remove(key);
}
@Override
@@ -97,6 +95,6 @@
@Override
protected void clear()
{
- objects.clear();
+ cache.clearCache();
}
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -23,7 +23,7 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visible;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.data.MappedAttributes;
import static org.exoplatform.portal.mop.navigation.Utils.*;
import static org.exoplatform.portal.pom.config.Utils.split;
@@ -53,7 +53,7 @@
{
/** . */
- final MOPSessionManager manager;
+ final POMSessionManager manager;
/** . */
private final DataCache dataCache;
@@ -61,12 +61,12 @@
/** . */
final Logger log = LoggerFactory.getLogger(NavigationServiceImpl.class);
- public NavigationServiceImpl(MOPSessionManager manager) throws NullPointerException
+ public NavigationServiceImpl(POMSessionManager manager) throws NullPointerException
{
this(manager, new SimpleDataCache());
}
- public NavigationServiceImpl(MOPSessionManager manager, DataCache dataCache) throws NullPointerException
+ public NavigationServiceImpl(POMSessionManager manager, DataCache dataCache) throws NullPointerException
{
if (manager == null)
{
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -20,11 +20,11 @@
package org.exoplatform.portal.mop.navigation;
import org.chromattic.api.UndeclaredRepositoryException;
-import org.exoplatform.commons.cache.CacheManager;
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
import static org.exoplatform.portal.mop.navigation.Utils.*;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.services.cache.CacheService;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.listener.ListenerService;
@@ -54,7 +54,7 @@
private ListenerService listenerService;
/** . */
- private final MOPSessionManager manager;
+ private final POMSessionManager manager;
/** . */
private Session session;
@@ -67,7 +67,7 @@
public NavigationServiceWrapper(
RepositoryService repositoryService,
- MOPSessionManager manager,
+ POMSessionManager manager,
ListenerService listenerService)
{
SimpleDataCache cache = new SimpleDataCache();
@@ -82,11 +82,11 @@
public NavigationServiceWrapper(
RepositoryService repositoryService,
- MOPSessionManager manager,
+ POMSessionManager manager,
ListenerService listenerService,
- CacheManager cacheManager)
+ CacheService cacheService)
{
- ExoDataCache cache = new ExoDataCache(cacheManager);
+ ExoDataCache cache = new ExoDataCache(cacheService);
//
this.repositoryService = repositoryService;
Copied: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java (from rev 7194, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java)
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java (rev 0)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.pom.config;
+
+import java.io.Serializable;
+
+/**
+ * A global key wrapping a local key including the current repository id.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class GlobalKey implements Serializable
+{
+
+ public static GlobalKey wrap(String repositoryName, Serializable localKey)
+ {
+ return new GlobalKey(repositoryName, localKey);
+ }
+
+ /** . */
+ private final String repositoryId;
+
+ /** . */
+ private final Serializable localKey;
+
+ public GlobalKey(String repositoryId, Serializable localKey)
+ {
+ if (repositoryId == null)
+ {
+ throw new NullPointerException();
+ }
+ if (localKey == null)
+ {
+ throw new NullPointerException();
+ }
+ this.repositoryId = repositoryId;
+ this.localKey = localKey;
+ }
+
+ public String getRepositoryId()
+ {
+ return repositoryId;
+ }
+
+ public Serializable getLocalKey()
+ {
+ return localKey;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return repositoryId.hashCode() ^ localKey.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof GlobalKey)
+ {
+ GlobalKey that = (GlobalKey)obj;
+ return repositoryId.equals(that.repositoryId) && localKey.equals(that.localKey);
+ }
+ return false;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "GlobalKey[repositoryId=" + repositoryId + ",localKey=" + localKey + "]";
+ }
+}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -33,7 +33,7 @@
{
/** . */
- MOPSessionManager manager;
+ POMSessionManager manager;
public MOPChromatticLifeCycle(InitParams params)
{
Deleted: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -1,254 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.exoplatform.portal.pom.config;
-
-import org.exoplatform.commons.cache.CacheManager;
-import org.exoplatform.commons.cache.CacheProvider;
-import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
-import org.exoplatform.commons.chromattic.ChromatticManager;
-import org.exoplatform.commons.chromattic.SessionContext;
-import org.exoplatform.portal.pom.config.cache.DataCache;
-import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
-import org.exoplatform.portal.pom.data.OwnerKey;
-import org.exoplatform.portal.pom.data.PortalKey;
-import org.exoplatform.services.cache.CachedObjectSelector;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ObjectCacheInfo;
-import org.exoplatform.services.jcr.RepositoryService;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.mop.core.api.MOPService;
-import org.picocontainer.Startable;
-
-import java.io.Serializable;
-import java.lang.reflect.UndeclaredThrowableException;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class MOPSessionManager implements Startable
-{
-
- /** . */
- private final Logger log = LoggerFactory.getLogger(MOPSessionManager.class);
-
- /** . */
- private MOPService pomService;
-
- /** . */
- private final CacheManager cacheManager;
-
- /** . */
- final ChromatticManager manager;
-
- /** . */
- private ChromatticLifeCycle configurator;
-
- /** . */
- private final TaskExecutionDecorator executor;
-
- /** . */
- private final RepositoryService repositoryService;
-
- public MOPSessionManager(RepositoryService repositoryService, ChromatticManager manager, CacheManager cacheManager)
- {
- //
- this.repositoryService = repositoryService;
- this.manager = manager;
- this.cacheManager = cacheManager;
- this.pomService = null;
- this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
- }
-
- public ChromatticLifeCycle getLifeCycle()
- {
- return configurator;
- }
-
- public void cachePut(Serializable key, Object value)
- {
- CacheProvider provider = cacheManager.getCurrentProvider();
-
- //
- if (log.isTraceEnabled())
- {
- log.trace("Updating cache key=" + key + " with value=" + value);
- }
-
- //
- provider.put(MOPSessionManager.class, key, value);
- }
-
- public Object cacheGet(Serializable key)
- {
- CacheProvider provider = cacheManager.getCurrentProvider();
-
- //
- Object value = provider.get(MOPSessionManager.class, key);
-
- //
- if (log.isTraceEnabled())
- {
- log.trace("Obtained for cache key=" + key + " value=" + value);
- }
-
- //
- return value;
- }
-
- public void cacheRemove(Serializable key)
- {
- if (log.isTraceEnabled())
- {
- log.trace("Removing cache key=" + key);
- }
-
- //
- if (key instanceof PortalKey)
- {
- final ExoCache cache = cacheManager.getCurrentProvider().getCache(MOPSessionManager.class);
-
- //
- if (cache != null)
- {
- // This code seems complex but actually it tries to find all objects in cache that have the same
- // owner key than the portal key, for instance if we remove (portal,classic) then all pages
- // related to (portal,classic) are also evicted
- final PortalKey portalKey = (PortalKey)key;
- try
- {
- cache.select(new CachedObjectSelector<Serializable, Object>()
- {
- public boolean select(Serializable key, ObjectCacheInfo<?> ocinfo)
- {
- if (key instanceof OwnerKey)
- {
- OwnerKey selectedOwnerKey = (OwnerKey)key;
- if (selectedOwnerKey.getType().equals(portalKey.getType()) && selectedOwnerKey.getId().equals(portalKey.getId()))
- {
- return true;
- }
- }
- return false;
- }
- public void onSelect(ExoCache<? extends Serializable, ?> exoCache, Serializable key, ObjectCacheInfo<?> ocinfo) throws Exception
- {
- cache.remove(key);
- }
- });
- }
- catch (Exception e)
- {
- log.error("Unexpected error when clearing pom cache", e);
- }
- }
- }
- else
- {
- cacheManager.getCurrentProvider().put(MOPSessionManager.class, key, null);
- }
- }
-
- public void start()
- {
- try
- {
- MOPChromatticLifeCycle configurator = (MOPChromatticLifeCycle)manager.getLifeCycle("mop");
- configurator.manager = this;
-
- //
- PortalMOPService pomService = new PortalMOPService(configurator.getChromattic());
- pomService.start();
-
- //
- this.pomService = pomService;
- this.configurator = configurator;
- }
- catch (Exception e)
- {
- throw new UndeclaredThrowableException(e);
- }
- }
-
- public void stop()
- {
- }
-
- public void clearCache()
- {
- if (log.isTraceEnabled())
- {
- log.trace("Clearing cache");
- }
-
- //
- cacheManager.getCurrentProvider().clear(MOPSessionManager.class);
- }
-
- public MOPService getPOMService()
- {
- return pomService;
- }
-
- public <E extends TaskExecutionDecorator> E getDecorator(Class<E> decoratorClass)
- {
- return executor.getDecorator(decoratorClass);
- }
-
- /**
- * <p>Returns the session currently associated with the current thread of execution.</p>
- *
- * @return the current session
- */
- public POMSession getSession()
- {
- SessionContext context = configurator.getContext();
- return context != null ? (POMSession)context.getAttachment("mopsession") : null;
- }
-
- /**
- * <p>Open and returns a session to the model. When the current thread is already associated with a previously opened
- * session the method will throw an <tt>IllegalStateException</tt>.</p>
- *
- * @return a session to the model.
- */
- public POMSession openSession()
- {
- SessionContext context = configurator.openContext();
- return (POMSession)context.getAttachment("mopsession");
- }
-
- /**
- * <p>Execute the task with a session.</p>
- *
- * @param task the task to execute
- * @throws Exception any exception thrown by the task
- * @return the value
- */
- public <V> V execute(POMTask<V> task) throws Exception
- {
- POMSession session = getSession();
-
- //
- return executor.execute(session, task);
- }
-
-}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -66,12 +66,12 @@
{
/** . */
- private final MOPSessionManager pomMgr;
+ private final POMSessionManager pomMgr;
/** . */
private ConfigurationManager confManager_;
- public POMDataStorage(MOPSessionManager pomMgr, ConfigurationManager confManager)
+ public POMDataStorage(POMSessionManager pomMgr, ConfigurationManager confManager)
{
this.pomMgr = pomMgr;
this.confManager_ = confManager;
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -72,7 +72,7 @@
}
/** . */
- final MOPSessionManager mgr;
+ final POMSessionManager mgr;
/** . */
private ModelImpl model;
@@ -98,7 +98,7 @@
/** . */
private MOPChromatticLifeCycle configurator;
- public POMSession(MOPSessionManager mgr, MOPChromatticLifeCycle configurator, SessionContext context)
+ public POMSession(POMSessionManager mgr, MOPChromatticLifeCycle configurator, SessionContext context)
{
// Register for cache eviction
context.addSynchronizationListener(listener);
@@ -242,7 +242,7 @@
return prefs;
}
- public MOPSessionManager getManager()
+ public POMSessionManager getManager()
{
return mgr;
}
Copied: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java (from rev 7194, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java)
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java (rev 0)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -0,0 +1,254 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.pom.config;
+
+import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
+import org.exoplatform.commons.chromattic.ChromatticManager;
+import org.exoplatform.commons.chromattic.SessionContext;
+import org.exoplatform.portal.pom.config.cache.DataCache;
+import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
+import org.exoplatform.portal.pom.data.OwnerKey;
+import org.exoplatform.portal.pom.data.PortalKey;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.cache.CachedObjectSelector;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ObjectCacheInfo;
+import org.exoplatform.services.jcr.RepositoryService;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.mop.core.api.MOPService;
+import org.picocontainer.Startable;
+
+import java.io.Serializable;
+import java.lang.reflect.UndeclaredThrowableException;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class POMSessionManager implements Startable
+{
+
+ /** . */
+ private final Logger log = LoggerFactory.getLogger(POMSessionManager.class);
+
+ /** . */
+ private MOPService pomService;
+
+ /** . */
+ private final ExoCache<GlobalKey, Object> cache;
+
+ /** . */
+ final ChromatticManager manager;
+
+ /** . */
+ private ChromatticLifeCycle configurator;
+
+ /** . */
+ private final TaskExecutionDecorator executor;
+
+ /** . */
+ private final RepositoryService repositoryService;
+
+ public POMSessionManager(RepositoryService repositoryService, ChromatticManager manager, CacheService cacheService)
+ {
+ //
+ this.repositoryService = repositoryService;
+ this.manager = manager;
+ this.cache = cacheService.getCacheInstance("MOPSessionManager");
+ this.pomService = null;
+ this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
+ }
+
+ public ChromatticLifeCycle getLifeCycle()
+ {
+ return configurator;
+ }
+
+ public void cachePut(Serializable key, Object value)
+ {
+ GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Updating cache key=" + globalKey + " with value=" + value);
+ }
+
+ //
+ cache.put(globalKey, value);
+ }
+
+ public Object cacheGet(Serializable key)
+ {
+ GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+
+ //
+ Object value = cache.get(globalKey);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Obtained for cache key=" + globalKey + " value=" + value);
+ }
+
+ //
+ return value;
+ }
+
+ public void cacheRemove(Serializable key)
+ {
+ final GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Removing cache key=" + globalKey);
+ }
+
+ //
+ if (key instanceof PortalKey)
+ {
+ // This code seems complex but actually it tries to find all objects in cache that have the same
+ // owner key than the portal key, for instance if we remove (portal,classic) then all pages
+ // related to (portal,classic) are also evicted
+ final PortalKey portalKey = (PortalKey)key;
+ try
+ {
+ cache.select(new CachedObjectSelector<GlobalKey, Object>()
+ {
+ public boolean select(GlobalKey selectedGlobalKey, ObjectCacheInfo<?> ocinfo)
+ {
+ if (globalKey.getRepositoryId().equals(selectedGlobalKey.getRepositoryId()))
+ {
+ Serializable selectedLocalKey = selectedGlobalKey.getLocalKey();
+ if (selectedLocalKey instanceof OwnerKey)
+ {
+ OwnerKey selectedOwnerKey = (OwnerKey)selectedLocalKey;
+ if (selectedOwnerKey.getType().equals(portalKey.getType()) && selectedOwnerKey.getId().equals(portalKey.getId()))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ public void onSelect(ExoCache<? extends GlobalKey, ?> exoCache, GlobalKey key, ObjectCacheInfo<?> ocinfo) throws Exception
+ {
+ cache.remove(key);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.error("Unexpected error when clearing pom cache", e);
+ }
+ }
+ else
+ {
+ cache.remove(globalKey);
+ }
+ }
+
+ public void start()
+ {
+ try
+ {
+ MOPChromatticLifeCycle configurator = (MOPChromatticLifeCycle)manager.getLifeCycle("mop");
+ configurator.manager = this;
+
+ //
+ PortalMOPService pomService = new PortalMOPService(configurator.getChromattic());
+ pomService.start();
+
+ //
+ this.pomService = pomService;
+ this.configurator = configurator;
+ }
+ catch (Exception e)
+ {
+ throw new UndeclaredThrowableException(e);
+ }
+ }
+
+ public void stop()
+ {
+ }
+
+ public void clearCache()
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace("Clearing cache");
+ }
+
+ //
+ cache.clearCache();
+ }
+
+ public MOPService getPOMService()
+ {
+ return pomService;
+ }
+
+ public <E extends TaskExecutionDecorator> E getDecorator(Class<E> decoratorClass)
+ {
+ return executor.getDecorator(decoratorClass);
+ }
+
+ /**
+ * <p>Returns the session currently associated with the current thread of execution.</p>
+ *
+ * @return the current session
+ */
+ public POMSession getSession()
+ {
+ SessionContext context = configurator.getContext();
+ return context != null ? (POMSession)context.getAttachment("mopsession") : null;
+ }
+
+ /**
+ * <p>Open and returns a session to the model. When the current thread is already associated with a previously opened
+ * session the method will throw an <tt>IllegalStateException</tt>.</p>
+ *
+ * @return a session to the model.
+ */
+ public POMSession openSession()
+ {
+ SessionContext context = configurator.openContext();
+ return (POMSession)context.getAttachment("mopsession");
+ }
+
+ /**
+ * <p>Execute the task with a session.</p>
+ *
+ * @param task the task to execute
+ * @throws Exception any exception thrown by the task
+ * @return the value
+ */
+ public <V> V execute(POMTask<V> task) throws Exception
+ {
+ POMSession session = getSession();
+
+ //
+ return executor.execute(session, task);
+ }
+
+}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -23,7 +23,7 @@
import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.portal.config.Query;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.config.POMTask;
import org.exoplatform.portal.pom.data.Mapper;
import org.exoplatform.portal.pom.data.PageData;
@@ -39,7 +39,7 @@
{
/** . */
- private final MOPSessionManager mgr;
+ private final POMSessionManager mgr;
/** . */
private final ObjectType<Site> ownerType;
@@ -53,7 +53,7 @@
/** . */
private Integer size;
- MOPAccess(MOPSessionManager mgr, Query<E> query)
+ MOPAccess(POMSessionManager mgr, Query<E> query)
{
String ownerType = query.getOwnerType();
ObjectType<Site> siteType = null;
@@ -131,7 +131,7 @@
public static class PageAccess extends MOPAccess<PageData, Page>
{
- public PageAccess(MOPSessionManager mgr, Query<PageData> pageDataQuery)
+ public PageAccess(POMSessionManager mgr, Query<PageData> pageDataQuery)
{
super(mgr, pageDataQuery);
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -33,7 +33,7 @@
import org.exoplatform.portal.mop.navigation.NodeContext;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.mop.api.workspace.Workspace;
/**
@@ -153,7 +153,7 @@
bootstrap.boot();
container = bootstrap.getContainer();
service = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
- MOPSessionManager mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ POMSessionManager mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
RequestLifeCycle.begin(container);
nav = service.loadNavigation(SiteKey.portal("classic"));
root = service.loadNode(NodeModel.SELF_MODEL, nav, Scope.ALL, null);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -22,7 +22,7 @@
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import java.util.concurrent.atomic.AtomicBoolean;
/**
@@ -36,7 +36,7 @@
DataStorage storage_;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private POMSession session;
@@ -46,7 +46,7 @@
super.setUp();
PortalContainer container = getContainer();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
}
public void testGetNullInvalidation() throws Exception
@@ -144,9 +144,7 @@
end(true);
// Clear cache
- begin();
mgr.clearCache();
- end();
// The first transaction
begin();
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -23,7 +23,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
/**
* @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
@@ -35,7 +35,7 @@
private DataStorage storage_;
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
public TestConcurrencyDataStorage(String name)
{
@@ -48,7 +48,7 @@
begin();
PortalContainer container = PortalContainer.getInstance();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
}
@@ -88,7 +88,7 @@
{
private DataStorage dataStorage;
- private MOPSessionManager sessionManager;
+ private POMSessionManager sessionManager;
private String pageName;
@@ -98,7 +98,7 @@
private final CountDownLatch stopSignal;
- public CreatePageTask(MOPSessionManager _sessionManager, DataStorage _dataStorage, CountDownLatch _startSignal, CountDownLatch stopSignal, String _pageName, String _pageTitle)
+ public CreatePageTask(POMSessionManager _sessionManager, DataStorage _dataStorage, CountDownLatch _startSignal, CountDownLatch stopSignal, String _pageName, String _pageTitle)
{
dataStorage = _dataStorage;
pageName = _pageName;
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -20,7 +20,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -33,7 +33,7 @@
private DataStorage storage;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private POMSession session;
@@ -44,7 +44,7 @@
begin();
PortalContainer container = PortalContainer.getInstance();
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -43,7 +43,7 @@
import org.exoplatform.portal.mop.navigation.NodeContext;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.pom.spi.gadget.Gadget;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
@@ -87,7 +87,7 @@
private NavigationService navService;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private LinkedList<Event> events;
@@ -118,7 +118,7 @@
super.setUp();
PortalContainer container = PortalContainer.getInstance();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
navService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
events = new LinkedList<Event>();
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -25,7 +25,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.portal.mop.importer.Imported;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.mop.api.workspace.Workspace;
/**
@@ -50,7 +50,7 @@
//
bootstrap.boot();
PortalContainer container = bootstrap.getContainer();
- MOPSessionManager mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ POMSessionManager mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
//
RequestLifeCycle.begin(container);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -25,6 +25,8 @@
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.Page;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visibility;
@@ -34,11 +36,13 @@
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import java.util.Arrays;
import java.util.GregorianCalendar;
+import java.util.HashSet;
import java.util.List;
+import java.util.Set;
import java.util.TimeZone;
/**
@@ -55,7 +59,7 @@
private DataStorage storage;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private POMSession session;
@@ -75,7 +79,7 @@
PortalContainer container = getContainer();
portalConfigService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
navService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -37,7 +37,7 @@
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.mop.api.Attributes;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.workspace.Navigation;
@@ -70,7 +70,7 @@
private DataStorage storage;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private POMSession session;
@@ -90,7 +90,7 @@
PortalContainer container = getContainer();
portalConfigService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
navService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -22,7 +22,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import java.util.List;
@@ -37,7 +37,7 @@
private DataStorage storage;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private POMSession session;
@@ -48,7 +48,7 @@
begin();
PortalContainer container = PortalContainer.getInstance();
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -29,13 +29,16 @@
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageBody;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.EventType;
+import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.portal.pom.config.POMDataStorage;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.config.cache.DataCache;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
@@ -51,6 +54,7 @@
import org.exoplatform.services.security.ConversationState;
import org.gatein.common.util.Tools;
+import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -76,7 +80,7 @@
private DataStorage storage_;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private Authenticator authenticator;
@@ -117,7 +121,7 @@
userPortalConfigSer_ =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
orgService_ = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
authenticator = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
events = new LinkedList<Event>();
@@ -324,7 +328,7 @@
}
catch (Exception ex)
{
- fail("Exception while querying pages with new portal", ex);
+ assertTrue("Exception while querying pages with new portal", false);
}
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -27,7 +27,7 @@
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.i18n.I18Nized;
import org.exoplatform.portal.mop.navigation.NavigationServiceImpl;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.gatein.common.util.Tools;
import org.gatein.mop.api.workspace.Navigation;
import org.gatein.mop.api.workspace.ObjectType;
@@ -51,7 +51,7 @@
{
/** . */
- protected MOPSessionManager mgr;
+ protected POMSessionManager mgr;
/** . */
protected NavigationServiceImpl service;
@@ -63,7 +63,7 @@
//
PortalContainer container = PortalContainer.getInstance();
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
service = new NavigationServiceImpl(mgr);
// dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -28,7 +28,7 @@
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.description.DescriptionServiceImpl;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -43,7 +43,7 @@
{
/** . */
- protected MOPSessionManager mgr;
+ protected POMSessionManager mgr;
/** . */
protected NavigationServiceImpl service;
@@ -61,7 +61,7 @@
//
PortalContainer container = PortalContainer.getInstance();
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
service = new NavigationServiceImpl(mgr);
descriptionService = new DescriptionServiceImpl(mgr);
dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -22,7 +22,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
@@ -44,7 +44,7 @@
private ListenerService listenerService;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
@Override
protected void setUp() throws Exception
@@ -57,7 +57,7 @@
//
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
navigationService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
}
public void testNotification() throws NavigationServiceException
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -33,8 +33,9 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.mop.navigation.Scope;
+import org.exoplatform.portal.mop.user.UserNodeFilterConfig.Builder;
import org.exoplatform.portal.pom.config.POMDataStorage;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
@@ -78,7 +79,7 @@
private DataStorage storage_;
/** . */
- private MOPSessionManager mgr;
+ private POMSessionManager mgr;
/** . */
private Authenticator authenticator;
@@ -119,7 +120,7 @@
userPortalConfigSer_ =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
orgService_ = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
authenticator = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
events = new LinkedList<Event>();
Modified: portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-22 22:12:56 UTC (rev 7196)
@@ -43,11 +43,6 @@
</component>
<component>
- <key>org.exoplatform.commons.cache.CacheManager</key>
- <type>org.exoplatform.commons.cache.CacheManager</type>
- </component>
-
- <component>
<key>org.exoplatform.services.security.Authenticator</key>
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
</component>
@@ -63,8 +58,8 @@
</component>
<component>
- <key>org.exoplatform.portal.pom.config.MOPSessionManager</key>
- <type>org.exoplatform.portal.pom.config.MOPSessionManager</type>
+ <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
+ <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
</component>
<component>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2011-08-22 22:12:56 UTC (rev 7196)
@@ -122,11 +122,6 @@
</component>
<component>
- <key>org.exoplatform.commons.cache.CacheManager</key>
- <type>org.exoplatform.commons.cache.CacheManager</type>
- </component>
-
- <component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
<init-params>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-08-22 22:12:56 UTC (rev 7196)
@@ -26,8 +26,8 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
<component>
- <key>org.exoplatform.portal.pom.config.MOPSessionManager</key>
- <type>org.exoplatform.portal.pom.config.MOPSessionManager</type>
+ <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
+ <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
</component>
<component>
@@ -330,7 +330,7 @@
<description>The JBoss Cache configuration for the MOP session Manager</description>
<object type="org.exoplatform.services.cache.ExoCacheConfig">
<field name="name">
- <string>MOPSessionManager.repository</string>
+ <string>MOPSessionManager</string>
</field>
<field name="maxSize">
<int>5000</int>
@@ -353,7 +353,7 @@
<description>The JBoss Cache configuration for the MOP session Manager</description>
<object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
<field name="name">
- <string>MOPSessionManager.repository</string>
+ <string>MOPSessionManager</string>
</field>
<field name="expirationTimeout">
<long>600</long>
@@ -378,7 +378,7 @@
<description>The JBoss Cache configuration for the navigation service</description>
<object type="org.exoplatform.services.cache.ExoCacheConfig">
<field name="name">
- <string>NavigationService.repository</string>
+ <string>NavigationService</string>
</field>
<field name="maxSize">
<int>5000</int>
@@ -401,7 +401,7 @@
<description>The JBoss Cache configuration for the navigation service</description>
<object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
<field name="name">
- <string>NavigationService.repository</string>
+ <string>NavigationService</string>
</field>
<field name="expirationTimeout">
<long>600000</long>
@@ -429,7 +429,7 @@
<description>The JBoss Cache configuration for the dezcription service</description>
<object type="org.exoplatform.services.cache.ExoCacheConfig">
<field name="name">
- <string>DescriptionService.repository</string>
+ <string>DescriptionService</string>
</field>
<field name="maxSize">
<int>5000</int>
@@ -452,7 +452,7 @@
<description>The JBoss Cache configuration for the description service</description>
<object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
<field name="name">
- <string>DescriptionService.repository</string>
+ <string>DescriptionService</string>
</field>
<field name="expirationTimeout">
<long>600000</long>
Modified: portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -29,7 +29,7 @@
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.pc.ExoKernelIntegration;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator;
import org.exoplatform.services.listener.ListenerService;
import org.gatein.common.logging.Logger;
@@ -306,7 +306,7 @@
consumerRegistry.setSessionEventBroadcaster(sessionEventBroadcaster);
// create ConsumerStructureProvider and register it to listen to page events
- MOPSessionManager sessionManager = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
+ POMSessionManager sessionManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
PortalStructureAccess structureAccess = new MOPPortalStructureAccess(sessionManager);
MOPConsumerStructureProvider structureprovider = new MOPConsumerStructureProvider(structureAccess);
listenerService.addListener(DataStorage.PAGE_CREATED, structureprovider);
Modified: portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java
===================================================================
--- portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java 2011-08-22 15:09:43 UTC (rev 7195)
+++ portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java 2011-08-22 22:12:56 UTC (rev 7196)
@@ -24,7 +24,7 @@
package org.gatein.integration.wsrp.structure;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.MOPSessionManager;
+import org.exoplatform.portal.pom.config.POMSessionManager;
import org.exoplatform.portal.pom.data.Mapper;
import org.exoplatform.portal.pom.data.PageKey;
import org.gatein.mop.api.workspace.ObjectType;
@@ -44,9 +44,9 @@
public class MOPPortalStructureAccess implements PortalStructureAccess
{
private static final String PAGES_CHILD_NAME = "pages";
- private final MOPSessionManager pomManager;
+ private final POMSessionManager pomManager;
- public MOPPortalStructureAccess(MOPSessionManager pomManager)
+ public MOPPortalStructureAccess(POMSessionManager pomManager)
{
this.pomManager = pomManager;
}
13 years, 4 months
gatein SVN: r7195 - in portal/trunk: component/common/src/main/java/org/exoplatform/commons/cache and 17 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2011-08-22 11:09:43 -0400 (Mon, 22 Aug 2011)
New Revision: 7195
Added:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java
portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java
Removed:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
Modified:
portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java
Log:
GTNPORTAL-2037 : Provide a cache manager for simplifying the various cache usage
Modified: portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java
===================================================================
--- portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/application-registry/src/main/java/org/exoplatform/application/registry/impl/ApplicationRegistryServiceImpl.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -33,7 +33,7 @@
import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.model.ApplicationType;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.wsrp.WSRP;
import org.gatein.common.i18n.LocalizedString;
@@ -83,13 +83,13 @@
private final Logger log = LoggerFactory.getLogger(ApplicationRegistryServiceImpl.class);
/** . */
- final POMSessionManager mopManager;
+ final MOPSessionManager mopManager;
/** Should match WSRPPortletInfo.PRODUCER_NAME_META_INFO_KEY */
private static final String PRODUCER_NAME_META_INFO_KEY = "producer-name";
public static final String PRODUCER_CATEGORY_NAME_SUFFIX = " Producer";
- public ApplicationRegistryServiceImpl(ChromatticManager manager, POMSessionManager mopManager)
+ public ApplicationRegistryServiceImpl(ChromatticManager manager, MOPSessionManager mopManager)
{
ApplicationRegistryChromatticLifeCycle lifeCycle = (ApplicationRegistryChromatticLifeCycle)manager.getLifeCycle("app");
lifeCycle.registry = this;
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheManager.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.commons.cache;
+
+import org.exoplatform.container.ExoContainer;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
+import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.services.jcr.RepositoryService;
+
+/**
+ * Manages the life cycle of {@link CacheProvider} with the current thread. The class implements the
+ * {@link ComponentRequestLifecycle} interface to associate the thread with a provider.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+public class CacheManager implements ComponentRequestLifecycle
+{
+
+ /** . */
+ final RepositoryService repositoryService;
+
+ /** . */
+ final CacheService cacheService;
+
+ /** . */
+ final ThreadLocal<CacheProvider> current;
+
+ public CacheManager(RepositoryService repositoryService, CacheService cacheService) throws NullPointerException
+ {
+ if (repositoryService == null)
+ {
+ throw new NullPointerException("No null repository service accepted");
+ }
+ if (cacheService == null)
+ {
+ throw new NullPointerException("No null cache service accepted");
+ }
+
+ //
+ this.repositoryService = repositoryService;
+ this.cacheService = cacheService;
+ this.current = new ThreadLocal<CacheProvider>();
+ }
+
+ /**
+ * Returns the current provider or return null if no such provider exist.
+ *
+ * @return the current provider
+ */
+ public CacheProvider getCurrentProvider()
+ {
+ return current.get();
+ }
+
+ public void startRequest(ExoContainer exoContainer)
+ {
+ begin();
+ }
+
+ public void endRequest(ExoContainer exoContainer)
+ {
+ end();
+ }
+
+ /**
+ * Attempt to begin a request.
+ *
+ * @return true if the request was begun, false if a provider was already associated
+ */
+ public boolean begin()
+ {
+ if (current.get() != null)
+ {
+ return false;
+ }
+ CacheProvider provider = new CacheProvider(this);
+ current.set(provider);
+ return true;
+ }
+
+ /**
+ * Attempt to end a request.
+ *
+ * @return true if the request was stopped, false if no request was previously associated
+ */
+ public boolean end()
+ {
+ if (current.get() == null)
+ {
+ return false;
+ }
+ current.set(null);
+ return true;
+ }
+}
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/CacheProvider.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -0,0 +1,167 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.commons.cache;
+
+import org.chromattic.api.UndeclaredRepositoryException;
+import org.exoplatform.services.cache.ExoCache;
+
+import javax.jcr.RepositoryException;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Provides caches according to types (classes). The provider is scope to the current request and is managed
+ * by a component request life cycle, it is made available through the {@link CacheManager#getCurrentProvider()} method.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ */
+public class CacheProvider
+{
+
+ /** . */
+ private final CacheManager manager;
+
+ /** . */
+ private Map<Class<?>, ExoCache> caches;
+
+ CacheProvider(CacheManager manager)
+ {
+ this.manager = manager;
+ this.caches = new HashMap<Class<?>, ExoCache>();
+ }
+
+ /**
+ * Returns a cache for a specified cache type or null if such cache does not exist.
+ *
+ * @param cacheType the cache type
+ * @return the corresponding cache
+ * @throws NullPointerException if the cache type is null
+ */
+ public ExoCache<?, ?> getCache(Class<?> cacheType) throws NullPointerException
+ {
+ if (cacheType == null)
+ {
+ throw new NullPointerException("No null cache type accepted");
+ }
+
+ //
+ return caches.get(cacheType);
+ }
+
+ /**
+ * Returns a value for a key for a given cache type. When the value does not exist, null is returned.
+ *
+ * @param cacheType the cache type
+ * @param key the key
+ * @param <K> the key generic type
+ * @param <S> the value generic type
+ * @return the value
+ */
+ public <K extends Serializable, S> S get(Class<?> cacheType, K key) throws NullPointerException
+ {
+ if (key == null)
+ {
+ throw new NullPointerException("No null key accepted");
+ }
+
+ //
+ ExoCache<K, S> cache = (ExoCache<K, S>)getCache(cacheType);
+
+ //
+ if (cache != null)
+ {
+ return cache.get(key);
+ }
+
+ //
+ return null;
+ }
+
+ /**
+ * Associates a value and a key for a given cache type. When the provided value is null, the value is instead
+ * removed from the cache.
+ *
+ * @param cacheType the cache type
+ * @param key the key
+ * @param value the value
+ * @param <K> the key generic type
+ * @param <S> the value generic type
+ */
+ public <K extends Serializable, S> void put(Class<?> cacheType, K key, S value) throws NullPointerException
+ {
+ if (key == null)
+ {
+ throw new NullPointerException("No null key accepted");
+ }
+
+ //
+ ExoCache<K, S> cache = (ExoCache<K, S>)getCache(cacheType);
+
+ //
+ if (value == null)
+ {
+ if (cache != null)
+ {
+ cache.remove(key);
+ }
+ }
+ else
+ {
+ if (cache == null)
+ {
+ String ckey = cacheType.getSimpleName() + "." + getRepositoryName();
+ cache = manager.cacheService.getCacheInstance(ckey);
+ caches.put(cacheType, cache);
+ }
+
+ //
+ cache.put(key, value);
+ }
+ }
+
+ /**
+ * Clear a cache for a given type.
+ *
+ * @param cacheType the cache type
+ * @throws NullPointerException when the cache type is null
+ */
+ public void clear(Class<?> cacheType) throws NullPointerException
+ {
+ ExoCache<?, ?> cache = getCache(cacheType);
+
+ //
+ if (cache != null)
+ {
+ cache.clearCache();
+ }
+ }
+
+ private String getRepositoryName()
+ {
+ try
+ {
+ return manager.repositoryService.getCurrentRepository().getConfiguration().getName();
+ }
+ catch (RepositoryException e)
+ {
+ throw new UndeclaredRepositoryException("JCR exceptions are really bad", e);
+ }
+ }
+}
Added: portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/cache/future/FutureCacheManager.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -0,0 +1,72 @@
+/*
+ * Copyright (C) 2011 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.commons.cache.future;
+
+import org.exoplatform.commons.cache.CacheManager;
+import org.exoplatform.services.cache.ExoCache;
+
+import java.io.Serializable;
+
+/** @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a> */
+public class FutureCacheManager<K extends Serializable, V, C> extends FutureCache<K, V, C>
+{
+
+ /** . */
+ private final CacheManager manager;
+
+ /** . */
+ private final Class<?> cacheType;
+
+ public FutureCacheManager(Class<?> cacheType, Loader<K, V, C> loader, CacheManager manager)
+ {
+ super(loader);
+
+ //
+ this.cacheType = cacheType;
+ this.manager = manager;
+ }
+
+ public void clear()
+ {
+ ExoCache<?, ?> cache = manager.getCurrentProvider().getCache(cacheType);
+
+ //
+ if (cache != null)
+ {
+ cache.clearCache();
+ }
+ }
+
+ public void remove(K key)
+ {
+ manager.getCurrentProvider().put(cacheType, key, null);
+ }
+
+ @Override
+ public V get(K key)
+ {
+ return manager.getCurrentProvider().get(cacheType, key);
+ }
+
+ @Override
+ public void put(K key, V entry)
+ {
+ manager.getCurrentProvider().put(cacheType, key, entry);
+ }
+}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/config/NewPortalConfigListener.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -44,7 +44,7 @@
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.mop.api.workspace.Workspace;
@@ -106,7 +106,7 @@
private Logger log = LoggerFactory.getLogger(getClass());
/** . */
- private final POMSessionManager pomMgr;
+ private final MOPSessionManager pomMgr;
/** . */
private NavigationService navigationService_;
@@ -115,7 +115,7 @@
private DescriptionService descriptionService_;
public NewPortalConfigListener(
- POMSessionManager pomMgr,
+ MOPSessionManager pomMgr,
DataStorage dataStorage,
ConfigurationManager cmanager,
InitParams params,
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/DescriptionServiceImpl.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -19,10 +19,11 @@
package org.exoplatform.portal.mop.description;
+import org.exoplatform.commons.cache.CacheManager;
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.i18n.I18NAdapter;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.mop.api.workspace.WorkspaceObject;
import java.util.Collection;
@@ -37,18 +38,23 @@
{
/** . */
- private final POMSessionManager manager;
+ private final MOPSessionManager manager;
/** . */
private DataCache cache;
- public DescriptionServiceImpl(POMSessionManager manager)
+ public DescriptionServiceImpl(MOPSessionManager manager)
{
this(manager, new SimpleDataCache());
}
- public DescriptionServiceImpl(POMSessionManager manager, DataCache cache)
+ public DescriptionServiceImpl(MOPSessionManager manager, CacheManager cacheManager)
{
+ this(manager, new ExoDataCache(cacheManager));
+ }
+
+ public DescriptionServiceImpl(MOPSessionManager manager, DataCache cache)
+ {
this.manager = manager;
this.cache = cache;
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/description/ExoDataCache.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -19,12 +19,11 @@
package org.exoplatform.portal.mop.description;
-import org.exoplatform.commons.cache.future.FutureExoCache;
+import org.exoplatform.commons.cache.CacheManager;
+import org.exoplatform.commons.cache.future.FutureCacheManager;
import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.ExoCache;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -33,10 +32,10 @@
{
/** . */
- protected ExoCache<CacheKey, CacheValue> cache;
+ protected CacheManager cacheManager;
/** . */
- protected FutureExoCache<CacheKey, CacheValue, POMSession> values;
+ protected FutureCacheManager<CacheKey, CacheValue, POMSession> values;
/** . */
private Loader<CacheKey, CacheValue, POMSession> valueLoader = new Loader<CacheKey, CacheValue, POMSession>()
@@ -47,25 +46,16 @@
}
};
- public ExoDataCache(CacheService cacheService)
+ public ExoDataCache(CacheManager cacheManager)
{
- this.cache = cacheService.getCacheInstance("NavigationService");
- this.values = new FutureExoCache<CacheKey, CacheValue, POMSession>(valueLoader, cache)
- {
- @Override
- protected void put(CacheKey key, CacheValue entry)
- {
- // Do nothing on purpose
- // as data in inserted with the putValue method
- // during the getValue method
- }
- };
+ this.cacheManager = cacheManager;
+ this.values = new FutureCacheManager<CacheKey, CacheValue, POMSession>(DescriptionService.class, valueLoader, cacheManager);
}
@Override
protected void removeState(CacheKey key)
{
- cache.remove(key);
+ values.remove(key);
}
@Override
@@ -78,6 +68,7 @@
@Override
protected void putValue(CacheKey key, CacheValue value)
{
- cache.put(key, value);
+ // Do nothing on purpose
+ // as data was inserted with the put(CacheKey, CacheValue) method
}
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/AbstractMopOperationHandler.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -25,7 +25,7 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.management.api.PathAddress;
import org.gatein.management.api.exceptions.OperationException;
import org.gatein.management.api.exceptions.ResourceNotFoundException;
@@ -57,7 +57,7 @@
throw new ResourceNotFoundException("No site type found for " + siteType);
}
- POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
+ MOPSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(MOPSessionManager.class);
POMSession session = mgr.getSession();
if (session == null) throw new OperationException(operationName, "MOP session was null");
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -37,7 +37,7 @@
import org.exoplatform.portal.mop.management.exportimport.SiteLayoutImportTask;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
import org.gatein.management.api.ContentType;
@@ -80,7 +80,7 @@
InputStream inputStream = attachment.getStream();
if (inputStream == null) throw new OperationException(operationContext.getOperationName(), "No data stream available for import.");
- POMSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(POMSessionManager.class);
+ MOPSessionManager mgr = operationContext.getRuntimeContext().getRuntimeComponent(MOPSessionManager.class);
POMSession session = mgr.getSession();
if (session == null) throw new OperationException(operationName, "MOP session was null");
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutExportResource.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -26,9 +26,6 @@
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.management.exportimport.SiteLayoutExportTask;
-import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.data.PortalData;
import org.gatein.management.api.ContentType;
import org.gatein.management.api.binding.BindingProvider;
import org.gatein.management.api.exceptions.OperationException;
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadConfigAsXml.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -25,10 +25,6 @@
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
-import org.exoplatform.portal.pom.data.PortalData;
-import org.exoplatform.portal.pom.data.PortalKey;
import org.gatein.management.api.exceptions.OperationException;
import org.gatein.management.api.exceptions.ResourceNotFoundException;
import org.gatein.management.api.operation.OperationContext;
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/ExoDataCache.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -19,6 +19,8 @@
package org.exoplatform.portal.mop.navigation;
+import org.exoplatform.commons.cache.CacheManager;
+import org.exoplatform.commons.cache.future.FutureCacheManager;
import org.exoplatform.commons.cache.future.FutureExoCache;
import org.exoplatform.commons.cache.future.Loader;
import org.exoplatform.portal.mop.SiteKey;
@@ -38,10 +40,10 @@
{
/** . */
- protected ExoCache<Serializable, Serializable> cache;
+ protected CacheManager cacheManager;
/** . */
- protected FutureExoCache<Serializable, Serializable, POMSession> objects;
+ protected FutureCacheManager<Serializable, Serializable, POMSession> objects;
/** . */
private Loader<Serializable, Serializable, POMSession> navigationLoader = new Loader<Serializable, Serializable, POMSession>()
@@ -59,10 +61,10 @@
}
};
- public ExoDataCache(CacheService cacheService)
+ public ExoDataCache(CacheManager cacheManager)
{
- this.cache = cacheService.getCacheInstance("NavigationService");
- this.objects = new FutureExoCache<Serializable, Serializable, POMSession>(navigationLoader, cache);
+ this.cacheManager = cacheManager;
+ this.objects = new FutureCacheManager<Serializable, Serializable, POMSession>(NavigationService.class, navigationLoader, cacheManager);
}
@Override
@@ -70,7 +72,7 @@
{
for (String key : keys)
{
- cache.remove(key);
+ objects.remove(key);
}
}
@@ -83,7 +85,7 @@
@Override
protected void removeNavigation(SiteKey key)
{
- cache.remove(key);
+ objects.remove(key);
}
@Override
@@ -95,6 +97,6 @@
@Override
protected void clear()
{
- cache.clearCache();
+ objects.clear();
}
}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceImpl.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -23,7 +23,7 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visible;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.portal.pom.data.MappedAttributes;
import static org.exoplatform.portal.mop.navigation.Utils.*;
import static org.exoplatform.portal.pom.config.Utils.split;
@@ -53,7 +53,7 @@
{
/** . */
- final POMSessionManager manager;
+ final MOPSessionManager manager;
/** . */
private final DataCache dataCache;
@@ -61,12 +61,12 @@
/** . */
final Logger log = LoggerFactory.getLogger(NavigationServiceImpl.class);
- public NavigationServiceImpl(POMSessionManager manager) throws NullPointerException
+ public NavigationServiceImpl(MOPSessionManager manager) throws NullPointerException
{
this(manager, new SimpleDataCache());
}
- public NavigationServiceImpl(POMSessionManager manager, DataCache dataCache) throws NullPointerException
+ public NavigationServiceImpl(MOPSessionManager manager, DataCache dataCache) throws NullPointerException
{
if (manager == null)
{
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/navigation/NavigationServiceWrapper.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -20,11 +20,11 @@
package org.exoplatform.portal.mop.navigation;
import org.chromattic.api.UndeclaredRepositoryException;
+import org.exoplatform.commons.cache.CacheManager;
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
import static org.exoplatform.portal.mop.navigation.Utils.*;
-import org.exoplatform.portal.pom.config.POMSessionManager;
-import org.exoplatform.services.cache.CacheService;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.listener.ListenerService;
@@ -54,7 +54,7 @@
private ListenerService listenerService;
/** . */
- private final POMSessionManager manager;
+ private final MOPSessionManager manager;
/** . */
private Session session;
@@ -67,7 +67,7 @@
public NavigationServiceWrapper(
RepositoryService repositoryService,
- POMSessionManager manager,
+ MOPSessionManager manager,
ListenerService listenerService)
{
SimpleDataCache cache = new SimpleDataCache();
@@ -82,11 +82,11 @@
public NavigationServiceWrapper(
RepositoryService repositoryService,
- POMSessionManager manager,
+ MOPSessionManager manager,
ListenerService listenerService,
- CacheService cacheService)
+ CacheManager cacheManager)
{
- ExoDataCache cache = new ExoDataCache(cacheService);
+ ExoDataCache cache = new ExoDataCache(cacheManager);
//
this.repositoryService = repositoryService;
Deleted: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/GlobalKey.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -1,94 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.exoplatform.portal.pom.config;
-
-import java.io.Serializable;
-
-/**
- * A global key wrapping a local key including the current repository id.
- *
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class GlobalKey implements Serializable
-{
-
- public static GlobalKey wrap(String repositoryName, Serializable localKey)
- {
- return new GlobalKey(repositoryName, localKey);
- }
-
- /** . */
- private final String repositoryId;
-
- /** . */
- private final Serializable localKey;
-
- public GlobalKey(String repositoryId, Serializable localKey)
- {
- if (repositoryId == null)
- {
- throw new NullPointerException();
- }
- if (localKey == null)
- {
- throw new NullPointerException();
- }
- this.repositoryId = repositoryId;
- this.localKey = localKey;
- }
-
- public String getRepositoryId()
- {
- return repositoryId;
- }
-
- public Serializable getLocalKey()
- {
- return localKey;
- }
-
- @Override
- public int hashCode()
- {
- return repositoryId.hashCode() ^ localKey.hashCode();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- if (obj == this)
- {
- return true;
- }
- if (obj instanceof GlobalKey)
- {
- GlobalKey that = (GlobalKey)obj;
- return repositoryId.equals(that.repositoryId) && localKey.equals(that.localKey);
- }
- return false;
- }
-
- @Override
- public String toString()
- {
- return "GlobalKey[repositoryId=" + repositoryId + ",localKey=" + localKey + "]";
- }
-}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPChromatticLifeCycle.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -33,7 +33,7 @@
{
/** . */
- POMSessionManager manager;
+ MOPSessionManager manager;
public MOPChromatticLifeCycle(InitParams params)
{
Copied: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java (from rev 7162, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java)
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java (rev 0)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/MOPSessionManager.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -0,0 +1,254 @@
+/**
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.portal.pom.config;
+
+import org.exoplatform.commons.cache.CacheManager;
+import org.exoplatform.commons.cache.CacheProvider;
+import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
+import org.exoplatform.commons.chromattic.ChromatticManager;
+import org.exoplatform.commons.chromattic.SessionContext;
+import org.exoplatform.portal.pom.config.cache.DataCache;
+import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
+import org.exoplatform.portal.pom.data.OwnerKey;
+import org.exoplatform.portal.pom.data.PortalKey;
+import org.exoplatform.services.cache.CachedObjectSelector;
+import org.exoplatform.services.cache.ExoCache;
+import org.exoplatform.services.cache.ObjectCacheInfo;
+import org.exoplatform.services.jcr.RepositoryService;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.mop.core.api.MOPService;
+import org.picocontainer.Startable;
+
+import java.io.Serializable;
+import java.lang.reflect.UndeclaredThrowableException;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class MOPSessionManager implements Startable
+{
+
+ /** . */
+ private final Logger log = LoggerFactory.getLogger(MOPSessionManager.class);
+
+ /** . */
+ private MOPService pomService;
+
+ /** . */
+ private final CacheManager cacheManager;
+
+ /** . */
+ final ChromatticManager manager;
+
+ /** . */
+ private ChromatticLifeCycle configurator;
+
+ /** . */
+ private final TaskExecutionDecorator executor;
+
+ /** . */
+ private final RepositoryService repositoryService;
+
+ public MOPSessionManager(RepositoryService repositoryService, ChromatticManager manager, CacheManager cacheManager)
+ {
+ //
+ this.repositoryService = repositoryService;
+ this.manager = manager;
+ this.cacheManager = cacheManager;
+ this.pomService = null;
+ this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
+ }
+
+ public ChromatticLifeCycle getLifeCycle()
+ {
+ return configurator;
+ }
+
+ public void cachePut(Serializable key, Object value)
+ {
+ CacheProvider provider = cacheManager.getCurrentProvider();
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Updating cache key=" + key + " with value=" + value);
+ }
+
+ //
+ provider.put(MOPSessionManager.class, key, value);
+ }
+
+ public Object cacheGet(Serializable key)
+ {
+ CacheProvider provider = cacheManager.getCurrentProvider();
+
+ //
+ Object value = provider.get(MOPSessionManager.class, key);
+
+ //
+ if (log.isTraceEnabled())
+ {
+ log.trace("Obtained for cache key=" + key + " value=" + value);
+ }
+
+ //
+ return value;
+ }
+
+ public void cacheRemove(Serializable key)
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace("Removing cache key=" + key);
+ }
+
+ //
+ if (key instanceof PortalKey)
+ {
+ final ExoCache cache = cacheManager.getCurrentProvider().getCache(MOPSessionManager.class);
+
+ //
+ if (cache != null)
+ {
+ // This code seems complex but actually it tries to find all objects in cache that have the same
+ // owner key than the portal key, for instance if we remove (portal,classic) then all pages
+ // related to (portal,classic) are also evicted
+ final PortalKey portalKey = (PortalKey)key;
+ try
+ {
+ cache.select(new CachedObjectSelector<Serializable, Object>()
+ {
+ public boolean select(Serializable key, ObjectCacheInfo<?> ocinfo)
+ {
+ if (key instanceof OwnerKey)
+ {
+ OwnerKey selectedOwnerKey = (OwnerKey)key;
+ if (selectedOwnerKey.getType().equals(portalKey.getType()) && selectedOwnerKey.getId().equals(portalKey.getId()))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+ public void onSelect(ExoCache<? extends Serializable, ?> exoCache, Serializable key, ObjectCacheInfo<?> ocinfo) throws Exception
+ {
+ cache.remove(key);
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.error("Unexpected error when clearing pom cache", e);
+ }
+ }
+ }
+ else
+ {
+ cacheManager.getCurrentProvider().put(MOPSessionManager.class, key, null);
+ }
+ }
+
+ public void start()
+ {
+ try
+ {
+ MOPChromatticLifeCycle configurator = (MOPChromatticLifeCycle)manager.getLifeCycle("mop");
+ configurator.manager = this;
+
+ //
+ PortalMOPService pomService = new PortalMOPService(configurator.getChromattic());
+ pomService.start();
+
+ //
+ this.pomService = pomService;
+ this.configurator = configurator;
+ }
+ catch (Exception e)
+ {
+ throw new UndeclaredThrowableException(e);
+ }
+ }
+
+ public void stop()
+ {
+ }
+
+ public void clearCache()
+ {
+ if (log.isTraceEnabled())
+ {
+ log.trace("Clearing cache");
+ }
+
+ //
+ cacheManager.getCurrentProvider().clear(MOPSessionManager.class);
+ }
+
+ public MOPService getPOMService()
+ {
+ return pomService;
+ }
+
+ public <E extends TaskExecutionDecorator> E getDecorator(Class<E> decoratorClass)
+ {
+ return executor.getDecorator(decoratorClass);
+ }
+
+ /**
+ * <p>Returns the session currently associated with the current thread of execution.</p>
+ *
+ * @return the current session
+ */
+ public POMSession getSession()
+ {
+ SessionContext context = configurator.getContext();
+ return context != null ? (POMSession)context.getAttachment("mopsession") : null;
+ }
+
+ /**
+ * <p>Open and returns a session to the model. When the current thread is already associated with a previously opened
+ * session the method will throw an <tt>IllegalStateException</tt>.</p>
+ *
+ * @return a session to the model.
+ */
+ public POMSession openSession()
+ {
+ SessionContext context = configurator.openContext();
+ return (POMSession)context.getAttachment("mopsession");
+ }
+
+ /**
+ * <p>Execute the task with a session.</p>
+ *
+ * @param task the task to execute
+ * @throws Exception any exception thrown by the task
+ * @return the value
+ */
+ public <V> V execute(POMTask<V> task) throws Exception
+ {
+ POMSession session = getSession();
+
+ //
+ return executor.execute(session, task);
+ }
+
+}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMDataStorage.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -66,12 +66,12 @@
{
/** . */
- private final POMSessionManager pomMgr;
+ private final MOPSessionManager pomMgr;
/** . */
private ConfigurationManager confManager_;
- public POMDataStorage(POMSessionManager pomMgr, ConfigurationManager confManager)
+ public POMDataStorage(MOPSessionManager pomMgr, ConfigurationManager confManager)
{
this.pomMgr = pomMgr;
this.confManager_ = confManager;
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSession.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -72,7 +72,7 @@
}
/** . */
- final POMSessionManager mgr;
+ final MOPSessionManager mgr;
/** . */
private ModelImpl model;
@@ -98,7 +98,7 @@
/** . */
private MOPChromatticLifeCycle configurator;
- public POMSession(POMSessionManager mgr, MOPChromatticLifeCycle configurator, SessionContext context)
+ public POMSession(MOPSessionManager mgr, MOPChromatticLifeCycle configurator, SessionContext context)
{
// Register for cache eviction
context.addSynchronizationListener(listener);
@@ -242,7 +242,7 @@
return prefs;
}
- public POMSessionManager getManager()
+ public MOPSessionManager getManager()
{
return mgr;
}
Deleted: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -1,254 +0,0 @@
-/**
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.exoplatform.portal.pom.config;
-
-import org.exoplatform.commons.chromattic.ChromatticLifeCycle;
-import org.exoplatform.commons.chromattic.ChromatticManager;
-import org.exoplatform.commons.chromattic.SessionContext;
-import org.exoplatform.portal.pom.config.cache.DataCache;
-import org.exoplatform.portal.pom.config.cache.PortalNamesCache;
-import org.exoplatform.portal.pom.data.OwnerKey;
-import org.exoplatform.portal.pom.data.PortalKey;
-import org.exoplatform.services.cache.CacheService;
-import org.exoplatform.services.cache.CachedObjectSelector;
-import org.exoplatform.services.cache.ExoCache;
-import org.exoplatform.services.cache.ObjectCacheInfo;
-import org.exoplatform.services.jcr.RepositoryService;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.mop.core.api.MOPService;
-import org.picocontainer.Startable;
-
-import java.io.Serializable;
-import java.lang.reflect.UndeclaredThrowableException;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-public class POMSessionManager implements Startable
-{
-
- /** . */
- private final Logger log = LoggerFactory.getLogger(POMSessionManager.class);
-
- /** . */
- private MOPService pomService;
-
- /** . */
- private final ExoCache<GlobalKey, Object> cache;
-
- /** . */
- final ChromatticManager manager;
-
- /** . */
- private ChromatticLifeCycle configurator;
-
- /** . */
- private final TaskExecutionDecorator executor;
-
- /** . */
- private final RepositoryService repositoryService;
-
- public POMSessionManager(RepositoryService repositoryService, ChromatticManager manager, CacheService cacheService)
- {
- //
- this.repositoryService = repositoryService;
- this.manager = manager;
- this.cache = cacheService.getCacheInstance("MOPSessionManager");
- this.pomService = null;
- this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
- }
-
- public ChromatticLifeCycle getLifeCycle()
- {
- return configurator;
- }
-
- public void cachePut(Serializable key, Object value)
- {
- GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
-
- //
- if (log.isTraceEnabled())
- {
- log.trace("Updating cache key=" + globalKey + " with value=" + value);
- }
-
- //
- cache.put(globalKey, value);
- }
-
- public Object cacheGet(Serializable key)
- {
- GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
-
- //
- Object value = cache.get(globalKey);
-
- //
- if (log.isTraceEnabled())
- {
- log.trace("Obtained for cache key=" + globalKey + " value=" + value);
- }
-
- //
- return value;
- }
-
- public void cacheRemove(Serializable key)
- {
- final GlobalKey globalKey = GlobalKey.wrap(configurator.getRepositoryName(), key);
-
- //
- if (log.isTraceEnabled())
- {
- log.trace("Removing cache key=" + globalKey);
- }
-
- //
- if (key instanceof PortalKey)
- {
- // This code seems complex but actually it tries to find all objects in cache that have the same
- // owner key than the portal key, for instance if we remove (portal,classic) then all pages
- // related to (portal,classic) are also evicted
- final PortalKey portalKey = (PortalKey)key;
- try
- {
- cache.select(new CachedObjectSelector<GlobalKey, Object>()
- {
- public boolean select(GlobalKey selectedGlobalKey, ObjectCacheInfo<?> ocinfo)
- {
- if (globalKey.getRepositoryId().equals(selectedGlobalKey.getRepositoryId()))
- {
- Serializable selectedLocalKey = selectedGlobalKey.getLocalKey();
- if (selectedLocalKey instanceof OwnerKey)
- {
- OwnerKey selectedOwnerKey = (OwnerKey)selectedLocalKey;
- if (selectedOwnerKey.getType().equals(portalKey.getType()) && selectedOwnerKey.getId().equals(portalKey.getId()))
- {
- return true;
- }
- }
- }
- return false;
- }
- public void onSelect(ExoCache<? extends GlobalKey, ?> exoCache, GlobalKey key, ObjectCacheInfo<?> ocinfo) throws Exception
- {
- cache.remove(key);
- }
- });
- }
- catch (Exception e)
- {
- log.error("Unexpected error when clearing pom cache", e);
- }
- }
- else
- {
- cache.remove(globalKey);
- }
- }
-
- public void start()
- {
- try
- {
- MOPChromatticLifeCycle configurator = (MOPChromatticLifeCycle)manager.getLifeCycle("mop");
- configurator.manager = this;
-
- //
- PortalMOPService pomService = new PortalMOPService(configurator.getChromattic());
- pomService.start();
-
- //
- this.pomService = pomService;
- this.configurator = configurator;
- }
- catch (Exception e)
- {
- throw new UndeclaredThrowableException(e);
- }
- }
-
- public void stop()
- {
- }
-
- public void clearCache()
- {
- if (log.isTraceEnabled())
- {
- log.trace("Clearing cache");
- }
-
- //
- cache.clearCache();
- }
-
- public MOPService getPOMService()
- {
- return pomService;
- }
-
- public <E extends TaskExecutionDecorator> E getDecorator(Class<E> decoratorClass)
- {
- return executor.getDecorator(decoratorClass);
- }
-
- /**
- * <p>Returns the session currently associated with the current thread of execution.</p>
- *
- * @return the current session
- */
- public POMSession getSession()
- {
- SessionContext context = configurator.getContext();
- return context != null ? (POMSession)context.getAttachment("mopsession") : null;
- }
-
- /**
- * <p>Open and returns a session to the model. When the current thread is already associated with a previously opened
- * session the method will throw an <tt>IllegalStateException</tt>.</p>
- *
- * @return a session to the model.
- */
- public POMSession openSession()
- {
- SessionContext context = configurator.openContext();
- return (POMSession)context.getAttachment("mopsession");
- }
-
- /**
- * <p>Execute the task with a session.</p>
- *
- * @param task the task to execute
- * @throws Exception any exception thrown by the task
- * @return the value
- */
- public <V> V execute(POMTask<V> task) throws Exception
- {
- POMSession session = getSession();
-
- //
- return executor.execute(session, task);
- }
-
-}
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/pom/config/tasks/MOPAccess.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -23,7 +23,7 @@
import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.portal.config.Query;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.portal.pom.config.POMTask;
import org.exoplatform.portal.pom.data.Mapper;
import org.exoplatform.portal.pom.data.PageData;
@@ -39,7 +39,7 @@
{
/** . */
- private final POMSessionManager mgr;
+ private final MOPSessionManager mgr;
/** . */
private final ObjectType<Site> ownerType;
@@ -53,7 +53,7 @@
/** . */
private Integer size;
- MOPAccess(POMSessionManager mgr, Query<E> query)
+ MOPAccess(MOPSessionManager mgr, Query<E> query)
{
String ownerType = query.getOwnerType();
ObjectType<Site> siteType = null;
@@ -131,7 +131,7 @@
public static class PageAccess extends MOPAccess<PageData, Page>
{
- public PageAccess(POMSessionManager mgr, Query<PageData> pageDataQuery)
+ public PageAccess(MOPSessionManager mgr, Query<PageData> pageDataQuery)
{
super(mgr, pageDataQuery);
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/AbstractImportTest.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -33,7 +33,7 @@
import org.exoplatform.portal.mop.navigation.NodeContext;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.mop.api.workspace.Workspace;
/**
@@ -153,7 +153,7 @@
bootstrap.boot();
container = bootstrap.getContainer();
service = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
- POMSessionManager mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ MOPSessionManager mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
RequestLifeCycle.begin(container);
nav = service.loadNavigation(SiteKey.portal("classic"));
root = service.loadNode(NodeModel.SELF_MODEL, nav, Scope.ALL, null);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestCache.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -22,7 +22,7 @@
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import java.util.concurrent.atomic.AtomicBoolean;
/**
@@ -36,7 +36,7 @@
DataStorage storage_;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private POMSession session;
@@ -46,7 +46,7 @@
super.setUp();
PortalContainer container = getContainer();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
}
public void testGetNullInvalidation() throws Exception
@@ -144,7 +144,9 @@
end(true);
// Clear cache
+ begin();
mgr.clearCache();
+ end();
// The first transaction
begin();
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestConcurrencyDataStorage.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -23,7 +23,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PortalConfig;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
/**
* @author <a href="mailto:hoang281283@gmail.com">Minh Hoang TO</a>
@@ -35,7 +35,7 @@
private DataStorage storage_;
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
public TestConcurrencyDataStorage(String name)
{
@@ -48,7 +48,7 @@
begin();
PortalContainer container = PortalContainer.getInstance();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
}
@@ -88,7 +88,7 @@
{
private DataStorage dataStorage;
- private POMSessionManager sessionManager;
+ private MOPSessionManager sessionManager;
private String pageName;
@@ -98,7 +98,7 @@
private final CountDownLatch stopSignal;
- public CreatePageTask(POMSessionManager _sessionManager, DataStorage _dataStorage, CountDownLatch _startSignal, CountDownLatch stopSignal, String _pageName, String _pageTitle)
+ public CreatePageTask(MOPSessionManager _sessionManager, DataStorage _dataStorage, CountDownLatch _startSignal, CountDownLatch stopSignal, String _pageName, String _pageTitle)
{
dataStorage = _dataStorage;
pageName = _pageName;
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestContentRegistry.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -20,7 +20,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -33,7 +33,7 @@
private DataStorage storage;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private POMSession session;
@@ -44,7 +44,7 @@
begin();
PortalContainer container = PortalContainer.getInstance();
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -43,7 +43,7 @@
import org.exoplatform.portal.mop.navigation.NodeContext;
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.portal.pom.data.ModelChange;
import org.exoplatform.portal.pom.spi.gadget.Gadget;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
@@ -87,7 +87,7 @@
private NavigationService navService;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private LinkedList<Event> events;
@@ -118,7 +118,7 @@
super.setUp();
PortalContainer container = PortalContainer.getInstance();
storage_ = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
navService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
events = new LinkedList<Event>();
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestImport.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -25,7 +25,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.portal.mop.importer.Imported;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.mop.api.workspace.Workspace;
/**
@@ -50,7 +50,7 @@
//
bootstrap.boot();
PortalContainer container = bootstrap.getContainer();
- POMSessionManager mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ MOPSessionManager mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
//
RequestLifeCycle.begin(container);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestLoadedPOM.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -25,8 +25,6 @@
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.ModelObject;
import org.exoplatform.portal.config.model.Page;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visibility;
@@ -36,13 +34,11 @@
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import java.util.Arrays;
import java.util.GregorianCalendar;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import java.util.TimeZone;
/**
@@ -59,7 +55,7 @@
private DataStorage storage;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private POMSession session;
@@ -79,7 +75,7 @@
PortalContainer container = getContainer();
portalConfigService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
navService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestMOP.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -37,7 +37,7 @@
import org.exoplatform.portal.mop.navigation.NodeModel;
import org.exoplatform.portal.mop.navigation.Scope;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.mop.api.Attributes;
import org.gatein.mop.api.content.Customization;
import org.gatein.mop.api.workspace.Navigation;
@@ -70,7 +70,7 @@
private DataStorage storage;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private POMSession session;
@@ -90,7 +90,7 @@
PortalContainer container = getContainer();
portalConfigService = (UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
navService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestSearch.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -22,7 +22,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import java.util.List;
@@ -37,7 +37,7 @@
private DataStorage storage;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private POMSession session;
@@ -48,7 +48,7 @@
begin();
PortalContainer container = PortalContainer.getInstance();
storage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
session = mgr.openSession();
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/config/TestUserPortalConfigService.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -29,16 +29,13 @@
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.Page;
import org.exoplatform.portal.config.model.PageBody;
-import org.exoplatform.portal.config.model.PageNavigation;
-import org.exoplatform.portal.config.model.PageNode;
import org.exoplatform.portal.config.model.PortalConfig;
import org.exoplatform.portal.mop.EventType;
-import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.portal.pom.config.POMDataStorage;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.portal.pom.config.cache.DataCache;
import org.exoplatform.portal.pom.spi.portlet.Portlet;
import org.exoplatform.portal.pom.spi.portlet.PortletBuilder;
@@ -54,7 +51,6 @@
import org.exoplatform.services.security.ConversationState;
import org.gatein.common.util.Tools;
-import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
@@ -80,7 +76,7 @@
private DataStorage storage_;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private Authenticator authenticator;
@@ -121,7 +117,7 @@
userPortalConfigSer_ =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
orgService_ = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
authenticator = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
events = new LinkedList<Event>();
@@ -328,7 +324,7 @@
}
catch (Exception ex)
{
- assertTrue("Exception while querying pages with new portal", false);
+ fail("Exception while querying pages with new portal", ex);
}
}
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/description/TestDescriptionService.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -27,7 +27,7 @@
import org.exoplatform.portal.mop.Described;
import org.exoplatform.portal.mop.i18n.I18Nized;
import org.exoplatform.portal.mop.navigation.NavigationServiceImpl;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.gatein.common.util.Tools;
import org.gatein.mop.api.workspace.Navigation;
import org.gatein.mop.api.workspace.ObjectType;
@@ -51,7 +51,7 @@
{
/** . */
- protected POMSessionManager mgr;
+ protected MOPSessionManager mgr;
/** . */
protected NavigationServiceImpl service;
@@ -63,7 +63,7 @@
//
PortalContainer container = PortalContainer.getInstance();
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
service = new NavigationServiceImpl(mgr);
// dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/AbstractTestNavigationService.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -28,7 +28,7 @@
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.description.DescriptionServiceImpl;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
/**
* @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
@@ -43,7 +43,7 @@
{
/** . */
- protected POMSessionManager mgr;
+ protected MOPSessionManager mgr;
/** . */
protected NavigationServiceImpl service;
@@ -61,7 +61,7 @@
//
PortalContainer container = PortalContainer.getInstance();
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
service = new NavigationServiceImpl(mgr);
descriptionService = new DescriptionServiceImpl(mgr);
dataStorage = (DataStorage)container.getComponentInstanceOfType(DataStorage.class);
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/navigation/TestNavigationServiceWrapper.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -22,7 +22,7 @@
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.mop.EventType;
import org.exoplatform.portal.mop.SiteKey;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
@@ -44,7 +44,7 @@
private ListenerService listenerService;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
@Override
protected void setUp() throws Exception
@@ -57,7 +57,7 @@
//
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
navigationService = (NavigationService)container.getComponentInstanceOfType(NavigationService.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
}
public void testNotification() throws NavigationServiceException
Modified: portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java
===================================================================
--- portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/java/org/exoplatform/portal/mop/user/TestUserPortal.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -33,9 +33,8 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.Visibility;
import org.exoplatform.portal.mop.navigation.Scope;
-import org.exoplatform.portal.mop.user.UserNodeFilterConfig.Builder;
import org.exoplatform.portal.pom.config.POMDataStorage;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.services.listener.Event;
import org.exoplatform.services.listener.Listener;
import org.exoplatform.services.listener.ListenerService;
@@ -79,7 +78,7 @@
private DataStorage storage_;
/** . */
- private POMSessionManager mgr;
+ private MOPSessionManager mgr;
/** . */
private Authenticator authenticator;
@@ -120,7 +119,7 @@
userPortalConfigSer_ =
(UserPortalConfigService)container.getComponentInstanceOfType(UserPortalConfigService.class);
orgService_ = (OrganizationService)container.getComponentInstanceOfType(OrganizationService.class);
- mgr = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ mgr = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
authenticator = (Authenticator)container.getComponentInstanceOfType(Authenticator.class);
listenerService = (ListenerService)container.getComponentInstanceOfType(ListenerService.class);
events = new LinkedList<Event>();
Modified: portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml
===================================================================
--- portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/component/portal/src/test/resources/conf/exo.portal.component.portal-configuration.xml 2011-08-22 15:09:43 UTC (rev 7195)
@@ -43,6 +43,11 @@
</component>
<component>
+ <key>org.exoplatform.commons.cache.CacheManager</key>
+ <type>org.exoplatform.commons.cache.CacheManager</type>
+ </component>
+
+ <component>
<key>org.exoplatform.services.security.Authenticator</key>
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
</component>
@@ -58,8 +63,8 @@
</component>
<component>
- <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
- <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
+ <key>org.exoplatform.portal.pom.config.MOPSessionManager</key>
+ <type>org.exoplatform.portal.pom.config.MOPSessionManager</type>
</component>
<component>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2011-08-22 15:09:43 UTC (rev 7195)
@@ -122,6 +122,11 @@
</component>
<component>
+ <key>org.exoplatform.commons.cache.CacheManager</key>
+ <type>org.exoplatform.commons.cache.CacheManager</type>
+ </component>
+
+ <component>
<key>org.exoplatform.services.cache.ExoCacheFactory</key>
<type>org.exoplatform.services.cache.impl.jboss.ExoCacheFactoryImpl</type>
<init-params>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/portal/portal-configuration.xml 2011-08-22 15:09:43 UTC (rev 7195)
@@ -26,8 +26,8 @@
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_2.xsd">
<component>
- <key>org.exoplatform.portal.pom.config.POMSessionManager</key>
- <type>org.exoplatform.portal.pom.config.POMSessionManager</type>
+ <key>org.exoplatform.portal.pom.config.MOPSessionManager</key>
+ <type>org.exoplatform.portal.pom.config.MOPSessionManager</type>
</component>
<component>
@@ -330,7 +330,7 @@
<description>The JBoss Cache configuration for the MOP session Manager</description>
<object type="org.exoplatform.services.cache.ExoCacheConfig">
<field name="name">
- <string>MOPSessionManager</string>
+ <string>MOPSessionManager.repository</string>
</field>
<field name="maxSize">
<int>5000</int>
@@ -353,7 +353,7 @@
<description>The JBoss Cache configuration for the MOP session Manager</description>
<object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
<field name="name">
- <string>MOPSessionManager</string>
+ <string>MOPSessionManager.repository</string>
</field>
<field name="expirationTimeout">
<long>600</long>
@@ -378,7 +378,7 @@
<description>The JBoss Cache configuration for the navigation service</description>
<object type="org.exoplatform.services.cache.ExoCacheConfig">
<field name="name">
- <string>NavigationService</string>
+ <string>NavigationService.repository</string>
</field>
<field name="maxSize">
<int>5000</int>
@@ -401,7 +401,7 @@
<description>The JBoss Cache configuration for the navigation service</description>
<object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
<field name="name">
- <string>NavigationService</string>
+ <string>NavigationService.repository</string>
</field>
<field name="expirationTimeout">
<long>600000</long>
@@ -429,7 +429,7 @@
<description>The JBoss Cache configuration for the dezcription service</description>
<object type="org.exoplatform.services.cache.ExoCacheConfig">
<field name="name">
- <string>DescriptionService</string>
+ <string>DescriptionService.repository</string>
</field>
<field name="maxSize">
<int>5000</int>
@@ -452,7 +452,7 @@
<description>The JBoss Cache configuration for the description service</description>
<object type="org.exoplatform.services.cache.impl.jboss.ea.EAExoCacheConfig">
<field name="name">
- <string>DescriptionService</string>
+ <string>DescriptionService.repository</string>
</field>
<field name="expirationTimeout">
<long>600000</long>
Modified: portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java
===================================================================
--- portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/WSRPServiceIntegration.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -29,7 +29,7 @@
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.pc.ExoKernelIntegration;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator;
import org.exoplatform.services.listener.ListenerService;
import org.gatein.common.logging.Logger;
@@ -306,7 +306,7 @@
consumerRegistry.setSessionEventBroadcaster(sessionEventBroadcaster);
// create ConsumerStructureProvider and register it to listen to page events
- POMSessionManager sessionManager = (POMSessionManager)container.getComponentInstanceOfType(POMSessionManager.class);
+ MOPSessionManager sessionManager = (MOPSessionManager)container.getComponentInstanceOfType(MOPSessionManager.class);
PortalStructureAccess structureAccess = new MOPPortalStructureAccess(sessionManager);
MOPConsumerStructureProvider structureprovider = new MOPConsumerStructureProvider(structureAccess);
listenerService.addListener(DataStorage.PAGE_CREATED, structureprovider);
Modified: portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java
===================================================================
--- portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java 2011-08-22 10:54:48 UTC (rev 7194)
+++ portal/trunk/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java 2011-08-22 15:09:43 UTC (rev 7195)
@@ -24,7 +24,7 @@
package org.gatein.integration.wsrp.structure;
import org.exoplatform.portal.pom.config.POMSession;
-import org.exoplatform.portal.pom.config.POMSessionManager;
+import org.exoplatform.portal.pom.config.MOPSessionManager;
import org.exoplatform.portal.pom.data.Mapper;
import org.exoplatform.portal.pom.data.PageKey;
import org.gatein.mop.api.workspace.ObjectType;
@@ -44,9 +44,9 @@
public class MOPPortalStructureAccess implements PortalStructureAccess
{
private static final String PAGES_CHILD_NAME = "pages";
- private final POMSessionManager pomManager;
+ private final MOPSessionManager pomManager;
- public MOPPortalStructureAccess(POMSessionManager pomManager)
+ public MOPPortalStructureAccess(MOPSessionManager pomManager)
{
this.pomManager = pomManager;
}
13 years, 4 months
gatein SVN: r7194 - portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: hangnguyen
Date: 2011-08-22 06:54:48 -0400 (Mon, 22 Aug 2011)
New Revision: 7194
Modified:
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_01_SignInSignOut.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03_ChangeDisplayLanguageInPublicMode.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04_RememberMyLogin.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05_RecoverUserNameOrPassword.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_CreateNewAccount.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_UsersManagement.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_SearchUser.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09_GroupManagement.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_AddUserIntoGroup.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_MembershipManagement.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_ImportApplication.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_ShowOrHideImportApplicationIcon.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ManageCategory.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15_AddApplicationIntoCategory.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_16_ViewPortlets.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_17_ManageRemoteGadget.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_ManageManualGadget.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_LinkToGadget.html
portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_ExpandAllCollapseAll.html
Log:
TESTVN-4028 - Daily tests on Portal
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_01_SignInSignOut.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_01_SignInSignOut.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_01_SignInSignOut.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -53,7 +53,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -73,7 +73,7 @@
</tr>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -108,7 +108,7 @@
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -163,7 +163,7 @@
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -218,7 +218,7 @@
</tr>
<tr>
<td>click</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03_ChangeDisplayLanguageInPublicMode.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03_ChangeDisplayLanguageInPublicMode.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_03_ChangeDisplayLanguageInPublicMode.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04_RememberMyLogin.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04_RememberMyLogin.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_04_RememberMyLogin.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -63,7 +63,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -103,7 +103,7 @@
</tr>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05_RecoverUserNameOrPassword.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05_RecoverUserNameOrPassword.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_05_RecoverUserNameOrPassword.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -413,7 +413,7 @@
</tr>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_CreateNewAccount.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_CreateNewAccount.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_06_CreateNewAccount.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -173,7 +173,7 @@
</tr>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -198,7 +198,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -218,7 +218,7 @@
</tr>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -243,7 +243,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -253,7 +253,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Users and groups management</td>
+ <td>link=Users and Groups Manager</td>
<td></td>
</tr>
<tr>
@@ -303,7 +303,7 @@
</tr>
<tr>
<td>assertConfirmation</td>
- <td>Are you sure to delete Test_SNF_PRL_06 user?</td>
+ <td>Are you sure to delete user Test_SNF_PRL_06?</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_UsersManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_UsersManagement.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_07_UsersManagement.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -153,7 +153,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Users and groups management</td>
+ <td>link=Users and Groups Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_SearchUser.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_SearchUser.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_08_SearchUser.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Users and groups management</td>
+ <td>link=Users and Groups Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09_GroupManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09_GroupManagement.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_09_GroupManagement.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Users and groups management</td>
+ <td>link=Users and Groups Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_AddUserIntoGroup.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_AddUserIntoGroup.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_10_AddUserIntoGroup.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Users and groups management</td>
+ <td>link=Users and Groups Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_MembershipManagement.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_MembershipManagement.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_11_MembershipManagement.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Users and groups management</td>
+ <td>link=Users and Groups Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_ImportApplication.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_ImportApplication.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_12_ImportApplication.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -57,13 +57,8 @@
<td></td>
</tr>
<tr>
- <td>waitForElementPresent</td>
- <td>link=Applications Registry</td>
- <td></td>
-</tr>
-<tr>
<td>clickAndWait</td>
- <td>link=Applications Registry</td>
+ <td>link=Applications Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_ShowOrHideImportApplicationIcon.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_ShowOrHideImportApplicationIcon.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_13_ShowOrHideImportApplicationIcon.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Applications Registry</td>
+ <td>link=Applications Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ManageCategory.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ManageCategory.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_14_ManageCategory.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,17 +48,17 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
- <td>echo</td>
- <td>-- Go to Application Registry--</td>
+ <td>clickAndWait</td>
+ <td>link=Applications Manager</td>
<td></td>
</tr>
<tr>
- <td>clickAndWait</td>
- <td>link=Applications Registry</td>
+ <td>echo</td>
+ <td>-- Go to Application Registry--</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15_AddApplicationIntoCategory.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15_AddApplicationIntoCategory.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_15_AddApplicationIntoCategory.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -43,7 +43,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -53,7 +53,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Applications Registry</td>
+ <td>link=Applications Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_16_ViewPortlets.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_16_ViewPortlets.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_16_ViewPortlets.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Applications Registry</td>
+ <td>link=Applications Manager</td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_17_ManageRemoteGadget.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_17_ManageRemoteGadget.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_17_ManageRemoteGadget.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,7 +58,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>link=Applications Registry</td>
+ <td>link=Applications Manager</td>
<td></td>
</tr>
<tr>
@@ -143,12 +143,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>link=Click here to add this gadget to a category.</td>
+ <td>link=Click here to add this gadget to a category. </td>
<td></td>
</tr>
<tr>
<td>click</td>
- <td>link=Click here to add this gadget to a category.</td>
+ <td>link=Click here to add this gadget to a category. </td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_ManageManualGadget.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_ManageManualGadget.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_18_ManageManualGadget.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -118,7 +118,7 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>link=Click here to add this gadget to a category.</td>
+ <td>link=Click here to add this gadget to a category. </td>
<td></td>
</tr>
<tr>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_LinkToGadget.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_LinkToGadget.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_19_LinkToGadget.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
@@ -58,12 +58,12 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//ul[@id='PortalNavigationTopContainer']/li[2]/span/a</td>
+ <td>//div[@class='UISiteBody']//a[text()='SiteMap']</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
- <td>//ul[@id='PortalNavigationTopContainer']/li[2]/span/a</td>
+ <td>//div[@class='UISiteBody']//a[text()='SiteMap']</td>
<td></td>
</tr>
<tr>
@@ -83,15 +83,20 @@
</tr>
<tr>
<td>waitForElementPresent</td>
- <td>//a[@href='/portal/groups/:organization:management:executive-board/organization/management']</td>
+ <td>//a[@href='/portal/private/classic/organization/management']</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
- <td>//a[@href='/portal/groups/:organization:management:executive-board/organization/management']</td>
+ <td>//a[@href='/portal/private/classic/organization/management']</td>
<td></td>
</tr>
<tr>
+ <td>echo</td>
+ <td>-- Check position of page --</td>
+ <td></td>
+</tr>
+<tr>
<td>verifyElementPresent</td>
<td>//li[4]/ul/li[2]/a</td>
<td></td>
Modified: portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_ExpandAllCollapseAll.html
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_ExpandAllCollapseAll.html 2011-08-19 19:54:37 UTC (rev 7193)
+++ portal/trunk/testsuite/selenium-snifftests/src/suite/org/exoplatform/portal/selenium/Test_SNF_PRL_20_ExpandAllCollapseAll.html 2011-08-22 10:54:48 UTC (rev 7194)
@@ -13,7 +13,7 @@
</thead><tbody>
<tr>
<td>open</td>
- <td>/portal/classic/</td>
+ <td>/portal/public/classic/</td>
<td></td>
</tr>
<tr>
@@ -48,7 +48,7 @@
</tr>
<tr>
<td>clickAndWait</td>
- <td>//div[@id='UIPortalLoginFormAction']</td>
+ <td>//a[@id='UIPortalLoginFormAction']</td>
<td></td>
</tr>
<tr>
13 years, 4 months
gatein SVN: r7193 - in epp/portal/branches/EPP_5_2_Branch: web/portal/src/main/webapp/WEB-INF/classes/locale/portal and 2 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-08-19 15:54:37 -0400 (Fri, 19 Aug 2011)
New Revision: 7193
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Application.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalProperties.java
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
JBEPP-1098: merge in changes from GTNPORTAL-1558 to add support to configure behaviour of portlet show info bar.
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Application.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Application.java 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/Application.java 2011-08-19 19:54:37 UTC (rev 7193)
@@ -46,7 +46,7 @@
private String description;
- private boolean showInfoBar = true;
+ private boolean showInfoBar;
private boolean showApplicationState = true;
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java 2011-08-19 19:54:37 UTC (rev 7193)
@@ -245,6 +245,28 @@
setProperty(PortalProperties.SESSION_ALIVE, type);
}
+ public Boolean isShowInfobar()
+ {
+ String value = getProperty(PortalProperties.SHOW_PORTLET_INFO, "1");
+ if (Integer.parseInt(value) == 1)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public void setShowInfobar(Boolean value)
+ {
+ if (value)
+ {
+ setProperty(PortalProperties.SHOW_PORTLET_INFO, "1");
+ }
+ else
+ {
+ setProperty(PortalProperties.SHOW_PORTLET_INFO, "0");
+ }
+ }
+
public void setDescription(String description)
{
this.description = description;
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalProperties.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalProperties.java 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalProperties.java 2011-08-19 19:54:37 UTC (rev 7193)
@@ -35,4 +35,6 @@
final public static String SESSION_NEVER = "never";
final public static String GADGET_SERVER = "gadgetServer";
+
+ final public static String SHOW_PORTLET_INFO = "showPortletInfo";
}
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_en.properties 2011-08-19 19:54:37 UTC (rev 7193)
@@ -364,6 +364,7 @@
UIPortalForm.label.option.always=Always
UIPortalForm.label.option.onDemand=On Demand
UIPortalForm.label.option.never=Never
+UIPortalForm.label.showInfobar=Show info bar by default
UIPortalForm.tab.label.PortalSetting=Portal Setting
UIPortalForm.tab.label.PortalTemplate=Portal Templates
UIPortalForm.tab.label.PermissionSetting=Permission Setting
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_fr.properties 2011-08-19 19:54:37 UTC (rev 7193)
@@ -336,6 +336,7 @@
UIPortalForm.label.option.always=Always
UIPortalForm.label.option.onDemand=On Demand
UIPortalForm.label.option.never=Never
+UIPortalForm.label.showInfobar=Afficher la barre d'info par défaut
UIPortalForm.tab.label.PortalSetting=Configuration du portal
UIPortalForm.tab.label.PortalTemplate=Modèles de portails
UIPortalForm.tab.label.PermissionSetting=Configuration des permissions
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/classes/locale/portal/webui_vi.properties 2011-08-19 19:54:37 UTC (rev 7193)
@@ -331,6 +331,7 @@
UIPortalForm.label.option.always=Luôn luôn
UIPortalForm.label.option.onDemand=Theo yêu cầu
UIPortalForm.label.option.never=Không bao giờ
+UIPortalForm.label.showInfobar=Mặc định hiển thị thanh thông tin
UIPortalForm.tab.label.PortalSetting=Cấu hình Portal
UIPortalForm.tab.label.PortalTemplate=Các Portal mẫu
UIPortalForm.tab.label.PermissionSetting=Tùy chọn phân quyền sử dụng
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/portal.xml 2011-08-19 19:54:37 UTC (rev 7193)
@@ -30,6 +30,7 @@
<edit-permission>*:/platform/administrators</edit-permission>
<properties>
<entry key="sessionAlive">onDemand</entry>
+ <entry key="showPortletInfo">0</entry>
</properties>
<portal-layout>
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortal.java 2011-08-19 19:54:37 UTC (rev 7193)
@@ -309,6 +309,28 @@
setProperty(PortalProperties.SESSION_ALIVE, type);
}
+ public Boolean isShowInfobar()
+ {
+ String value = getProperty(PortalProperties.SHOW_PORTLET_INFO, "1");
+ if (Integer.parseInt(value) == 1)
+ {
+ return true;
+ }
+ return false;
+ }
+
+ public void setShowInfobar(Boolean value)
+ {
+ if (value)
+ {
+ setProperty(PortalProperties.SHOW_PORTLET_INFO, "1");
+ }
+ else
+ {
+ setProperty(PortalProperties.SHOW_PORTLET_INFO, "0");
+ }
+ }
+
public String getLabel()
{
return label;
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalComponentActionListener.java 2011-08-19 19:54:37 UTC (rev 7193)
@@ -21,6 +21,7 @@
import org.exoplatform.application.registry.Application;
import org.exoplatform.portal.application.PortalRequestContext;
+import org.exoplatform.portal.config.DataStorage;
import org.exoplatform.portal.config.UserACL;
import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.portal.config.model.ApplicationState;
@@ -28,6 +29,7 @@
import org.exoplatform.portal.config.model.CloneApplicationState;
import org.exoplatform.portal.config.model.Container;
import org.exoplatform.portal.config.model.TransientApplicationState;
+import org.exoplatform.portal.mop.SiteType;
import org.exoplatform.portal.webui.application.PortletState;
import org.exoplatform.portal.webui.application.UIPortlet;
import org.exoplatform.portal.webui.container.UITabContainer;
@@ -332,6 +334,12 @@
}
uiPortlet.setPortletInPortal(uiTarget instanceof UIPortal);
uiPortlet.setShowEditControl(true);
+
+ //TODO Wait to fix issue EXOGTN-213 and then
+ //we should get "showInfobar" from current UI portal instead of Storage service
+ UIPortal currentPortal = Util.getUIPortal();
+ DataStorage storage = uiApp.getApplicationComponent(DataStorage.class);
+ uiPortlet.setShowInfoBar(storage.getPortalConfig(currentPortal.getSiteKey().getTypeName(), currentPortal.getSiteKey().getName()).isShowInfobar());
uiSource = uiPortlet;
}
List<UIComponent> children = uiTarget.getChildren();
Modified: epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-08-19 18:35:04 UTC (rev 7192)
+++ epp/portal/branches/EPP_5_2_Branch/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-08-19 19:54:37 UTC (rev 7193)
@@ -55,6 +55,7 @@
import org.exoplatform.webui.event.Event;
import org.exoplatform.webui.event.Event.Phase;
import org.exoplatform.webui.event.EventListener;
+import org.exoplatform.webui.form.UIFormCheckBoxInput;
import org.exoplatform.webui.form.UIFormInputItemSelector;
import org.exoplatform.webui.form.UIFormInputSet;
import org.exoplatform.webui.form.UIFormSelectBox;
@@ -80,7 +81,8 @@
@ComponentConfigs({
@ComponentConfig(lifecycle = UIFormLifecycle.class, template = "system:/groovy/webui/form/UIFormTabPane.gtmpl", events = {
@EventConfig(listeners = UIPortalForm.SaveActionListener.class),
- @EventConfig(listeners = UIMaskWorkspace.CloseActionListener.class, phase = Phase.DECODE)}),
+ @EventConfig(listeners = UIMaskWorkspace.CloseActionListener.class, phase = Phase.DECODE),
+ @EventConfig(listeners = UIPortalForm.CheckShowActionListener.class)}),
@ComponentConfig(id = "CreatePortal", lifecycle = UIFormLifecycle.class, template = "system:/groovy/webui/form/UIFormTabPane.gtmpl", initParams = @ParamConfig(name = "PortalTemplateConfigOption", value = "system:/WEB-INF/conf/uiconf/portal/webui/portal/PortalTemplateConfigOption.groovy"), events = {
@EventConfig(name = "Save", listeners = UIPortalForm.CreateActionListener.class),
@EventConfig(listeners = UIPortalForm.SelectItemOptionActionListener.class, phase = Phase.DECODE),
@@ -97,6 +99,8 @@
private static final String FIELD_SESSION_ALIVE = "sessionAlive";
+ private static final String FIELD_SHOW_INFOBAR = "showInfobar";
+
private static final String FIELD_LABEL = "label";
private static final String FIELD_DESCRIPTION = "description";
@@ -269,6 +273,11 @@
new UIFormSelectBox(FIELD_SESSION_ALIVE, FIELD_SESSION_ALIVE, listSessionAlive);
uiSessionAliveBox.setValue(PortalProperties.SESSION_ON_DEMAND);
uiPropertiesSet.addUIFormInput(uiSessionAliveBox);
+
+ //TODO add more box for showPortletMode and showWindowState if needed
+ UIFormCheckBoxInput<Boolean> uiShowInfobarBox = new UIFormCheckBoxInput<Boolean>(FIELD_SHOW_INFOBAR, FIELD_SHOW_INFOBAR, true);
+ uiShowInfobarBox.setOnChange("CheckShowInfobar");
+ uiPropertiesSet.addChild(uiShowInfobarBox);
addUIFormInput(uiPropertiesSet);
UIFormInputSet uiPermissionSetting = createUIComponent(UIFormInputSet.class, "PermissionSetting", null);
@@ -417,6 +426,21 @@
}
}
+ static public class CheckShowActionListener extends EventListener<UIPortalForm>
+ {
+ public void execute(Event<UIPortalForm> event) throws Exception
+ {
+ UIPortalForm uiForm = event.getSource();
+ UIFormInputSet InfoForm = uiForm.getChildById("Properties");
+ UIFormCheckBoxInput<Boolean> showInfobarForm = InfoForm.getUIFormCheckBoxInput(UIPortalForm.FIELD_SHOW_INFOBAR);
+
+ //TODO: When we need to implement for showPortletMode or showWindowState
+ // we can change how to get/set value for showInfobarForm (as well as of PortalConfig)
+ showInfobarForm.setValue(showInfobarForm.isChecked());
+ event.getRequestContext().addUIComponentToUpdateByAjax(uiForm);
+ }
+ }
+
private String capitalizeFirstLetter(String word)
{
if (word == null)
13 years, 5 months
gatein SVN: r7192 - in epp/portal/branches/EPP_5_2_Branch: webui/core/src/main/java/org/exoplatform/webui/form and 1 other directory.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-08-19 14:35:04 -0400 (Fri, 19 Aug 2011)
New Revision: 7192
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java
Log:
JBEPP-1079 Unknown error when edit category with empty description
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2011-08-19 18:18:07 UTC (rev 7191)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UICategoryForm.java 2011-08-19 18:35:04 UTC (rev 7192)
@@ -41,6 +41,7 @@
import org.exoplatform.webui.form.validator.StringLengthValidator;
import org.exoplatform.webui.organization.UIListPermissionSelector;
import org.exoplatform.webui.organization.UIListPermissionSelector.EmptyIteratorValidator;
+import org.gatein.common.text.EntityEncoder;
import java.util.ArrayList;
import java.util.Date;
@@ -104,7 +105,8 @@
category_ = category;
uiSetting.getUIStringInput(FIELD_NAME).setEditable(false).setValue(category_.getName());
uiSetting.getUIStringInput(FIELD_DISPLAY_NAME).setValue(category_.getDisplayName());
- uiSetting.getUIFormTextAreaInput(FIELD_DESCRIPTION).setValue(category_.getDescription());
+ String description = category_.getDescription()==null?"":category_.getDescription();
+ uiSetting.getUIFormTextAreaInput(FIELD_DESCRIPTION).setValue( EntityEncoder.FULL.encode(description) );
List<String> accessPermissions = category_.getAccessPermissions();
String[] per = new String[accessPermissions.size()];
if (accessPermissions != null && accessPermissions.size() > 0)
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-19 18:18:07 UTC (rev 7191)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/component/UIGadgetEditor.java 2011-08-19 18:35:04 UTC (rev 7192)
@@ -122,6 +122,8 @@
UIFormStringInput uiInputName = getUIStringInput(FIELD_NAME);
String encoded = StringEscapeUtils.escapeHtml(StringEscapeUtils.unescapeHtml(uiInputSource.getValue()));
uiInputSource.setValue(encoded);
+ //uiInputSource.setValue(uiInputSource.getValue());
+
if(this.isEdit()) {
uiInputName.setEditable(false);
}
Modified: epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java 2011-08-19 18:18:07 UTC (rev 7191)
+++ epp/portal/branches/EPP_5_2_Branch/webui/core/src/main/java/org/exoplatform/webui/form/UIFormTextAreaInput.java 2011-08-19 18:35:04 UTC (rev 7192)
@@ -21,8 +21,6 @@
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.commons.serialization.api.annotations.Serialized;
-import org.gatein.common.text.EntityEncoder;
-
import java.io.Writer;
/**
@@ -42,7 +40,6 @@
*/
private int columns = 30;
-
public UIFormTextAreaInput()
{
}
13 years, 5 months
gatein SVN: r7191 - epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-08-19 14:18:07 -0400 (Fri, 19 Aug 2011)
New Revision: 7191
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
Log:
JBEPP-353 JBEPP-1048 XSS vulnerability when adding portlet to category
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl 2011-08-19 17:52:11 UTC (rev 7190)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/groovy/portal/webui/application/UIApplicationList.gtmpl 2011-08-19 18:18:07 UTC (rev 7191)
@@ -39,17 +39,25 @@
<%
for(application in uicomponent.getApplications()) {
String applicationLabel = application.getDisplayName();
+ String applicationLabelFull = applicationLabel;
if(applicationLabel.length() > 30) applicationLabel = applicationLabel.substring(0, 27) + "...";
+ applicationLabel = encoder.encode(applicationLabel==null?"":applicationLabel);
+ applicationLabelFull = encoder.encode(applicationLabelFull==null?"":applicationLabelFull);
String srcBG = application.getIconURL();
String srcBGError = "/eXoResources/skin/sharedImages/Icon80x80/DefaultPortlet.png";
+
+ description = application.getDescription();
+ if(description == null) displayName = "";
+ description = encoder.encode(description);
+
%>
<div class="UIVTab VTabStyle3" id="<%=application.getId();%>" onmousedown="eXo.portal.PortalDragDrop.init.call(this, event);">
<div class="VTabContentBG">
<div class="OverflowContainer">
<img src="<%=(srcBG!=null && srcBG.length()>0)?srcBG:srcBGError%>" onError="src='$srcBGError'" alt=""/>
- <div class="ContentInfo" title="<%= application.getDisplayName() %>" style="cursor:move;">
+ <div class="ContentInfo" title="<%= applicationLabelFull %>" style="cursor:move;">
<div class="LabelTab">$applicationLabel</div>
- <div class="LableText"><%= application.getDescription() %></div>
+ <div class="LableText"><%= description %></div>
</div>
<div class="ClearLeft"><span></span></div>
</div>
13 years, 5 months
gatein SVN: r7190 - epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-08-19 13:52:11 -0400 (Fri, 19 Aug 2011)
New Revision: 7190
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
Log:
JBEPP-1087: fix NPE issue when adding a new container to a page. Fixes a previously bad patch applied which didn't correct for a javascript method parameter order switch.
Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-19 16:20:22 UTC (rev 7189)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-08-19 17:52:11 UTC (rev 7190)
@@ -640,7 +640,7 @@
* @param {boolean} async - asynchronous or none
* @return {String} response text if request is not async
*/
-function ajaxAsyncRequest(url, async, method, queryString) {
+function ajaxAsyncRequest(method, url, async, queryString) {
if(async == undefined) async = true ;
var request = eXo.core.Browser.createHttpRequest() ;
request.open(method, url, async) ;
13 years, 5 months
gatein SVN: r7189 - in epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp: src and 1 other directory.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2011-08-19 12:20:22 -0400 (Fri, 19 Aug 2011)
New Revision: 7189
Added:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
Log:
JBEPP-1091 Distribution improvement
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml 2011-08-19 16:11:19 UTC (rev 7188)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml 2011-08-19 16:20:22 UTC (rev 7189)
@@ -13,13 +13,12 @@
<artifactId>distribution</artifactId>
<packaging>pom</packaging>
<name>Distribution</name>
-
<modules>
<module>serverAddon</module>
<module>portletbridge</module>
<module>examples</module>
</modules>
-
+
<dependencies>
<dependency>
<groupId>org.exoplatform.portal.distribution.root</groupId>
@@ -69,9 +68,20 @@
<profiles>
<profile>
<id>epp-distribution-assembly</id>
+ <!--<description>This profile assembly parts using directory. This is slower.</description>-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
+ <properties>
+ <distribution.format>dir</distribution.format>
+
+ <include.default>*.distribution.deploy:*:zip</include.default>
+ <patch.default>patch</patch.default>
+ <include.production>*.distribution.deploy:*:zip</include.production>
+ <patch.production>patch</patch.production>
+ <include.all>*.distribution.deploy:*:zip</include.all>
+ <patch.all>patch</patch.all>
+ </properties>
<build>
<plugins>
<!-- Put to gether all components -->
@@ -93,17 +103,84 @@
</execution>
</executions>
</plugin>
+
+ <!-- Apply patches and rename folders -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>ant-final</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <property name="root.path">${project.build.directory}/${project.build.finalName}</property>
+ <property name="epp.path">${root.path}/${epp.dir}</property>
+ <property name="eap.path">${root.path}/${eap.dir}</property>
+
+ <move file="${eap.path}" toFile="${epp.path}"/>
+ <move file="${epp.path}/gatein-sso-${sso.version}" toFile="${epp.path}/${sso.directory}"/>
+
+ <ant antfile="src/build.xml" inheritRefs="true">
+ <target name="patch"/>
+ <property name="toConfiguration" value="default"/>
+ </ant>
+
+ <ant antfile="src/build.xml" inheritRefs="true">
+ <target name="patch"/>
+ <property name="toConfiguration" value="production"/>
+ </ant>
+
+ <ant antfile="src/build.xml" inheritRefs="true">
+ <target name="patch"/>
+ <property name="toConfiguration" value="all"/>
+ </ant>
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</profile>
<profile>
- <id>epp-distribution-patch</id>
+ <id>epp-distribution-single</id>
+ <!--<description>This profile assembly parts using directory. Takes parameter servername=(default|production|all).</description>-->
<activation>
- <activeByDefault>true</activeByDefault>
+ <activeByDefault>false</activeByDefault>
</activation>
+ <properties>
+ <distribution.format>dir</distribution.format>
+
+ <servername>default</servername>
+ </properties>
<build>
<plugins>
+ <!-- Put to gether all components -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distro-assembly</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <descriptors>
+ <descriptor>src/assemble-single.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
<!-- Apply patches and rename folders -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
@@ -117,24 +194,104 @@
</goals>
<configuration>
<target>
- <property name="epp.path">${project.build.directory}/${project.build.finalName}/${epp.dir}</property>
- <property name="eap.path">${project.build.directory}/${project.build.finalName}/${eap.dir}</property>
+ <property name="root.path">${project.build.directory}/${project.build.finalName}</property>
+ <property name="epp.path">${root.path}/${epp.dir}</property>
+ <property name="eap.path">${root.path}/${eap.dir}</property>
<move file="${eap.path}" toFile="${epp.path}"/>
<move file="${epp.path}/gatein-sso-${sso.version}" toFile="${epp.path}/${sso.directory}"/>
<ant antfile="src/build.xml" inheritRefs="true">
<target name="patch"/>
+ <property name="toConfiguration" value="${servername}"/>
+ </ant>
+
+
+ </target>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>epp-distribution-assembly-zip</id>
+ <!--<description>This profile assembly parts using zip. This is faster than zi, but root folder cannot be renamed.</description>-->
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <properties>
+ <distribution.format>zip</distribution.format>
+
+ <include.default>*.distribution.deploy:*:zip</include.default>
+ <patch.default>patch</patch.default>
+ <include.production>*.distribution.deploy:*:zip</include.production>
+ <patch.production>patch</patch.production>
+ <include.all>*.distribution.deploy:*:zip</include.all>
+ <patch.all>patch</patch.all>
+ </properties>
+ <build>
+ <plugins>
+ <!-- Put to gether all components -->
+ <plugin>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distro-assembly</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <appendAssemblyId>false</appendAssemblyId>
+ <attach>false</attach>
+ <descriptors>
+ <descriptor>src/assemble.xml</descriptor>
+ </descriptors>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <!-- Apply patches and rename folders -->
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.6</version>
+ <executions>
+ <execution>
+ <id>ant-final</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <target>
+ <property name="root.path">${project.build.directory}/${project.build.finalName}</property>
+ <property name="epp.path">${root.path}/${epp.dir}</property>
+ <property name="eap.path">${root.path}/${eap.dir}</property>
+ <property name="epp.zip">${root.path}.zip</property>
+ <property name="tmp.dir">${project.build.directory}/tmp</property>
+
+ <unzip src="${epp.zip}" dest="${project.build.directory}/${project.build.finalName}"/>
+ <delete file="${epp.zip}"/>
+
+ <move file="${eap.path}" toFile="${epp.path}"/>
+ <move file="${epp.path}/gatein-sso-${sso.version}" toFile="${epp.path}/${sso.directory}"/>
+
+ <ant antfile="src/build.xml" inheritRefs="true">
+ <target name="${patch.default}"/>
<property name="toConfiguration" value="default"/>
</ant>
<ant antfile="src/build.xml" inheritRefs="true">
- <target name="patch"/>
+ <target name="${patch.production}"/>
<property name="toConfiguration" value="production"/>
</ant>
<ant antfile="src/build.xml" inheritRefs="true">
- <target name="patch"/>
+ <target name="${patch.all}"/>
<property name="toConfiguration" value="all"/>
</ant>
@@ -146,7 +303,7 @@
</plugins>
</build>
</profile>
-
+
<profile>
<id>epp-distribution-zip</id>
<activation>
Added: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble-single.xml 2011-08-19 16:20:22 UTC (rev 7189)
@@ -0,0 +1,73 @@
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+ <id>bin</id>
+ <formats>
+ <format>${distribution.format}</format>
+ </formats>
+ <includeBaseDirectory>false</includeBaseDirectory>
+
+ <dependencySets>
+
+<!-- START profiles -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution.deploy:*:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}/jboss-as/server/${servername}</outputDirectory>
+ <unpack>true</unpack>
+ <unpackOptions>
+ <excludes>
+ <exclude>**/hibernate-core*</exclude>
+ <exclude>**/jaxb-api*</exclude>
+ <exclude>**/stax-api*</exclude>
+
+ <!-- Exclude cluster -->
+ <!--<exclude>**/hibernate-jbosscache2*</exclude>-->
+ <!--<exclude>**/jbosscache-core*</exclude>-->
+ <!--<exclude>**/jgroups*</exclude>-->
+ </excludes>
+ </unpackOptions>
+ </dependencySet>
+
+<!-- END profiles -->
+
+ <!-- Modules - portletbridge -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution.root:*:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}/${artifact.artifactId}</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- SSO Module - with root dir, renamed later -->
+ <dependencySet>
+ <includes>
+ <include>org.gatein.sso:*:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- Examples -->
+ <dependencySet>
+ <includes>
+ <include>*.distribution:examples:zip</include>
+ </includes>
+ <outputDirectory>${eap.dir}/jboss-as/docs/examples/portal</outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ <!-- EAP -->
+ <dependencySet>
+ <includes>
+ <include>${eap.groupId}:jboss-eap:zip</include>
+ </includes>
+ <outputDirectory></outputDirectory>
+ <unpack>true</unpack>
+ </dependencySet>
+
+ </dependencySets>
+</assembly>
\ No newline at end of file
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml 2011-08-19 16:11:19 UTC (rev 7188)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/assemble.xml 2011-08-19 16:20:22 UTC (rev 7189)
@@ -4,7 +4,7 @@
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
<id>bin</id>
<formats>
- <format>dir</format>
+ <format>${distribution.format}</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
@@ -25,7 +25,7 @@
</excludes>
</unpackOptions>
</dependencySet>
-
+
<dependencySet>
<includes>
<include>*.distribution.deploy:*:zip</include>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml 2011-08-19 16:11:19 UTC (rev 7188)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/src/build.xml 2011-08-19 16:20:22 UTC (rev 7189)
@@ -50,24 +50,31 @@
/>
</target>
-
+
+ <target name="donotpatch">
+ <echo>Not patching ${toConfiguration}</echo>
+ </target>
+
<target name="patchInZip">
<!-- unzip -->
- <unzip src="${epp.zip}" dest="${tmp.dir}">
+ <unzip src="${epp.zip}" dest="${root.path}">
<patternset>
- <include name="jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"/>
- <include name="jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"/>
- <include name="jboss-as/server/${toConfiguration}/deploy/properties-service.xml"/>
- <include name="jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"/>
+ <include name="${eap.dir}/jboss-as/server/${toConfiguration}/conf/jboss-log4j.xml"/>
+ <include name="${eap.dir}/jboss-as/server/${toConfiguration}/deployers/jbossweb.deployer/web.xml"/>
+ <include name="${eap.dir}/jboss-as/server/${toConfiguration}/deploy/properties-service.xml"/>
+ <include name="${eap.dir}/jboss-as/server/${toConfiguration}/deploy/jbossweb.sar/context.xml"/>
+ <include name="${eap.dir}/jboss-as/server/default/deploy/gatein.ear/lib/pc-portlet*"/>
</patternset>
</unzip>
+ <move file="${eap.path}" toFile="${epp.path}"/>
<!-- patch -->
+ <!--<property name="epp.path">${tmp.dir}</property>-->
<antcall inheritRefs="true">
<target name="patch"/>
- <property name="epp.zip" value="${tmp.dir}"/>
</antcall>
<!-- zip -->
- <zip destfile="${epp.zip}" basedir="${tmp.dir}" update="true">
+ <move file="${epp.path}" toFile="${eap.path}"/>
+ <zip destfile="${epp.zip}" basedir="${root.path}" update="true">
</zip>
</target>
</project>
\ No newline at end of file
13 years, 5 months