Author: thomas.heute(a)jboss.com
Date: 2008-03-18 12:44:37 -0400 (Tue, 18 Mar 2008)
New Revision: 10309
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderRequest.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderResponse.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/filter/JBossPortletFilter.java
Log:
- Fixed the CMS
- Fixed the JBossPortlet and related Request/Response
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/controller/portlet/PortletInvocationFactory.java 2008-03-18
16:44:37 UTC (rev 10309)
@@ -151,7 +151,13 @@
//
render.setAttribute(PortletInvocation.INVOCATION_SCOPE,
"controller_context", controllerContext);
+
+ UserContext userContext = cf.createUserContext();
+ //
+ controllerContextTL.set(controllerContext);
+ userContextTL.set(userContext);
+
// Contextualize
render.setSecurityContext(cf.createSecurityContext());
render.setPortalContext(cf.createPortalContext());
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossActionResponse.java 2008-03-18
16:44:37 UTC (rev 10309)
@@ -37,7 +37,6 @@
import org.jboss.portal.api.PortalRuntimeContext;
import org.jboss.portal.api.node.PortalNode;
import org.jboss.portal.api.node.PortalNodeURL;
-import org.jboss.portal.common.NotYetImplemented;
import org.jboss.portal.core.aspects.controller.node.Navigation;
/**
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossPortlet.java 2008-03-18
16:44:37 UTC (rev 10309)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portlet;
-import org.jboss.logging.Logger;
import org.jboss.portal.format.util.EntityTable;
import javax.portlet.ActionRequest;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderRequest.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderRequest.java 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderRequest.java 2008-03-18
16:44:37 UTC (rev 10309)
@@ -33,7 +33,6 @@
import org.jboss.portal.core.controller.portlet.ControllerUserContext;
import org.jboss.portal.core.controller.portlet.PortletInvocationFactory;
import org.jboss.portal.identity.User;
-import org.jboss.portal.portlet.impl.jsr168.api.RenderRequestImpl;
import org.jboss.portal.portlet.spi.UserContext;
import org.jboss.portlet.util.Parameters;
@@ -51,11 +50,11 @@
/** . */
private ControllerContext controllerContext;
- private RenderRequestImpl portletRequest;
+ private RenderRequest portletRequest;
private UserContext userContext;
- public JBossRenderRequest(RenderRequestImpl portletRequest)
+ public JBossRenderRequest(RenderRequest portletRequest)
{
super(portletRequest);
this.portletRequest = portletRequest;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderResponse.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderResponse.java 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/JBossRenderResponse.java 2008-03-18
16:44:37 UTC (rev 10309)
@@ -39,9 +39,6 @@
import org.jboss.portal.api.node.PortalNode;
import org.jboss.portal.api.node.PortalNodeURL;
import org.jboss.portal.core.aspects.controller.node.Navigation;
-import org.jboss.portal.portlet.impl.jsr168.api.PortletRequestImpl;
-import org.jboss.portal.portlet.impl.jsr168.api.RenderResponseImpl;
-import org.jboss.portal.portlet.invocation.RenderInvocation;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -49,9 +46,9 @@
*/
public class JBossRenderResponse extends PortletResponseWrapper implements
RenderResponse
{
- private RenderResponseImpl portletResponse;
+ private RenderResponse portletResponse;
- public JBossRenderResponse(RenderResponseImpl portletResponse, RenderInvocation
invocation, PortletRequestImpl preq)
+ public JBossRenderResponse(RenderResponse portletResponse)
{
super(portletResponse);
this.portletResponse = portletResponse;
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/filter/JBossPortletFilter.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/filter/JBossPortletFilter.java 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portlet/filter/JBossPortletFilter.java 2008-03-18
16:44:37 UTC (rev 10309)
@@ -24,6 +24,8 @@
import org.jboss.portlet.JBossActionRequest;
import org.jboss.portlet.JBossActionResponse;
+import org.jboss.portlet.JBossRenderRequest;
+import org.jboss.portlet.JBossRenderResponse;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
@@ -71,7 +73,10 @@
public void doFilter(RenderRequest request, RenderResponse response, FilterChain
filterChain) throws IOException, PortletException
{
- filterChain.doFilter(request, response);
+ JBossRenderRequest renderRequest = new JBossRenderRequest(request);
+ JBossRenderResponse renderResponse = new JBossRenderResponse(response);
+
+ filterChain.doFilter(renderRequest, renderResponse);
}
public void doFilter(ResourceRequest resourceRequest, ResourceResponse
resourceResponse, FilterChain filterChain) throws IOException, PortletException
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml 2008-03-18
14:57:23 UTC (rev 10308)
+++
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/portlet.xml 2008-03-18
16:44:37 UTC (rev 10309)
@@ -23,10 +23,24 @@
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
<portlet-app
-
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
+
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1...
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
- version="1.0">
+
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2...
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
+ version="2.0">
+
+ <filter>
+ <filter-name>JBoss Portlet Filter</filter-name>
+
<filter-class>org.jboss.portlet.filter.JBossPortletFilter</filter-class>
+ <lifecycle>ACTION_PHASE</lifecycle>
+ <lifecycle>RENDER_PHASE</lifecycle>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>JBoss Portlet Filter</filter-name>
+ <portlet-name>CMSPortlet</portlet-name>
+ <portlet-name>CMSAdminPortlet</portlet-name>
+ </filter-mapping>
+
<portlet>
<description>Content Management System Portlet</description>
<portlet-name>CMSPortlet</portlet-name>