|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.servlet.controller.ControllerContextHelper
public final class ControllerContextHelper
This class helps with storing and retrieving the controller context. Internally it uses the current servlet request. Thanks to the servlet-service framework, the current request becomes the parent of all sub-requests that use e.g. the 'servlet:' protocol. This means that it is enough to store objects that should be available in a sub-request into the current request.
Method Summary | |
---|---|
static Map<String,Object> |
getContext(Map<String,? extends Object> parameters)
Retrieve the current controller context from the Cocoon parameters. |
static void |
storeContext(Map<String,Object> controllerContext,
javax.servlet.http.HttpServletRequest request)
Store the controller context (a Map directly into the
HttpServletRequest . |
static void |
storeContext(Map<String,Object> controllerContext,
Map<String,Object> parameters)
Store the controller context (a Map ) in the Cocoon parameters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Map<String,Object> getContext(Map<String,? extends Object> parameters)
parameters
- The Cocoon parameters map.
public static void storeContext(Map<String,Object> controllerContext, Map<String,Object> parameters)
Map
) in the Cocoon parameters.
controllerContext
- The objects that should be available in the
child request.parameters
- The Cocoon parameters map.public static void storeContext(Map<String,Object> controllerContext, javax.servlet.http.HttpServletRequest request)
Map
directly into the
HttpServletRequest
.
controllerContext
- The objects that should be available in the
child request.request
- The current request that becomes the parent of the next
request.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |