Class ModuleContext

  • All Implemented Interfaces:
    java.io.Serializable

    public class ModuleContext
    extends java.lang.Object
    implements java.io.Serializable
    Context 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 void cleanCurrentWindowId()  
      void dontGenerateNewWindowIdNextTime()  
      boolean exists​(java.lang.String application, java.lang.String module, java.lang.String objectName)  
      boolean exists​(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)  
      java.lang.Object get​(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.Object get​(java.lang.String application, java.lang.String module, java.lang.String objectName, java.lang.String className)  
      java.lang.Object get​(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.Object get​(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.Collection getAll​(java.lang.String objectName)
      All objects with this name in all the active modules of the user session.
      java.util.Map getContext​(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)  
      java.lang.String getCurrentModule​(javax.servlet.http.HttpServletRequest request)  
      java.lang.String getWindowId​(javax.servlet.http.HttpServletRequest request)  
      void put​(java.lang.String application, java.lang.String module, java.lang.String objectName, java.lang.Object value)  
      void put​(javax.servlet.http.HttpServletRequest request, java.lang.String objectName, java.lang.Object value)  
      void remove​(java.lang.String application, java.lang.String module, java.lang.String objectName)  
      void remove​(javax.servlet.http.HttpServletRequest request, java.lang.String objectName)  
      void resetAllModulesExceptCurrent​(javax.servlet.http.HttpServletRequest request)
      Reset all the context state for all the module but the current one.
      void resetModule​(javax.servlet.http.HttpServletRequest request)
      Reset all the context state for the module.
      void setCurrentWindowId​(java.lang.String id)  
      void setCurrentWindowId​(javax.servlet.http.HttpServletRequest request)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ModuleContext

        public ModuleContext()
    • Method Detail

      • get

        public java.lang.Object get​(javax.servlet.http.HttpServletRequest request,
                                    java.lang.String objectName)
                             throws XavaException
        Return 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 XavaException
        Return 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 XavaException
        If 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 XavaException
        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 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()