Enum SlingServletFilterScope

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COMPONENT
      Filters are called upon calling the RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called.
      ERROR
      Filters are called upon HttpServletResponse.sendError(int) or HttpServletResponse.sendError(int, String) or any uncaught Throwable before resolving the error handler Servlet or script.
      FORWARD
      Filters are called upon calling the RequestDispatcher.forward method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called.
      INCLUDE
      Filters are called upon calling the RequestDispatcher.include method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called.
      REQUEST
      Filters are called once per request hitting Sling from the outside.
    • Enum Constant Detail

      • REQUEST

        public static final SlingServletFilterScope REQUEST
        Filters are called once per request hitting Sling from the outside. These filters are called after the resource addressed by the request URL and the Servlet or script to process the request has been resolved before the COMPONENT filters (if any) and the Servlet or script are called.

        Servlet API Correspondence: REQUEST

      • COMPONENT

        public static final SlingServletFilterScope COMPONENT
        Filters are called upon calling the RequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse) method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called.

        Servlet API Correspondence: REQUEST,INCLUDE,FORWARD

      • ERROR

        public static final SlingServletFilterScope ERROR
        Filters are called upon HttpServletResponse.sendError(int) or HttpServletResponse.sendError(int, String) or any uncaught Throwable before resolving the error handler Servlet or script.

        Servlet API Correspondence: ERROR

      • INCLUDE

        public static final SlingServletFilterScope INCLUDE
        Filters are called upon calling the RequestDispatcher.include method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called.

        Servlet API Correspondence: INCLUDE

      • FORWARD

        public static final SlingServletFilterScope FORWARD
        Filters are called upon calling the RequestDispatcher.forward method after the included resource and the Servlet or script to process the include have been resolved before the Servlet or script is called.

        Servlet API Correspondence: FORWARD

    • Method Detail

      • values

        public static SlingServletFilterScope[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (SlingServletFilterScope c : SlingServletFilterScope.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static SlingServletFilterScope valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getScope

        public String getScope()
        Returns:
        String representation of the scope