Package org.apache.pluto.internal.impl

Examples of org.apache.pluto.internal.impl.ActionResponseImpl


      debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());
     
        ActionRequestImpl actionRequest = new ActionRequestImpl(
            this, internalPortletWindow, request);
        ActionResponseImpl actionResponse = new ActionResponseImpl(
            this, internalPortletWindow, request, response);
       
        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
        invoker.action(actionRequest, actionResponse);
        debugWithName("Portlet action processed for: "
            + portletWindow.getPortletName());
       
        // After processing action, send a redirect URL for rendering.
        String location = actionResponse.getRedirectLocation();

        if (location == null) {
         
          // Create portlet URL provider to encode redirect URL.
          debugWithName("No redirect location specified.");
            PortletURLProvider redirectURL = requiredContainerServices
                .getPortalCallbackService()
                .getPortletURLProvider(request, internalPortletWindow);
           
            // Encode portlet mode if it is changed.
            if (actionResponse.getChangedPortletMode() != null) {
                redirectURL.setPortletMode(
                    actionResponse.getChangedPortletMode());
            }
           
            // Encode window state if it is changed.
            if (actionResponse.getChangedWindowState() != null) {
                redirectURL.setWindowState(
                    actionResponse.getChangedWindowState());
            }
           
            // Encode render parameters retrieved from action response.
            Map renderParameters = actionResponse.getRenderParameters();
            redirectURL.clearParameters();
            redirectURL.setParameters(renderParameters);
           
            // Encode redirect URL as a render URL.
            redirectURL.setAction(false);
           
            // Set secure of the redirect URL if necessary.
            if (actionRequest.isSecure()) {
                redirectURL.setSecure();
            }
           
            // Encode the redirect URL to a string.
            location = actionResponse.encodeRedirectURL(redirectURL.toString());
        }

        // Here we intentionally use the original response
        // instead of the wrapped internal response.
        response.sendRedirect(location);
View Full Code Here


           
            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                      (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                      (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }
           
            // The requested method is NOOP: do nothing.
View Full Code Here

      debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());
     
        ActionRequestImpl actionRequest = new ActionRequestImpl(
            this, internalPortletWindow, request);
        ActionResponseImpl actionResponse = new ActionResponseImpl(
            this, internalPortletWindow, request, response);
       
        PortletInvoker invoker = new PortletInvoker(internalPortletWindow);
        invoker.action(actionRequest, actionResponse);
        debugWithName("Portlet action processed for: "
            + portletWindow.getPortletName());
       
        // After processing action, send a redirect URL for rendering.
        String location = actionResponse.getRedirectLocation();

        if (location == null) {
         
          // Create portlet URL provider to encode redirect URL.
          debugWithName("No redirect location specified.");
            PortletURLProvider redirectURL = requiredContainerServices
                .getPortalCallbackService()
                .getPortletURLProvider(request, internalPortletWindow);
           
            // Encode portlet mode if it is changed.
            if (actionResponse.getChangedPortletMode() != null) {
                redirectURL.setPortletMode(
                    actionResponse.getChangedPortletMode());
            }
           
            // Encode window state if it is changed.
            if (actionResponse.getChangedWindowState() != null) {
                redirectURL.setWindowState(
                    actionResponse.getChangedWindowState());
            }
           
            // Encode render parameters retrieved from action response.
            Map renderParameters = actionResponse.getRenderParameters();
            redirectURL.clearParameters();
            redirectURL.setParameters(renderParameters);
           
            // Encode redirect URL as a render URL.
            redirectURL.setAction(false);
           
            // Set secure of the redirect URL if necessary.
            if (actionRequest.isSecure()) {
                redirectURL.setSecure();
            }
           
            // Encode the redirect URL to a string.
            location = actionResponse.encodeRedirectURL(redirectURL.toString());
        }

        // Here we intentionally use the original response
        // instead of the wrapped internal response.
        response.sendRedirect(location);
View Full Code Here

    public InternalActionResponse createActionResponse(PortletContainer container,
                                                       HttpServletRequest request,
                                                       HttpServletResponse response,
                                                       InternalPortletWindow internalPortletWindow) {
        return new ActionResponseImpl(container, internalPortletWindow, request, response);
    }
View Full Code Here

            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                    (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                    (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }

            // The requested method is ADMIN: call handlers.
View Full Code Here

            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                    (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                    (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }

            // The requested method is ADMIN: call handlers.
View Full Code Here

            // The requested method is ACTION: call Portlet.processAction(..)
            else if (methodId == Constants.METHOD_ACTION) {
                ActionRequestImpl actionRequest =
                    (ActionRequestImpl) portletRequest;
                ActionResponseImpl actionResponse =
                    (ActionResponseImpl) portletResponse;
                portlet.processAction(actionRequest, actionResponse);
            }

            // The requested method is ADMIN: call handlers.
View Full Code Here

    public InternalActionResponse createActionResponse(PortletContainer container,
                                                       HttpServletRequest request,
                                                       HttpServletResponse response,
                                                       InternalPortletWindow internalPortletWindow) {
        return new ActionResponseImpl(container, internalPortletWindow, request, response);
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.internal.impl.ActionResponseImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.