cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r563567 - in /cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal: ./ event/impl/ impl/ layout/renderer/aspect/impl/ services/impl/ services/impl/links/
Date Tue, 07 Aug 2007 17:17:42 GMT
Author: cziegeler
Date: Tue Aug  7 10:17:41 2007
New Revision: 563567

URL: http://svn.apache.org/viewvc?view=rev&rev=563567
Log:
Remove dependencies to cocoon environment. Replace it with direct references to servlet api
classes.

Added:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java
  (with props)
Modified:
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/PortalService.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CIncludeCopletAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/DefaultCopletAspect.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/DefaultLinkService.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/LinkInfo.java
    cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/PageLabelLinkService.java

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/PortalService.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/PortalService.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/PortalService.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/PortalService.java
Tue Aug  7 10:17:41 2007
@@ -132,6 +132,12 @@
     ProcessInfoProvider getProcessInfoProvider();
 
     /**
+     * Get the current request context.
+     * @since 2.2
+     */
+    RequestContext getRequestContext();
+
+    /**
      * Get the user service.
      */
     UserService getUserService();

Added: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java?view=auto&rev=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java
(added)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java
Tue Aug  7 10:17:41 2007
@@ -0,0 +1,40 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.cocoon.portal;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Information and object dealing with the current request response cycle.
+ *
+ * @version $Id$
+ * @since 2.2
+ */
+public interface RequestContext {
+
+     HttpServletRequest getRequest();
+
+     HttpServletResponse getResponse();
+
+     /**
+      * Is the request an Ajax request?
+      *
+      * @return true if this is an Ajax request
+      */
+     boolean isAjaxRequest();
+}

Propchange: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/RequestContext.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/event/impl/DefaultEventManager.java
Tue Aug  7 10:17:41 2007
@@ -63,13 +63,6 @@
     protected Map eventHierarchy = new HashMap();
 
     /**
-     * Helper method to get the current object model
-     */
-    protected Map getObjectModel() {
-        return this.portalService.getProcessInfoProvider().getObjectModel();
-    }
-
-    /**
      * Initialize this component.
      */
     public void init() {

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/impl/PortalServiceImpl.java
Tue Aug  7 10:17:41 2007
@@ -24,6 +24,8 @@
 import java.util.Map;
 
 import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import org.apache.avalon.framework.activity.Disposable;
 import org.apache.avalon.framework.configuration.Configurable;
@@ -33,8 +35,10 @@
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
 import org.apache.avalon.framework.thread.ThreadSafe;
+import org.apache.cocoon.ajax.AjaxHelper;
 import org.apache.cocoon.portal.PortalRuntimeException;
 import org.apache.cocoon.portal.PortalService;
+import org.apache.cocoon.portal.RequestContext;
 import org.apache.cocoon.portal.coplet.adapter.CopletAdapter;
 import org.apache.cocoon.portal.event.EventConverter;
 import org.apache.cocoon.portal.event.EventManager;
@@ -404,4 +408,45 @@
             throw new PortalRuntimeException("Unable to lookup event converter.", e);
         }
     }
+
+    /**
+     * TODO - Remove dependency on ProcessInfoProvider!
+     * @see org.apache.cocoon.portal.PortalService#getRequestContext()
+     */
+    public RequestContext getRequestContext() {
+        return new RequestContextImpl(this.processInfoProvider);
+    }
+
+    public static final class RequestContextImpl implements RequestContext {
+
+        protected final ProcessInfoProvider provider;
+
+        public RequestContextImpl(ProcessInfoProvider prov) {
+            this.provider = prov;
+        }
+
+        /**
+         * @see org.apache.cocoon.portal.RequestContext#getRequest()
+         */
+        public HttpServletRequest getRequest() {
+            return this.provider.getRequest();
+        }
+
+        /**
+         * @see org.apache.cocoon.portal.RequestContext#getResponse()
+         */
+        public HttpServletResponse getResponse() {
+            return this.provider.getResponse();
+        }
+
+        /**
+         * @see org.apache.cocoon.portal.RequestContext#isAjaxRequest()
+         */
+        public boolean isAjaxRequest() {
+            final HttpServletRequest req = this.getRequest();
+            return req.getParameter(AjaxHelper.AJAX_REQUEST_PARAMETER) != null;
+        }
+
+    }
 }
+

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CIncludeCopletAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CIncludeCopletAspect.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CIncludeCopletAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/CIncludeCopletAspect.java
Tue Aug  7 10:17:41 2007
@@ -18,8 +18,6 @@
 
 import java.util.Properties;
 
-import org.apache.cocoon.ajax.AjaxHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.portal.Constants;
 import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.layout.renderer.aspect.RendererAspectContext;
@@ -65,7 +63,7 @@
  *
  * @version $Id$
  */
-public class CIncludeCopletAspect 
+public class CIncludeCopletAspect
     extends AbstractCIncludeAspect {
 
 	/**
@@ -84,7 +82,7 @@
         }
 
         // if ajax is used and the current request is not an ajax request, we just send some
javascript stuff back
-        if ( config.useAjax && !AjaxHelper.isAjaxRequest(ObjectModelHelper.getRequest(rendererContext.getPortalService().getProcessInfoProvider().getObjectModel())))
{
+        if ( config.useAjax && !rendererContext.getPortalService().getRequestContext().isAjaxRequest()
) {
             final String uri = rendererContext.getPortalService().getLinkService().getRefreshLinkURI();
             final char separator = (uri.indexOf('?') == -1 ? '?' : '&');
             final StringBuffer buffer = new StringBuffer("cocoon.portal.process(\"");

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/DefaultCopletAspect.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/DefaultCopletAspect.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/DefaultCopletAspect.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/layout/renderer/aspect/impl/DefaultCopletAspect.java
Tue Aug  7 10:17:41 2007
@@ -18,8 +18,6 @@
 
 import java.util.Properties;
 
-import org.apache.cocoon.ajax.AjaxHelper;
-import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.portal.Constants;
 import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.coplet.adapter.CopletAdapter;
@@ -41,7 +39,7 @@
  * This aspect directly invokes the coplet adapter to stream out the coplet content.
  * An alternative solution is to generate only cinclude tags by using the
  * {@link org.apache.cocoon.portal.layout.renderer.aspect.impl.CIncludeCopletAspect}
- * and include the coplet contents later. That would allow caching up to the point 
+ * and include the coplet contents later. That would allow caching up to the point
  * of the cinclude transformer.
  *
  * <h2>Example XML:</h2>
@@ -76,7 +74,7 @@
 
         final CopletInstance cid = this.getCopletInstance(((CopletLayout)layout).getCopletInstanceId());
         // if ajax is used and the current request is not an ajax request, we just send some
javascript stuff back
-        if ( config.useAjax && !AjaxHelper.isAjaxRequest(ObjectModelHelper.getRequest(rendererContext.getPortalService().getProcessInfoProvider().getObjectModel())))
{
+        if ( config.useAjax && !rendererContext.getPortalService().getRequestContext().isAjaxRequest()
) {
             final String uri = rendererContext.getPortalService().getLinkService().getRefreshLinkURI();
             final char separator = (uri.indexOf('?') == -1 ? '?' : '&');
             final StringBuffer buffer = new StringBuffer("cocoon.portal.process(\"");

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/DefaultPortalManager.java
Tue Aug  7 10:17:41 2007
@@ -20,10 +20,7 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.apache.cocoon.ajax.AjaxHelper;
 import org.apache.cocoon.ajax.BrowserUpdateTransformer;
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.portal.PortalException;
 import org.apache.cocoon.portal.PortalRuntimeException;
 import org.apache.cocoon.portal.layout.renderer.Renderer;
@@ -131,7 +128,6 @@
     throws SAXException {
         final ProfileManager profileManager = this.portalService.getProfileManager();
 
-        final Request req = ObjectModelHelper.getRequest(this.portalService.getProcessInfoProvider().getObjectModel());
         // check for render parameters
         // if a parameter for a layout or a coplet is defined
         // then only this coplet or layout object is rendered
@@ -163,7 +159,7 @@
 
         // If no parameter is specified test for ajax request which will
         // only render the changed coplets
-        if ( portalLayout == null && AjaxHelper.isAjaxRequest(req) ) {
+        if ( portalLayout == null && portalService.getRequestContext().isAjaxRequest()
) {
             Layout rootLayout = profileManager.getLayout(null);
             ch.startPrefixMapping("bu", BrowserUpdateTransformer.BU_NSURI);
             ch.startElement(BrowserUpdateTransformer.BU_NSURI, "document", "bu:document",
XMLUtils.EMPTY_ATTRIBUTES);

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/DefaultLinkService.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/DefaultLinkService.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/DefaultLinkService.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/DefaultLinkService.java
Tue Aug  7 10:17:41 2007
@@ -24,9 +24,9 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
-import org.apache.cocoon.environment.Response;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.cocoon.portal.PortalRuntimeException;
 import org.apache.cocoon.portal.event.ComparableEvent;
 import org.apache.cocoon.portal.event.Event;
@@ -111,7 +111,7 @@
      * @return A LinkInfo object.
      */
     protected LinkInfo getInfo() {
-        final Request request = ObjectModelHelper.getRequest(this.portalService.getProcessInfoProvider().getObjectModel());
+        final HttpServletRequest request = this.portalService.getRequestContext().getRequest();
         LinkInfo info = (LinkInfo)request.getAttribute(DefaultLinkService.class.getName());
         if ( info == null ) {
             info = (LinkInfo)request.getAttribute(DefaultLinkService.class.getName());
@@ -127,7 +127,7 @@
      * @see org.apache.cocoon.portal.services.LinkService#isSecure()
      */
     public boolean isSecure() {
-        final Request request = ObjectModelHelper.getRequest(this.portalService.getProcessInfoProvider().getObjectModel());
+        final HttpServletRequest request = this.portalService.getRequestContext().getRequest();
         return request.isSecure();
     }
 
@@ -135,7 +135,7 @@
      * @see org.apache.cocoon.portal.services.LinkService#encodeURL(String url)
      */
     public String encodeURL(String url) {
-        final Response response = ObjectModelHelper.getResponse(this.portalService.getProcessInfoProvider().getObjectModel());
+        final HttpServletResponse response = this.portalService.getRequestContext().getResponse();
         return response.encodeURL(url);
     }
 
@@ -361,7 +361,7 @@
      * @see org.apache.cocoon.portal.services.aspects.RequestProcessorAspect#process(org.apache.cocoon.portal.services.aspects.RequestProcessorAspectContext)
      */
     public void process(RequestProcessorAspectContext context) {
-        final Request request = ObjectModelHelper.getRequest(context.getPortalService().getProcessInfoProvider().getObjectModel());
+        final HttpServletRequest request = context.getPortalService().getRequestContext().getRequest();
         final EventManager publisher = context.getPortalService().getEventManager();
         final EventConverter converter = context.getPortalService().getEventConverter();
 

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/LinkInfo.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/LinkInfo.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/LinkInfo.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/LinkInfo.java
Tue Aug  7 10:17:41 2007
@@ -22,7 +22,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cocoon.environment.Request;
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.cocoon.portal.event.ComparableEvent;
 import org.apache.cocoon.portal.event.Event;
 
@@ -44,10 +45,13 @@
     /** Is the page called using https? */
     protected final boolean isSecure;
 
-    public LinkInfo(Request request, int defaultPort, int defaultSecurePort) {
+    public LinkInfo(HttpServletRequest request, int defaultPort, int defaultSecurePort) {
         this.isSecure = request.getScheme().equals("https");
         // create relative url
-        String relativeURI = request.getSitemapURI();
+        String relativeURI = request.getServletPath();
+        if ( request.getPathInfo() != null ) {
+            relativeURI = relativeURI + request.getPathInfo();
+        }
         final int pos = relativeURI.lastIndexOf('/');
         if ( pos != -1 ) {
             relativeURI = relativeURI.substring(pos+1);
@@ -63,7 +67,7 @@
         }
     }
 
-    protected String getAbsoluteUrl(Request request, boolean useSecure, int port) {
+    protected String getAbsoluteUrl(HttpServletRequest request, boolean useSecure, int port)
{
         final StringBuffer buffer = new StringBuffer();
         if ( useSecure ) {
             buffer.append("https://");
@@ -76,14 +80,12 @@
             buffer.append(':');
             buffer.append(port);
         }
-        if ( request.getContextPath().length() > 0 ) {
-            buffer.append(request.getContextPath());
-        }
-        buffer.append('/');                        
-        if ( request.getSitemapURIPrefix().length() > 0 ) {
-            buffer.append(request.getSitemapURIPrefix());
+        buffer.append(request.getContextPath());
+        buffer.append('/');
+        buffer.append(request.getServletPath());
+        if ( request.getPathInfo() != null ) {
+            buffer.append(request.getPathInfo());
         }
-        buffer.append(request.getSitemapURI());
         return buffer.toString();
     }
 
@@ -127,7 +129,7 @@
      * Add an event to each link in this page.
      */
     public void addEvent(Event event) {
-        if ( event != null ) { 
+        if ( event != null ) {
             if (event instanceof ComparableEvent) {
                 if ( this.comparableEvents != null ) {
                     // search if we already have an event for this!

Modified: cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/PageLabelLinkService.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/PageLabelLinkService.java?view=diff&rev=563567&r1=563566&r2=563567
==============================================================================
--- cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/PageLabelLinkService.java
(original)
+++ cocoon/trunk/blocks/cocoon-portal/cocoon-portal-impl/src/main/java/org/apache/cocoon/portal/services/impl/links/PageLabelLinkService.java
Tue Aug  7 10:17:41 2007
@@ -25,8 +25,8 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.cocoon.environment.ObjectModelHelper;
-import org.apache.cocoon.environment.Request;
+import javax.servlet.http.HttpServletRequest;
+
 import org.apache.cocoon.portal.PortalService;
 import org.apache.cocoon.portal.event.Event;
 import org.apache.cocoon.portal.event.EventManager;
@@ -93,7 +93,7 @@
     public void process(RequestProcessorAspectContext context) {
         final Map pageLabelMap = (Map)context.getPortalService().getUserService().getAttribute(PAGE_LABEL_MAP);
         if ( pageLabelMap != null ) {
-            final Request request = ObjectModelHelper.getRequest(context.getPortalService().getProcessInfoProvider().getObjectModel());
+            final HttpServletRequest request = context.getPortalService().getRequestContext().getRequest();
             final EventManager publisher = context.getPortalService().getEventManager();
 
             final String[] values = request.getParameterValues( this.pageLabelRequestParameter
);



Mime
View raw message