Package org.openxava.controller
Class ModuleContext
- java.lang.Object
-
- org.openxava.controller.ModuleContext
-
- All Implemented Interfaces:
java.io.Serializable
public class ModuleContext extends java.lang.Object implements java.io.SerializableContext with life of session and private for every module.- Author:
- Javier Paniza
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ModuleContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcleanCurrentWindowId()voiddontGenerateNewWindowIdNextTime()booleanexists(java.lang.String application, java.lang.String module, java.lang.String objectName)booleanexists(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)java.lang.Objectget(java.lang.String application, java.lang.String module, java.lang.String objectName)If does not exist the it create one, as defined in controllers.xml.java.lang.Objectget(java.lang.String application, java.lang.String module, java.lang.String objectName, java.lang.String className)java.lang.Objectget(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)Return a object associated to the specified module in 'application' and 'module' of request.java.lang.Objectget(javax.servlet.http.HttpServletRequest request, java.lang.String objectName, java.lang.String className)Return a object asociate to the specified module in 'application' and 'module' of request.java.util.CollectiongetAll(java.lang.String objectName)All objects with this name in all the active modules of the user session.java.util.MapgetContext(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)java.lang.StringgetCurrentModule(javax.servlet.http.HttpServletRequest request)java.lang.StringgetWindowId(javax.servlet.http.HttpServletRequest request)voidput(java.lang.String application, java.lang.String module, java.lang.String objectName, java.lang.Object value)voidput(javax.servlet.http.HttpServletRequest request, java.lang.String objectName, java.lang.Object value)voidremove(java.lang.String application, java.lang.String module, java.lang.String objectName)voidremove(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)voidresetAllModulesExceptCurrent(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.voidsetCurrentWindowId(java.lang.String id)voidsetCurrentWindowId(javax.servlet.http.HttpServletRequest request)
-
-
-
Method Detail
-
get
public java.lang.Object get(javax.servlet.http.HttpServletRequest request, java.lang.String objectName) throws XavaExceptionReturn a object associated to the specified module in 'application' and 'module' of request.- Throws:
XavaException
-
get
public java.lang.Object get(javax.servlet.http.HttpServletRequest request, java.lang.String objectName, java.lang.String className) throws XavaExceptionReturn a object asociate to the specified module in 'application' and 'module' of request.- Throws:
XavaException
-
get
public java.lang.Object get(java.lang.String application, java.lang.String module, java.lang.String objectName, java.lang.String className) throws XavaException- Throws:
XavaException
-
get
public java.lang.Object get(java.lang.String application, java.lang.String module, java.lang.String objectName) throws XavaExceptionIf does not exist the it create one, as defined in controllers.xml.- Throws:
XavaException
-
exists
public boolean exists(java.lang.String application, java.lang.String module, java.lang.String objectName) throws XavaException- Throws:
XavaException
-
exists
public boolean exists(javax.servlet.http.HttpServletRequest request, java.lang.String objectName) throws XavaException- Throws:
XavaException
-
put
public void put(javax.servlet.http.HttpServletRequest request, java.lang.String objectName, java.lang.Object value) throws XavaException- Throws:
XavaException
-
put
public void put(java.lang.String application, java.lang.String module, java.lang.String objectName, java.lang.Object value) throws XavaException- Throws:
XavaException
-
remove
public void remove(javax.servlet.http.HttpServletRequest request, java.lang.String objectName) throws XavaException- Throws:
XavaException
-
remove
public void remove(java.lang.String application, java.lang.String module, java.lang.String objectName) throws XavaException- Throws:
XavaException
-
getCurrentModule
public java.lang.String getCurrentModule(javax.servlet.http.HttpServletRequest request)
- Since:
- 4.1.2
-
resetModule
public void resetModule(javax.servlet.http.HttpServletRequest request) throws XavaExceptionReset 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 XavaExceptionReset all the context state for all the module but the current one. Actually reinit the modules.- Throws:
XavaException- Since:
- 6.0.2
-
getContext
public java.util.Map getContext(javax.servlet.http.HttpServletRequest request, java.lang.String objectName) throws XavaException- Throws:
XavaException
-
getAll
public java.util.Collection getAll(java.lang.String objectName)
All objects with this name in all the active modules of the user session.
-
getWindowId
public java.lang.String getWindowId(javax.servlet.http.HttpServletRequest request)
-
setCurrentWindowId
public void setCurrentWindowId(javax.servlet.http.HttpServletRequest request)
-
setCurrentWindowId
public void setCurrentWindowId(java.lang.String id)
-
cleanCurrentWindowId
public static void cleanCurrentWindowId()
-
dontGenerateNewWindowIdNextTime
public void dontGenerateNewWindowIdNextTime()
-
-