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 |
init(OData odata,
ServiceMetadata edm)
Initializes the processor for each HTTP request - response cycle.
|
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.
|
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
- if serialization failedpublic 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
- if serialization failedpublic 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
- if deserialization failedSerializerException
- if serialization failedpublic 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
- if serialization failedpublic 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
- if serialization failedpublic 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
- if serialization failedpublic 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
- if deserialization failedSerializerException
- if serialization failedpublic 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 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
- if de-serialization failedSerializerException
- if serialization failedpublic 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
- if deserialization failedSerializerException
- if serialization failedCopyright © 2013–2015 The Apache Software Foundation. All rights reserved.