Package org.openxava.controller
Class ModuleContext
java.lang.Object
org.openxava.controller.ModuleContext
- All Implemented Interfaces:
Serializable
Context with life of session and private for every module.
- Author:
- Javier Paniza
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidbooleanbooleanIf does not exist the it create one, as defined in controllers.xml.Return a object associated to the specified module in 'application' and 'module' of request.Return a object asociate to the specified module in 'application' and 'module' of request.All objects with this name in all the active modules of the user session.getContext(javax.servlet.http.HttpServletRequest request, String objectName) getCurrentModule(javax.servlet.http.HttpServletRequest request) getWindowId(javax.servlet.http.HttpServletRequest request) voidvoidvoidvoidvoidresetAllModulesExceptCurrent(javax.servlet.http.HttpServletRequest request) Reset all the context state for all the module but the current one.voidresetModule(javax.servlet.http.HttpServletRequest request) Reset all the context state for the module.voidvoidsetCurrentWindowId(javax.servlet.http.HttpServletRequest request)
-
Constructor Details
-
ModuleContext
public ModuleContext()
-
-
Method Details
-
get
public Object get(javax.servlet.http.HttpServletRequest request, String objectName) throws XavaException Return a object associated to the specified module in 'application' and 'module' of request.- Throws:
XavaException
-
get
public Object get(javax.servlet.http.HttpServletRequest request, String objectName, String className) throws XavaException Return a object asociate to the specified module in 'application' and 'module' of request.- Throws:
XavaException
-
get
public Object get(String application, String module, String objectName, String className) throws XavaException - Throws:
XavaException
-
get
If does not exist the it create one, as defined in controllers.xml.- Throws:
XavaException
-
exists
- Throws:
XavaException
-
exists
public boolean exists(javax.servlet.http.HttpServletRequest request, String objectName) throws XavaException - Throws:
XavaException
-
put
public void put(javax.servlet.http.HttpServletRequest request, String objectName, Object value) throws XavaException - Throws:
XavaException
-
put
public void put(String application, String module, String objectName, Object value) throws XavaException - Throws:
XavaException
-
remove
public void remove(javax.servlet.http.HttpServletRequest request, String objectName) throws XavaException - Throws:
XavaException
-
remove
- Throws:
XavaException
-
getCurrentModule
- Since:
- 4.1.2
-
resetModule
Reset all the context state for the module. Actually reinit the module.- Throws:
XavaException- Since:
- 6.0
-
resetAllModulesExceptCurrent
public void resetAllModulesExceptCurrent(javax.servlet.http.HttpServletRequest request) throws XavaException Reset all the context state for all the module but the current one. Actually reinit the modules.- Throws:
XavaException- Since:
- 6.0.2
-
getContext
public Map getContext(javax.servlet.http.HttpServletRequest request, String objectName) throws XavaException - Throws:
XavaException
-
getAll
All objects with this name in all the active modules of the user session. -
getWindowId
-
setCurrentWindowId
public void setCurrentWindowId(javax.servlet.http.HttpServletRequest request) -
setCurrentWindowId
-
cleanCurrentWindowId
public static void cleanCurrentWindowId() -
dontGenerateNewWindowIdNextTime
public void dontGenerateNewWindowIdNextTime()
-