org.riotfamily.riot.runtime
Class RiotRuntime

java.lang.Object
  extended by org.riotfamily.riot.runtime.RiotRuntime
All Implemented Interfaces:
ServletContextAware

public class RiotRuntime
extends Object
implements ServletContextAware

Bean that exposes the riot-servlet prefix, the resource path and the riot version.

By default, Riot assumes that the riot-servlet is mapped to /riot/*. In order to use a different mapping, you have to set the context attribute riotServletPrefix in your web.xml.


Field Summary
static String DEFAULT_SERVLET_PREFIX
           
static String SERVLET_PREFIX_ATTRIBUTE
           
 
Constructor Summary
RiotRuntime()
           
 
Method Summary
 String getDeeplinkForHandler(HttpServletRequest request, String handlerName, Object... attributes)
           
 String getDeeplinkForHandler(HttpServletRequest request, String handlerName, Object attribute)
           
 String getResourcePath()
           
static RiotRuntime getRuntime(ApplicationContext context)
           
 String getServletPrefix()
           
 String getUrlForHandler(String handlerName, Object... attributes)
           
 String getUrlForHandler(String handlerName, Object attributes)
           
 String getVersionString()
           
 void setHandlerUrlResolver(HandlerUrlResolver handlerUrlResolver)
           
 void setResourceMapping(String resourceMapping)
           
 void setServletContext(ServletContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SERVLET_PREFIX_ATTRIBUTE

public static final String SERVLET_PREFIX_ATTRIBUTE
See Also:
Constant Field Values

DEFAULT_SERVLET_PREFIX

public static final String DEFAULT_SERVLET_PREFIX
See Also:
Constant Field Values
Constructor Detail

RiotRuntime

public RiotRuntime()
Method Detail

setResourceMapping

public void setResourceMapping(String resourceMapping)

setServletContext

public void setServletContext(ServletContext context)
Specified by:
setServletContext in interface ServletContextAware

setHandlerUrlResolver

public void setHandlerUrlResolver(HandlerUrlResolver handlerUrlResolver)
See Also:
RiotRuntimeInitializer

getServletPrefix

public String getServletPrefix()

getResourcePath

public String getResourcePath()

getVersionString

public String getVersionString()

getUrlForHandler

public String getUrlForHandler(String handlerName,
                               Object attributes)

getUrlForHandler

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

getDeeplinkForHandler

public String getDeeplinkForHandler(HttpServletRequest request,
                                    String handlerName,
                                    Object attribute)

getDeeplinkForHandler

public String getDeeplinkForHandler(HttpServletRequest request,
                                    String handlerName,
                                    Object... attributes)

getRuntime

public static RiotRuntime getRuntime(ApplicationContext context)