Class PreferencesImpl
java.lang.Object
org.apache.olingo.server.core.prefer.PreferencesImpl
- All Implemented Interfaces:
Preferences
Provides access methods to the preferences set in the Prefer HTTP request
header as described in RFC 7240.
Preferences defined in the OData standard can be accessed with named methods.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.olingo.server.api.prefer.Preferences
Preferences.Preference, Preferences.Return -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the value of theurlparameter of the preferenceodata.callbackornullif not set or the URI is not valid.Gets the value of the preferenceodata.maxpagesizeornullif not set or an invalid value has been set.getPreference(String name) Gets named preference.Gets the value of the preferencereturnornullif not set or the value is not valid.getWait()Gets the value of the preferencewaitornullif not set or the value is not valid.booleanWhether the preferenceodata.allow-entityreferenceshas been set.booleanWhether the preferenceodata.continue-on-errorhas been set.booleanWhether the preferencerespond-asynchas been set.booleanWhether the preferenceodata.track-changeshas been set.
-
Constructor Details
-
PreferencesImpl
-
-
Method Details
-
getPreference
Description copied from interface:PreferencesGets named preference. Names are case insensitive.- Specified by:
getPreferencein interfacePreferences- Parameters:
name- name of the preference- Returns:
Preferences.Preferenceornullif no such preference has been set
-
hasAllowEntityReferences
public boolean hasAllowEntityReferences()Description copied from interface:PreferencesWhether the preferenceodata.allow-entityreferenceshas been set.- Specified by:
hasAllowEntityReferencesin interfacePreferences
-
getCallback
Description copied from interface:PreferencesGets the value of theurlparameter of the preferenceodata.callbackornullif not set or the URI is not valid.- Specified by:
getCallbackin interfacePreferences- Returns:
- the callback URI
-
hasContinueOnError
public boolean hasContinueOnError()Description copied from interface:PreferencesWhether the preferenceodata.continue-on-errorhas been set.- Specified by:
hasContinueOnErrorin interfacePreferences
-
getMaxPageSize
Description copied from interface:PreferencesGets the value of the preferenceodata.maxpagesizeornullif not set or an invalid value has been set.- Specified by:
getMaxPageSizein interfacePreferences- Returns:
- the page size for server-driven paging
-
hasTrackChanges
public boolean hasTrackChanges()Description copied from interface:PreferencesWhether the preferenceodata.track-changeshas been set.- Specified by:
hasTrackChangesin interfacePreferences
-
getReturn
Description copied from interface:PreferencesGets the value of the preferencereturnornullif not set or the value is not valid.- Specified by:
getReturnin interfacePreferences
-
hasRespondAsync
public boolean hasRespondAsync()Description copied from interface:PreferencesWhether the preferencerespond-asynchas been set.- Specified by:
hasRespondAsyncin interfacePreferences
-
getWait
Description copied from interface:PreferencesGets the value of the preferencewaitornullif not set or the value is not valid.- Specified by:
getWaitin interfacePreferences- Returns:
- the number of seconds the client is prepared to wait for the service to process the request synchronously
-