public interface ReadOnlyContext
Context. Prefer to use fields of this type for injection in processors, because it is
thread-safe (the getAggregatedFolderPath is computed correctly in multi-threaded environment).
The interface is required to make it possible to create Proxy of the Context during injection using
standard jdk support. It is possible to create also proxies for classes, but a new dependency is required for this
(javassist), which is something I prefer to avoid at this point.| Modifier and Type | Method and Description |
|---|---|
String |
getAggregatedFolderPath()
This field is useful only for the aggregated resources of type
ResourceType.CSS. |
WroConfiguration |
getConfig() |
javax.servlet.FilterConfig |
getFilterConfig() |
javax.servlet.http.HttpServletRequest |
getRequest() |
javax.servlet.http.HttpServletResponse |
getResponse() |
javax.servlet.ServletContext |
getServletContext() |
WroConfiguration getConfig()
WroConfiguration singleton instance.javax.servlet.http.HttpServletRequest getRequest()
javax.servlet.http.HttpServletResponse getResponse()
javax.servlet.ServletContext getServletContext()
javax.servlet.FilterConfig getFilterConfig()
String getAggregatedFolderPath()
ResourceType.CSS. The
aggregatedFolderPath is used to compute the depth. For example, if aggregatedFolder is "wro" then the depth is 1
and the path used to prefix the image url is "..". If the aggregatedFolder is "css/aggregated", the
depth is 2 and the prefix is "../..". The name of the aggregated folder is not important, it is used
only to compute the depth.Copyright © 2008-2013. All Rights Reserved.