public class ListsProcessor extends ODataSingleProcessor
Constructor and Description |
---|
ListsProcessor(ScenarioDataSource dataSource) |
ListsProcessor(ScenarioDataSource dataSource,
BeanPropertyAccess valueAccess) |
Modifier and Type | Method and Description |
---|---|
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.
|
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 |
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.
|
getContext, getCustomContentTypes, readMetadata, readServiceDocument, setContext
public ListsProcessor(ScenarioDataSource dataSource)
public ListsProcessor(ScenarioDataSource dataSource, BeanPropertyAccess valueAccess)
public ODataResponse readEntitySet(GetEntitySetUriInfo uriInfo, String contentType) throws ODataException
EntitySetProcessor
readEntitySet
in interface EntitySetProcessor
readEntitySet
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntitySetProcessor
public ODataResponse countEntitySet(GetEntitySetCountUriInfo uriInfo, String contentType) throws ODataException
EntitySetProcessor
countEntitySet
in interface EntitySetProcessor
countEntitySet
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntitySetProcessor
public ODataResponse readEntityLinks(GetEntitySetLinksUriInfo uriInfo, String contentType) throws ODataException
EntityLinksProcessor
readEntityLinks
in interface EntityLinksProcessor
readEntityLinks
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataException
EntityLinksProcessor
public ODataResponse countEntityLinks(GetEntitySetLinksCountUriInfo uriInfo, String contentType) throws ODataException
EntityLinksProcessor
countEntityLinks
in interface EntityLinksProcessor
countEntityLinks
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataException
EntityLinksProcessor
public ODataResponse readEntity(GetEntityUriInfo uriInfo, String contentType) throws ODataException
EntityProcessor
readEntity
in interface EntityProcessor
readEntity
in class ODataSingleProcessor
contentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse existsEntity(GetEntityCountUriInfo uriInfo, String contentType) throws ODataException
EntityProcessor
existsEntity
in interface EntityProcessor
existsEntity
in class ODataSingleProcessor
contentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse deleteEntity(DeleteUriInfo uriInfo, String contentType) throws ODataException
EntityProcessor
deleteEntity
in interface EntityProcessor
deleteEntity
in class ODataSingleProcessor
uriInfo
- a DeleteUriInfo
object with information from the URI parsercontentType
- the content type of the responseODataResponse
objectODataException
EntityProcessor
public ODataResponse createEntity(PostUriInfo uriInfo, InputStream content, String requestContentType, String contentType) throws ODataException
EntitySetProcessor
createEntity
in interface EntitySetProcessor
createEntity
in class ODataSingleProcessor
uriInfo
- 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 responseODataResponse
objectODataException
EntitySetProcessor
public ODataResponse updateEntity(PutMergePatchUriInfo uriInfo, InputStream content, String requestContentType, boolean merge, String contentType) throws ODataException
EntityProcessor
updateEntity
in interface EntityProcessor
updateEntity
in class ODataSingleProcessor
uriInfo
- 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 responseODataResponse
objectODataException
EntityProcessor
public ODataResponse readEntityLink(GetEntityLinkUriInfo uriInfo, String contentType) throws ODataException
EntityLinkProcessor
readEntityLink
in interface EntityLinkProcessor
readEntityLink
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse existsEntityLink(GetEntityLinkCountUriInfo uriInfo, String contentType) throws ODataException
EntityLinkProcessor
existsEntityLink
in interface EntityLinkProcessor
existsEntityLink
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse deleteEntityLink(DeleteUriInfo uriInfo, String contentType) throws ODataException
EntityLinkProcessor
deleteEntityLink
in interface EntityLinkProcessor
deleteEntityLink
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse createEntityLink(PostUriInfo uriInfo, InputStream content, String requestContentType, String contentType) throws ODataException
EntityLinksProcessor
createEntityLink
in interface EntityLinksProcessor
createEntityLink
in class ODataSingleProcessor
uriInfo
- 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 responseODataException
EntityLinkProcessor
public ODataResponse updateEntityLink(PutMergePatchUriInfo uriInfo, InputStream content, String requestContentType, String contentType) throws ODataException
EntityLinkProcessor
updateEntityLink
in interface EntityLinkProcessor
updateEntityLink
in class ODataSingleProcessor
uriInfo
- 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 responseODataResponse
objectODataException
EntityLinkProcessor
public ODataResponse readEntityComplexProperty(GetComplexPropertyUriInfo uriInfo, String contentType) throws ODataException
EntityComplexPropertyProcessor
readEntityComplexProperty
in interface EntityComplexPropertyProcessor
readEntityComplexProperty
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityComplexPropertyProcessor
public ODataResponse readEntitySimpleProperty(GetSimplePropertyUriInfo uriInfo, String contentType) throws ODataException
EntitySimplePropertyProcessor
readEntitySimpleProperty
in interface EntitySimplePropertyProcessor
readEntitySimpleProperty
in class ODataSingleProcessor
contentType
- the content type of the responseODataResponse
objectODataException
EntitySimplePropertyProcessor
public ODataResponse readEntitySimplePropertyValue(GetSimplePropertyUriInfo uriInfo, String contentType) throws ODataException
EntitySimplePropertyValueProcessor
readEntitySimplePropertyValue
in interface EntitySimplePropertyValueProcessor
readEntitySimplePropertyValue
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntitySimplePropertyValueProcessor
public ODataResponse deleteEntitySimplePropertyValue(DeleteUriInfo uriInfo, String contentType) throws ODataException
EntitySimplePropertyValueProcessor
deleteEntitySimplePropertyValue
in interface EntitySimplePropertyValueProcessor
deleteEntitySimplePropertyValue
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntitySimplePropertyValueProcessor
public ODataResponse updateEntityComplexProperty(PutMergePatchUriInfo uriInfo, InputStream content, String requestContentType, boolean merge, String contentType) throws ODataException
EntityComplexPropertyProcessor
updateEntityComplexProperty
in interface EntityComplexPropertyProcessor
updateEntityComplexProperty
in class ODataSingleProcessor
uriInfo
- 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 responseODataResponse
objectODataException
EntityComplexPropertyProcessor
public ODataResponse updateEntitySimpleProperty(PutMergePatchUriInfo uriInfo, InputStream content, String requestContentType, String contentType) throws ODataException
EntitySimplePropertyProcessor
updateEntitySimpleProperty
in interface EntitySimplePropertyProcessor
updateEntitySimpleProperty
in class ODataSingleProcessor
uriInfo
- 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 responseODataResponse
objectODataException
EntitySimplePropertyProcessor
public ODataResponse updateEntitySimplePropertyValue(PutMergePatchUriInfo uriInfo, InputStream content, String requestContentType, String contentType) throws ODataException
EntitySimplePropertyValueProcessor
updateEntitySimplePropertyValue
in interface EntitySimplePropertyValueProcessor
updateEntitySimplePropertyValue
in class ODataSingleProcessor
uriInfo
- 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 responseODataResponse
objectODataException
EntitySimplePropertyValueProcessor
public ODataResponse readEntityMedia(GetMediaResourceUriInfo uriInfo, String contentType) throws ODataException
EntityMediaProcessor
readEntityMedia
in interface EntityMediaProcessor
readEntityMedia
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityMediaProcessor
public ODataResponse deleteEntityMedia(DeleteUriInfo uriInfo, String contentType) throws ODataException
EntityMediaProcessor
deleteEntityMedia
in interface EntityMediaProcessor
deleteEntityMedia
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
EntityMediaProcessor
public ODataResponse updateEntityMedia(PutMergePatchUriInfo uriInfo, InputStream content, String requestContentType, String contentType) throws ODataException
EntityMediaProcessor
updateEntityMedia
in interface EntityMediaProcessor
updateEntityMedia
in class ODataSingleProcessor
uriInfo
- information about the request URIcontent
- the content of the requestrequestContentType
- the content type of the request bodycontentType
- the content type of the responseODataResponse
objectODataException
EntityMediaProcessor
public ODataResponse executeFunctionImport(GetFunctionImportUriInfo uriInfo, String contentType) throws ODataException
FunctionImportProcessor
executeFunctionImport
in interface FunctionImportProcessor
executeFunctionImport
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
FunctionImportProcessor
public ODataResponse executeFunctionImportValue(GetFunctionImportUriInfo uriInfo, String contentType) throws ODataException
FunctionImportValueProcessor
executeFunctionImportValue
in interface FunctionImportValueProcessor
executeFunctionImportValue
in class ODataSingleProcessor
uriInfo
- information about the request URIcontentType
- the content type of the responseODataResponse
objectODataException
FunctionImportValueProcessor
public ODataResponse executeBatch(BatchHandler handler, String contentType, InputStream content) throws ODataException
BatchProcessor
ODataResponse
executeBatch
in interface BatchProcessor
executeBatch
in class ODataSingleProcessor
handler
- batch handlercontentType
- the content type of the requestcontent
- Batch Request bodyODataResponse
objectODataException
BatchProcessor
public BatchResponsePart executeChangeSet(BatchHandler handler, List<ODataRequest> requests) throws ODataException
BatchProcessor
BatchResponsePart
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 responseexecuteChangeSet
in interface BatchProcessor
executeChangeSet
in class ODataSingleProcessor
handler
- batch handlerrequests
- list of single change requestsBatchResponsePart
objectODataException
BatchProcessor
Copyright © 2013-2017 The Apache Software Foundation. All Rights Reserved.