Interface Olingo4App

  • All Known Implementing Classes:
    Olingo4AppImpl

    public interface Olingo4App
    Olingo4 Client Api Interface.
    • Method Detail

      • setServiceUri

        void setServiceUri​(String serviceUri)
        Sets Service base URI.
        Parameters:
        serviceUri -
      • getServiceUri

        String getServiceUri()
        Returns Service base URI.
        Returns:
        service base URI.
      • setHttpHeaders

        void setHttpHeaders​(Map<String,​String> httpHeaders)
        Sets custom Http headers to add to every service request.
        Parameters:
        httpHeaders - custom Http headers.
      • getHttpHeaders

        Map<String,​String> getHttpHeaders()
        Returns custom Http headers.
        Returns:
        custom Http headers.
      • getContentType

        String getContentType()
        Returns content type for service calls. Defaults to application/json;charset=utf-8.
        Returns:
        content type.
      • setContentType

        void setContentType​(String contentType)
        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 calling read(null, "$metdata", null, responseHandler)
        resourcePath - OData Resource path
        queryParams - OData query params http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        responseHandler - 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 calling read(null, "$metdata", null, responseHandler)
        resourcePath - OData Resource path
        queryParams - OData query params http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html#_Toc453752288
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        responseHandler - 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 with HttpStatusCode on success, or with exception on failure.
        Parameters:
        resourcePath - resource path for Entry
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        responseHandler - HttpStatusCode callback 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 Edm
        resourcePath - resource path to create
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        data - request data
        responseHandler - 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 Edm
        resourcePath - resource path to update
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        data - updated data
        responseHandler - ClientEntity callback 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 Edm
        resourcePath - resource path to update
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        data - patch/merge data
        responseHandler - ClientEntity callback 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 Edm
        resourcePath - resource path to update
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        data - patch/merge data
        responseHandler - ClientEntity 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 Edm
        resourcePath - resource path to action
        endpointHttpHeaders - HTTP Headers to add/override the component versions
        data - action data
        responseHandler - ClientEntity callback handler