Class HtlPageContext


  • public class HtlPageContext
    extends javax.servlet.jsp.PageContext
    Mocks a PageContext from the Bindings of HTL.
    • Field Detail

      • bindings

        protected final Bindings bindings
      • jspWriter

        protected javax.servlet.jsp.JspWriter jspWriter
    • Constructor Detail

      • HtlPageContext

        public HtlPageContext​(@Nonnull
                              Bindings bindings)
        Instantiates a new HTLPageContext.
        Parameters:
        bindings - the HTL bindings
    • Method Detail

      • getSlingScriptHelper

        protected org.apache.sling.api.scripting.SlingScriptHelper getSlingScriptHelper()
      • getSlingScript

        protected org.apache.sling.api.scripting.SlingScript getSlingScript()
      • release

        public void release()
        Specified by:
        release in class javax.servlet.jsp.PageContext
      • getSession

        public javax.servlet.http.HttpSession getSession()
        Specified by:
        getSession in class javax.servlet.jsp.PageContext
      • getRequest

        public javax.servlet.ServletRequest getRequest()
        Specified by:
        getRequest in class javax.servlet.jsp.PageContext
      • getResponse

        public javax.servlet.ServletResponse getResponse()
        Specified by:
        getResponse in class javax.servlet.jsp.PageContext
      • getOut

        public javax.servlet.jsp.JspWriter getOut()
        Specified by:
        getOut in class javax.servlet.jsp.JspContext
      • setAttribute

        public void setAttribute​(String name,
                                 Object attribute)
        Specified by:
        setAttribute in class javax.servlet.jsp.JspContext
      • setAttribute

        public void setAttribute​(String name,
                                 Object o,
                                 int scope)
        Specified by:
        setAttribute in class javax.servlet.jsp.JspContext
      • getAttribute

        public Object getAttribute​(String name)
        Specified by:
        getAttribute in class javax.servlet.jsp.JspContext
      • getAttribute

        public Object getAttribute​(String name,
                                   int scope)
        Specified by:
        getAttribute in class javax.servlet.jsp.JspContext
      • findAttribute

        public Object findAttribute​(String name)
        Specified by:
        findAttribute in class javax.servlet.jsp.JspContext
      • removeAttribute

        public void removeAttribute​(String name)
        Specified by:
        removeAttribute in class javax.servlet.jsp.JspContext
      • removeAttribute

        public void removeAttribute​(String name,
                                    int scope)
        Specified by:
        removeAttribute in class javax.servlet.jsp.JspContext
      • getAttributesScope

        public int getAttributesScope​(String name)
        Specified by:
        getAttributesScope in class javax.servlet.jsp.JspContext
      • getAttributeNamesInScope

        public Enumeration<String> getAttributeNamesInScope​(int scope)
        Specified by:
        getAttributeNamesInScope in class javax.servlet.jsp.JspContext
      • forward

        public void forward​(String relativeUrlPath)
                     throws javax.servlet.ServletException,
                            IOException
        Specified by:
        forward in class javax.servlet.jsp.PageContext
        Throws:
        javax.servlet.ServletException
        IOException
      • include

        public void include​(String relativeUrlPath)
                     throws javax.servlet.ServletException,
                            IOException
        Specified by:
        include in class javax.servlet.jsp.PageContext
        Throws:
        javax.servlet.ServletException
        IOException
      • include

        public void include​(String relativeUrlPath,
                            boolean flush)
                     throws javax.servlet.ServletException,
                            IOException
        Specified by:
        include in class javax.servlet.jsp.PageContext
        Throws:
        javax.servlet.ServletException
        IOException
      • getPage

        public Object getPage()
        Specified by:
        getPage in class javax.servlet.jsp.PageContext
      • getServletConfig

        public javax.servlet.ServletConfig getServletConfig()
        Specified by:
        getServletConfig in class javax.servlet.jsp.PageContext
      • getServletContext

        public javax.servlet.ServletContext getServletContext()
        Specified by:
        getServletContext in class javax.servlet.jsp.PageContext
      • getExpressionEvaluator

        public javax.servlet.jsp.el.ExpressionEvaluator getExpressionEvaluator()
        Specified by:
        getExpressionEvaluator in class javax.servlet.jsp.JspContext
      • getVariableResolver

        public javax.servlet.jsp.el.VariableResolver getVariableResolver()
        Specified by:
        getVariableResolver in class javax.servlet.jsp.JspContext
      • getELContext

        public javax.el.ELContext getELContext()
        Specified by:
        getELContext in class javax.servlet.jsp.JspContext
      • getException

        public Exception getException()
        Specified by:
        getException in class javax.servlet.jsp.PageContext
      • handlePageException

        public void handlePageException​(Exception e)
                                 throws javax.servlet.ServletException,
                                        IOException
        Specified by:
        handlePageException in class javax.servlet.jsp.PageContext
        Throws:
        javax.servlet.ServletException
        IOException
      • handlePageException

        public void handlePageException​(Throwable t)
                                 throws javax.servlet.ServletException,
                                        IOException
        Specified by:
        handlePageException in class javax.servlet.jsp.PageContext
        Throws:
        javax.servlet.ServletException
        IOException