org.apache.tapestry5.services
Interface URLRewriter

All Known Implementing Classes:
URLRewriterImpl

public interface URLRewriter

Service that implements URL and link rewriting.

Since:
5.1.0.2

Method Summary
 boolean hasLinkRules()
           
 boolean hasRequestRules()
           
 org.apache.tapestry5.services.Request processLink(org.apache.tapestry5.services.Request request, URLRewriteContext context)
          Processes rules for rewriting links.
 org.apache.tapestry5.services.Request processRequest(org.apache.tapestry5.services.Request request)
          Processes an incoming Request.
 

Method Detail

processRequest

org.apache.tapestry5.services.Request processRequest(org.apache.tapestry5.services.Request request)
Processes an incoming Request. This method must check if they need to rewrite this request. If no, it must return the received request unchanged. This method cannot return null.

Parameters:
request - a Request.
Returns:
request a Request. It cannot be null.

processLink

org.apache.tapestry5.services.Request processLink(org.apache.tapestry5.services.Request request,
                                                  URLRewriteContext context)
Processes rules for rewriting links.

Parameters:
request - the request to examine
context - the context providing additional information for rewriting
Returns:
the original request if the URLRewriter does nothing, a modified request otherwise, but never null

hasRequestRules

boolean hasRequestRules()
Returns:
true if the urlrewriter has any rules for rewriting inbound request urls

hasLinkRules

boolean hasLinkRules()
Returns:
true if the URLRewriter has any rules for rewriting outbound links.


Copyright © 2012. All Rights Reserved.