Package org.apache.lenya.cms.linking

Examples of org.apache.lenya.cms.linking.OutgoingLinkRewriter.rewrite()


        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, session, request
                .getRequestURI(), request.isSecure(), false, this.relativeUrls);
        if (!rewriter.matches(url)) {
            throw new ConfigurationException("The URL [" + url + "] can't be rewritten!");
        }
        return rewriter.rewrite(url);
    }

    /**
     * @see org.apache.cocoon.components.modules.input.InputModule#getAttributeNames(org.apache.avalon.framework.configuration.Configuration,
     *      java.util.Map)
View Full Code Here


                String originalUrl = resources[i].getCanonicalWebappURL();
                int lastDotIndex = originalUrl.lastIndexOf('.');
                String extension = resources[i].getSourceExtension();
                String url = originalUrl.substring(0, lastDotIndex) + "." + extension;

                String proxyUrl = rewriter.rewrite(url);
                asset2proxyUrl.put(resources[i], proxyUrl);

            }

            setParameter("assets", resources);
View Full Code Here

        URLInformation info = new URLInformation(getSourceURL());
        String pubId = info.getPublicationId();
        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, getSession(),
                    getSourceURL(), request.isSecure(), false, false);
       
        setParameter("proxyUrl",rewriter.rewrite("/" + pubId));
    }

    /**
     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
     */
 
View Full Code Here

                            url);
                    if (policy.isSSLProtected()) {
                        Session session = RepositoryUtil.getSession(this.manager, request);
                        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, session, url,
                                false, true, false);
                        String sslUri = rewriter.rewrite(url);
                        return Collections.singletonMap(KEY_REDIRECT_URI, sslUri);
                    }
                }
   
            } finally {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.