Class HttpSessionHashModel

    • Constructor Summary

      Constructors 
      Constructor Description
      HttpSessionHashModel​(FreemarkerServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, ObjectWrapper wrapper)
      Use this constructor when the session isn't already created.
      HttpSessionHashModel​(javax.servlet.http.HttpSession session, ObjectWrapper wrapper)
      Use this constructor when the session already exists.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TemplateModel get​(java.lang.String key)
      Gets a TemplateModel from the hash.
      boolean isEmpty()  
      • Methods inherited from class java.lang.Object

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

      • HttpSessionHashModel

        public HttpSessionHashModel​(javax.servlet.http.HttpSession session,
                                    ObjectWrapper wrapper)
        Use this constructor when the session already exists.
        Parameters:
        session - the session
        wrapper - an object wrapper used to wrap session attributes
      • HttpSessionHashModel

        public HttpSessionHashModel​(FreemarkerServlet servlet,
                                    javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response,
                                    ObjectWrapper wrapper)
        Use this constructor when the session isn't already created. It is passed enough parameters so that the session can be properly initialized after it's detected that it was created.
        Parameters:
        servlet - the FreemarkerServlet that created this model. If the model is not created through FreemarkerServlet, leave this argument as null.
        request - the actual request
        response - the actual response
        wrapper - an object wrapper used to wrap session attributes