gatein SVN: r5340 - in exo/portal/branches/3.1.x: web/eXoResources/src/main/webapp/javascript/eXo/gadget and 2 other directories.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-11-29 04:38:54 -0500 (Mon, 29 Nov 2010)
New Revision: 5340
Modified:
exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
Log:
EXOGTN-123 Todo gadgets: type any note into the Todo gadgets, and do refresh the browser, the note cannot be saved....
Modified: exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml
===================================================================
--- exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml 2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/gadgets/eXoGadgets/src/main/webapp/gadgets/Todo/Todo.xml 2010-11-29 09:38:54 UTC (rev 5340)
@@ -175,11 +175,11 @@
if(inputList[i].value != null && inputList[i].value != "") {
var tmp = inputList[i].value;
var numTask = tmp.substring(0, tmp.indexOf('.'));
- var contentTask = tmp.substring(tmp.indexOf('.'), tmp.length);
+ var contentTask = tmp.substring(tmp.indexOf('.') + 1, tmp.length);
if(parseInt(numTask) != parseInt(inputList[i].id)) {
numTask = inputList[i].id;
}
- inputList[i].value = numTask+contentTask;
+ inputList[i].value = numTask + "." + contentTask;
}
}
}
Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/gadget/Gadgets.js 2010-11-29 09:38:54 UTC (rev 5340)
@@ -762,16 +762,26 @@
}
}
this.setUserPrefs(prefs);
- this.refresh();
};
+gadgets.IfrGadget.prototype.setUserPrefs = function(newUserPrefs) {
+ gadgets.IfrGadget.superClass_.setUserPrefs.call(this, newUserPrefs);
+ this.refresh();
+};
+
+gadgets.IfrGadget.prototype.setUserPref = function(name, value) {
+ gadgets.IfrGadget.superClass_.setUserPref.call(this, name, value);
+ this.refresh();
+};
+
gadgets.IfrGadget.prototype.handleCancelUserPrefs = function() {
this.hideUserPrefsDialog();
};
gadgets.IfrGadget.prototype.refresh = function() {
var iframeId = this.getIframeId();
- document.getElementById(iframeId).src = this.getIframeUrl();
+ if (document.getElementById(iframeId))
+ document.getElementById(iframeId).src = this.getIframeUrl();
};
Modified: exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2010-11-29 09:38:54 UTC (rev 5340)
@@ -515,7 +515,7 @@
}
}
}
- if(response.blocksToUpdate == undefined) {
+ if(response.blocksToUpdate == undefined && temp.innerHTML !== "") {
if(confirm(eXo.i18n.I18NMessage.getMessage("SessionTimeout"))) instance.ajaxTimeout(request) ;
}
//Handle the portal responses
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-11-29 09:27:32 UTC (rev 5339)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIGadget.java 2010-11-29 09:38:54 UTC (rev 5340)
@@ -438,6 +438,7 @@
//
try{
uiGadget.addUserPref(event.getRequestContext().getRequestParameter("userPref"));
+ Util.getPortalRequestContext().setResponseComplete(true);
} catch(Exception e){
WebuiRequestContext context = WebuiRequestContext.getCurrentInstance();
UIPortletApplication uiPortlet = uiGadget.getAncestorOfType(UIPortletApplication.class);
14 years
gatein SVN: r5339 - in exo/portal/branches/3.1.x: webui/core/src/main/java/org/exoplatform/webui/application/portlet and 2 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-29 04:27:32 -0500 (Mon, 29 Nov 2010)
New Revision: 5339
Modified:
exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
Log:
EXOGTN-157: Page 's title and portlet 's title are not localizable
Modified: exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl
===================================================================
--- exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-11-29 08:36:33 UTC (rev 5338)
+++ exo/portal/branches/3.1.x/web/portal/src/main/webapp/groovy/portal/webui/application/UIPortlet.gtmpl 2010-11-29 09:27:32 UTC (rev 5339)
@@ -37,14 +37,7 @@
<div class="FixHeight">
<%
if(hasPermission) {
- if(portletTitle == null || portletTitle.trim().length() < 1) {
- try {
- String portletName = uicomponent.getProducedOfferedPortlet().getInfo().getName();
- print _ctx.getRequestContext().getApplicationResourceBundle().getString("UIPortlet.description." + portletName);
- } catch(Exception e){
- print uicomponent.getDisplayName();
- }
- } else print portletTitle;
+ print uicomponent.getDisplayTitle();
} else print "<div class='ProtectedContent'>"+_ctx.appRes("UIPortlet.label.protectedContent")+"</div>";
%>
</div>
@@ -62,12 +55,8 @@
if(portalMode != uiPortalApp.CONTAINER_BLOCK_EDIT_MODE && portalMode != uiPortalApp.APP_BLOCK_EDIT_MODE) {
if(uicomponent.getShowInfoBar()) {
- String title = portletTitle;
+ String title = uicomponent.getDisplayTitle();
if(title == null || title.trim().length() < 1)
- title = uicomponent.getTitle();
- if(title == null || title.trim().length() < 1)
- title = uicomponent.getDisplayName();
- if(title == null || title.trim().length() < 1)
title = portletId;
/*Begin Window Portlet Bar*/
String visibility = "visible";
@@ -292,9 +281,7 @@
String portletIcon = uicomponent.getIcon();
if(portletIcon == null) portletIcon = "PortletIcon";
- String title = portletTitle;
- if(title == null || title.trim().length() < 1)
- title = uicomponent.getDisplayTitle();
+ String title = uicomponent.getDisplayTitle();
if(title.length() > 30) title = title.substring(0,27) + "...";
%>
<div class="PortletIcon $portletIcon"><%=hasPermission ? title : _ctx.appRes("UIPortlet.label.protectedContent")%></div>
Modified: exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java
===================================================================
--- exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java 2010-11-29 08:36:33 UTC (rev 5338)
+++ exo/portal/branches/3.1.x/webui/core/src/main/java/org/exoplatform/webui/application/portlet/PortletApplicationController.java 2010-11-29 09:27:32 UTC (rev 5339)
@@ -107,6 +107,8 @@
{
try
{
+ //Need to localize portlet title via predefined I18n key javax.portlet.title
+ res.setTitle(getTitle(req));
getPortletApplication().render(req, res);
}
catch (Exception ex)
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-11-29 08:36:33 UTC (rev 5338)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestContext.java 2010-11-29 09:27:32 UTC (rev 5339)
@@ -36,6 +36,7 @@
import javax.servlet.http.HttpServletResponse;
import org.exoplatform.Constants;
+import org.exoplatform.commons.utils.ExpressionUtil;
import org.exoplatform.commons.utils.PortalPrinter;
import org.exoplatform.commons.xml.DOMSerializer;
import org.exoplatform.container.ExoContainer;
@@ -218,6 +219,7 @@
if (page != null)
{
title = page.getTitle();
+ return ExpressionUtil.getExpressionValue(this.getApplicationResourceBundle(), title);
}
else
{
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-11-29 08:36:33 UTC (rev 5338)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-11-29 09:27:32 UTC (rev 5339)
@@ -159,6 +159,9 @@
private StateString navigationalState;
+ /** A field storing localized value of javax.portlet.title * */
+ private String configuredTitle;
+
public UIPortlet()
{
// That value will be overriden when it is mapped onto a data storage
@@ -360,16 +363,6 @@
supportedPublicParams_ = supportedPublicRenderParameters;
}
- public String getDisplayTitle()
- {
- String title = getTitle();
- if (title == null)
- {
- title = getDisplayName();
- }
- return title;
- }
-
public String getDisplayName()
{
if (displayName == null)
@@ -912,4 +905,38 @@
{
this.navigationalState = navigationalState;
}
+
+ protected void setConfiguredTitle(String _configuredTitle)
+ {
+ this.configuredTitle = _configuredTitle;
+ }
+
+ /**
+ * Returns the title showed on the InfoBar. The title is computed in following manner.
+ * <p/>
+ * 1. First, the method getTitle(), inherited from UIPortalComponent is called. The getTitle() returns what users set
+ * in the PortletSetting tab, the current method returns call result if it is not null.
+ * <p/>
+ * 2. configuredTitle, which is the localized value of javax.portlet.title is returned if it is not null.
+ * <p/>
+ * 3. If the method does not terminate at neither (1) nor (2), the configured display name is returned.
+ *
+ * @return
+ */
+ public String getDisplayTitle()
+ {
+ String displayedTitle = getTitle();
+ if (displayedTitle != null && displayedTitle.trim().length() > 0)
+ {
+ return displayedTitle;
+ }
+
+ if (configuredTitle != null)
+ {
+ return configuredTitle;
+ }
+
+ return getDisplayName();
+
+ }
}
\ No newline at end of file
Modified: exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java
===================================================================
--- exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java 2010-11-29 08:36:33 UTC (rev 5338)
+++ exo/portal/branches/3.1.x/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortletLifecycle.java 2010-11-29 09:27:32 UTC (rev 5339)
@@ -170,7 +170,6 @@
//
Text markup = null;
- String portletTitle = null;
try
{
@@ -219,8 +218,9 @@
markup = Text.create("");
break;
}
- portletTitle = fragmentResponse.getTitle();
-
+
+ uicomponent.setConfiguredTitle(fragmentResponse.getTitle());
+
// setup portlet properties
if (fragmentResponse.getProperties() != null)
{
@@ -339,7 +339,6 @@
WebuiBindingContext bcontext = new WebuiBindingContext(resolver, context.getWriter(), uicomponent, prcontext);
bcontext.put(UIComponent.UICOMPONENT, uicomponent);
bcontext.put("portletContent", markup);
- bcontext.put("portletTitle", portletTitle);
try
{
renderTemplate(uicomponent.getTemplate(), bcontext);
14 years
gatein SVN: r5338 - in exo/portal/branches/3.1.x/component/portal/src: main/java/org/exoplatform/portal/pom/config and 2 other directories.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2010-11-29 03:36:33 -0500 (Mon, 29 Nov 2010)
New Revision: 5338
Added:
exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/cache/PortalNamesCache.java
Modified:
exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java
exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
Log:
EXOGTN-182 DataStorage getAllPortalNames() cache
Modified: exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java 2010-11-29 07:52:03 UTC (rev 5337)
+++ exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/config/model/PortalConfig.java 2010-11-29 08:36:33 UTC (rev 5338)
@@ -67,6 +67,16 @@
this(PORTAL_TYPE);
}
+ public PortalConfig(String type)
+ {
+ this(type, null);
+ }
+
+ public PortalConfig(String type, String ownerId)
+ {
+ this(type, ownerId, null);
+ }
+
public PortalConfig(String type, String ownerId, String storageId)
{
super(storageId);
@@ -74,16 +84,9 @@
//
this.type = type;
this.name = ownerId;
+ this.portalLayout = new Container();
}
- public PortalConfig(String type)
- {
- this.type = type;
-
- //
- setPortalLayout(new Container());
- }
-
public PortalConfig(PortalData data)
{
super(data.getStorageId());
@@ -99,14 +102,6 @@
this.portalLayout = new Container(data.getPortalLayout());
}
- PortalConfig(String storageId, String type)
- {
- super(storageId);
-
- //
- this.type = type;
- }
-
public String getType()
{
return type;
Modified: exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-11-29 07:52:03 UTC (rev 5337)
+++ exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/POMSessionManager.java 2010-11-29 08:36:33 UTC (rev 5338)
@@ -23,6 +23,7 @@
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.services.cache.CacheService;
import org.exoplatform.services.cache.ExoCache;
import org.exoplatform.services.jcr.RepositoryService;
@@ -69,7 +70,7 @@
this.manager = manager;
this.cache = cacheService.getCacheInstance("MOPSessionManager");
this.pomService = null;
- this.executor = new DataCache(new ExecutorDispatcher());
+ this.executor = new PortalNamesCache(new DataCache(new ExecutorDispatcher()));
}
public void cachePut(Serializable key, Object value)
Added: exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/cache/PortalNamesCache.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/cache/PortalNamesCache.java (rev 0)
+++ exo/portal/branches/3.1.x/component/portal/src/main/java/org/exoplatform/portal/pom/config/cache/PortalNamesCache.java 2010-11-29 08:36:33 UTC (rev 5338)
@@ -0,0 +1,79 @@
+/*
+ * Copyright (C) 2010 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to 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.cache;
+
+import org.exoplatform.commons.utils.LazyPageList;
+import org.exoplatform.commons.utils.ListAccessImpl;
+import org.exoplatform.portal.pom.config.POMSession;
+import org.exoplatform.portal.pom.config.POMTask;
+import org.exoplatform.portal.pom.config.TaskExecutionDecorator;
+import org.exoplatform.portal.pom.config.TaskExecutor;
+import org.exoplatform.portal.pom.config.tasks.PortalConfigTask;
+import org.exoplatform.portal.pom.config.tasks.SearchTask;
+import org.exoplatform.portal.pom.data.PortalKey;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class PortalNamesCache extends TaskExecutionDecorator
+{
+
+ public PortalNamesCache(TaskExecutor next)
+ {
+ super(next);
+ }
+
+ @Override
+ public <V> V execute(POMSession session, POMTask<V> task) throws Exception
+ {
+ if (!session.isModified())
+ {
+ if (task instanceof SearchTask.FindSiteKey)
+ {
+ List<PortalKey> data = (List<PortalKey>)session.getFromCache(SearchTask.FindSiteKey.class);
+ if (data == null)
+ {
+ V result = super.execute(session, task);
+ LazyPageList<PortalKey> list = (LazyPageList<PortalKey>)result;
+ session.putInCache(SearchTask.FindSiteKey.class, Collections.unmodifiableList(new ArrayList<PortalKey>(list.getAll())));
+ return result;
+ }
+ else
+ {
+ return (V)new LazyPageList<PortalKey>(new ListAccessImpl<PortalKey>(PortalKey.class, data), 10);
+ }
+ }
+ else if (task instanceof PortalConfigTask.Save || task instanceof PortalConfigTask.Remove)
+ {
+ V result = super.execute(session, task);
+ session.scheduleForEviction(SearchTask.FindSiteKey.class);
+ return result;
+ }
+ }
+
+ //
+ return super.execute(session, task);
+ }
+}
Modified: exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java
===================================================================
--- exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 07:52:03 UTC (rev 5337)
+++ exo/portal/branches/3.1.x/component/portal/src/test/java/org/exoplatform/portal/config/TestDataStorage.java 2010-11-29 08:36:33 UTC (rev 5338)
@@ -21,6 +21,7 @@
import static org.exoplatform.portal.pom.config.Utils.split;
+import junit.framework.AssertionFailedError;
import org.exoplatform.container.PortalContainer;
import org.exoplatform.portal.application.PortletPreferences;
import org.exoplatform.portal.application.Preference;
@@ -36,6 +37,8 @@
import org.exoplatform.services.listener.ListenerService;
import java.util.*;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.atomic.AtomicReference;
/**
* Created by The eXo Platform SARL Author : Tung Pham thanhtungty(a)gmail.com Nov
@@ -869,6 +872,121 @@
assertEquals("foo", storage_.getId(gadgetApp.getState()));
}
+ public void testGetAllPortalNames() throws Exception
+ {
+ final List<String> names = storage_.getAllPortalNames();
+
+ // Create new portal
+ storage_.create(new PortalConfig("portal", "testGetAllPortalNames"));
+
+ // Test during tx we see the good names
+ List<String> transientNames = storage_.getAllPortalNames();
+ assertTrue(transientNames.containsAll(names));
+ transientNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), transientNames);
+
+ // Test we have not seen anything yet outside of tx
+ final CountDownLatch addSync = new CountDownLatch(1);
+ final AtomicReference<Throwable> error = new AtomicReference<Throwable>();
+ new Thread()
+ {
+ @Override
+ public void run()
+ {
+ begin();
+ try
+ {
+ List<String> isolatedNames = storage_.getAllPortalNames();
+ assertEquals(new HashSet<String>(names), new HashSet<String>(isolatedNames));
+ }
+ catch (Throwable t)
+ {
+ error.set(t);
+ }
+ finally
+ {
+ addSync.countDown();
+ end();
+ }
+ }
+ }.start();
+
+ //
+ addSync.await();
+ if (error.get() != null)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(error.get());
+ throw afe;
+ }
+
+ // Now commit tx
+ session.close(true);
+ end(true);
+
+ // We test we observe the change
+ begin();
+ session = mgr.openSession();
+ List<String> afterNames = storage_.getAllPortalNames();
+ assertTrue(afterNames.containsAll(names));
+ afterNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), afterNames);
+
+ // Then we remove the newly created portal
+ storage_.remove(new PortalConfig("portal", "testGetAllPortalNames"));
+
+ // Test we are syeing the transient change
+ transientNames.clear();
+ transientNames = storage_.getAllPortalNames();
+ assertEquals(names, transientNames);
+
+ // Test we have not seen anything yet outside of tx
+ error.set(null);
+ final CountDownLatch removeSync = new CountDownLatch(1);
+ new Thread()
+ {
+ public void run()
+ {
+ begin();
+ try
+ {
+ List<String> isolatedNames = storage_.getAllPortalNames();
+ assertTrue(isolatedNames.containsAll(names));
+ isolatedNames.removeAll(names);
+ assertEquals(Collections.singletonList("testGetAllPortalNames"), isolatedNames);
+ }
+ catch (Throwable t)
+ {
+ error.set(t);
+ }
+ finally
+ {
+ removeSync.countDown();
+ end();
+ }
+ }
+ }.start();
+
+ //
+ removeSync.await();
+ if (error.get() != null)
+ {
+ AssertionFailedError afe = new AssertionFailedError();
+ afe.initCause(error.get());
+ throw afe;
+ }
+
+ //
+ session.close(true);
+ end(true);
+
+ // Now test it is still removed
+ begin();
+ session = mgr.openSession();
+ afterNames = storage_.getAllPortalNames();
+ assertEquals(new HashSet<String>(names), new HashSet<String>(afterNames));
+ }
+
private Application<Portlet> create(String instanceId)
{
int i0 = instanceId.indexOf("#");
14 years
gatein SVN: r5337 - portal/branches.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-29 02:52:03 -0500 (Mon, 29 Nov 2010)
New Revision: 5337
Removed:
portal/branches/branch-GTNPORTAL-1643/
Log:
GTNPORTAL-1643: Delete the commit branch of Sprint 42
14 years
gatein SVN: r5336 - portal/branches.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2010-11-29 02:49:45 -0500 (Mon, 29 Nov 2010)
New Revision: 5336
Added:
portal/branches/branch-GTNPORTAL-1700/
Log:
GTNPORTAL-1700: Create commit branch for activities in Sprint 43
Copied: portal/branches/branch-GTNPORTAL-1700 (from rev 5335, portal/trunk)
14 years
gatein SVN: r5334 - epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-11-29 02:06:03 -0500 (Mon, 29 Nov 2010)
New Revision: 5334
Modified:
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml
Log:
Incremented Rev History and Book Info
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml 2010-11-29 07:04:56 UTC (rev 5333)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml 2010-11-29 07:06:03 UTC (rev 5334)
@@ -11,7 +11,7 @@
<productname>JBoss Enterprise Portal Platform</productname>
<productnumber>5</productnumber>
<edition>1</edition>
- <pubsnumber>2.2</pubsnumber>
+ <pubsnumber>2.3</pubsnumber>
<abstract>
<para>
This book provides information about obtaining, installing and running &PRODUCT;. It forms part of the complete document suite along with the &PRODUCT; User Guide and the &PRODUCT; Reference Guide available at <ulink type="http" url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Portal_Platform/index...." />.
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml 2010-11-29 07:04:56 UTC (rev 5333)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml 2010-11-29 07:06:03 UTC (rev 5334)
@@ -9,7 +9,7 @@
<simpara>
<revhistory>
<revision>
- <revnumber>1-2.2</revnumber>
+ <revnumber>1-2.3</revnumber>
<date>Mon Nov 29 2010</date>
<author>
<firstname>Scott</firstname>
@@ -18,7 +18,7 @@
</author>
<revdescription>
<simplelist>
- <member>Added "Gadget Proxy Configuration" section</member>
+ <member>Added "Gadget Proxy Configuration" section.</member>
</simplelist>
</revdescription>
</revision>
14 years
gatein SVN: r5333 - epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-11-29 02:04:56 -0500 (Mon, 29 Nov 2010)
New Revision: 5333
Modified:
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Getting_Started.xml
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Installation.xml
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml
Log:
JBEPP-652: Add Note to Pre-Install section re 'fresh' installation
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml 2010-11-29 06:49:29 UTC (rev 5332)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Book_Info.xml 2010-11-29 07:04:56 UTC (rev 5333)
@@ -11,7 +11,7 @@
<productname>JBoss Enterprise Portal Platform</productname>
<productnumber>5</productnumber>
<edition>1</edition>
- <pubsnumber>2.1</pubsnumber>
+ <pubsnumber>2.2</pubsnumber>
<abstract>
<para>
This book provides information about obtaining, installing and running &PRODUCT;. It forms part of the complete document suite along with the &PRODUCT; User Guide and the &PRODUCT; Reference Guide available at <ulink type="http" url="http://docs.redhat.com/docs/en-US/JBoss_Enterprise_Portal_Platform/index...." />.
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Getting_Started.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Getting_Started.xml 2010-11-29 06:49:29 UTC (rev 5332)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Getting_Started.xml 2010-11-29 07:04:56 UTC (rev 5333)
@@ -6,6 +6,17 @@
<chapter id="Getting_Started">
<title>Getting Started</title>
+
+ <section id="sect-Installation_Guide-Getting_Started-Upgrading_Previous_Installations">
+ <title>Upgrading Previous Installations</title>
+ <para>
+ Unfortunately existing &PRODUCT; 5.0 or 5.0.1 installations cannot be upgraded in order to deploy &PRODUCT; &VERSION_MICRO;.
+ </para>
+ <para>
+ If you have an existing installation of &PRODUCT; 5.0 or 5.0.1 (including installations that include the technical preview release of the &PRODUCT; extension) you must either replace this installation or deploy a new instance of &PRODUCT;.
+ </para>
+ </section>
+
<section id="Getting_Started-Pre_Requisites">
<title>Pre-Requisites</title>
<para>
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Installation.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Installation.xml 2010-11-29 06:49:29 UTC (rev 5332)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Installation.xml 2010-11-29 07:04:56 UTC (rev 5333)
@@ -14,7 +14,7 @@
The officially supported versions are available from the JBoss Customer Support Portal (CSP) located at <ulink url="https://support.redhat.com/jbossnetwork/restricted/main.html">https://support.redhat.com/jbossnetwork/restricted/main.html</ulink>. Platforms including in your Support subscription are listed in the <literal>Software</literal> section.
</para>
</section>
-
+
<section id="Installing">
<title>Installing</title>
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml 2010-11-29 06:49:29 UTC (rev 5332)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml 2010-11-29 07:04:56 UTC (rev 5333)
@@ -10,7 +10,7 @@
<revhistory>
<revision>
<revnumber>1-2.2</revnumber>
- <date></date>
+ <date>Mon Nov 29 2010</date>
<author>
<firstname>Scott</firstname>
<surname>Mumford</surname>
14 years
gatein SVN: r5332 - exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2010-11-29 01:49:29 -0500 (Mon, 29 Nov 2010)
New Revision: 5332
Modified:
exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
Log:
EXOGTN-90 Reapply because EXOGTN-143 reverted my last commit
Modified: exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java
===================================================================
--- exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-29 06:30:05 UTC (rev 5331)
+++ exo/portal/branches/3.1.x/webui/eXo/src/main/java/org/exoplatform/webui/organization/account/UIUserSelector.java 2010-11-29 06:49:29 UTC (rev 5332)
@@ -412,7 +412,9 @@
uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectGroupForm.getApplicationComponent(OrganizationService.class);
PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ users.setPageSize(10);
uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
@@ -423,17 +425,23 @@
{
UIUserSelector uiSelectUserForm = event.getSource();
String groupId = uiSelectUserForm.getSelectedGroup();
- uiSelectUserForm.setSelectedGroup(groupId);
OrganizationService service = uiSelectUserForm.getApplicationComponent(OrganizationService.class);
+
+ PageList users = PageList.EMPTY_LIST;
if (groupId != null && groupId.trim().length() != 0)
{
- PageList users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
- uiSelectUserForm.uiIterator_.setPageList(users);
+ if (service.getGroupHandler().findGroupById(groupId) != null)
+ {
+ users = uiSelectUserForm.removeDuplicate(service.getUserHandler().findUsersByGroup(groupId));
+ }
}
else
{
- uiSelectUserForm.uiIterator_.setPageList(service.getUserHandler().findUsers(new Query()));
+ users = service.getUserHandler().findUsers(new Query());
}
+ users.setPageSize(10);
+ uiSelectUserForm.uiIterator_.setPageList(users);
+ uiSelectUserForm.setKeyword(null);
event.getRequestContext().addUIComponentToUpdateByAjax(uiSelectUserForm);
}
}
14 years
gatein SVN: r5331 - epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US.
by do-not-reply@jboss.org
Author: smumford
Date: 2010-11-29 01:30:05 -0500 (Mon, 29 Nov 2010)
New Revision: 5331
Added:
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/GadgetProxyConfig.xml
Modified:
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Configuration.xml
epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml
Log:
JBEPP-673: Added Gadget Proxy Configuration section
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Configuration.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Configuration.xml 2010-11-29 05:56:27 UTC (rev 5330)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Configuration.xml 2010-11-29 06:30:05 UTC (rev 5331)
@@ -10,6 +10,6 @@
<xi:include href="EMailServiceConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="ClusteringConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
<xi:include href="HTTPSConfiguration.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
-
+ <xi:include href="GadgetProxyConfig.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</chapter>
Added: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/GadgetProxyConfig.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/GadgetProxyConfig.xml (rev 0)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/GadgetProxyConfig.xml 2010-11-29 06:30:05 UTC (rev 5331)
@@ -0,0 +1,82 @@
+<?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 "Installation_Guide.ent">
+%BOOK_ENTITIES;
+]>
+
+<section>
+ <title>Gadget Proxy Configuration</title>
+ <section>
+ <title>Overview</title>
+ <para>
+ Gadget consumption requires a local anonymous proxy to route access to elements used by the gadgets.
+ </para>
+ <para>
+ This must be done to work around web-browser security mechanisms.
+ </para>
+ </section>
+
+ <section>
+ <title>Setup the Filter</title>
+ <para>
+ The anonymous proxy can be setup to accept or refuse certain hosts.
+ </para>
+ <para>
+ By default, the proxy is closed to any host except the domain on which the gadget server is installed.
+ </para>
+ <para>
+ To modify the filtering of domain names, modify: <filename><replaceable>JBOSS_HOME</replaceable>/server/<replaceable><PROFILE></replaceable>/deploy/gatein.ear/02portal.war/WEB-INF/conf/common/common-configuration.xml</filename>
+ </para>
+<example>
+<title>common-configuration.xml</title>
+<programlisting language="XML" role="XML"><![CDATA[<component>
+ <key>org.exoplatform.web.security.proxy.ProxyFilterService</key>
+ <type>org.exoplatform.web.security.proxy.ProxyFilterService</type>
+ <init-params>
+ <values-param>
+ <!-- The white list -->
+ <name>white-list</name>
+ <value></value>
+ </values-param>
+ <values-param>
+ <name>black-list</name>
+ <value></value>
+ </values-param>
+ </init-params>
+ </component> ]]>
+</programlisting>
+</example>
+ <para>
+ The proxy will deny access to a resource that is on the blacklist. If the domain name does not match any of the blacklist, the proxy filter will verify if the domain name is on the white list.
+ </para>
+ <para>
+ If the domain name is not defined in either the white list or black list, access will be denied.
+ </para>
+ <para>
+ Multiple values can be added for each list and wildcards can also be used.
+ </para>
+ <para>
+ Below is an example of a valid configuration:
+ </para>
+<example>
+<title>Valid Proxy Configuration</title>
+<programlisting language="XML" role="XML"><![CDATA[<component>
+ <key>org.exoplatform.web.security.proxy.ProxyFilterService</key>
+ <type>org.exoplatform.web.security.proxy.ProxyFilterService</type>
+ <init-params>
+ <values-param>
+ <!-- The white list -->
+ <name>white-list</name>
+ <value>*.example.com</value>
+ <value>www.example.net</value>
+ </values-param>
+ <values-param>
+ <name>black-list</name>
+ <value>evil.example.com</value>
+ </values-param>
+ </init-params>
+ </component> ]]>
+</programlisting>
+</example>
+ </section>
+</section>
\ No newline at end of file
Modified: epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml
===================================================================
--- epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml 2010-11-29 05:56:27 UTC (rev 5330)
+++ epp/docs/branches/EPP_5_1_Branch/Installation_Guide/en-US/Revision_History.xml 2010-11-29 06:30:05 UTC (rev 5331)
@@ -8,6 +8,20 @@
<title>Revision History</title>
<simpara>
<revhistory>
+ <revision>
+ <revnumber>1-2.2</revnumber>
+ <date></date>
+ <author>
+ <firstname>Scott</firstname>
+ <surname>Mumford</surname>
+ <email>smumford(a)redhat.com</email>
+ </author>
+ <revdescription>
+ <simplelist>
+ <member>Added "Gadget Proxy Configuration" section</member>
+ </simplelist>
+ </revdescription>
+ </revision>
<revision>
<revnumber>1-2.1</revnumber>
<date>Mon Nov 22 2010</date>
14 years