Package com.volantis.mcs.integration

Examples of com.volantis.mcs.integration.PageURLRewriter


                new Class [] {MarinerApplication.class},
                new Object [] { application });

        final String testURL = "http://test/url";

        PageURLRewriter layoutURLRewriter = new PageURLRewriter() {
            public MarinerURL rewriteURL(MarinerRequestContext context,
                                         MarinerURL url,
                                         PageURLDetails details) {
                return new MarinerURL(testURL);
            }
View Full Code Here


        appContext.setFragmentationSupported(true);
        // Fragmentation needs a URL and rewriter for URL manipulation.
        pageContext.setRootPageURL(new MarinerURL());
        pageContext.setVolantis(new TestableVolantis() {
            public PageURLRewriter getLayoutURLRewriter() {
                return new PageURLRewriter() {
                    public MarinerURL rewriteURL(MarinerRequestContext context,
                                                 MarinerURL url,
                                                 PageURLDetails details) {
                        return new URLRewriterManager.DefaultURLRewriter().
                                mapToExternalURL(context, url);
View Full Code Here

        appContext.setFragmentationSupported(true);
        // Fragmentation needs a URL and rewriter for URL manipulation.
        pageContext.setRootPageURL(new MarinerURL());
        pageContext.setVolantis(new TestableVolantis() {
            public PageURLRewriter getLayoutURLRewriter() {
                return new PageURLRewriter() {
                    public MarinerURL rewriteURL(MarinerRequestContext context,
                                                 MarinerURL url,
                                                 PageURLDetails details) {
                        return new URLRewriterManager.DefaultURLRewriter().
                                mapToExternalURL(context, url);
View Full Code Here

    private static PageURLRewriter createRewriter(Class rewriterClass,
                                                 MarinerApplication marinerApplication)
            throws InvocationTargetException, InstantiationException,
            IllegalAccessException {
        Constructor constructors [] = rewriterClass.getConstructors();
        PageURLRewriter rewriter = null;
        Constructor defaultConstructor = null;
        for (int i = 0; i < constructors.length && rewriter == null; i++) {
            Class paramTypes [] = constructors[i].getParameterTypes();
            switch (paramTypes.length) {
                case 0:
View Full Code Here

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

        // perform any URL rewriting that might be needed
        PageURLRewriter urlRewriter = context.getVolantisBean().
                getLayoutURLRewriter();
        MarinerURL externalURL =
                urlRewriter.rewriteURL(context.getRequestContext(),
                sessionURL,
                PageURLDetailsFactory.createPageURLDetails(PageURLType.FRAGMENT));

        return externalURL;
    }
View Full Code Here

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

        // perform any URL rewriting that may be required by an external plugin
        PageURLRewriter urlRewriter = pageContext.getVolantisBean().
                getLayoutURLRewriter();
        MarinerURL externalURL =
                urlRewriter.rewriteURL(pageContext.getRequestContext(),
                        sessionURL,
                        PageURLDetailsFactory.createPageURLDetails(
                                PageURLType.FRAGMENT));

        String absoluteLink = externalURL.getExternalForm();
View Full Code Here

        pageURLRewriter = new RuntimePageURLRewriter(marinerConfig.
                getPageURLRewriterPluginClass(), marinerApplication);

        // Configure the layout url rewriter.
        layoutURLRewriter = new PageURLRewriter() {
            public MarinerURL rewriteURL(MarinerRequestContext context,
                                         MarinerURL url,
                                         PageURLDetails details) {

                // First rewrite the url with the urlRewriter.
View Full Code Here

    protected static String rewriteURLWithPageURLRewriter(XDIMEContextInternal context, String url, PageURLType urlType) {
        MarinerRequestContext requestContext = context.getInitialRequestContext();
       
        ApplicationContext applicationContext = ContextInternals.getApplicationContext(requestContext);
       
        PageURLRewriter rewriter = applicationContext.getPageURLRewriter();
       
        if (rewriter != null) {
            // Convert URL string to MarinerURL instance.
            MarinerURL marinerURL = new MarinerURL(url);
           
            // Rewrite the MarinerURL instance.
            marinerURL = rewriter.rewriteURL(requestContext, marinerURL,
                    PageURLDetailsFactory.createPageURLDetails(urlType));
           
            // Convert back to URL string.
            url = marinerURL.getExternalForm();
        }
View Full Code Here

        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();
        MarinerURL externalURL = urlRewriter.rewriteURL(
            context.getRequestContext(),
            marinerURL,
            PageURLDetailsFactory.createPageURLDetails(PageURLType.FORM));

        String absoluteLink = externalURL.getExternalForm();
View Full Code Here

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

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

        return urlRewriter.rewriteURL
            (requestContext, sessionURL,
             PageURLDetailsFactory.
             createPageURLDetails(PageURLType.FORM));
    }
View Full Code Here

TOP

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

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.