Package jakarta.mvc.locale
Interface LocaleResolverContext
-
public interface LocaleResolverContextContextual data used by a
LocaleResolverto resolve the request locale.- Since:
- 1.0
- Author:
- Christian Kaltepoth, Ivar Grimstad
- See Also:
LocaleResolver
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Locale>getAcceptableLanguages()Get a list of languages that are acceptable for the response according to theAccept-LanguageHTTP header sent by the client.jakarta.ws.rs.core.ConfigurationgetConfiguration()Returns the application's configuration.jakarta.ws.rs.core.CookiegetCookie(String name)Returns the cookie with the given name.StringgetHeaderString(String name)Get the request header as a single string value.jakarta.ws.rs.core.RequestgetRequest()Get the Jakarta RESTful Web ServicesRequestinstance.jakarta.ws.rs.core.UriInfogetUriInfo()Get request URI information.
-
-
-
Method Detail
-
getConfiguration
jakarta.ws.rs.core.Configuration getConfiguration()
Returns the application's configuration.- Returns:
- application's configuration.
- See Also:
Configuration
-
getAcceptableLanguages
List<Locale> getAcceptableLanguages()
Get a list of languages that are acceptable for the response according to theAccept-LanguageHTTP header sent by the client.- Returns:
- a read-only list of languages ordered by their q-value.
- See Also:
Locale
-
getRequest
jakarta.ws.rs.core.Request getRequest()
Get the Jakarta RESTful Web ServicesRequestinstance.- Returns:
- the Jakarta RESTful Web Services
Requestinstance. - See Also:
Request
-
getUriInfo
jakarta.ws.rs.core.UriInfo getUriInfo()
Get request URI information.- Returns:
- request URI information
- See Also:
UriInfo
-
getCookie
jakarta.ws.rs.core.Cookie getCookie(String name)
Returns the cookie with the given name.- Parameters:
name- the name of the cookie- Returns:
- the cookie or
nullif no cookie with this name exists - See Also:
Cookie
-
getHeaderString
String getHeaderString(String name)
Get the request header as a single string value.- Parameters:
name- the name of the request header- Returns:
- the request header value. If the request header is not present then
nullis returned. If the request header is present more than once then the values of joined together and separated by a ',' character.
-
-