|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectro.isdc.wro.config.Context
public class Context
Holds the properties related to a request cycle.
| Method Summary | |
|---|---|
static void |
destroy()
Perform context clean-up. |
static Context |
get()
|
String |
getAggregatedFolderPath()
|
WroConfiguration |
getConfig()
|
javax.servlet.FilterConfig |
getFilterConfig()
|
javax.servlet.http.HttpServletRequest |
getRequest()
|
javax.servlet.http.HttpServletResponse |
getResponse()
|
javax.servlet.ServletContext |
getServletContext()
|
static boolean |
isContextSet()
|
static void |
set(Context context)
|
static void |
set(Context context,
WroConfiguration config)
Associate a context with the CURRENT request cycle. |
void |
setAggregatedFolderPath(String aggregatedFolderPath)
This field is useful only for the aggregated resources of type ResourceType.CSS. |
void |
setConfig(WroConfiguration config)
DO NOT CALL THIS METHOD UNLESS YOU ARE SURE WHAT YOU ARE DOING. |
static Context |
standaloneContext()
A context useful for running in non web context (standAlone applications). |
String |
toString()
|
static void |
unset()
Remove context from the local thread. |
static Context |
webContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterConfig filterConfig)
A context useful for running in web context (inside a servlet container). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public WroConfiguration getConfig()
WroConfiguration singleton instance.public void setConfig(WroConfiguration config)
WroConfiguration singleton instance.
public static Context webContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
javax.servlet.FilterConfig filterConfig)
public static Context standaloneContext()
public static Context get()
Context associated with CURRENT request cycle.public static boolean isContextSet()
public static void set(Context context)
public static void set(Context context,
WroConfiguration config)
context - Context to set.public static void unset()
public javax.servlet.http.HttpServletRequest getRequest()
public javax.servlet.http.HttpServletResponse getResponse()
public javax.servlet.ServletContext getServletContext()
public javax.servlet.FilterConfig getFilterConfig()
public String getAggregatedFolderPath()
public void setAggregatedFolderPath(String aggregatedFolderPath)
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.
aggregatedFolderPath - the aggregatedFolderPath to setpublic static void destroy()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||