Interface Olingo4App
- All Known Implementing Classes:
Olingo4AppImpl
public interface Olingo4App
Olingo4 Client Api Interface.
-
Method Summary
Modifier and TypeMethodDescription<T> voidaction(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Calls a OData actionvoidbatch(org.apache.olingo.commons.api.edm.Edm edm, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<List<Olingo4BatchResponse>> responseHandler) Executes a batch request.voidclose()Closes resources.<T> voidcreate(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Creates a new OData resource.voiddelete(String resourcePath, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<org.apache.olingo.commons.api.http.HttpStatusCode> responseHandler) Deletes an OData resource and invokes callback withHttpStatusCodeon success, or with exception on failure.Returns content type for service calls.Returns custom Http headers.Returns Service base URI.<T> voidmerge(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Patches/merges an OData resource using HTTP MERGE.<T> voidpatch(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Patches/merges an OData resource using HTTP PATCH.<T> voidread(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<T> responseHandler) Reads an OData resource and invokes callback with appropriate result.voidsetContentType(String contentType) Set default service call content type.voidsetHttpHeaders(Map<String, String> httpHeaders) Sets custom Http headers to add to every service request.voidsetServiceUri(String serviceUri) Sets Service base URI.<T> voidupdate(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Updates an OData resource.voiduread(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<InputStream> responseHandler) Reads an OData resource and invokes callback with the unparsed input stream.
-
Method Details
-
setServiceUri
Sets Service base URI.- Parameters:
serviceUri-
-
getServiceUri
String getServiceUri()Returns Service base URI.- Returns:
- service base URI.
-
setHttpHeaders
Sets custom Http headers to add to every service request.- Parameters:
httpHeaders- custom Http headers.
-
getHttpHeaders
Returns custom Http headers.- Returns:
- custom Http headers.
-
getContentType
String getContentType()Returns content type for service calls. Defaults toapplication/json;charset=utf-8.- Returns:
- content type.
-
setContentType
Set default service call content type.- Parameters:
contentType- content type.
-
close
void close()Closes resources. -
read
<T> void read(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<T> responseHandler) Reads an OData resource and invokes callback with appropriate result.- Parameters:
edm- Service Edm, read from callingread(null, "$metdata", null, responseHandler)resourcePath- OData Resource pathqueryParams- OData query params http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288endpointHttpHeaders- HTTP Headers to add/override the component versionsresponseHandler- callback handler
-
uread
void uread(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> queryParams, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<InputStream> responseHandler) Reads an OData resource and invokes callback with the unparsed input stream.- Parameters:
edm- Service Edm, read from callingread(null, "$metdata", null, responseHandler)resourcePath- OData Resource pathqueryParams- OData query params http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288endpointHttpHeaders- HTTP Headers to add/override the component versionsresponseHandler- callback handler
-
delete
void delete(String resourcePath, Map<String, String> endpointHttpHeaders, Olingo4ResponseHandler<org.apache.olingo.commons.api.http.HttpStatusCode> responseHandler) Deletes an OData resource and invokes callback withHttpStatusCodeon success, or with exception on failure.- Parameters:
resourcePath- resource path for EntryendpointHttpHeaders- HTTP Headers to add/override the component versionsresponseHandler-HttpStatusCodecallback handler
-
create
<T> void create(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Creates a new OData resource.- Parameters:
edm- service EdmresourcePath- resource path to createendpointHttpHeaders- HTTP Headers to add/override the component versionsdata- request dataresponseHandler- callback handler
-
update
<T> void update(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Updates an OData resource.- Parameters:
edm- service EdmresourcePath- resource path to updateendpointHttpHeaders- HTTP Headers to add/override the component versionsdata- updated dataresponseHandler-ClientEntitycallback handler
-
patch
<T> void patch(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Patches/merges an OData resource using HTTP PATCH.- Parameters:
edm- service EdmresourcePath- resource path to updateendpointHttpHeaders- HTTP Headers to add/override the component versionsdata- patch/merge dataresponseHandler-ClientEntitycallback handler
-
merge
<T> void merge(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Patches/merges an OData resource using HTTP MERGE.- Parameters:
edm- service EdmresourcePath- resource path to updateendpointHttpHeaders- HTTP Headers to add/override the component versionsdata- patch/merge dataresponseHandler-ClientEntitycallback handler
-
batch
void batch(org.apache.olingo.commons.api.edm.Edm edm, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<List<Olingo4BatchResponse>> responseHandler) Executes a batch request.- Parameters:
edm- service EdmendpointHttpHeaders- HTTP Headers to add/override the component versionsdata- orderedOlingo4BatchRequestlistresponseHandler- callback handler
-
action
<T> void action(org.apache.olingo.commons.api.edm.Edm edm, String resourcePath, Map<String, String> endpointHttpHeaders, Object data, Olingo4ResponseHandler<T> responseHandler) Calls a OData action- Parameters:
edm- service EdmresourcePath- resource path to actionendpointHttpHeaders- HTTP Headers to add/override the component versionsdata- action dataresponseHandler-ClientEntitycallback handler
-