public class DefaultODataContextLocaleExtractor extends java.lang.Object implements ODataContextLanguageExtractor
ODataContextLanguageExtractor| Constructor and Description |
|---|
DefaultODataContextLocaleExtractor() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
containsALanguage(java.lang.String language) |
protected java.util.Optional<java.lang.String> |
extractContentLanguage(ODataContext oDataContext) |
java.util.Locale |
extractFrom(ODataContext oDataContext,
java.lang.String headerName)
Get the Content/Accept Locale based on the given ODataContext
|
java.util.Optional<java.util.Locale> |
getAcceptLanguage(ODataContext oDataContext)
Get the Language based on the given ODataContext
|
protected ODataLocalizationService |
getODataLocalizationService() |
void |
setoDataLocalizationService(ODataLocalizationService oDataLocalizationService) |
public java.util.Locale extractFrom(ODataContext oDataContext,
java.lang.String headerName)
ODataContextLanguageExtractorextractFrom in interface ODataContextLanguageExtractoroDataContext - The ODataContext to be used.headerName - The header name to use. For instance: "Content-Language" or "Accept-Language"public java.util.Optional<java.util.Locale> getAcceptLanguage(ODataContext oDataContext)
ODataContextLanguageExtractorgetAcceptLanguage in interface ODataContextLanguageExtractoroDataContext - The ODataContext to be used.protected java.util.Optional<java.lang.String> extractContentLanguage(ODataContext oDataContext)
protected boolean containsALanguage(java.lang.String language)
protected ODataLocalizationService getODataLocalizationService()
public void setoDataLocalizationService(ODataLocalizationService oDataLocalizationService)
Copyright © 2018 SAP SE. All Rights Reserved.