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)
Processorpublic void readEntityCollection(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestedContentType) throws ODataApplicationException, SerializerException
EntityCollectionProcessorreadEntityCollection in interface EntityCollectionProcessorrequest - 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 failureSerializerExceptionpublic void readEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestedContentType) throws ODataApplicationException, SerializerException
EntityProcessorreadEntity in interface EntityProcessorrequest - 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 failureSerializerExceptionpublic void createEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
EntityProcessorcreateEntity in interface EntityProcessorrequest - 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 failureDeserializerExceptionSerializerExceptionpublic void deleteEntity(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException
EntityProcessordeleteEntity in interface EntityProcessorrequest - 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
PrimitiveProcessornull, 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 PrimitiveProcessorrequest - 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 failureSerializerExceptionpublic void readComplex(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format) throws ODataApplicationException, SerializerException
ComplexProcessorreadComplex in interface ComplexProcessorrequest - 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 failureSerializerExceptionpublic void readPrimitiveValue(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format) throws ODataApplicationException, SerializerException
PrimitiveValueProcessornull, 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 PrimitiveValueProcessorrequest - 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 failureSerializerExceptionpublic void updatePrimitive(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
PrimitiveProcessorupdatePrimitive in interface PrimitiveProcessorrequest - 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 failureDeserializerExceptionSerializerExceptionpublic void updatePrimitiveValue(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, ODataLibraryException
PrimitiveValueProcessorupdatePrimitiveValue in interface PrimitiveValueProcessorrequest - 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 failureODataLibraryExceptionpublic void deletePrimitive(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException
PrimitiveProcessorNULL (see chapter "11.4.9.2 Set a Value to Null")deletePrimitive in interface PrimitiveProcessorrequest - 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
PrimitiveValueProcessornull.deletePrimitiveValue in interface PrimitiveValueProcessorrequest - 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 failureODataLibraryExceptionpublic void updateComplex(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType requestFormat, ContentType responseFormat) throws ODataApplicationException, DeserializerException, SerializerException
ComplexProcessorupdateComplex in interface ComplexProcessorrequest - 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 failureDeserializerExceptionSerializerExceptionpublic void deleteComplex(ODataRequest request, ODataResponse response, UriInfo uriInfo) throws ODataApplicationException
ComplexProcessorNULL (see chapter "11.4.9.2 Set a Value to Null")deleteComplex in interface ComplexProcessorrequest - 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
EntityProcessorupdateEntity in interface EntityProcessorrequest - 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 failureDeserializerExceptionSerializerExceptionpublic static boolean isODataMetadataNone(ContentType contentType)
Copyright © 2013–2015 The Apache Software Foundation. All rights reserved.