public class CarsProcessor extends Object implements EntityCollectionProcessor, EntityProcessor, PrimitiveProcessor, PrimitiveValueProcessor, ComplexProcessor
Constructor and Description |
---|
CarsProcessor(DataProvider dataProvider) |
Modifier and Type | Method and Description |
---|---|
void |
createEntity(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestFormat,
ContentType responseFormat)
Creates an entity with send data in the persistence and puts content, status, and Location into the response.
|
void |
deleteComplex(ODataRequest request,
ODataResponse response,
UriInfo uriInfo)
Deletes complex-type value from an entity and puts the status into the response.
|
void |
deleteEntity(ODataRequest request,
ODataResponse response,
UriInfo uriInfo)
Deletes entity from persistence and puts the status into the response.
|
void |
deletePrimitive(ODataRequest request,
ODataResponse response,
UriInfo uriInfo)
Deletes primitive-type value from an entity and puts the status into the response.
|
void |
deletePrimitiveValue(ODataRequest request,
ODataResponse response,
UriInfo uriInfo)
Deletes primitive-type raw value from an entity and puts the status into the response.
|
void |
init(OData odata,
ServiceMetadata edm)
Initializes the processor for each HTTP request - response cycle.
|
static boolean |
isODataMetadataNone(ContentType contentType) |
void |
readComplex(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType format)
Reads complex-type instance.
|
void |
readEntity(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestedContentType)
Reads entity data from persistence and puts serialized content and status into the response.
|
void |
readEntityCollection(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestedContentType)
Reads entities data from persistence and puts serialized content and status into the response.
|
void |
readPrimitive(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType format)
Reads primitive-type instance.
|
void |
readPrimitiveValue(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType format)
Reads raw value of a primitive-type instance, e.g., of a primitive property of an entity.
|
void |
updateComplex(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestFormat,
ContentType responseFormat)
Update complex-type instance with send data in the persistence and
puts content, status, and Location into the response.
|
void |
updateEntity(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestFormat,
ContentType responseFormat)
Update entity data with send data in the persistence and puts content, status, and Location into the response.
|
void |
updatePrimitive(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestFormat,
ContentType responseFormat)
Update primitive-type instance with send data in the persistence and
puts content, status, and Location into the response.
|
void |
updatePrimitiveValue(ODataRequest request,
ODataResponse response,
UriInfo uriInfo,
ContentType requestFormat,
ContentType responseFormat)
Update primitive-type instance with sent raw data in the persistence and
puts content, status, and Location into the response.
|
public CarsProcessor(DataProvider dataProvider)
public void init(OData odata, ServiceMetadata edm)
Processor
public void readEntityCollection(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestedContentType) throws ODataApplicationException, SerializerException
EntityCollectionProcessor
readEntityCollection
in interface EntityCollectionProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestedContentType
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureSerializerException
public void readEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestedContentType) throws ODataApplicationException, SerializerException
EntityProcessor
readEntity
in interface EntityProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestedContentType
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureSerializerException
public void createEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
EntityProcessor
createEntity
in interface EntityProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestFormat
- content type of body sent with requestresponseFormat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureDeserializerException
SerializerException
public void deleteEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException
EntityProcessor
deleteEntity
in interface EntityProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIODataApplicationException
- if the service implementation encounters a failurepublic void readPrimitive(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format) throws ODataApplicationException, SerializerException
PrimitiveProcessor
null
, the service responds with 204 No Content.
If it is not available, for example due to permissions, the service responds with 404 Not Found.readPrimitive
in interface PrimitiveProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIformat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureSerializerException
public void readComplex(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format) throws ODataApplicationException, SerializerException
ComplexProcessor
readComplex
in interface ComplexProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIformat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureSerializerException
public void readPrimitiveValue(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format) throws ODataApplicationException, SerializerException
PrimitiveValueProcessor
null
, the service responds with 204 No Content.
If it is not available, for example due to permissions, the service responds with 404 Not Found.readPrimitiveValue
in interface PrimitiveValueProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIformat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureSerializerException
public void updatePrimitive(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
PrimitiveProcessor
updatePrimitive
in interface PrimitiveProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestFormat
- content type of body sent with requestresponseFormat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureDeserializerException
SerializerException
public void updatePrimitiveValue(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, ODataLibraryException
PrimitiveValueProcessor
updatePrimitiveValue
in interface PrimitiveValueProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestFormat
- content type of body sent with requestresponseFormat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureODataLibraryException
public void deletePrimitive(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException
PrimitiveProcessor
NULL
(see chapter "11.4.9.2 Set a Value to Null")deletePrimitive
in interface PrimitiveProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIODataApplicationException
- if the service implementation encounters a failurepublic void deletePrimitiveValue(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException, ODataLibraryException
PrimitiveValueProcessor
null
.deletePrimitiveValue
in interface PrimitiveValueProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIODataApplicationException
- if the service implementation encounters a failureODataLibraryException
public void updateComplex(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
ComplexProcessor
updateComplex
in interface ComplexProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestFormat
- content type of body sent with requestresponseFormat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureDeserializerException
SerializerException
public void deleteComplex(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException
ComplexProcessor
NULL
(see chapter "11.4.9.2 Set a Value to Null")deleteComplex
in interface ComplexProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIODataApplicationException
- if the service implementation encounters a failurepublic void updateEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
EntityProcessor
updateEntity
in interface EntityProcessor
request
- OData request object containing raw HTTP informationresponse
- OData response object for collecting response datauriInfo
- information of a parsed OData URIrequestFormat
- content type of body sent with requestresponseFormat
- requested content type after content negotiationODataApplicationException
- if the service implementation encounters a failureDeserializerException
SerializerException
public static boolean isODataMetadataNone(ContentType contentType)
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.