public abstract class BaseRequest extends Object implements Request
Request.Type
Modifier and Type | Field and Description |
---|---|
static String |
ASC_ORDER_PROPERTY_KEY
Sort order property key.
|
static int |
DEFAULT_PAGE_SIZE
Default page size for pagination request.
|
static String |
PAGE_SIZE_PROPERTY_KEY
Page size property key
|
Constructor and Description |
---|
BaseRequest(javax.ws.rs.core.HttpHeaders headers,
RequestBody body,
javax.ws.rs.core.UriInfo uriInfo,
ResourceInstance resource)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getAPIVersion()
Obtain the api version of the request.
|
RequestBody |
getBody()
Obtain the request body data.
|
Map<String,TemporalInfo> |
getFields()
Obtain the partial response fields and associated temporal information which were provided
in the query string of the request uri.
|
Map<String,List<String>> |
getHttpHeaders()
Obtain the http headers associated with the request.
|
PageRequest |
getPageRequest()
Obtain the pagination request information.
|
protected PredicateCompiler |
getPredicateCompiler()
Obtain the predicate compiler which is used to compile the query string into
a predicate.
|
Predicate |
getQueryPredicate()
Obtain the query predicate that was built from the user provided predicate fields in the query string.
|
String |
getRemoteAddress()
Returns the remote address for the request
|
Renderer |
getRenderer()
Obtain the renderer for the request.
|
protected abstract RequestHandler |
getRequestHandler()
Obtain the underlying request handler for the request.
|
ResourceInstance |
getResource()
Obtain the resource definition which corresponds to the resource being operated on by the request.
|
protected ResultPostProcessor |
getResultPostProcessor()
Obtain the result post processor for the request.
|
SortRequest |
getSortRequest()
Obtain information to order the results by.
|
String |
getURI()
Obtain the URI of this request.
|
Result |
process()
Process the request.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getRequestType
public static final int DEFAULT_PAGE_SIZE
public static final String PAGE_SIZE_PROPERTY_KEY
public static final String ASC_ORDER_PROPERTY_KEY
public BaseRequest(javax.ws.rs.core.HttpHeaders headers, RequestBody body, javax.ws.rs.core.UriInfo uriInfo, ResourceInstance resource)
headers
- http headersbody
- http bodyuriInfo
- uri informationresource
- associated resource definitionpublic ResourceInstance getResource()
Request
getResource
in interface Request
ResourceDefinition
public String getURI()
Request
public int getAPIVersion()
Request
getAPIVersion
in interface Request
public Predicate getQueryPredicate()
Request
getQueryPredicate
in interface Request
public Map<String,TemporalInfo> getFields()
Request
public Renderer getRenderer()
Request
getRenderer
in interface Request
public Map<String,List<String>> getHttpHeaders()
Request
getHttpHeaders
in interface Request
public PageRequest getPageRequest()
Request
getPageRequest
in interface Request
public RequestBody getBody()
Request
protected ResultPostProcessor getResultPostProcessor()
protected PredicateCompiler getPredicateCompiler()
public SortRequest getSortRequest()
Request
getSortRequest
in interface Request
protected abstract RequestHandler getRequestHandler()
public String getRemoteAddress()
Request
getRemoteAddress
in interface Request
Copyright © 2022 Apache Software Foundation. All rights reserved.