org.riotfamily.common.web.mapping
Interface ReverseHandlerMapping

All Known Implementing Classes:
AbstractReverseHandlerMapping, AdvancedBeanNameHandlerMapping, PageHandlerMapping, SiteBeanNameHandlerMapping

public interface ReverseHandlerMapping

Interface that can be implemented by HandlerMappings in order to allow reverse lookups. This way you can obtain an URL for a mapped handler.

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

Field Summary
static String TOP_LEVEL_HANDLER_NAME_ATTRIBUTE
          Name of the HttpServletRequest attribute that contains the beanName of the matched handler.
 
Method Summary
 String getUrlForHandler(String handlerName, String prefix, Object attributes, UrlResolverContext context)
          Returns the URL of a mapped handler.
 

Field Detail

TOP_LEVEL_HANDLER_NAME_ATTRIBUTE

static final String TOP_LEVEL_HANDLER_NAME_ATTRIBUTE
Name of the HttpServletRequest attribute that contains the beanName of the matched handler.

Note: This attribute is not required to be supported by all ReverseHandlerMapping implementations.

Method Detail

getUrlForHandler

String getUrlForHandler(String handlerName,
                        String prefix,
                        Object attributes,
                        UrlResolverContext context)
Returns the URL of a mapped handler.

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