public class EngineConstants extends Object
CoreConstants
interface provides some symbolic constants for
well known constant strings in Sling. Even though these constants will never
change, it is recommended that applications refer to the symbolic constants
instead of code the strings themselves.Modifier and Type | Field and Description |
---|---|
static String |
FILTER_NAME
The name of the service to be used for registering filters with the
SlingRequestProcessor . |
static String |
FILTER_ORDER
Deprecated.
Use
"service.ranking"
(org.osgi.framework.Constants.SERVICE_RANKING) instead |
static String |
FILTER_SCOPE
Deprecated.
Use
SLING_FILTER_SCOPE instead |
static String |
FILTER_SCOPE_COMPONENT
Filter scope value identifying a component level filter.
|
static String |
FILTER_SCOPE_ERROR
Filter scope value identifying an error level filter.
|
static String |
FILTER_SCOPE_FORWARD
Filter scope value identifying a forward level filter.
|
static String |
FILTER_SCOPE_INCLUDE
Filter scope value identifying an include level filter.
|
static String |
FILTER_SCOPE_REQUEST
Filter scope value identifying a request level filter.
|
static String |
SESSION
Deprecated.
as of bundle version 2.1
|
static String |
SLING_CURRENT_SERVLET_NAME
Deprecated.
|
static String |
SLING_FILTER_SCOPE
The name of the service registration property of a
java.servlet.Filter service to be used as a filter by the
SlingRequestProcessor . |
static String |
SLING_HOME
Deprecated.
|
static String |
SLING_HOME_URL
Deprecated.
|
static String |
SLING_SERLVET_NAME
Deprecated.
|
Constructor and Description |
---|
EngineConstants() |
@Deprecated public static final String SLING_HOME
SlingSettingsService.SLING_HOME
This property is available calling the
BundleContext.getProperty(String)
method.
SLING_HOME_URL
,
Constant Field Values@Deprecated public static final String SLING_HOME_URL
SlingSettingsService.SLING_HOME_URL
The value of this property is assigned the value of
new File(${sling.home}).toURI().toString()
before resolving
the property variables.
This property is available calling the
BundleContext.getProperty(String)
method.
SLING_HOME
,
Constant Field Values@Deprecated public static final String SLING_CURRENT_SERVLET_NAME
SlingConstants.SLING_CURRENT_SERVLET_NAME
Servlet.service()
method and reset to any previously stored
value after the service method returns.@Deprecated public static final String SLING_SERLVET_NAME
component.name
property or the service.pid
is
used. If none of the three properties is defined, the Servlet is ignored.@Deprecated public static final String SESSION
javax.jcr.Session
request attribute used to be set by
the SlingAuthenticator upon successfull authentication. with the
release of the Authentication Core 1.0.0 bundle, this request attribute
is not set any more.
Applications requiring access to the JCR Session must be modified to get
the Resource Resolver from the Sling request (
SlingHttpServletRequest.getResourceResolver()
) and adapt it
to the JCR Session.
public static final String FILTER_NAME
SlingRequestProcessor
.@Deprecated public static final String FILTER_SCOPE
SLING_FILTER_SCOPE
insteadjava.servlet.Filter
service to be used as a filter by the
SlingRequestProcessor
.
The specification of the filter.scope
service registration
property is required for a javax.servlet.Filter
service to
be used as a filter by the Sling Engine.
The filter.scope
registration property is expected to be a
scalar String, an array of Strings or a Vector of Strings. Case of the
value is ignored.
FILTER_SCOPE_COMPONENT
,
FILTER_SCOPE_ERROR
,
FILTER_SCOPE_FORWARD
,
FILTER_SCOPE_INCLUDE
,
FILTER_SCOPE_REQUEST
,
Constant Field Valuespublic static final String SLING_FILTER_SCOPE
java.servlet.Filter
service to be used as a filter by the
SlingRequestProcessor
.
The specification of the sling.filter.scope
service registration
property is required for a javax.servlet.Filter
service to
be used as a filter by the Sling Engine.
The sling.filter.scope
registration property is expected to be a
scalar String, an array of Strings or a Vector of Strings. Case of the
value is ignored.
FILTER_SCOPE_COMPONENT
,
FILTER_SCOPE_ERROR
,
FILTER_SCOPE_FORWARD
,
FILTER_SCOPE_INCLUDE
,
FILTER_SCOPE_REQUEST
,
Constant Field Valuespublic static final String FILTER_SCOPE_COMPONENT
Component level filters are called once at the beginning of each request
(after the FILTER_SCOPE_REQUEST
filters) and for each resource
being included or forwarded. The order of calling the filters is defined
by the service.ranking
(or FILTER_ORDER
) property
and the service registration ID.
SLING_FILTER_SCOPE
,
Constant Field Valuespublic static final String FILTER_SCOPE_ERROR
Error level filters are called before calling the
ErrorHandler
due to either a
HttpServletResponse.sendError
call or due to an uncaught
Throwable
. The order of calling the filters is defined by
the service.ranking
(or FILTER_ORDER
) property and
the service registration ID.
FILTER_SCOPE
,
Constant Field Valuespublic static final String FILTER_SCOPE_INCLUDE
Include level filters are called before the script handling an included
resource is called. A resource is considered included if it rendered as a
result of calling RequestDispatcher.include
. This may also
be induced by any JSP tags causing the
RequestDispatcher.include
method being called, e.g.
<sling:include>
. The order of calling the filters is
defined by the service.ranking
(or FILTER_ORDER
)
property and the service registration ID.
FILTER_SCOPE
,
Constant Field Valuespublic static final String FILTER_SCOPE_FORWARD
Forward level filters are called before the script handling a forwarded
resource is called. A resource is considered forwarded if it rendered as
a result of calling RequestDispatcher.forward
. This may also
be induced by any JSP tags causing the
RequestDispatcher.forward
method being called, e.g.
<sling:forward>
. The order of calling the filters is
defined by the service.ranking
(or FILTER_ORDER
)
property and the service registration ID.
FILTER_SCOPE
,
Constant Field Valuespublic static final String FILTER_SCOPE_REQUEST
Request level filters are called once at the beginning of each request.
The order of calling the filters is defined by the
service.ranking
(or FILTER_ORDER
) property and the
service registration ID.
FILTER_SCOPE
,
Constant Field Values@Deprecated public static final String FILTER_ORDER
"service.ranking"
(org.osgi.framework.Constants.SERVICE_RANKING) insteadservice.ranking
service
property to implement filter ordering.
If a service is registered with both a service.ranking
and a
filter.order
property, the service.ranking
property is used for ordering. If only a filter.order
property is used it is currently still used.
Copyright © 2014 The Apache Software Foundation. All rights reserved.