Package com.volantis.synergetics.url

Examples of com.volantis.synergetics.url.URLPrefixRewriteManager


            webdConf.setRemapRedirects(true);

            // Create and configure the URL rewriter.
            URLRewriteProcessConfiguration configuration =
                    new URLRewriteProcessConfiguration();
            URLPrefixRewriteManager rewriter =
                    configuration.getURLPrefixRewriteManager();

            // This rule simulates mapping a DSB service called xpv to
            // the DSB service anotherService.
            rewriter.addRewritableURLPrefix("http://www.volantis.com/dsb/xpv",
                    "http://www.volantis.com/dsb/anotherService",
                    URLPrefixRewriteOperation.REPLACE_PREFIX);
            webdConf.setRedirectRewriteManager(rewriter);

            XMLPipelineContext context =
View Full Code Here


            ConverterConfiguration convertConfig =
                    urlRewriteConfig.getConverterConfiguration();
            convertConfig.setTuples(TUPLES);

            URLPrefixRewriteManager rewriteManager =
                    urlRewriteConfig.getURLPrefixRewriteManager();

            rewriteManager.addRewritableURLPrefix(null, redirectURL,
                                                  URLPrefixRewriteOperation.ADD_PREFIX);

            process = new URLRewriteProcess(urlRewriteConfig);
        }
        return process;
View Full Code Here

     * @param contextURL the current base URL. Can be null.
     * @return the redirect url.
     */
    private String remapRedirectURL(String redirectURL,
                                    String contextURL) {
        URLPrefixRewriteManager rewriteManager =
                configuration.getRedirectRewriteManager();
        if (rewriteManager != null) {
            String remappedRedirectURL = rewriteManager.
                    findAndExecuteRule(redirectURL, contextURL);

            if (remappedRedirectURL != null) {
                // There has been an attempt to remap the redirect
                // url. If the remap was successful then we either
View Full Code Here

                   new ConverterTuple(
                       "http://www.volantis.com/tuple", "img", "src")
               };
        convertConfig.setTuples(tuples);

        URLPrefixRewriteManager rewriteManager =
                configuration.getURLPrefixRewriteManager();
        rewriteManager.addRewritableURLPrefix(null,
                "http://volantis.com/dsb/BBCNews",
                URLPrefixRewriteOperation.ADD_PREFIX);

        privateConfiguration = createURLRewriterConfiguration();
View Full Code Here

                   new ConverterTuple(
                       "http://www.volantis.com/tuple", "img", "src")
               };
        convertConfig.setTuples(tuples);

        URLPrefixRewriteManager rewriteManager =
                configuration.getURLPrefixRewriteManager();
        rewriteManager.addRewritableURLPrefix("http://www.bbc.co.uk/news/",
                null,
                URLPrefixRewriteOperation.REMOVE_PREFIX);
        rewriteManager.addRewritableURLPrefix("http://www.cnn.com/news/",
                null,
                URLPrefixRewriteOperation.REMOVE_PREFIX);

        privateConfiguration = createURLRewriterConfiguration();
View Full Code Here

                   new ConverterTuple(
                       "http://www.volantis.com/tuple", "img", "src")
               };
        convertConfig.setTuples(tuples);

        URLPrefixRewriteManager rewriteManager =
                configuration.getURLPrefixRewriteManager();
        rewriteManager.addRewritableURLPrefix("http://www.bbc.co.uk/news",
                "http://volantis.com/dsb/BBCNews",
                URLPrefixRewriteOperation.REPLACE_PREFIX);
        rewriteManager.addRewritableURLPrefix("http://www.cnn.com/news",
                "http://volantis.com/dsb/CNNNews",
                URLPrefixRewriteOperation.REPLACE_PREFIX);

        privateConfiguration = createURLRewriterConfiguration();
View Full Code Here

            ConverterConfiguration convertConfig =
                    urlRewriteConfig.getConverterConfiguration();
            convertConfig.setTuples(TUPLES);

            URLPrefixRewriteManager rewriteManager =
                    urlRewriteConfig.getURLPrefixRewriteManager();

            //Add rewritableURLPrefix values for all the remote projects.
            //The values are constructed by mapping the remote project location
            //to the contextPath/project.
            //e.g. if there is a project mapping jsp->http://localhost:8080
            //and a context value of 'volantis', http://localhost:8080/blah/blah
            //will be remapped to http://localhost:8080/volantis/jsp/blah/blah
            Iterator iterator = urlRemapper.pathPrefixIterator();
            while (iterator.hasNext()) {
                String project = (String) iterator.next();
                URL remoteMCSProjectLocation =
                        urlRemapper.getRemoteSiteRootURL(project);

                rewriteManager.addRewritableURLPrefix(
                        remoteMCSProjectLocation.toExternalForm(),
                            contextPath+"/"+project,
                                      URLPrefixRewriteOperation.REPLACE_PREFIX);
            }
View Full Code Here

TOP

Related Classes of com.volantis.synergetics.url.URLPrefixRewriteManager

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.