org.apache.olingo.client.api

## Interface Configuration

-     public interface Configuration

  Configuration wrapper.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ContentType` | `getDefaultBatchAcceptFormat()` Gets the configured default `Accept` header value format for a batch request.
    `ContentType` | `getDefaultFormat()` Gets the configured OData format.
    `ContentType` | `getDefaultMediaFormat()` Gets the configured OData media format.
    `ContentType` | `getDefaultPubFormat()` Gets the configured OData format for AtomPub exchanges.
    `ContentType` | `getDefaultValueFormat()` Gets the configured OData value format.
    `ExecutorService` | `getExecutor()` Retrieves request executor service.
    `HttpClientFactory` | `getHttpClientFactory()` Gets the HttpClient factory to be used for executing requests.
    `HttpUriRequestFactory` | `getHttpUriRequestFactory()` Gets the HttpUriRequest factory for generating requests to be executed.
    `boolean` | `isAddressingDerivedTypes()` Gets whether query URIs in request should contain fully qualified type name. - OData Intermediate Conformance Level: MUST support casting to a derived type according to [OData-URL] if derived types are present in the model.
    `boolean` | `isContinueOnError()` When processing a set of requests (in batch requests, for example), checks if the execution will be aborted after first error encountered or not.
    `boolean` | `isGzipCompression()` Checks whether Gzip compression (e.g. support for `Accept-Encoding: gzip` and `Content-Encoding: gzip` HTTP headers) is enabled.
    `boolean` | `isKeyAsSegment()` Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment (non-standard).
    `boolean` | `isUseChuncked()` Checks whether chunk HTTP encoding is being used.
    `boolean` | `isUseUrlOperationFQN()` Checks whether operation name in request URI should be fully qualified name, which is required by OData V4 protocol, but some service may still choose to support shorter name.
    `boolean` | `isUseXHTTPMethod()` Gets whether `PUT`, `MERGE`, `PATCH`, `DELETE` HTTP methods need to be translated to `POST` with additional `X-HTTTP-Method` header.
    `void` | `setAddressingDerivedTypes(boolean value)` Sets whether query URIs in request should contain fully qualified type name. - OData Intermediate Conformance Level: MUST support casting to a derived type according to [OData-URL] if derived types are present in the model.
    `void` | `setContinueOnError(boolean value)` When processing a set of requests (in batch requests, for example), sets if the execution will be aborted after first error encountered or not.
    `void` | `setDefaultBatchAcceptFormat(ContentType contentType)` Set the default `Accept` header value format for a batch request.
    `void` | `setDefaultMediaFormat(ContentType format)` Sets the default OData media format.
    `void` | `setDefaultPubFormat(ContentType format)` Sets the default OData format for AtomPub exchanges.
    `void` | `setDefaultValueFormat(ContentType format)` Sets the default OData value format.
    `void` | `setExecutor(ExecutorService executorService)` Sets request executor service.
    `void` | `setGzipCompression(boolean value)` Sets Gzip compression (e.g. support for `Accept-Encoding: gzip` and `Content-Encoding: gzip` HTTP headers) enabled or disabled.
    `void` | `setHttpClientFactory(HttpClientFactory factory)` Sets the HttpClient factory to be used for executing requests.
    `void` | `setHttpUriRequestFactory(HttpUriRequestFactory factory)` Sets the HttpUriRequest factory generating requests to be executed.
    `void` | `setKeyAsSegment(boolean value)` Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment (non-standard).
    `void` | `setUseChuncked(boolean value)` Sets chunk HTTP encoding enabled or disabled.
    `void` | `setUseUrlOperationFQN(boolean value)` Sets whether operation name in request URI should be fully qualified name, which is required by OData V4 protocol, but some service may still choose to support shorter name.
    `void` | `setUseXHTTPMethod(boolean value)` Sets whether `PUT`, `MERGE`, `PATCH`, `DELETE` HTTP methods need to be translated to `POST` with additional `X-HTTTP-Method` header.

- - ### Method Detail

    - #### getDefaultBatchAcceptFormat

          ContentType getDefaultBatchAcceptFormat()

      Gets the configured default `Accept` header value format for a batch request.
      Returns:
        configured default `Accept` header value for a batch request.

    - #### setDefaultBatchAcceptFormat

          void setDefaultBatchAcceptFormat(ContentType contentType)

      Set the default `Accept` header value format for a batch request.
      Parameters:
        `contentType` - default `Accept` header value.

    - #### getDefaultPubFormat

          ContentType getDefaultPubFormat()

      Gets the configured OData format for AtomPub exchanges. If this configuration parameter doesn't exist the JSON_FULL_METADATA format will be used as default.
      Returns:
        configured OData format for AtomPub if specified; JSON_FULL_METADATA format otherwise.

    - #### setDefaultPubFormat

          void setDefaultPubFormat(ContentType format)

      Sets the default OData format for AtomPub exchanges.
      Parameters:
        `format` - default format.

    - #### getDefaultFormat

          ContentType getDefaultFormat()

      Gets the configured OData format. This value depends on what is returned from `getDefaultPubFormat()`.
      Returns:
        configured OData format
      See Also:
        `getDefaultPubFormat()`

    - #### getDefaultValueFormat

          ContentType getDefaultValueFormat()

      Gets the configured OData value format. If this configuration parameter doesn't exist the TEXT format will be used as default.
      Returns:
        configured OData value format if specified; TEXT_PLAIN format otherwise.

    - #### setDefaultValueFormat

          void setDefaultValueFormat(ContentType format)

      Sets the default OData value format.
      Parameters:
        `format` - default format.

    - #### getDefaultMediaFormat

          ContentType getDefaultMediaFormat()

      Gets the configured OData media format. If this configuration parameter doesn't exist the APPLICATION_OCTET_STREAM format will be used as default.
      Returns:
        configured OData media format if specified; APPLICATION_OCTET_STREAM format otherwise.

    - #### setDefaultMediaFormat

          void setDefaultMediaFormat(ContentType format)

      Sets the default OData media format.
      Parameters:
        `format` - default format.

    - #### getHttpClientFactory

          HttpClientFactory getHttpClientFactory()

      Gets the HttpClient factory to be used for executing requests.
      Returns:
        provided implementation (if configured via `setHttpClientFactory` or default.

    - #### setHttpClientFactory

          void setHttpClientFactory(HttpClientFactory factory)

      Sets the HttpClient factory to be used for executing requests.
      Parameters:
        `factory` - implementation of `HttpClientFactory`.
      See Also:
        `HttpClientFactory`

    - #### getHttpUriRequestFactory

          HttpUriRequestFactory getHttpUriRequestFactory()

      Gets the HttpUriRequest factory for generating requests to be executed.
      Returns:
        provided implementation (if configured via `setHttpUriRequestFactory` or default.

    - #### setHttpUriRequestFactory

          void setHttpUriRequestFactory(HttpUriRequestFactory factory)

      Sets the HttpUriRequest factory generating requests to be executed.
      Parameters:
        `factory` - implementation of `HttpUriRequestFactory`.
      See Also:
        `HttpUriRequestFactory`

    - #### isUseXHTTPMethod

          boolean isUseXHTTPMethod()

      Gets whether `PUT`, `MERGE`, `PATCH`, `DELETE` HTTP methods need to be translated to `POST` with additional `X-HTTTP-Method` header.
      Returns:
        whether `X-HTTTP-Method` header is to be used

    - #### setUseXHTTPMethod

          void setUseXHTTPMethod(boolean value)

      Sets whether `PUT`, `MERGE`, `PATCH`, `DELETE` HTTP methods need to be translated to `POST` with additional `X-HTTTP-Method` header.
      Parameters:
        `value` - 'TRUE' to use tunneling.

    - #### isGzipCompression

          boolean isGzipCompression()

      Checks whether Gzip compression (e.g. support for `Accept-Encoding: gzip` and `Content-Encoding: gzip` HTTP headers) is enabled.
      Returns:
        whether HTTP Gzip compression is enabled

    - #### setGzipCompression

          void setGzipCompression(boolean value)

      Sets Gzip compression (e.g. support for `Accept-Encoding: gzip` and `Content-Encoding: gzip` HTTP headers) enabled or disabled.
      Parameters:
        `value` - whether to use Gzip compression.

    - #### isUseChuncked

          boolean isUseChuncked()

      Checks whether chunk HTTP encoding is being used.
      Returns:
        whether chunk HTTP encoding is being used

    - #### setUseChuncked

          void setUseChuncked(boolean value)

      Sets chunk HTTP encoding enabled or disabled.
      Parameters:
        `value` - whether to use chunk HTTP encoding.

    - #### isKeyAsSegment

          boolean isKeyAsSegment()

      Checks whether URIs contain entity key between parentheses (standard) or instead as additional segment (non-standard).
      Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or http://services.odata.org/V4/OData/OData.svc/Products/0
      Returns:
        whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment.

    - #### setKeyAsSegment

          void setKeyAsSegment(boolean value)

      Sets whether URIs shall be built with entity key between parentheses (standard) or instead as additional segment (non-standard).
      Example: http://services.odata.org/V4/OData/OData.svc/Products(0) or http://services.odata.org/V4/OData/OData.svc/Products/0
      Parameters:
        `value` - 'TRUE' to use this feature.

    - #### isAddressingDerivedTypes

          boolean isAddressingDerivedTypes()

      Gets whether query URIs in request should contain fully qualified type name. - OData Intermediate Conformance Level: MUST support casting to a derived type according to [OData-URL] if derived types are present in the model.
      Example: http://host/service/Customers/Model.VipCustomer(102) or http://host/service/Customers/Model.VipCustomer
      Returns:
        whether query URIs in request should contain fully qualified type name. segment.

    - #### setAddressingDerivedTypes

          void setAddressingDerivedTypes(boolean value)

      Sets whether query URIs in request should contain fully qualified type name. - OData Intermediate Conformance Level: MUST support casting to a derived type according to [OData-URL] if derived types are present in the model.
      Example: http://host/service/Customers/Model.VipCustomer(102) or http://host/service/Customers/Model.VipCustomer
      Parameters:
        `value` - 'TRUE' to use this feature.

    - #### isUseUrlOperationFQN

          boolean isUseUrlOperationFQN()

      Checks whether operation name in request URI should be fully qualified name, which is required by OData V4 protocol, but some service may still choose to support shorter name.
      Example: http://host/service/Customers(2)/NS1.Model.IncreaseSalary VS http://host/service/Customers(2)/IncreaseSalary
      Returns:
        wheter operation name in request URI should be fully qualified name. segment.

    - #### setUseUrlOperationFQN

          void setUseUrlOperationFQN(boolean value)

      Sets whether operation name in request URI should be fully qualified name, which is required by OData V4 protocol, but some service may still choose to support shorter name.
      Example: http://host/service/Customers(2)/NS1.Model.IncreaseSalary VS http://host/service/Customers(2)/IncreaseSalary
      Parameters:
        `value` - 'TRUE' to use this feature.

    - #### isContinueOnError

          boolean isContinueOnError()

      When processing a set of requests (in batch requests, for example), checks if the execution will be aborted after first error encountered or not.
      Returns:
        whether execution of a set of requests will be aborted after first error

    - #### setContinueOnError

          void setContinueOnError(boolean value)

      When processing a set of requests (in batch requests, for example), sets if the execution will be aborted after first error encountered or not.
      Parameters:
        `value` - 'TRUE' to use this feature.

    - #### getExecutor

          ExecutorService getExecutor()

      Retrieves request executor service.
      Returns:
        request executor service.

    - #### setExecutor

          void setExecutor(ExecutorService executorService)

      Sets request executor service.
      Parameters:
        `executorService` - new executor services.

Copyright © 2013–2022 The Apache Software Foundation. All rights reserved.