public class SlingConstants
extends java.lang.Object
SlingConstants
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.
This class is not intended to be extended or instantiated because it just provides constants not intended to be overwritten.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_INCLUDE_CONTEXT_PATH
The name of the request attribute containing the
HttpServletRequest.getContextPath() of the request which
included the servlet currently being active underlying the
Servlet which included the servlet currently being active
(value is "javax.servlet.include.context_path"). |
static java.lang.String |
ATTR_INCLUDE_PATH_INFO
The name of the request attribute containing the
HttpServletRequest.getPathInfo() of the request which
included the servlet currently being active underlying the
Servlet which included the servlet currently being active
(value is "javax.servlet.include.path_info"). |
static java.lang.String |
ATTR_INCLUDE_QUERY_STRING
The name of the request attribute containing the
HttpServletRequest.getQueryString() of the request which
included the servlet currently being active underlying the
Servlet which included the servlet currently being active
(value is "javax.servlet.include.query_string"). |
static java.lang.String |
ATTR_INCLUDE_REQUEST_URI
The name of the request attribute containing the
HttpServletRequest.getRequestURI() of the request which
included the servlet currently being active underlying the
Servlet which included the servlet currently being active
(value is "javax.servlet.include.request_uri"). |
static java.lang.String |
ATTR_INCLUDE_SERVLET_PATH
The name of the request attribute containing the
HttpServletRequest.getServletPath() of the request which
included the servlet currently being active underlying the
Servlet which included the servlet currently being active
(value is "javax.servlet.include.servlet_path"). |
static java.lang.String |
ATTR_REQUEST_CONTENT
The name of the request attribute containing the
Resource
underlying the Servlet which included the servlet currently
being active (value is "org.apache.sling.api.include.resource"). |
static java.lang.String |
ATTR_REQUEST_PATH_INFO
The name of the request attribute containing the
RequestPathInfo underlying the Servlet which
included the servlet currently being active (value is
"org.apache.sling.api.include.request_path_info"). |
static java.lang.String |
ATTR_REQUEST_SERVLET
The name of the request attribute containing the
Servlet
which included the servlet currently being active (value is
"org.apache.sling.api.include.servlet"). |
static java.lang.String |
ERROR_EXCEPTION
The name of the request attribute containing the exception thrown causing
the error handler to be called (value is
"javax.servlet.error.exception").
|
static java.lang.String |
ERROR_EXCEPTION_TYPE
The name of the request attribute containing the fully qualified class
name of the exception thrown causing the error handler to be called
(value is "javax.servlet.error.exception_type").
|
static java.lang.String |
ERROR_MESSAGE
The name of the request attribute containing the message of the error
situation (value is "javax.servlet.error.message").
|
static java.lang.String |
ERROR_REQUEST_URI
The name of the request attribute containing the URL requested by the
client during whose processing the error handling was caused (value is
"javax.servlet.error.request_uri").
|
static java.lang.String |
ERROR_SERVLET_NAME
The name of the request attribute containing the name of the servlet
which caused the error handling (value is
"javax.servlet.error.servlet_name").
|
static java.lang.String |
ERROR_STATUS
The name of the request attribute containing the status code sent to the
client (value is "javax.servlet.error.status_code").
|
static java.lang.String |
NAMESPACE_PREFIX
The namespace prefix used throughout Sling (value is "sling").
|
static java.lang.String |
NAMESPACE_URI_ROOT
The namespace URI prefix to be used by Sling projects to define
namespaces (value is "http://sling.apache.org/").
|
static java.lang.String |
PROPERTY_ADAPTABLE_CLASSES
Deprecated.
Use a service listener listening for service removed events for
org.apache.sling.adapter.Adaption . |
static java.lang.String |
PROPERTY_ADAPTER_CLASSES
Deprecated.
Use a service listener listening for service removed events for
org.apache.sling.adapter.Adaption . |
static java.lang.String |
PROPERTY_ADDED_ATTRIBUTES
The name of the event property holding the added attribute names
of a resource for an
TOPIC_RESOURCE_CHANGED event. |
static java.lang.String |
PROPERTY_CHANGED_ATTRIBUTES
The name of the event property holding the changed attribute names
of a resource for an
TOPIC_RESOURCE_CHANGED event. |
static java.lang.String |
PROPERTY_PATH
The name of the event property holding the resource path.
|
static java.lang.String |
PROPERTY_REMOVED_ATTRIBUTES
The name of the event property holding the removed attribute names
of a resource for an
TOPIC_RESOURCE_CHANGED event. |
static java.lang.String |
PROPERTY_RESOURCE_SUPER_TYPE
The name of the event property holding the resource super type.
|
static java.lang.String |
PROPERTY_RESOURCE_TYPE
The name of the event property holding the resource type.
|
static java.lang.String |
PROPERTY_USERID
The name of the event property holding the userid.
|
static java.lang.String |
SLING_CURRENT_SERVLET_NAME
The name of the request attribute providing the name of the currently
executing servlet (value is "sling.core.current.servletName").
|
static java.lang.String |
TOPIC_ADAPTER_FACTORY_ADDED
Deprecated.
Use a service listener listening for service removed events for
org.apache.sling.adapter.Adaption . |
static java.lang.String |
TOPIC_ADAPTER_FACTORY_REMOVED
Deprecated.
Use a service listener listening for service removed events for
org.apache.sling.adapter.Adaption . |
static java.lang.String |
TOPIC_RESOURCE_ADDED
Deprecated.
Register a
ResourceChangeListener instead |
static java.lang.String |
TOPIC_RESOURCE_CHANGED
Deprecated.
Register a
ResourceChangeListener instead |
static java.lang.String |
TOPIC_RESOURCE_PROVIDER_ADDED
The topic for the OSGi event which is sent when a resource provider has been
added to the resource tree.
|
static java.lang.String |
TOPIC_RESOURCE_PROVIDER_REMOVED
The topic for the OSGi event which is sent when a resource provider has been
removed from the resource tree.
|
static java.lang.String |
TOPIC_RESOURCE_REMOVED
Deprecated.
Register a
ResourceChangeListener instead |
static java.lang.String |
TOPIC_RESOURCE_RESOLVER_MAPPING_CHANGED
The topic for the OSGi event which is sent when the resource mapping changes.
|
Constructor and Description |
---|
SlingConstants() |
public static final java.lang.String NAMESPACE_PREFIX
The actual use depends on the environment. For example a
ResourceResolver
using a JCR
repository may name Sling node types and items using namespaces mapped to
this prefix. A JSP tag library for Sling may use this prefix as the
namespace prefix for its tags.
public static final java.lang.String NAMESPACE_URI_ROOT
The actual namespace URI depends on the environment. For example a
ResourceResolver
using a JCR
repository may define its namespace as
NAMESPACE_URI_ROOT + "jcr/sling/1.0"
. A JSP
tag library for Sling may define its namespace as
NAMESPACE_URI_ROOT + "taglib/sling/1.0"
.
public static final java.lang.String ATTR_REQUEST_SERVLET
Servlet
which included the servlet currently being active (value is
"org.apache.sling.api.include.servlet"). This attribute is only set if
the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is javax.servlet.Servlet
.
public static final java.lang.String ATTR_REQUEST_CONTENT
Resource
underlying the Servlet
which included the servlet currently
being active (value is "org.apache.sling.api.include.resource"). This
attribute is only set if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is
org.apache.sling.api.resource.Resource
.
public static final java.lang.String ATTR_REQUEST_PATH_INFO
RequestPathInfo
underlying the Servlet
which
included the servlet currently being active (value is
"org.apache.sling.api.include.request_path_info"). This attribute is only
set if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is
org.apache.sling.api.request.RequestPathInfo
.
public static final java.lang.String ATTR_INCLUDE_REQUEST_URI
HttpServletRequest.getRequestURI()
of the request which
included the servlet currently being active underlying the
Servlet
which included the servlet currently being active
(value is "javax.servlet.include.request_uri"). This attribute is only
set if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is String
.
Note: In Sling, the
HttpServletRequest.getRequestURI()
method will always return
the same result regardless of whether it is called from the client
request processing servlet or script or from an included servlet or
script. This request attribute is set for compatibility with the Servlet
API specification.
public static final java.lang.String ATTR_INCLUDE_CONTEXT_PATH
HttpServletRequest.getContextPath()
of the request which
included the servlet currently being active underlying the
Servlet
which included the servlet currently being active
(value is "javax.servlet.include.context_path"). This attribute is only
set if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is String
.
Note: In Sling, the
HttpServletRequest.getContextPath()
method will always
return the same result regardless of whether it is called from the client
request processing servlet or script or from an included servlet or
script. This request attribute is set for compatibility with the Servlet
API specification.
public static final java.lang.String ATTR_INCLUDE_SERVLET_PATH
HttpServletRequest.getServletPath()
of the request which
included the servlet currently being active underlying the
Servlet
which included the servlet currently being active
(value is "javax.servlet.include.servlet_path"). This attribute is only
set if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is String
.
Note: In Sling, the
HttpServletRequest.getServletPath()
method will always
return the same result regardless of whether it is called from the client
request processing servlet or script or from an included servlet or
script. This request attribute is set for compatibility with the Servlet
API specification.
public static final java.lang.String ATTR_INCLUDE_PATH_INFO
HttpServletRequest.getPathInfo()
of the request which
included the servlet currently being active underlying the
Servlet
which included the servlet currently being active
(value is "javax.servlet.include.path_info"). This attribute is only set
if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is String
.
Note: In Sling, the HttpServletRequest.getPathInfo()
method will always return the same result regardless of whether it is
called from the client request processing servlet or script or from an
included servlet or script. This request attribute is set for
compatibility with the Servlet API specification.
public static final java.lang.String ATTR_INCLUDE_QUERY_STRING
HttpServletRequest.getQueryString()
of the request which
included the servlet currently being active underlying the
Servlet
which included the servlet currently being active
(value is "javax.servlet.include.query_string"). This attribute is only
set if the serlvet or script is included via
RequestDispatcher.include
from another servlet or script.
The type of the attribute value is String
.
Note: In Sling, the
HttpServletRequest.getQueryString()
method will always
return the same result regardless of whether it is called from the client
request processing servlet or script or from an included servlet or
script. This request attribute is set for compatibility with the Servlet
API specification.
public static final java.lang.String ERROR_EXCEPTION
The type of the attribute value is java.lang.Throwable
.
public static final java.lang.String ERROR_EXCEPTION_TYPE
Throwable
itself.
The type of the attribute value is java.lang.String
.
public static final java.lang.String ERROR_MESSAGE
Throwable.getMessage()
. If error handling is caused by a
call to one of the SlingHttpServletResponse.sendError
methods, this attribute contains the optional message.
The type of the attribute value is java.lang.String
.
public static final java.lang.String ERROR_REQUEST_URI
SlingHttpServletRequest.getRequestURI()
method.
The type of the attribute value is java.lang.String
.
public static final java.lang.String ERROR_SERVLET_NAME
The type of the attribute value is java.lang.String
.
public static final java.lang.String ERROR_STATUS
The type of the attribute value is java.lang.Integer
.
@Deprecated public static final java.lang.String TOPIC_RESOURCE_ADDED
ResourceChangeListener
insteadPROPERTY_PATH
, PROPERTY_RESOURCE_SUPER_TYPE
and PROPERTY_RESOURCE_TYPE
properties.@Deprecated public static final java.lang.String TOPIC_RESOURCE_REMOVED
ResourceChangeListener
insteadPROPERTY_PATH
. As the resource has already been removed
no further information like resource type etc. might be available.@Deprecated public static final java.lang.String TOPIC_RESOURCE_CHANGED
ResourceChangeListener
insteadPROPERTY_PATH
, PROPERTY_RESOURCE_SUPER_TYPE
and PROPERTY_RESOURCE_TYPE
properties.
Since 2.2.0 the event might contain these properties PROPERTY_ADDED_ATTRIBUTES
,
PROPERTY_REMOVED_ATTRIBUTES
, PROPERTY_CHANGED_ATTRIBUTES
. All of them are
optional.public static final java.lang.String TOPIC_RESOURCE_PROVIDER_ADDED
PROPERTY_PATH
property.public static final java.lang.String TOPIC_RESOURCE_PROVIDER_REMOVED
PROPERTY_PATH
property.public static final java.lang.String TOPIC_RESOURCE_RESOLVER_MAPPING_CHANGED
public static final java.lang.String PROPERTY_PATH
public static final java.lang.String PROPERTY_USERID
public static final java.lang.String PROPERTY_RESOURCE_TYPE
public static final java.lang.String PROPERTY_RESOURCE_SUPER_TYPE
public static final java.lang.String PROPERTY_CHANGED_ATTRIBUTES
TOPIC_RESOURCE_CHANGED
event.
The value of the property is a string array.public static final java.lang.String PROPERTY_ADDED_ATTRIBUTES
TOPIC_RESOURCE_CHANGED
event.
The value of the property is a string array.public static final java.lang.String PROPERTY_REMOVED_ATTRIBUTES
TOPIC_RESOURCE_CHANGED
event.
The value of the property is a string array.@Deprecated public static final java.lang.String TOPIC_ADAPTER_FACTORY_ADDED
org.apache.sling.adapter.Adaption
.PROPERTY_ADAPTABLE_CLASSES
,
and PROPERTY_ADAPTER_CLASSES
poperties.@Deprecated public static final java.lang.String TOPIC_ADAPTER_FACTORY_REMOVED
org.apache.sling.adapter.Adaption
.PROPERTY_ADAPTABLE_CLASSES
,
and PROPERTY_ADAPTER_CLASSES
poperties.public static final java.lang.String PROPERTY_ADAPTABLE_CLASSES
org.apache.sling.adapter.Adaption
.public static final java.lang.String PROPERTY_ADAPTER_CLASSES
org.apache.sling.adapter.Adaption
.public static final java.lang.String SLING_CURRENT_SERVLET_NAME
Servlet.service()
method and reset to any previously
stored value after the service method returns.Copyright © 2022 The Apache Software Foundation. All rights reserved.