|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.olingo.odata2.api.processor.ODataSingleProcessor
public abstract class ODataSingleProcessor
A default ODataProcessor that implements all processor features in a single class.
It is recommended to derive from this class and it is required by the
ODataServiceFactory to build an
ODataService.
This abstract class provides a default behavior, returning the correct response
for requests for the service or the metadata document, respectively, and throwing an
ODataNotImplementedException for all other requests.
Sub classes have to override only methods they want to support.
| Constructor Summary | |
|---|---|
ODataSingleProcessor()
|
|
| Method Summary | |
|---|---|
ODataResponse |
countEntityLinks(GetEntitySetLinksCountUriInfo uriInfo,
String contentType)
Counts the number of target entities of a navigation property. |
ODataResponse |
countEntitySet(GetEntitySetCountUriInfo uriInfo,
String contentType)
Counts the number of requested entities. |
ODataResponse |
createEntity(PostUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
Creates an entity. |
ODataResponse |
createEntityLink(PostUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
Creates a new link to a target entity of a navigation property. |
ODataResponse |
deleteEntity(DeleteUriInfo uriInfo,
String contentType)
Deletes an entity. |
ODataResponse |
deleteEntityLink(DeleteUriInfo uriInfo,
String contentType)
Deletes the link to the target entity of a navigation property. |
ODataResponse |
deleteEntityMedia(DeleteUriInfo uriInfo,
String contentType)
Deletes the media resource of an entity. |
ODataResponse |
deleteEntitySimplePropertyValue(DeleteUriInfo uriInfo,
String contentType)
Deletes the value of a simple property of an entity. |
ODataResponse |
executeBatch(BatchHandler handler,
String contentType,
InputStream content)
Executes a OData batch request and provide Batch Response as ODataResponse |
BatchResponsePart |
executeChangeSet(BatchHandler handler,
List<ODataRequest> requests)
Executes a Change Set and provide BatchResponsePart as BatchResponsePart that contains the responses to
change requests. |
ODataResponse |
executeFunctionImport(GetFunctionImportUriInfo uriInfo,
String contentType)
Executes a function import and returns the result. |
ODataResponse |
executeFunctionImportValue(GetFunctionImportUriInfo uriInfo,
String contentType)
Returns the unformatted value of a function import. |
ODataResponse |
existsEntity(GetEntityCountUriInfo uriInfo,
String contentType)
Checks whether an entity exists. |
ODataResponse |
existsEntityLink(GetEntityLinkCountUriInfo uriInfo,
String contentType)
Returns whether the target entity of a navigation property exists. |
ODataContext |
getContext()
|
List<String> |
getCustomContentTypes(Class<? extends ODataProcessor> processorFeature)
The OData library will consider these additional content types during negotiation of http content type header. |
ODataResponse |
readEntity(GetEntityUriInfo uriInfo,
String contentType)
Reads an entity. |
ODataResponse |
readEntityComplexProperty(GetComplexPropertyUriInfo uriInfo,
String contentType)
Reads a complex property of an entity. |
ODataResponse |
readEntityLink(GetEntityLinkUriInfo uriInfo,
String contentType)
Reads the URI of the target entity of a navigation property. |
ODataResponse |
readEntityLinks(GetEntitySetLinksUriInfo uriInfo,
String contentType)
Reads the URIs of the target entities of a navigation property. |
ODataResponse |
readEntityMedia(GetMediaResourceUriInfo uriInfo,
String contentType)
Reads the media resource of an entity. |
ODataResponse |
readEntitySet(GetEntitySetUriInfo uriInfo,
String contentType)
Reads entities. |
ODataResponse |
readEntitySimpleProperty(GetSimplePropertyUriInfo uriInfo,
String contentType)
Reads a simple property of an entity. |
ODataResponse |
readEntitySimplePropertyValue(GetSimplePropertyUriInfo uriInfo,
String contentType)
Reads the unformatted value of a simple property of an entity. |
ODataResponse |
readMetadata(GetMetadataUriInfo uriInfo,
String contentType)
|
ODataResponse |
readServiceDocument(GetServiceDocumentUriInfo uriInfo,
String contentType)
|
void |
setContext(ODataContext context)
|
ODataResponse |
updateEntity(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
boolean merge,
String contentType)
Updates an entity. |
ODataResponse |
updateEntityComplexProperty(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
boolean merge,
String contentType)
Updates a complex property of an entity. |
ODataResponse |
updateEntityLink(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
Updates the link to the target entity of a navigation property. |
ODataResponse |
updateEntityMedia(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
Updates the media resource of an entity. |
ODataResponse |
updateEntitySimpleProperty(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
Updates a simple property of an entity. |
ODataResponse |
updateEntitySimplePropertyValue(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
Updates a simple property of an entity with an unformatted value. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ODataSingleProcessor()
| Method Detail |
|---|
public void setContext(ODataContext context)
setContext in interface ODataProcessorcontext - A request context object which is usually injected by the OData library itself.ODataProcessorpublic ODataContext getContext()
getContext in interface ODataProcessorODataProcessor
public ODataResponse executeBatch(BatchHandler handler,
String contentType,
InputStream content)
throws ODataException
BatchProcessorODataResponse
executeBatch in interface BatchProcessorhandler - batch handlercontentType - the content type of the requestcontent - Batch Request body
ODataResponse object
ODataExceptionBatchProcessor
public BatchResponsePart executeChangeSet(BatchHandler handler,
List<ODataRequest> requests)
throws ODataException
BatchProcessorBatchResponsePart that contains the responses to
change requests.
The method has to define a rollback semantic that may be applied when a request within a Change Set fails
(all-or-nothing requirement).
If a request within a Change Set fails, instead of Change Set Response should be returned the error response
executeChangeSet in interface BatchProcessorhandler - batch handlerrequests - list of single change requests
BatchResponsePart object
ODataNotImplementedException
ODataExceptionBatchProcessor
public ODataResponse executeFunctionImport(GetFunctionImportUriInfo uriInfo,
String contentType)
throws ODataException
FunctionImportProcessor
executeFunctionImport in interface FunctionImportProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionFunctionImportProcessor
public ODataResponse executeFunctionImportValue(GetFunctionImportUriInfo uriInfo,
String contentType)
throws ODataException
FunctionImportValueProcessor
executeFunctionImportValue in interface FunctionImportValueProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionFunctionImportValueProcessor
public ODataResponse readEntitySimplePropertyValue(GetSimplePropertyUriInfo uriInfo,
String contentType)
throws ODataException
EntitySimplePropertyValueProcessor
readEntitySimplePropertyValue in interface EntitySimplePropertyValueProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySimplePropertyValueProcessor
public ODataResponse updateEntitySimplePropertyValue(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
throws ODataException
EntitySimplePropertyValueProcessor
updateEntitySimplePropertyValue in interface EntitySimplePropertyValueProcessoruriInfo - information about the request URIcontent - the content of the request, containing the new valuerequestContentType - the content type of the request body
(important for a binary property)contentType - the content type of the response
ODataResponse object
ODataExceptionEntitySimplePropertyValueProcessor
public ODataResponse deleteEntitySimplePropertyValue(DeleteUriInfo uriInfo,
String contentType)
throws ODataException
EntitySimplePropertyValueProcessor
deleteEntitySimplePropertyValue in interface EntitySimplePropertyValueProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySimplePropertyValueProcessor
public ODataResponse readEntitySimpleProperty(GetSimplePropertyUriInfo uriInfo,
String contentType)
throws ODataException
EntitySimplePropertyProcessor
readEntitySimpleProperty in interface EntitySimplePropertyProcessorcontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySimplePropertyProcessor
public ODataResponse updateEntitySimpleProperty(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
throws ODataException
EntitySimplePropertyProcessor
updateEntitySimpleProperty in interface EntitySimplePropertyProcessoruriInfo - information about the request URIcontent - the content of the request, containing the updated property datarequestContentType - the content type of the request bodycontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySimplePropertyProcessor
public ODataResponse readEntityMedia(GetMediaResourceUriInfo uriInfo,
String contentType)
throws ODataException
EntityMediaProcessor
readEntityMedia in interface EntityMediaProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityMediaProcessor
public ODataResponse updateEntityMedia(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
throws ODataException
EntityMediaProcessor
updateEntityMedia in interface EntityMediaProcessoruriInfo - information about the request URIcontent - the content of the requestrequestContentType - the content type of the request bodycontentType - the content type of the response
ODataResponse object
ODataExceptionEntityMediaProcessor
public ODataResponse deleteEntityMedia(DeleteUriInfo uriInfo,
String contentType)
throws ODataException
EntityMediaProcessor
deleteEntityMedia in interface EntityMediaProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityMediaProcessor
public ODataResponse readEntityLinks(GetEntitySetLinksUriInfo uriInfo,
String contentType)
throws ODataException
EntityLinksProcessor
readEntityLinks in interface EntityLinksProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataExceptionEntityLinksProcessor
public ODataResponse countEntityLinks(GetEntitySetLinksCountUriInfo uriInfo,
String contentType)
throws ODataException
EntityLinksProcessor
countEntityLinks in interface EntityLinksProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataExceptionEntityLinksProcessor
public ODataResponse createEntityLink(PostUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
throws ODataException
EntityLinksProcessor
createEntityLink in interface EntityLinksProcessoruriInfo - information about the request URIcontent - the content of the request, containing the link datarequestContentType - the content type of the request bodycontentType - the content type of the response
ODataExceptionEntityLinkProcessor
public ODataResponse readEntityLink(GetEntityLinkUriInfo uriInfo,
String contentType)
throws ODataException
EntityLinkProcessor
readEntityLink in interface EntityLinkProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityLinkProcessor
public ODataResponse existsEntityLink(GetEntityLinkCountUriInfo uriInfo,
String contentType)
throws ODataException
EntityLinkProcessor
existsEntityLink in interface EntityLinkProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityLinkProcessor
public ODataResponse updateEntityLink(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
throws ODataException
EntityLinkProcessor
updateEntityLink in interface EntityLinkProcessoruriInfo - information about the request URIcontent - the content of the request, containing the new URIrequestContentType - the content type of the request bodycontentType - the content type of the response
ODataResponse object
ODataExceptionEntityLinkProcessor
public ODataResponse deleteEntityLink(DeleteUriInfo uriInfo,
String contentType)
throws ODataException
EntityLinkProcessor
deleteEntityLink in interface EntityLinkProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityLinkProcessor
public ODataResponse readEntityComplexProperty(GetComplexPropertyUriInfo uriInfo,
String contentType)
throws ODataException
EntityComplexPropertyProcessor
readEntityComplexProperty in interface EntityComplexPropertyProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityComplexPropertyProcessor
public ODataResponse updateEntityComplexProperty(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
boolean merge,
String contentType)
throws ODataException
EntityComplexPropertyProcessor
updateEntityComplexProperty in interface EntityComplexPropertyProcessoruriInfo - information about the request URIcontent - the content of the request, containing the updated property datarequestContentType - the content type of the request bodymerge - if true, properties not present in the data are left unchanged;
if false, they are resetcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityComplexPropertyProcessor
public ODataResponse readEntitySet(GetEntitySetUriInfo uriInfo,
String contentType)
throws ODataException
EntitySetProcessor
readEntitySet in interface EntitySetProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySetProcessor
public ODataResponse countEntitySet(GetEntitySetCountUriInfo uriInfo,
String contentType)
throws ODataException
EntitySetProcessor
countEntitySet in interface EntitySetProcessoruriInfo - information about the request URIcontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySetProcessor
public ODataResponse createEntity(PostUriInfo uriInfo,
InputStream content,
String requestContentType,
String contentType)
throws ODataException
EntitySetProcessor
createEntity in interface EntitySetProcessoruriInfo - information about the request URIcontent - the content of the request, containing the data of the new entityrequestContentType - the content type of the request bodycontentType - the content type of the response
ODataResponse object
ODataExceptionEntitySetProcessor
public ODataResponse readEntity(GetEntityUriInfo uriInfo,
String contentType)
throws ODataException
EntityProcessor
readEntity in interface EntityProcessorcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityProcessor
public ODataResponse existsEntity(GetEntityCountUriInfo uriInfo,
String contentType)
throws ODataException
EntityProcessor
existsEntity in interface EntityProcessorcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityProcessor
public ODataResponse updateEntity(PutMergePatchUriInfo uriInfo,
InputStream content,
String requestContentType,
boolean merge,
String contentType)
throws ODataException
EntityProcessor
updateEntity in interface EntityProcessoruriInfo - information about the request URIcontent - the content of the request, containing the updated entity datarequestContentType - the content type of the request bodymerge - if true, properties not present in the data are left unchanged;
if false, they are resetcontentType - the content type of the response
ODataResponse object
ODataExceptionEntityProcessor
public ODataResponse deleteEntity(DeleteUriInfo uriInfo,
String contentType)
throws ODataException
EntityProcessor
deleteEntity in interface EntityProcessoruriInfo - a DeleteUriInfo object with information from the URI parsercontentType - the content type of the response
ODataResponse object
ODataExceptionEntityProcessor
public ODataResponse readServiceDocument(GetServiceDocumentUriInfo uriInfo,
String contentType)
throws ODataException
readServiceDocument in interface ServiceDocumentProcessorODataResponse object
ODataExceptionServiceDocumentProcessor
public ODataResponse readMetadata(GetMetadataUriInfo uriInfo,
String contentType)
throws ODataException
readMetadata in interface MetadataProcessorODataResponse object
ODataExceptionMetadataProcessor
public List<String> getCustomContentTypes(Class<? extends ODataProcessor> processorFeature)
throws ODataException
CustomContentType
getCustomContentTypes in interface CustomContentTypeODataExceptionCustomContentType
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||