Enum SlingServletFilterScope
- java.lang.Object
-
- java.lang.Enum<SlingServletFilterScope>
-
- org.apache.sling.servlets.annotations.SlingServletFilterScope
-
- All Implemented Interfaces:
Serializable
,Comparable<SlingServletFilterScope>
public enum SlingServletFilterScope extends Enum<SlingServletFilterScope>
The possible scopes for theSlingServletFilter.scope()
annotation.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description COMPONENT
Filters are called upon calling theRequestDispatcher.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 uponHttpServletResponse.sendError(int)
orHttpServletResponse.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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getScope()
String
toString()
static SlingServletFilterScope
valueOf(String name)
Returns the enum constant of this type with the specified name.static SlingServletFilterScope[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 theRequestDispatcher.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 uponHttpServletResponse.sendError(int)
orHttpServletResponse.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 nameNullPointerException
- if the argument is null
-
getScope
public String getScope()
- Returns:
- String representation of the scope
-
toString
public String toString()
- Overrides:
toString
in classEnum<SlingServletFilterScope>
-
-