public abstract class HttpServletBase extends HttpServlet implements HasDynamicAuthorization, ErrorResponseHandler, SupportsPatch
HttpServlet implementations, providing
SupportsPatch and HasDynamicAuthorization support.USE_DEFAULT_CONSTRAINTSPATCH| Modifier | Constructor and Description |
|---|---|
protected |
HttpServletBase() |
| Modifier and Type | Method and Description |
|---|---|
void |
doPatch(HttpServletRequest request,
HttpServletResponse response)
Perform a HTTP PATCH operation.
|
AuthorizationConstraint |
getConstraint(HttpServletRequest request)
Determine the
AuthorizationConstraint that applies to a resource. |
boolean |
onError(HttpServletRequest request,
HttpServletResponse response,
int statusCode,
Throwable cause)
Called when the runtime is about to raise an error condition (i.e report an
HTTP status code in the 400-499 range).
|
protected void |
service(HttpServletRequest req,
HttpServletResponse resp) |
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, logpublic void doPatch(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
SupportsPatchdoPatch in interface SupportsPatchrequest - an HttpServletRequest object that contains the request the
client has made of the servletresponse - an HttpServletResponse object that contains the response
the servlet sends to the clientServletException - if the request for the PATCH could not be handledIOException - if an input or output error is detected when the servlet handles
the PATCH requestpublic AuthorizationConstraint getConstraint(HttpServletRequest request) throws ServletException, IOException
HasDynamicAuthorizationAuthorizationConstraint that applies to a resource.getConstraint in interface HasDynamicAuthorizationrequest - an HttpServletRequest object that contains the request the
client has made of the servletAuthorizationConstraint instance if a constraint applies to
the request. null if no constraint applies to the
request. HasDynamicAuthorization.USE_DEFAULT_CONSTRAINTS if
this method cannot determine what constraint applies to the
request, and therefore the runtime's default
AuthorizationConstraint discovery logic will be applied to
the request.ServletException - if the request for the dynamic privilege could not be handledIOException - if an input or output error is detected when the servlet
determines the AuthorizationConstraintpublic boolean onError(HttpServletRequest request, HttpServletResponse response, int statusCode, Throwable cause) throws ServletException, IOException
ErrorResponseHandleronError in interface ErrorResponseHandlerrequest - The HttpServletRequest for the current requestresponse - The HttpServletResponse for the current responsestatusCode - The HTTP status code to be raisedcause - The cause of the error condition, may be nulltrue. If this method does not
handle the error condition this method must return
false. In which case the standard runtime's error
handling will be invokedServletExceptionIOExceptionprotected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException
service in class HttpServletServletExceptionIOExceptionOracle REST Data Services Plugin API version: 3.0.0.65.09.35 Copyright © 2015 Oracle Corp. All Rights Reserved.