Top Description Methods
javax.mvc.locale

public Interface LocaleResolverContext

Imports
javax.ws.rs.core.Configuration, .Cookie, .Request, .UriInfo, java.util.List, .Locale

Contextual data used by a javax.mvc.locale.LocaleResolver to resolve the request locale.

Author
Christian Kaltepoth
Since
1.0
See Also
javax.mvc.locale.LocaleResolver

Method Summary

Modifier and TypeMethod and Description
public List<Locale>

Returns:

a read-only list of languages ordered by their q-value.
getAcceptableLanguages
()

Get a list of languages that are acceptable for the response according to the Accept-Language HTTP header sent by the client.

public Configuration

Returns:

application's configuration.
getConfiguration
()

Returns the application's configuration.

public Cookie

Returns:

the cookie or null if no cookie with this name exists
getCookie
(String
the name of the cookie
name
)

Returns the cookie with the given name.

public String

Returns:

the request header value. If the request header is not present then null is returned. If the request header is present more than once then the values of joined together and separated by a ',' character.
getHeaderString
(String
the name of the request header
name
)

Get the request header as a single string value.

public Request

Returns:

the JAX-RS Request instance.
getRequest
()

Get the JAX-RS Request instance.

public UriInfo

Returns:

request URI information
getUriInfo
()

Get request URI information.

Method Detail

getAcceptableLanguagesback to summary
public List<Locale> getAcceptableLanguages()

Get a list of languages that are acceptable for the response according to the Accept-Language HTTP header sent by the client.

Returns:List<Locale>

a read-only list of languages ordered by their q-value.

See Also
Locale
getConfigurationback to summary
public Configuration getConfiguration()

Returns the application's configuration.

Returns:Configuration

application's configuration.

See Also
javax.ws.rs.core.Configuration
getCookieback to summary
public Cookie getCookie(String name)

Returns the cookie with the given name.

Parameters
name:String

the name of the cookie

Returns:Cookie

the cookie or null if no cookie with this name exists

See Also
Cookie
getHeaderStringback to summary
public String getHeaderString(String name)

Get the request header as a single string value.

Parameters
name:String

the name of the request header

Returns:String

the request header value. If the request header is not present then null is returned. If the request header is present more than once then the values of joined together and separated by a ',' character.

getRequestback to summary
public Request getRequest()

Get the JAX-RS Request instance.

Returns:Request

the JAX-RS Request instance.

See Also
Request
getUriInfoback to summary
public UriInfo getUriInfo()

Get request URI information.

Returns:UriInfo

request URI information

See Also
UriInfo