org.xwiki.portlet.url
Class DefaultURLRewriter

java.lang.Object
  extended by org.xwiki.portlet.url.DefaultURLRewriter
All Implemented Interfaces:
URLRewriter

public class DefaultURLRewriter
extends Object
implements URLRewriter

Rewrites relative servlet URLs into portlet URLs.

Version:
$Id: 9303376cba8f233e1943a8999771d67710365fc9 $

Constructor Summary
DefaultURLRewriter(DispatchURLFactory dispatchURLFactory, String contextPath)
          Creates a new URL rewriter that transforms relative servlet URLs into portlet URLs.
 
Method Summary
 String rewrite(String servletURL, Object... parameters)
          Rewrites the given URL using the given parameters.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultURLRewriter

public DefaultURLRewriter(DispatchURLFactory dispatchURLFactory,
                          String contextPath)
Creates a new URL rewriter that transforms relative servlet URLs into portlet URLs.

Parameters:
dispatchURLFactory - the object used to create portlet URLs
contextPath - the servlet context path, used to determine relative servlet URLs
Method Detail

rewrite

public String rewrite(String servletURL,
                      Object... parameters)
Description copied from interface: URLRewriter
Rewrites the given URL using the given parameters.

Specified by:
rewrite in interface URLRewriter
Parameters:
servletURL - the URL to be rewritten
parameters - parameters to control how the given URL is rewritten
Returns:
the rewritten URL


Copyright © 2004-2013 XWiki. All Rights Reserved.