Package org.apache.pluto.spi

Examples of org.apache.pluto.spi.PortletURLProvider


        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 String toString() {
        StringBuffer url = new StringBuffer(200);

        PortletURLProvider urlProvider = container
            .getRequiredContainerServices()
            .getPortalCallbackService()
            .getPortletURLProvider(servletRequest, internalPortletWindow);

        if (mode != null) {
            urlProvider.setPortletMode(mode);
        }
        if (state != null) {
            urlProvider.setWindowState(state);
        }
        if (isAction) {
            urlProvider.setAction(true);
        }
        if (secure) {
            urlProvider.setSecure();
        }
        urlProvider.clearParameters();
        urlProvider.setParameters(parameters);

        url.append(urlProvider.toString());

        return url.toString();
    }
View Full Code Here

        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

        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 String toString() {
        StringBuffer url = new StringBuffer(200);

        PortletURLProvider urlProvider = container
            .getRequiredContainerServices()
            .getPortalCallbackService()
            .getPortletURLProvider(servletRequest, internalPortletWindow);

        if (mode != null) {
            urlProvider.setPortletMode(mode);
        }
        if (state != null) {
            urlProvider.setWindowState(state);
        }
        if (isAction) {
            urlProvider.setAction(true);
        }
        if (secure) {
            urlProvider.setSecure();
        }
        urlProvider.clearParameters();
        urlProvider.setParameters(parameters);

        url.append(urlProvider.toString());

        return url.toString();
    }
View Full Code Here

        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 (redirectURL.isSecureSupported()) {
                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 void setSecure(boolean secure) throws PortletSecurityException {
        if (!secure) {
            return;
        }
        PortletURLProvider urlProvider = container
            .getRequiredContainerServices()
            .getPortalCallbackService()
            .getPortletURLProvider(servletRequest, internalPortletWindow);
        if (urlProvider.isSecureSupported()) {
            urlProvider.setSecure();
        } else {
          LOG.info("Secure URLs not supported.");
        }
    }
View Full Code Here

    }

    public String toString() {
        StringBuffer url = new StringBuffer(200);

        PortletURLProvider urlProvider = container
            .getRequiredContainerServices()
            .getPortalCallbackService()
            .getPortletURLProvider(servletRequest, internalPortletWindow);

        if (mode != null) {
            urlProvider.setPortletMode(mode);
        }
        if (state != null) {
            urlProvider.setWindowState(state);
        }
        if (isAction) {
            urlProvider.setAction(true);
        }
        if (secure && urlProvider.isSecureSupported()) {
            try {
                urlProvider.setSecure();
            } catch (PortletSecurityException e) {
                throw new IllegalStateException("URL Provider is misconfigured." +
                    "  It claims to support secure urls," +
                    " yet it threw a PortletSecurityException");
            }
        }
        urlProvider.clearParameters();
        urlProvider.setParameters(parameters);

        url.append(urlProvider.toString());

        return url.toString();
    }
View Full Code Here

        this.parameters = StringUtils.copyParameters(parameters);
    }

    public void setSecure(boolean secure) throws PortletSecurityException {
        PortletURLProvider urlProvider = container
            .getRequiredContainerServices()
            .getPortalCallbackService()
            .getPortletURLProvider(servletRequest, internalPortletWindow);
        if(urlProvider.isSecureSupported()) {
            throw new PortletSecurityException("Secure URLs not supported.");
        }
    }
View Full Code Here

    }

    public String toString() {
        StringBuffer url = new StringBuffer(200);

        PortletURLProvider urlProvider = container
            .getRequiredContainerServices()
            .getPortalCallbackService()
            .getPortletURLProvider(servletRequest, internalPortletWindow);

        if (mode != null) {
            urlProvider.setPortletMode(mode);
        }
        if (state != null) {
            urlProvider.setWindowState(state);
        }
        if (isAction) {
            urlProvider.setAction(true);
        }
        if (secure && urlProvider.isSecureSupported()) {
            try {
                urlProvider.setSecure();
            } catch (PortletSecurityException e) {
                throw new IllegalStateException("URL Provider is misconfigured." +
                    "  It claims to support secure urls," +
                    " yet it threw a PortletSecurityException");
            }
        }
        urlProvider.clearParameters();
        urlProvider.setParameters(parameters);

        url.append(urlProvider.toString());

        return url.toString();
    }
View Full Code Here

TOP

Related Classes of org.apache.pluto.spi.PortletURLProvider

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.