@ProviderType
public interface ErrorPageHandlerService
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_STATUS_CODE |
Modifier and Type | Method and Description |
---|---|
boolean |
doHandle404(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response)
Determine is the request is a 404 and if so handles the request appropriately base on some CQ idiosyncrasies .
|
String |
findErrorPage(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.resource.Resource errorResource)
Find the JCR full path to the most appropriate Error Page
|
String |
getErrorPageName(org.apache.sling.api.SlingHttpServletRequest request)
Get the Error Page's name (all lowercase) that should be used to render the page for this error.
|
String |
getException(org.apache.sling.api.SlingHttpServletRequest request)
Returns the Exception Message (Stacktrace) from the Request
|
String |
getRequestProgress(org.apache.sling.api.SlingHttpServletRequest request)
Returns a String representation of the RequestProgress trace
|
int |
getStatusCode(org.apache.sling.api.SlingHttpServletRequest request)
Get Error Status Code from Request or Default (500) if no status code can be found
|
void |
includeUsingGET(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
String path)
Include the path, forcing the request method to be GET.
|
boolean |
isEnabled()
Determines if this Service is "enabled".
|
boolean |
isVanityDispatchCheckEnabled()
Determines if Vanity-URL dispatch check is enabled.
|
void |
resetRequestAndResponse(org.apache.sling.api.SlingHttpServletRequest request,
org.apache.sling.api.SlingHttpServletResponse response,
int statusCode)
Reset response attributes to support printing out a new page (rather than one that potentially errored out).
|
static final int DEFAULT_STATUS_CODE
boolean isEnabled()
String findErrorPage(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.resource.Resource errorResource)
request
- errorResource
- int getStatusCode(org.apache.sling.api.SlingHttpServletRequest request)
request
- String getErrorPageName(org.apache.sling.api.SlingHttpServletRequest request)
request
- boolean doHandle404(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response)
request
- response
- String getException(org.apache.sling.api.SlingHttpServletRequest request)
request
- String getRequestProgress(org.apache.sling.api.SlingHttpServletRequest request)
request
- void resetRequestAndResponse(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, int statusCode)
request
- response
- statusCode
- void includeUsingGET(org.apache.sling.api.SlingHttpServletRequest request, org.apache.sling.api.SlingHttpServletResponse response, String path)
request
- the requestresponse
- the responsepath
- the pathboolean isVanityDispatchCheckEnabled()
Copyright © 2013–2021 Adobe. All rights reserved.