public class RestBinding extends Binding
Modifier and Type | Field and Description |
---|---|
private Constants |
bindingConstants |
private Set<String> |
conformanceClasses |
private static org.slf4j.Logger |
LOGGER |
Constructor and Description |
---|
RestBinding() |
Modifier and Type | Method and Description |
---|---|
private RestRequest |
decodeHttpRequest(javax.servlet.http.HttpServletRequest request) |
void |
doDeleteOperation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP DELETE request handling method
|
void |
doGetOperation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP GET request handling method
|
protected void |
doOperation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
doOptionsOperation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP DELETE request handling method
|
void |
doPostOperation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP POST request handling method
|
void |
doPutOperation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
HTTP PUT request handling method
|
private ServiceResponse |
encodeOwsExceptionReport(OwsExceptionReport oer) |
private ServiceResponse |
encodeRestResponse(RestResponse restResponse) |
Set<String> |
getConformanceClasses() |
private RestDecoder |
getDecoder() |
private RestEncoder |
getEncoder() |
private RequestHandler |
getRequestHandler(RestRequest restRequest) |
private HTTPStatus |
getResponseCode(OwsExceptionReport oer) |
String |
getUrlPattern()
Get URL pattern for the operator.
|
private ServiceResponse |
handleRequest(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
private RestResponse |
handleRestRequest(RestRequest restRequest) |
private boolean |
isMethodeNotAllowedExceptionForResourceType(CodedException owsE) |
private boolean |
isOperationNotSupportedException(CodedException owsE) |
checkOperationHttpDeleteSupported, checkOperationHttpGetSupported, checkOperationHttpOptionsSupported, checkOperationHttpPostSupported, checkOperationHttpPutSupported, getSupportedEncodings
private static final org.slf4j.Logger LOGGER
private final Constants bindingConstants
public String getUrlPattern()
Binding
getUrlPattern
in class Binding
public void doOptionsOperation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException
Binding
doOptionsOperation
in class Binding
request
- HTTP DELETE requestresponse
- HTTP DELETE responseHTTPException
- if the encoding of an exception failedIOException
- if an IO error occurspublic void doDeleteOperation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException
Binding
doDeleteOperation
in class Binding
request
- HTTP DELETE requestresponse
- HTTP DELETE responseHTTPException
- if the encoding of an exception failedIOException
- if an IO error occurspublic void doPutOperation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException
Binding
doPutOperation
in class Binding
request
- HTTP PUT requestresponse
- HTTP PUT responseHTTPException
- if the encoding of an exception failedIOException
- if an IO error occurspublic void doPostOperation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException
Binding
doPostOperation
in class Binding
request
- HTTP POST requestresponse
- HTTP POST responseHTTPException
- if the encoding of an exception failedIOException
- if an IO error occurspublic void doGetOperation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException
Binding
doGetOperation
in class Binding
request
- HTTP GET requestresponse
- HTTP GET responseHTTPException
- if the encoding of an exception failedIOException
- if an IO error occursprotected void doOperation(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws HTTPException, IOException
HTTPException
IOException
private ServiceResponse encodeOwsExceptionReport(OwsExceptionReport oer) throws HTTPException, IOException
HTTPException
IOException
private boolean isOperationNotSupportedException(CodedException owsE)
private boolean isMethodeNotAllowedExceptionForResourceType(CodedException owsE)
private RestRequest decodeHttpRequest(javax.servlet.http.HttpServletRequest request) throws OwsExceptionReport
OwsExceptionReport
private ServiceResponse encodeRestResponse(RestResponse restResponse) throws OwsExceptionReport
OwsExceptionReport
private RestResponse handleRestRequest(RestRequest restRequest) throws OwsExceptionReport
OwsExceptionReport
private RestEncoder getEncoder() throws OwsExceptionReport
OwsExceptionReport
private RequestHandler getRequestHandler(RestRequest restRequest) throws OwsExceptionReport
OwsExceptionReport
private RestDecoder getDecoder() throws OwsExceptionReport
OwsExceptionReport
private HTTPStatus getResponseCode(OwsExceptionReport oer)
private ServiceResponse handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws OwsExceptionReport
OwsExceptionReport
Copyright © 2012-2015 52north.org. All Rights Reserved.