Package com.volantis.mcs.integration

Examples of com.volantis.mcs.integration.URLRewriter


            protocol = applicationContext.getProtocol();

            // The protocol needs to know what the context is.
            protocol.setMarinerPageContext(this);

            URLRewriter urlRewriter = volantisBean.getURLRewriter();

            requestURL = urlRewriter.mapToMarinerURL(requestContext,
                                                     marinerRequestURL);

            // The request URL must not be modified.
            requestURL.makeReadOnly();
View Full Code Here


    }



    public URLRewriter getSessionURLRewriter() {
        return new URLRewriter() {
            public MarinerURL mapToExternalURL(MarinerRequestContext context,
                                               MarinerURL url) {
                return url;
            }
View Full Code Here

        // Get the URLRewriter to use to encode session information in the
        // URL and use it, do this before stripping the URL as otherwise it is
        // not done properly.
        MarinerRequestContext requestContext = context.getRequestContext();
        URLRewriter sessionURLRewriter = context.getSessionURLRewriter();
        MarinerURL sessionURL
            = sessionURLRewriter.mapToExternalURL(requestContext,
                                                  documentURL);

        if (logger.isDebugEnabled()) {
            logger.debug("Encoded url is "
                         + sessionURL.getExternalForm());
View Full Code Here

       
        // Get the URLRewriter to use to encode session information in the
        // URL and use it, do this before stripping the URL as otherwise it is
        // not done properly.
        MarinerRequestContext requestContext = pageContext.getRequestContext();
        URLRewriter sessionURLRewriter = pageContext.getSessionURLRewriter();
        MarinerURL sessionURL
            = sessionURLRewriter.mapToExternalURL(requestContext,
                           pageContext.getRequestURL(true));

        if (logger.isDebugEnabled()) {
            logger.debug("Encoded url is "
                         + sessionURL.getExternalForm());
        }

        // As the link we generate is always back to this page we can reduce the
        // overhead by removing the protocol, authority and all but the last part
        // of the path. We do this before URL rewriting as we have no idea what
        // the URL will look like afterwards.
        sessionURL.setProtocol(null);
        sessionURL.setAuthority(null);
        String path = sessionURL.getPath();
        int index = path.lastIndexOf('/');
        if (index != -1) {
            path = path.substring(index + 1);
            sessionURL.setPath(path);
        }

        if (logger.isDebugEnabled()) {
            logger.debug("Relative url is "
                         + sessionURL.getExternalForm());
        }

        // perform any URL rewriting that might be needed
        URLRewriter urlRewriter
            = pageContext.getVolantisBean().getURLRewriter();
        MarinerURL externalURL =
            urlRewriter.mapToExternalURL(requestContext, sessionURL);
           
        // Split the URL up
        SessionIdentifierSearcher searcher
             = SessionIdentifierSearcherFactory.create();           
        SessionIdentifierURL splitURL
View Full Code Here

        }

        // Get the URLRewriter to use to encode session information in the
        // URL and use it.
        MarinerRequestContext requestContext = pageContext.getRequestContext();
        URLRewriter sessionURLRewriter = pageContext.getSessionURLRewriter();
        MarinerURL sessionURL
                = sessionURLRewriter.mapToExternalURL(requestContext,
                                                      rootPageURL);

        // perform any URL rewriting that may be required by an external plugin
        PageURLRewriter urlRewriter = pageContext.getVolantisBean().
                getLayoutURLRewriter();
View Full Code Here

        }

        // Get the URLRewriter to use to encode session information in the
        // URL and use it.
        MarinerRequestContext requestContext = context.getRequestContext();
        URLRewriter sessionURLRewriter = context.getSessionURLRewriter();
        marinerURL = sessionURLRewriter.mapToExternalURL(requestContext,
                                                         marinerURL);

        // perform any URL rewriting that may be required by an external plugin
        PageURLRewriter urlRewriter = context.getVolantisBean().
            getLayoutURLRewriter();
View Full Code Here

     */
    protected MarinerURL rewriteFormURL(MarinerURL url) {
        // Get the URLRewriter to use to encode session information in the
        // URL and use it.
        MarinerRequestContext requestContext = context.getRequestContext();
        URLRewriter sessionURLRewriter = context.getSessionURLRewriter();

        MarinerURL sessionURL = sessionURLRewriter.mapToExternalURL
            (requestContext, url);

        // perform any URL rewriting that may be required by an external
        // plugin
        PageURLRewriter urlRewriter
View Full Code Here

TOP

Related Classes of com.volantis.mcs.integration.URLRewriter

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.