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
    Description
    static class 
    Generic preference object.
    static enum 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the value of the url parameter of the preference odata.callback or null if not set or the URI is not valid.
    Gets the value of the preference odata.maxpagesize or null if not set or an invalid value has been set.
    Gets named preference.
    Gets the value of the preference return or null if not set or the value is not valid.
    Gets the value of the preference wait or null if not set or the value is not valid.
    boolean
    Whether the preference odata.allow-entityreferences has been set.
    boolean
    Whether the preference odata.continue-on-error has been set.
    boolean
    Whether the preference respond-async has been set.
    boolean
    Whether the preference odata.track-changes has been set.
  • Method Details

    • 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