org.riotfamily.common.web.mapping
Class HandlerUrlResolver

java.lang.Object
  extended by org.riotfamily.common.web.mapping.HandlerUrlResolver
All Implemented Interfaces:
ApplicationContextAware

public class HandlerUrlResolver
extends Object
implements ApplicationContextAware

Class that performs URL lookups for handlers mapped by a ReverseHandlerMapping.

Since:
6.5
Author:
Felix Gnass [fgnass at neteye dot de]

Constructor Summary
HandlerUrlResolver(PathCompleter pathCompleter)
           
 
Method Summary
 String getUrlForHandler(HttpServletRequest request, String handlerName, Object... attributes)
          Returns the URL of a mapped handler.
 String getUrlForHandler(HttpServletRequest request, String handlerName, Object attributes)
          Returns the URL of a mapped handler.
 String getUrlForHandler(HttpServletRequest request, String handlerName, Object attributes, String prefix)
          Returns the URL of a mapped handler.
 String getUrlForHandler(UrlResolverContext context, String handlerName, Object... attributes)
           
 String getUrlForHandler(UrlResolverContext context, String handlerName, Object attributes)
           
 String getUrlForHandler(UrlResolverContext context, String handlerName, Object attributes, String prefix)
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HandlerUrlResolver

public HandlerUrlResolver(PathCompleter pathCompleter)
Method Detail

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
Specified by:
setApplicationContext in interface ApplicationContextAware

getUrlForHandler

public String getUrlForHandler(HttpServletRequest request,
                               String handlerName,
                               Object attributes)
Returns the URL of a mapped handler.

Parameters:
handlerName - The name of the handler
attributes - Optional attributes to fill out wildcards. Can either be null, a primitive wrapper, a Map or a bean.
request - The current request

getUrlForHandler

public String getUrlForHandler(HttpServletRequest request,
                               String handlerName,
                               Object... attributes)
Returns the URL of a mapped handler.

Parameters:
handlerName - The name of the handler
attributes - Optional attributes to fill out wildcards.
request - The current request

getUrlForHandler

public String getUrlForHandler(HttpServletRequest request,
                               String handlerName,
                               Object attributes,
                               String prefix)
Returns the URL of a mapped handler.

Parameters:
handlerName - The name of the handler
attributes - Optional attributes to fill out wildcards. Can either be null, a primitive wrapper, a Map or a bean.
request - The current request
prefix - Optional prefix to sort out ambiguities

getUrlForHandler

public String getUrlForHandler(UrlResolverContext context,
                               String handlerName,
                               Object attributes)

getUrlForHandler

public String getUrlForHandler(UrlResolverContext context,
                               String handlerName,
                               Object... attributes)

getUrlForHandler

public String getUrlForHandler(UrlResolverContext context,
                               String handlerName,
                               Object attributes,
                               String prefix)