org.apache.olingo.server.api.prefer

## Interface Preferences

-     public interface Preferences

  Provides access methods to the preferences set in Prefer HTTP request headers as described in RFC 7240. Preferences defined in the OData standard can be accessed with named methods.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `Preferences.Preference` Generic preference object.
    `static class` | `Preferences.Return`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `URI` | `getCallback()` Gets the value of the `url` parameter of the preference `odata.callback` or `null` if not set or the URI is not valid.
    `Integer` | `getMaxPageSize()` Gets the value of the preference `odata.maxpagesize` or `null` if not set or an invalid value has been set.
    `Preferences.Preference` | `getPreference(String name)` Gets named preference.
    `Preferences.Return` | `getReturn()` Gets the value of the preference `return` or `null` if not set or the value is not valid.
    `Integer` | `getWait()` Gets the value of the preference `wait` or `null` if not set or the value is not valid.
    `boolean` | `hasAllowEntityReferences()` Whether the preference `odata.allow-entityreferences` has been set.
    `boolean` | `hasContinueOnError()` Whether the preference `odata.continue-on-error` has been set.
    `boolean` | `hasRespondAsync()` Whether the preference `respond-async` has been set.
    `boolean` | `hasTrackChanges()` Whether the preference `odata.track-changes` has been set.

- - ### Method Detail

    - #### getPreference

          Preferences.Preference getPreference(String name)

      Gets named preference. Names are case insensitive.
      Parameters:
        `name` - name of the preference
      Returns:
        `Preferences.Preference` or `null` if no such preference has been set

    - #### hasAllowEntityReferences

          boolean hasAllowEntityReferences()

      Whether the preference `odata.allow-entityreferences` has been set.

    - #### getCallback

          URI getCallback()

      Gets the value of the `url` parameter of the preference `odata.callback` or `null` if not set or the URI is not valid.
      Returns:
        the callback URI

    - #### hasContinueOnError

          boolean hasContinueOnError()

      Whether the preference `odata.continue-on-error` has been set.

    - #### getMaxPageSize

          Integer getMaxPageSize()

      Gets the value of the preference `odata.maxpagesize` or `null` if not set or an invalid value has been set.
      Returns:
        the page size for server-driven paging

    - #### hasTrackChanges

          boolean hasTrackChanges()

      Whether the preference `odata.track-changes` has been set.

    - #### getReturn

          Preferences.Return getReturn()

      Gets the value of the preference `return` or `null` if not set or the value is not valid.

    - #### hasRespondAsync

          boolean hasRespondAsync()

      Whether the preference `respond-async` has been set.

    - #### getWait

          Integer getWait()

      Gets the value of the preference `wait` or `null` if not set or the value is not valid.
      Returns:
        the number of seconds the client is prepared to wait for the service to process the request synchronously

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