Package org.apache.pluto.internal

Examples of org.apache.pluto.internal.InternalActionRequest


                        portletWindow.getContextPath()), portletWindow);

        debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());

        InternalActionRequest actionRequest = getOptionalContainerServices().getPortletEnvironmentService()
            .createActionRequest(this, request, response, internalPortletWindow);

        InternalActionResponse actionResponse = getOptionalContainerServices().getPortletEnvironmentService()
            .createActionResponse(this, request, response, internalPortletWindow);

        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();

        try {
            ContainerInvocation.setInvocation(this, internalPortletWindow);
            invoker.action(actionRequest, actionResponse, internalPortletWindow);
        }
        finally {
            ContainerInvocation.clearInvocation();
        }

        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());
View Full Code Here


          new InternalPortletWindowImpl(portletAppCtx, portletWindow);

        debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());

        InternalActionRequest actionRequest = getOptionalContainerServices().getPortletEnvironmentService()
            .createActionRequest(this, request, response, internalPortletWindow);

        InternalActionResponse actionResponse = getOptionalContainerServices().getPortletEnvironmentService()
            .createActionResponse(this, request, response, internalPortletWindow);
View Full Code Here

                        portletWindow.getContextPath()), portletWindow);

        debugWithName("Action request received for portlet: "
          + portletWindow.getPortletName());

        InternalActionRequest actionRequest = getOptionalContainerServices().getPortletEnvironmentService()
            .createActionRequest(this, request, response, internalPortletWindow);

        InternalActionResponse actionResponse = getOptionalContainerServices().getPortletEnvironmentService()
            .createActionResponse(this, request, response, internalPortletWindow);

        PortletInvokerService invoker = optionalContainerServices.getPortletInvokerService();

        try {
            ContainerInvocation.setInvocation(this, internalPortletWindow);
            invoker.action(actionRequest, actionResponse, internalPortletWindow);
        }
        finally {
            ContainerInvocation.clearInvocation();
        }

        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());
View Full Code Here

TOP

Related Classes of org.apache.pluto.internal.InternalActionRequest

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.