public abstract class BaseService extends Object
Constructor and Description |
---|
BaseService() |
Modifier and Type | Method and Description |
---|---|
protected ResourceInstance |
createResource(Resource.Type type,
Map<Resource.Type,String> mapIds)
Create a resource instance.
|
protected RequestBodyParser |
getBodyParser() |
protected ResultSerializer |
getResultSerializer()
Get the default serializer.
|
protected ResultSerializer |
getResultSerializer(javax.ws.rs.core.MediaType mediaType)
Get a serializer for the given media type.
|
protected javax.ws.rs.core.Response |
handleRequest(javax.ws.rs.core.HttpHeaders headers,
String body,
javax.ws.rs.core.UriInfo uriInfo,
Request.Type requestType,
javax.ws.rs.core.MediaType mediaType,
ResourceInstance resource)
Requests are funneled through this method so that common logic can be executed.
|
protected javax.ws.rs.core.Response |
handleRequest(javax.ws.rs.core.HttpHeaders headers,
String body,
javax.ws.rs.core.UriInfo uriInfo,
Request.Type requestType,
ResourceInstance resource)
Requests are funneled through this method so that common logic can be executed.
|
static void |
init(RequestAuditLogger instance) |
public static final javax.ws.rs.core.MediaType MEDIA_TYPE_TEXT_CSV_TYPE
public static final String MSG_SUCCESSFUL_OPERATION
public static final String MSG_REQUEST_ACCEPTED
public static final String MSG_INVALID_ARGUMENTS
public static final String MSG_INVALID_REQUEST
public static final String MSG_CLUSTER_NOT_FOUND
public static final String MSG_CLUSTER_OR_HOST_NOT_FOUND
public static final String MSG_VIEW_NOT_FOUND
public static final String MSG_NOT_AUTHENTICATED
public static final String MSG_PERMISSION_DENIED
public static final String MSG_SERVER_ERROR
public static final String MSG_RESOURCE_ALREADY_EXISTS
public static final String MSG_RESOURCE_NOT_FOUND
public static final String QUERY_FIELDS
public static final String QUERY_FILTER_DESCRIPTION
public static final String QUERY_SORT
public static final String QUERY_SORT_DESCRIPTION
public static final String QUERY_PAGE_SIZE
public static final String QUERY_PAGE_SIZE_DESCRIPTION
public static final String DEFAULT_PAGE_SIZE
public static final String QUERY_FROM
public static final String QUERY_FROM_DESCRIPTION
public static final String QUERY_FROM_VALUES
public static final String DEFAULT_FROM
public static final String QUERY_TO
public static final String QUERY_TO_DESCRIPTION
public static final String QUERY_TO_TYPE
public static final String QUERY_TO_VALUES
public static final String QUERY_PREDICATE
public static final String QUERY_PREDICATE_DESCRIPTION
public static final String RESPONSE_CONTAINER_LIST
public static final String DATA_TYPE_INT
public static final String DATA_TYPE_STRING
public static final String PARAM_TYPE_QUERY
public static final String PARAM_TYPE_BODY
public static final String FIELDS_SEPARATOR
protected static RequestAuditLogger requestAuditLogger
public static void init(RequestAuditLogger instance)
protected javax.ws.rs.core.Response handleRequest(javax.ws.rs.core.HttpHeaders headers, String body, javax.ws.rs.core.UriInfo uriInfo, Request.Type requestType, ResourceInstance resource)
headers
- http headersbody
- http bodyuriInfo
- uri informationrequestType
- http request typeresource
- resource instance that is being acted onprotected javax.ws.rs.core.Response handleRequest(javax.ws.rs.core.HttpHeaders headers, String body, javax.ws.rs.core.UriInfo uriInfo, Request.Type requestType, javax.ws.rs.core.MediaType mediaType, ResourceInstance resource)
headers
- http headersbody
- http bodyuriInfo
- uri informationrequestType
- http request typemediaType
- the requested media type; may be nullresource
- resource instance that is being acted onprotected ResourceInstance createResource(Resource.Type type, Map<Resource.Type,String> mapIds)
type
- the resource typemapIds
- all primary and foreign key properties and valuesprotected ResultSerializer getResultSerializer(javax.ws.rs.core.MediaType mediaType)
mediaType
- the media typeprotected ResultSerializer getResultSerializer()
protected RequestBodyParser getBodyParser()
Copyright © 2022 Apache Software Foundation. All rights reserved.