gatein SVN: r7434 - in portal/branches/xss: web/eXoResources/src/main/webapp/WEB-INF and 2 other directories.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-15 01:05:37 -0400 (Thu, 15 Sep 2011)
New Revision: 7434
Modified:
portal/branches/xss/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
portal/branches/xss/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/core/HTMLUtil.js
portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
Log:
GTNPORTAL-2068 XSS in RSS reader gadget popups many strange alerts after trying to pass XSS string
Modified: portal/branches/xss/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js
===================================================================
--- portal/branches/xss/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2011-09-15 03:47:43 UTC (rev 7433)
+++ portal/branches/xss/gadgets/eXoGadgets/src/main/webapp/gadgets/rssAggregator/script.js 2011-09-15 05:05:37 UTC (rev 7434)
@@ -85,7 +85,7 @@
RssAggregator.prototype.renderFeed = function(feedObj) {
if(feedObj.rc != 200 && feedObj.data == undefined) {
- document.write("the url: " + feedurl + " is down or invalid");
+ document.write("the url: " + gadgets.util.escapeString(feedurl) + " is down or invalid");
return;
}
this.feed = feedObj.data;
@@ -140,7 +140,7 @@
}
}
} else {
- document.write("No feed found at " + feedurl);
+ document.write("No feed found at " + gadgets.util.escapeString(feedurl));
}
gadgets.window.adjustHeight();
}
Modified: portal/branches/xss/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml
===================================================================
--- portal/branches/xss/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2011-09-15 03:47:43 UTC (rev 7433)
+++ portal/branches/xss/web/eXoResources/src/main/webapp/WEB-INF/gatein-resources.xml 2011-09-15 05:05:37 UTC (rev 7434)
@@ -132,6 +132,16 @@
<js-path>/javascript/eXo/core/DOMUtil.js</js-path>
<js-priority>1</js-priority>
</param>
+ <param>
+ <js-module>eXo.core.HTMLUtil</js-module>
+ <js-path>/javascript/eXo/core/HTMLUtil.js</js-path>
+ <js-priority>2</js-priority>
+ </param>
+ <param>
+ <js-module>eXo.core.html.HTMLEntities</js-module>
+ <js-path>/javascript/eXo/core/html/HTMLEntities.js</js-path>
+ <js-priority>1</js-priority>
+ </param>
<param>
<js-module>eXo.core.Browser</js-module>
<js-path>/javascript/eXo/core/Browser.js</js-path>
Modified: portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/core/HTMLUtil.js
===================================================================
--- portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/core/HTMLUtil.js 2011-09-15 03:47:43 UTC (rev 7433)
+++ portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/core/HTMLUtil.js 2011-09-15 05:05:37 UTC (rev 7434)
@@ -21,7 +21,7 @@
* @author Nguyen Ba Uoc
*/
// 4test
-if (eXo.require) eXo.require('eXo.core.html.HTMLEntities');
+//if (eXo.require) eXo.require('eXo.core.html.HTMLEntities');
function HTMLUtil() {
this.entities = eXo.core.html.HTMLEntities ;
Modified: portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js
===================================================================
--- portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-09-15 03:47:43 UTC (rev 7433)
+++ portal/branches/xss/web/eXoResources/src/main/webapp/javascript/eXo/portal/PortalHttpRequest.js 2011-09-15 05:05:37 UTC (rev 7434)
@@ -61,6 +61,7 @@
* which is itself placed inside an array to provide an OO view of the
* AJAX response
*/
+
function PortletResponse(responseDiv) {
var DOMUtil = eXo.core.DOMUtil ;
var div = eXo.core.DOMUtil.getChildrenByTagName(responseDiv, "div") ;
@@ -125,7 +126,7 @@
this.blocksToUpdate[j] = obj ;
/*
- * handle embeded javascripts to dynamically add them to the page head
+ * handle embedded javascripts to dynamically add them to the page head
*
* This is needed when we refresh an entire portal page that contains some
* standard JSR 168 / 286 portlets with embeded <script> tag
@@ -406,6 +407,8 @@
instance.executeScript = function(script) {
if(script == null || script == "") return ;
try {
+ var HTMLUtil = eXo.core.HTMLUtil;
+ script = HTMLUtil.entitiesDecode(script);
eval(script) ;
return;
} catch(err) {
@@ -421,7 +424,7 @@
}
}
} ;
-
+
instance.updateHtmlHead = function(response) {
if (!response) return;
cleanHtmlHead(response);
13 years, 3 months
gatein SVN: r7433 - in portal/trunk: component/web/server/src/main/java/org/exoplatform/web/handler and 5 other directories.
by do-not-reply@jboss.org
Author: hoang_to
Date: 2011-09-14 23:47:43 -0400 (Wed, 14 Sep 2011)
New Revision: 7433
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java
portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java
portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml
portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml
portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/controller.xml
portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/controller.xml
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java
Log:
GTNPORTAL-2099: WebRequestHandler could relay request handling work to another requesthandler
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -35,14 +35,13 @@
import org.exoplatform.management.rest.annotations.RESTEndpoint;
import org.exoplatform.web.application.Application;
import org.exoplatform.web.controller.QualifiedName;
+import org.exoplatform.web.controller.metadata.ControllerDescriptor;
import org.exoplatform.web.controller.metadata.DescriptorBuilder;
-import org.exoplatform.web.controller.metadata.ControllerDescriptor;
+import org.exoplatform.web.controller.router.Router;
import org.exoplatform.web.controller.router.RouterConfigException;
-import org.exoplatform.web.controller.router.Router;
import org.gatein.common.http.QueryStringParser;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
-
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -56,7 +55,6 @@
import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicReference;
-
import javax.servlet.ServletConfig;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -320,51 +318,57 @@
Iterator<Map<QualifiedName, String>> matcher = router.matcher(portalPath, req.getParameterMap());
//
- Map<QualifiedName, String> parameters = null;
- if (matcher.hasNext())
- {
- parameters = matcher.next();
- }
+ boolean started = false;
+ boolean processed = false;
//
- if (parameters != null)
+ try
{
- String handlerKey = parameters.get(HANDLER_PARAM);
- if (handlerKey != null)
+ while (matcher.hasNext() && !processed)
{
- WebRequestHandler handler = handlers.get(handlerKey);
- if (handler != null)
+ if (!started)
{
- if (debug)
- {
- log.debug("Serving request path=" + portalPath + ", parameters=" + parameters + " with handler " + handler);
- }
-
- //
RequestLifeCycle.begin(ExoContainerContext.getCurrentContainer());
+ started = true;
+ }
- //
- try
+ //
+ Map<QualifiedName, String> parameters = matcher.next();
+ String handlerKey = parameters.get(HANDLER_PARAM);
+ if (handlerKey != null)
+ {
+ WebRequestHandler handler = handlers.get(handlerKey);
+ if (handler != null)
{
- handler.execute(new ControllerContext(this, router, req, res, parameters));
+ if (debug)
+ {
+ log.debug("Serving request path=" + portalPath + ", parameters=" + parameters + " with handler " + handler);
+ }
+
+ //
+ processed = handler.execute(new ControllerContext(this, router, req, res, parameters));
}
- finally
+ else
{
- RequestLifeCycle.end();
+ log.debug("No handler " + handlerKey + " for request path=" + portalPath + ", parameters=" + parameters);
}
}
- else
- {
- log.error("Invalid handler " + handlerKey + " for request path=" + portalPath + ", parameters=" + parameters);
- res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
- }
}
}
- else
+ finally
{
- log.error("Could not associate the request path=" + portalPath + ", parameters=" + parameters + " with an handler");
- res.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
+ if (started)
+ {
+ RequestLifeCycle.end();
+ }
}
+
+ //
+ if (!processed)
+ {
+ log.error("Could not associate the request path=" + portalPath + " with an handler");
+ res.sendError(HttpServletResponse.SC_NOT_FOUND);
+ }
}
else
{
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebRequestHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -20,10 +20,6 @@
package org.exoplatform.web;
import org.exoplatform.container.component.BaseComponentPlugin;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.util.Map;
import javax.servlet.ServletConfig;
/**
@@ -55,8 +51,9 @@
*
* @param context the controller context
* @throws Exception any exception
+ * @return true if the handler was able to handle the request
*/
- abstract public void execute(ControllerContext context) throws Exception;
+ abstract public boolean execute(ControllerContext context) throws Exception;
/**
* Destroy callback.
Modified: portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java
===================================================================
--- portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/DownloadHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -49,9 +49,10 @@
}
@Override
- public void execute(ControllerContext context) throws Exception
+ public boolean execute(ControllerContext context) throws Exception
{
execute(context.getController(), context.getRequest(), context.getResponse());
+ return true;
}
public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
Modified: portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java
===================================================================
--- portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/component/web/server/src/main/java/org/exoplatform/web/handler/UploadHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -53,9 +53,10 @@
}
@Override
- public void execute(ControllerContext context) throws Exception
+ public boolean execute(ControllerContext context) throws Exception
{
execute(context.getController(), context.getRequest(), context.getResponse());
+ return true;
}
public void execute(WebAppController controller, HttpServletRequest req, HttpServletResponse res) throws Exception
Modified: portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml
===================================================================
--- portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/packaging/jboss-as5/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml 2011-09-15 03:47:43 UTC (rev 7433)
@@ -67,15 +67,6 @@
</route>
</route>
- <route path="/{gtn:path}">
- <route-param qname="gtn:handler">
- <value>staticResource</value>
- </route-param>
- <path-param qname="gtn:path" encoding="preserve-path">
- <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
- </path-param>
- </route>
-
<route path="/">
<!-- The portal handler -->
@@ -129,6 +120,15 @@
</route>
+ <route path="/{gtn:path}">
+ <route-param qname="gtn:handler">
+ <value>staticResource</value>
+ </route-param>
+ <path-param qname="gtn:path" encoding="preserve-path">
+ <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
+ </path-param>
+ </route>
+
<!-- Default handler -->
<route path="/">
<route-param qname="gtn:handler">
Modified: portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml
===================================================================
--- portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/packaging/jboss-as6/pkg/src/main/resources/jboss/server/default/conf/gatein/controller.xml 2011-09-15 03:47:43 UTC (rev 7433)
@@ -67,15 +67,6 @@
</route>
</route>
- <route path="/{gtn:path}">
- <route-param qname="gtn:handler">
- <value>staticResource</value>
- </route-param>
- <path-param qname="gtn:path" encoding="preserve-path">
- <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
- </path-param>
- </route>
-
<route path="/">
<!-- The portal handler -->
@@ -129,6 +120,15 @@
</route>
+ <route path="/{gtn:path}">
+ <route-param qname="gtn:handler">
+ <value>staticResource</value>
+ </route-param>
+ <path-param qname="gtn:path" encoding="preserve-path">
+ <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
+ </path-param>
+ </route>
+
<!-- Default handler -->
<route path="/">
<route-param qname="gtn:handler">
Modified: portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/controller.xml
===================================================================
--- portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/controller.xml 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/packaging/jetty/pkg/src/main/resources/jetty/gatein/conf/controller.xml 2011-09-15 03:47:43 UTC (rev 7433)
@@ -67,15 +67,6 @@
</route>
</route>
- <route path="/{gtn:path}">
- <route-param qname="gtn:handler">
- <value>staticResource</value>
- </route-param>
- <path-param qname="gtn:path" encoding="preserve-path">
- <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
- </path-param>
- </route>
-
<route path="/">
<!-- The portal handler -->
@@ -129,6 +120,15 @@
</route>
+ <route path="/{gtn:path}">
+ <route-param qname="gtn:handler">
+ <value>staticResource</value>
+ </route-param>
+ <path-param qname="gtn:path" encoding="preserve-path">
+ <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
+ </path-param>
+ </route>
+
<!-- Default handler -->
<route path="/">
<route-param qname="gtn:handler">
Modified: portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/controller.xml
===================================================================
--- portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/controller.xml 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/packaging/tomcat/pkg/src/main/resources/tomcat/gatein/conf/controller.xml 2011-09-15 03:47:43 UTC (rev 7433)
@@ -67,15 +67,6 @@
</route>
</route>
- <route path="/{gtn:path}">
- <route-param qname="gtn:handler">
- <value>staticResource</value>
- </route-param>
- <path-param qname="gtn:path" encoding="preserve-path">
- <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
- </path-param>
- </route>
-
<route path="/">
<!-- The portal handler -->
@@ -129,6 +120,15 @@
</route>
+ <route path="/{gtn:path}">
+ <route-param qname="gtn:handler">
+ <value>staticResource</value>
+ </route-param>
+ <path-param qname="gtn:path" encoding="preserve-path">
+ <pattern>.*\.(jpg|png|gif|ico|css)</pattern>
+ </path-param>
+ </route>
+
<!-- Default handler -->
<route path="/">
<route-param qname="gtn:handler">
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/DefaultRequestHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -56,7 +56,7 @@
}
@Override
- public void execute(ControllerContext context) throws Exception
+ public boolean execute(ControllerContext context) throws Exception
{
String defaultPortal = configService.getDefaultPortal();
PortalURLContext urlContext = new PortalURLContext(context, SiteKey.portal(defaultPortal));
@@ -64,5 +64,6 @@
String s = url.setResource(new NavigationResource(SiteType.PORTAL, defaultPortal, "")).toString();
HttpServletResponse resp = context.getResponse();
resp.sendRedirect(resp.encodeRedirectURL(s));
+ return true;
}
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/LegacyRequestHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -84,7 +84,7 @@
}
@Override
- public void execute(ControllerContext context) throws Exception
+ public boolean execute(ControllerContext context) throws Exception
{
String requestSiteName = context.getParameter(PortalRequestHandler.REQUEST_SITE_NAME);
String requestPath = context.getParameter(PortalRequestHandler.REQUEST_PATH);
@@ -129,5 +129,6 @@
HttpServletResponse resp = context.getResponse();
resp.sendRedirect(resp.encodeRedirectURL(s));
+ return true;
}
}
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalRequestHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -28,7 +28,6 @@
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.web.ControllerContext;
-import org.exoplatform.web.WebAppController;
import org.exoplatform.web.WebRequestHandler;
import org.exoplatform.web.application.ApplicationLifecycle;
import org.exoplatform.web.application.ApplicationRequestPhaseLifecycle;
@@ -37,10 +36,8 @@
import org.exoplatform.web.controller.QualifiedName;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.core.UIApplication;
-
import java.util.List;
import java.util.Locale;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -98,7 +95,7 @@
*/
@SuppressWarnings("unchecked")
@Override
- public void execute(ControllerContext controllerContext) throws Exception
+ public boolean execute(ControllerContext controllerContext) throws Exception
{
HttpServletRequest req = controllerContext.getRequest();
HttpServletResponse res = controllerContext.getResponse();
@@ -126,7 +123,7 @@
if (requestSiteName == null) {
res.sendRedirect(req.getContextPath());
- return;
+ return true;
}
PortalApplication app = controllerContext.getController().getApplication(PortalApplication.PORTAL_APPLICATION_ID);
@@ -137,7 +134,7 @@
PortalConfig persistentPortalConfig = storage.getPortalConfig(requestSiteType, requestSiteName);
if (persistentPortalConfig == null)
{
- context.sendError(HttpServletResponse.SC_NOT_FOUND);
+ return false;
}
else if(req.getRemoteUser() == null)
{
@@ -152,6 +149,7 @@
{
processRequest(context, app);
}
+ return true;
}
@SuppressWarnings("unchecked")
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java 2011-09-15 03:39:16 UTC (rev 7432)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/StaticResourceRequestHandler.java 2011-09-15 03:47:43 UTC (rev 7433)
@@ -39,7 +39,7 @@
}
@Override
- public void execute(ControllerContext context) throws Exception
+ public boolean execute(ControllerContext context) throws Exception
{
PortalContainer portalContainer = PortalContainer.getInstance();
ServletContext mergedContext = portalContainer.getPortalContext();
@@ -47,5 +47,6 @@
HttpServletRequest req = context.getRequest();
HttpServletResponse res = context.getResponse();
mergedContext.getNamedDispatcher("default").forward(req, res);
+ return true;
}
}
13 years, 3 months
gatein SVN: r7432 - portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget.
by do-not-reply@jboss.org
Author: kien_nguyen
Date: 2011-09-14 23:39:16 -0400 (Wed, 14 Sep 2011)
New Revision: 7432
Modified:
portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
Log:
GTNPORTAL-819 Make sure pubsub is working between gadget
Modified: portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js
===================================================================
--- portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2011-09-15 00:00:54 UTC (rev 7431)
+++ portal/trunk/web/eXoResources/src/main/webapp/javascript/eXo/gadget/UIGadget.js 2011-09-15 03:39:16 UTC (rev 7432)
@@ -35,7 +35,7 @@
eXo.gadgets = window.gadgets;
//window.gadgets = eXo.gadget.Gadgets;
if (!eXo.gadgets || !eXo.gadgets.rpc) {
- eXo.core.Loader.register('rpc', '1.0.0',true, 0, hostName + '/js/rpc.js?c=1');
+ eXo.core.Loader.register('rpc', '1.0.0',true, 0, hostName + '/js/pubsub.js?c=1');
eXo.core.Loader.register('eXo.gadgets.Gadgets', '/eXoResources/javascript/eXo/gadget/Gadgets.js');
eXo.core.Loader.register('eXo.gadgets.ExoBasedUserPrefStore', '/eXoResources/javascript/eXo/gadget/ExoBasedUserPrefStore.js');
}
@@ -82,8 +82,9 @@
}
else uiGadget.style.width = "auto";
eXo.gadget.UIGadget.init(uiGadget, isDesktop, gadget.metadata);
- }
-
+ }
+ //setup for pubsub mechanism
+ gadgets.pubsubrouter.init(function(id){return url;}, {});
},
/**
* Initialize data of gadget such as title, style, etc
13 years, 3 months
gatein SVN: r7431 - epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-14 20:00:54 -0400 (Wed, 14 Sep 2011)
New Revision: 7431
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
Log:
JBEPP-1108: merge in patch from GTNPORTAL-2101 to fix NPE issue
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2011-09-14 23:54:33 UTC (rev 7430)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2011-09-15 00:00:54 UTC (rev 7431)
@@ -300,7 +300,11 @@
uiNavigationPopup.setRendered(true);
event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigationPopup.getParent());
- selector.getUserNodeLabels().put(uiPageNodeForm.getPageNode().getId(), uiPageNodeForm.getPageNode().getI18nizedLabels());
+ TreeNode pageNode = uiPageNodeForm.getPageNode();
+ if (pageNode != null)
+ {
+ selector.getUserNodeLabels().put(pageNode.getId(), pageNode.getI18nizedLabels());
+ }
selector.createEvent("NodeModified", Phase.PROCESS, event.getRequestContext()).broadcast();
}
13 years, 3 months
gatein SVN: r7430 - portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-14 19:54:33 -0400 (Wed, 14 Sep 2011)
New Revision: 7430
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
Log:
GTNPORTAL-2101: fix NPE when clicking the back button when creating a new navigation node.
Modified: portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java
===================================================================
--- portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2011-09-14 19:44:51 UTC (rev 7429)
+++ portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/navigation/webui/component/UIGroupNavigationManagement.java 2011-09-14 23:54:33 UTC (rev 7430)
@@ -300,7 +300,11 @@
uiNavigationPopup.setRendered(true);
event.getRequestContext().addUIComponentToUpdateByAjax(uiNavigationPopup.getParent());
- selector.getUserNodeLabels().put(uiPageNodeForm.getPageNode().getId(), uiPageNodeForm.getPageNode().getI18nizedLabels());
+ TreeNode pageNode = uiPageNodeForm.getPageNode();
+ if (pageNode != null)
+ {
+ selector.getUserNodeLabels().put(pageNode.getId(), pageNode.getI18nizedLabels());
+ }
selector.createEvent("NodeModified", Phase.PROCESS, event.getRequestContext()).broadcast();
}
13 years, 3 months
gatein SVN: r7429 - in components/pc/trunk/federation/src: main/java/org/gatein/pc/federation/impl and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-14 15:44:51 -0400 (Wed, 14 Sep 2011)
New Revision: 7429
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
Log:
- Renamed setter.
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2011-09-14 19:39:58 UTC (rev 7428)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2011-09-14 19:44:51 UTC (rev 7429)
@@ -50,7 +50,7 @@
/**
* Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to the {@link
- * PortletInvokerResolver} specified using {@link #setNullInvokerHandler(PortletInvokerResolver)} if it's not
+ * PortletInvokerResolver} specified using {@link #setPortletInvokerResolver(PortletInvokerResolver)} if it's not
* initially
* resolved or returns <code>null</code> if a FederatedPortletInvoker is not found after going through the specified
* NullInvokerHandler resolution mechanism.
@@ -118,5 +118,5 @@
*
* @param portletResolver
*/
- void setNullInvokerHandler(PortletInvokerResolver portletResolver);
+ void setPortletInvokerResolver(PortletInvokerResolver portletResolver);
}
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-14 19:39:58 UTC (rev 7428)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-14 19:44:51 UTC (rev 7429)
@@ -305,7 +305,7 @@
return federated.importPortlet(stateType, compoundPortletContext);
}
- public synchronized void setNullInvokerHandler(PortletInvokerResolver portletResolver)
+ public synchronized void setPortletInvokerResolver(PortletInvokerResolver portletResolver)
{
if (portletResolver == null)
{
Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-09-14 19:39:58 UTC (rev 7428)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-09-14 19:44:51 UTC (rev 7429)
@@ -208,7 +208,7 @@
final String federatedId = "inexistent";
assertNull(federatingInvoker.getFederatedInvoker(federatedId));
- federatingInvoker.setNullInvokerHandler(new PortletInvokerResolver()
+ federatingInvoker.setPortletInvokerResolver(new PortletInvokerResolver()
{
public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
{
13 years, 3 months
gatein SVN: r7428 - in components/pc/trunk/federation/src: main/java/org/gatein/pc/federation/impl and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-14 15:39:58 -0400 (Wed, 14 Sep 2011)
New Revision: 7428
Added:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/PortletInvokerResolver.java
Removed:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
Log:
- Renamed NullInvokerHandler to PortletInvokerResolver since it's more explicit that way.
- Improved documentation.
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2011-09-14 19:23:49 UTC (rev 7427)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/FederatingPortletInvoker.java 2011-09-14 19:39:58 UTC (rev 7428)
@@ -50,7 +50,8 @@
/**
* Returns the registered FederatedPortletInvoker associated with the specified identifier, delegating to the {@link
- * NullInvokerHandler} specified using {@link #setNullInvokerHandler(NullInvokerHandler)} if it's not initially
+ * PortletInvokerResolver} specified using {@link #setNullInvokerHandler(PortletInvokerResolver)} if it's not
+ * initially
* resolved or returns <code>null</code> if a FederatedPortletInvoker is not found after going through the specified
* NullInvokerHandler resolution mechanism.
*
@@ -115,7 +116,7 @@
* Specifies which NullInvokerHandler to use to attempt retrieval of a federated invoker when default resolution
* mechanism cannot find an associated invoker.
*
- * @param nullHandler
+ * @param portletResolver
*/
- void setNullInvokerHandler(NullInvokerHandler nullHandler);
+ void setNullInvokerHandler(PortletInvokerResolver portletResolver);
}
Deleted: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java 2011-09-14 19:23:49 UTC (rev 7427)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java 2011-09-14 19:39:58 UTC (rev 7428)
@@ -1,89 +0,0 @@
-/*
- * JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
- * contributors as indicated by the @authors tag. See the
- * copyright.txt in the distribution for a full listing of
- * individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.gatein.pc.federation;
-
-import org.gatein.pc.api.NoSuchPortletException;
-
-import java.util.Collection;
-import java.util.Collections;
-
-/**
- * Encapsulates behavior to resolve FederatedPortletInvokers in the context of a FederatingPortletInvoker when the
- * default resolution mechanism fails to retrieve an associated FederatedPortletInvoker.
- *
- * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
- * @version $Revision$
- */
-public interface NullInvokerHandler
-{
- /**
- * Default handling mechanism: if we haven't found an invoker for the portlet id in the first place, throw
- * NoSuchPortletException.
- */
- NullInvokerHandler DEFAULT_HANDLER = new NullInvokerHandler()
- {
- public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
- {
- if (compoundPortletId != null)
- {
- throw new NoSuchPortletException(compoundPortletId);
- }
- else
- {
- return null;
- }
- }
-
- public boolean knows(String invokerId)
- {
- return false;
- }
-
- public Collection<String> getKnownInvokerIds()
- {
- return Collections.emptyList();
- }
- };
-
- /**
- * Attempts to resolve a FederatedPortletInvoker with the specified identifier in the context of the specified
- * calling FederatingPortletInvoker, optionally trying to perform resolution to invoke an action on the specified
- * portlet identifier.
- *
- * @param invokerId the identifier of the FederatedPortletInvoker to be retrieved. Should match the optional
- * compound portlet identifier if one is specified.
- * @param callingInvoker the calling FederatingPortletInvoker which failed to resolve a FederatedPortletInvoker
- * for the specified invoker identifier
- * @param compoundPortletId an optional portlet identifier for which we are trying to resolve an invoker, if no such
- * portlet identifier is required for the resolution, this argument should be
- * <code>null</code> and implementations should be prepared for that case.
- * @return
- * @throws NoSuchPortletException
- */
- FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException;
-
- boolean knows(String invokerId);
-
- Collection<String> getKnownInvokerIds();
-}
Copied: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/PortletInvokerResolver.java (from rev 7424, components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/NullInvokerHandler.java)
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/PortletInvokerResolver.java (rev 0)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/PortletInvokerResolver.java 2011-09-14 19:39:58 UTC (rev 7428)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.gatein.pc.federation;
+
+import org.gatein.pc.api.NoSuchPortletException;
+
+import java.util.Collection;
+import java.util.Collections;
+
+/**
+ * Encapsulates behavior to resolve FederatedPortletInvokers in the context of a FederatingPortletInvoker when the
+ * default resolution mechanism fails to retrieve an associated FederatedPortletInvoker.
+ *
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public interface PortletInvokerResolver
+{
+ /**
+ * Default handling mechanism: if we haven't found an invoker for the portlet id in the first place, throw
+ * NoSuchPortletException if we specified a portlet id or null if we didn't.
+ */
+ PortletInvokerResolver DEFAULT_RESOLVER = new PortletInvokerResolver()
+ {
+ public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
+ {
+ if (compoundPortletId != null)
+ {
+ throw new NoSuchPortletException(compoundPortletId);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public boolean knows(String invokerId)
+ {
+ return false;
+ }
+
+ public Collection<String> getKnownInvokerIds()
+ {
+ return Collections.emptyList();
+ }
+ };
+
+ /**
+ * Attempts to resolve a FederatedPortletInvoker with the specified identifier in the context of the specified
+ * calling FederatingPortletInvoker, optionally trying to perform resolution to invoke an action on the specified
+ * portlet identifier.
+ *
+ * @param invokerId the identifier of the FederatedPortletInvoker to be retrieved. Should match the optional
+ * compound portlet identifier if one is specified.
+ * @param callingInvoker the calling FederatingPortletInvoker which failed to resolve a FederatedPortletInvoker
+ * for the specified invoker identifier
+ * @param compoundPortletId an optional portlet identifier for which we are trying to resolve an invoker, if no such
+ * portlet identifier is required for the resolution, this argument should be
+ * <code>null</code> and implementations should be prepared for that case.
+ * @return the resolved FederatedPortletInvoker or <code>null</code> if one couldn't be found
+ * @throws NoSuchPortletException if a PortletInvoker couldn't be found and a compound portlet identifier was
+ * specified
+ */
+ FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException;
+
+ boolean knows(String invokerId);
+
+ Collection<String> getKnownInvokerIds();
+}
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-14 19:23:49 UTC (rev 7427)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-14 19:39:58 UTC (rev 7428)
@@ -39,7 +39,7 @@
import org.gatein.pc.api.state.PropertyMap;
import org.gatein.pc.federation.FederatedPortletInvoker;
import org.gatein.pc.federation.FederatingPortletInvoker;
-import org.gatein.pc.federation.NullInvokerHandler;
+import org.gatein.pc.federation.PortletInvokerResolver;
import java.util.Collection;
import java.util.Collections;
@@ -65,7 +65,7 @@
/** The registred FederatedPortletInvokers. */
private volatile Map<String, FederatedPortletInvoker> invokerCache = new HashMap<String, FederatedPortletInvoker>();
- private NullInvokerHandler nullHandler = NullInvokerHandler.DEFAULT_HANDLER;
+ private PortletInvokerResolver portletResolver = PortletInvokerResolver.DEFAULT_RESOLVER;
public synchronized FederatedPortletInvoker registerInvoker(String federatedId, PortletInvoker federatedInvoker)
{
@@ -95,7 +95,7 @@
{
throw new IllegalArgumentException("No null id accepted");
}
- if (!invokerCache.containsKey(federatedId) && !nullHandler.knows(federatedId))
+ if (!invokerCache.containsKey(federatedId) && !portletResolver.knows(federatedId))
{
throw new IllegalArgumentException("Attempting to unregister unknown invoker " + federatedId);
}
@@ -127,7 +127,7 @@
FederatedPortletInvoker federatedPortletInvoker = invokerCache.get(federatedId);
if (federatedPortletInvoker == null)
{
- federatedPortletInvoker = nullHandler.resolvePortletInvokerFor(federatedId, this, compoundPortletId);
+ federatedPortletInvoker = portletResolver.resolvePortletInvokerFor(federatedId, this, compoundPortletId);
if (federatedPortletInvoker != null)
{
synchronized (this)
@@ -142,7 +142,7 @@
public Collection<String> getFederatedInvokerIds()
{
final Collection<String> resolvedIds = getResolvedInvokerIds();
- final Collection<String> resolvableIds = nullHandler.getKnownInvokerIds();
+ final Collection<String> resolvableIds = portletResolver.getKnownInvokerIds();
final HashSet<String> ids = new HashSet<String>(resolvedIds.size() + resolvableIds.size());
ids.addAll(resolvedIds);
ids.addAll(resolvableIds);
@@ -305,15 +305,15 @@
return federated.importPortlet(stateType, compoundPortletContext);
}
- public synchronized void setNullInvokerHandler(NullInvokerHandler nullHandler)
+ public synchronized void setNullInvokerHandler(PortletInvokerResolver portletResolver)
{
- if (nullHandler == null)
+ if (portletResolver == null)
{
- this.nullHandler = NullInvokerHandler.DEFAULT_HANDLER;
+ this.portletResolver = PortletInvokerResolver.DEFAULT_RESOLVER;
}
else
{
- this.nullHandler = nullHandler;
+ this.portletResolver = portletResolver;
}
}
Modified: components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java
===================================================================
--- components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-09-14 19:23:49 UTC (rev 7427)
+++ components/pc/trunk/federation/src/test/java/org/gatein/pc/federation/FederatingPortletInvokerTestCase.java 2011-09-14 19:39:58 UTC (rev 7428)
@@ -208,7 +208,7 @@
final String federatedId = "inexistent";
assertNull(federatingInvoker.getFederatedInvoker(federatedId));
- federatingInvoker.setNullInvokerHandler(new NullInvokerHandler()
+ federatingInvoker.setNullInvokerHandler(new PortletInvokerResolver()
{
public FederatedPortletInvoker resolvePortletInvokerFor(String invokerId, FederatingPortletInvoker callingInvoker, String compoundPortletId) throws NoSuchPortletException
{
13 years, 3 months
gatein SVN: r7427 - epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-14 15:23:49 -0400 (Wed, 14 Sep 2011)
New Revision: 7427
Modified:
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml
Log:
Add new epp-distribution-quick profile which gets around the extremely slow unzip process from the assembly profile. Should provide drastic speed up in building for testing purposes.
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-09-14 19:20:11 UTC (rev 7426)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/pom.xml 2011-09-14 19:23:49 UTC (rev 7427)
@@ -240,6 +240,138 @@
</profile>
<profile>
+ <id>epp-distribution-quick</id>
+ <!--<description>Does not use the assembly unzip operations which are extremly inefficient. Uses dependency unzip which is much faster but
+ it loses the execution permision set on run.sh</description>-->
+ <activation>
+ <activeByDefault>false</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 -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>distro-assembly</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>unpack</goal>
+ </goals>
+ <configuration>
+ <artifactItems>
+ <artifactItem>
+ <groupId>org.jboss.jbossas</groupId>
+ <artifactId>jboss-eap</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.exoplatform.portal.distribution.deploy</groupId>
+ <artifactId>serverAddon</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/${eap.dir}/jboss-as/server/default</outputDirectory>
+ <excludes>**/hibernate-core*,**/jaxb-api*,**/stax-api*</excludes>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.exoplatform.portal.distribution.deploy</groupId>
+ <artifactId>serverAddon</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/${eap.dir}/jboss-as/server/all</outputDirectory>
+ <excludes>**/hibernate-core*,**/jaxb-api*,**/stax-api*</excludes>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.exoplatform.portal.distribution.deploy</groupId>
+ <artifactId>serverAddon</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/${eap.dir}/jboss-as/server/production</outputDirectory>
+ <excludes>**/hibernate-core*,**/jaxb-api*,**/stax-api*</excludes>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.exoplatform.portal.distribution.root</groupId>
+ <artifactId>portletbridge</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/${eap.dir}/portletbridge</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.gatein.sso</groupId>
+ <artifactId>sso-packaging</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/${eap.dir}</outputDirectory>
+ </artifactItem>
+ <artifactItem>
+ <groupId>org.exoplatform.portal.distribution</groupId>
+ <artifactId>examples</artifactId>
+ <type>zip</type>
+ <outputDirectory>${project.build.directory}/${project.build.finalName}/${eap.dir}/jboss-as/docs/examples/portal</outputDirectory>
+ </artifactItem>
+
+ </artifactItems>
+ </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>
+
+ <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>
+
+ <ant antfile="src/build.xml" inheritRefs="true">
+ <target name="modifyStartupMessage"/>
+ </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>
@@ -362,4 +494,4 @@
</profile>
</profiles>
-</project>
\ No newline at end of file
+</project>
13 years, 3 months
gatein SVN: r7426 - components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-14 15:20:11 -0400 (Wed, 14 Sep 2011)
New Revision: 7426
Modified:
components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
Log:
- Do not attempt to resolve invoker until we know it's needed in getPortlets.
- Improved getResolvedInvokerIds and getFederatedInvokerIds.
Modified: components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java
===================================================================
--- components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-14 17:35:05 UTC (rev 7425)
+++ components/pc/trunk/federation/src/main/java/org/gatein/pc/federation/impl/FederatingPortletInvokerService.java 2011-09-14 19:20:11 UTC (rev 7426)
@@ -141,18 +141,18 @@
public Collection<String> getFederatedInvokerIds()
{
- final Collection<String> ids = getResolvedInvokerIds();
- ids.addAll(nullHandler.getKnownInvokerIds());
+ final Collection<String> resolvedIds = getResolvedInvokerIds();
+ final Collection<String> resolvableIds = nullHandler.getKnownInvokerIds();
+ final HashSet<String> ids = new HashSet<String>(resolvedIds.size() + resolvableIds.size());
+ ids.addAll(resolvedIds);
+ ids.addAll(resolvableIds);
return ids;
}
public Collection<String> getResolvedInvokerIds()
{
- Set<String> ids = new HashSet<String>(invokerCache.size() * 2);
- ids.addAll(invokerCache.keySet());
-
- return ids;
+ return invokerCache.keySet();
}
public boolean isResolved(String federatedId) throws IllegalArgumentException
@@ -172,9 +172,7 @@
LinkedHashSet<Portlet> portlets = new LinkedHashSet<Portlet>();
for (String invokerId : getFederatedInvokerIds())
{
- final FederatedPortletInvoker federated = getFederatedInvoker(invokerId);
-
- if (LOCAL_PORTLET_INVOKER_ID.equals(federated.getId()))
+ if (LOCAL_PORTLET_INVOKER_ID.equals(invokerId))
{
// skip invoker if it's local and we don't want local portlets
if (!includeLocalPortlets)
@@ -191,6 +189,8 @@
}
}
+ final FederatedPortletInvoker federated = getFederatedInvoker(invokerId);
+
try
{
Set<Portlet> offeredPortlets = federated.getPortlets();
13 years, 3 months
gatein SVN: r7425 - in components/wsrp/trunk/jcr-impl/src/main: java/org/gatein/wsrp/consumer/registry/mapping and 2 other directories.
by do-not-reply@jboss.org
Author: mwringe
Date: 2011-09-14 13:35:05 -0400 (Wed, 14 Sep 2011)
New Revision: 7425
Added:
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/WSSEndpointEnabled.java
Modified:
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java
components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java
components/wsrp/trunk/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml
Log:
JBEPP-1143: make the wssendpoint enablement part of a mixin so that it doesn't cause problems when updating with an older version's jcr.
Modified: components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java
===================================================================
--- components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java 2011-09-14 16:26:48 UTC (rev 7424)
+++ components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java 2011-09-14 17:35:05 UTC (rev 7425)
@@ -38,6 +38,7 @@
import org.gatein.wsrp.jcr.mapping.mixins.BaseMixin;
import org.gatein.wsrp.jcr.mapping.mixins.LastModified;
import org.gatein.wsrp.jcr.mapping.mixins.ModifyRegistrationRequired;
+import org.gatein.wsrp.jcr.mapping.mixins.WSSEndpointEnabled;
import org.gatein.wsrp.registration.mapping.RegistrationPropertyDescriptionMapping;
import javax.jcr.RepositoryException;
@@ -75,7 +76,8 @@
{
Collections.addAll(mappingClasses, ProducerInfosMapping.class, ProducerInfoMapping.class,
EndpointInfoMapping.class, RegistrationInfoMapping.class, RegistrationPropertyMapping.class,
- RegistrationPropertyDescriptionMapping.class, LastModified.class, ModifyRegistrationRequired.class);
+ RegistrationPropertyDescriptionMapping.class, LastModified.class, ModifyRegistrationRequired.class,
+ WSSEndpointEnabled.class);
}
public JCRConsumerRegistry(ChromatticPersister persister) throws Exception
@@ -137,7 +139,9 @@
getMixin(pim, session, LastModified.class).setLastModified(now);
getMixin(pim, session, ModifyRegistrationRequired.class).setModifyRegistrationRequired(info.isModifyRegistrationRequired());
info.setLastModified(now);
+ getMixin(pim.getEndpointInfo(), session, WSSEndpointEnabled.class).setWSSEnabled(info.getEndpointConfigurationInfo().getWSSEnabled());
+
persister.closeSession(true);
}
catch (Exception e)
@@ -203,6 +207,7 @@
getMixin(pim, session, ModifyRegistrationRequired.class).setModifyRegistrationRequired(producerInfo.isModifyRegistrationRequired());
getMixin(pim, session, LastModified.class).setLastModified(now);
producerInfo.setLastModified(now);
+ getMixin(pim.getEndpointInfo(), session, WSSEndpointEnabled.class).setWSSEnabled(producerInfo.getEndpointConfigurationInfo().getWSSEnabled());
persister.closeSession(true);
}
@@ -214,7 +219,30 @@
public Iterator<ProducerInfo> getProducerInfosFromStorage()
{
ChromatticSession session = persister.getSession();
- final Iterator<ProducerInfo> iterator = new ProducerInfoIterator(getRefreshedInfoCache(session).getConsumers().iterator());
+
+ Collection<WSRPConsumer> consumers = getRefreshedInfoCache(session).getConsumers();
+
+ // GTNWSRP-239
+ // Kindof crappy place to put this, but we need to be able to retrieve the mixin from the jcr so that it can be used to
+ // configure the ProducerInfo
+ Iterator<WSRPConsumer> consumersIterator = consumers.iterator();
+ while (consumersIterator.hasNext())
+ {
+ ProducerInfo pi = consumersIterator.next().getProducerInfo();
+ String key = pi.getKey();
+ ProducerInfoMapping pim = session.findById(ProducerInfoMapping.class, key);
+ if (pim == null)
+ {
+ throw new IllegalArgumentException("Couldn't find ProducerInfoMapping associated with key " + key);
+ }
+ WSSEndpointEnabled wssee = getMixin(pim.getEndpointInfo(), session, WSSEndpointEnabled.class);
+ if (wssee != null)
+ {
+ pi.getEndpointConfigurationInfo().setWSSEnabled(wssee.getWSSEnabled());
+ }
+ }
+
+ final Iterator<ProducerInfo> iterator = new ProducerInfoIterator(consumers.iterator());
persister.closeSession(false);
return iterator;
}
Modified: components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java
===================================================================
--- components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java 2011-09-14 16:26:48 UTC (rev 7424)
+++ components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/mapping/EndpointInfoMapping.java 2011-09-14 17:35:05 UTC (rev 7425)
@@ -47,24 +47,16 @@
public abstract void setWSTimeoutMilliseconds(Integer expiration);
- @Property(name = "enablewss")
- @DefaultValue("false")
- public abstract boolean getWSSEnabled();
-
- public abstract void setWSSEnabled(boolean enable);
-
public void initFrom(EndpointConfigurationInfo info)
{
setWSDLURL(info.getWsdlDefinitionURL());
setWSTimeoutMilliseconds(info.getWSOperationTimeOut());
- setWSSEnabled(info.getWSSEnabled());
}
EndpointConfigurationInfo toEndpointConfigurationInfo(EndpointConfigurationInfo initial)
{
initial.setWsdlDefinitionURL(getWSDLURL());
initial.setWSOperationTimeOut(getWSTimeoutMilliseconds());
- initial.setWSSEnabled(getWSSEnabled());
return initial;
}
}
Added: components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/WSSEndpointEnabled.java
===================================================================
--- components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/WSSEndpointEnabled.java (rev 0)
+++ components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/WSSEndpointEnabled.java 2011-09-14 17:35:05 UTC (rev 7425)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2011, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.gatein.wsrp.jcr.mapping.mixins;
+
+import org.chromattic.api.annotations.DefaultValue;
+import org.chromattic.api.annotations.MixinType;
+import org.chromattic.api.annotations.Property;
+
+/**
+ * @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
+ * @version $Revision$
+ */
+@MixinType(name = "wsrp:wssendpointinfo")
+public abstract class WSSEndpointEnabled implements BaseMixin
+{
+ @Property(name = "enablewss")
+ @DefaultValue("false")
+ public abstract boolean getWSSEnabled();
+
+ public abstract void setWSSEnabled(boolean enable);
+
+ @Override
+ public void initializeValue()
+ {
+ //set to false by default
+ setWSSEnabled(false);
+ }
+
+}
+
Property changes on: components/wsrp/trunk/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/WSSEndpointEnabled.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: components/wsrp/trunk/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml
===================================================================
--- components/wsrp/trunk/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml 2011-09-14 16:26:48 UTC (rev 7424)
+++ components/wsrp/trunk/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml 2011-09-14 17:35:05 UTC (rev 7425)
@@ -96,6 +96,19 @@
</childNodeDefinitions>
</nodeType>
+ <nodeType name="wsrp:wssendpointinfo" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <supertypes>
+ <supertype>nt:base</supertype>
+ <supertype>mix:referenceable</supertype>
+ </supertypes>
+ <propertyDefinitions>
+ <propertyDefinition name="enablewss" requiredType="boolean" autoCreated="false" mandatory="false"
+ onParentVersion="COPY" protected="false" multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<nodeType name="wsrp:endpointinfo" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
<supertypes>
<supertype>nt:base</supertype>
@@ -110,10 +123,6 @@
onParentVersion="COPY" protected="false" multiple="false">
<valueConstraints/>
</propertyDefinition>
- <propertyDefinition name="enablewss" requiredType="boolean" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
</propertyDefinitions>
</nodeType>
13 years, 3 months