Package org.jgrapes.http
Class LanguageSelector.Selection
java.lang.Object
org.jgrapes.http.LanguageSelector.Selection
- All Implemented Interfaces:
Serializable
- Enclosing class:
LanguageSelector
Represents a locale selection.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionLocale[]
get()
Return the current locale.Returns a cookie that reflects the current selection.long
Gets the cookie max age.Gets the cookie name.Gets the cookie path.Gets the cookie same site.boolean
Checks if is explicitly set.Updates the current locale.toString()
-
Method Details
-
getCookieName
Gets the cookie name.- Returns:
- the cookieName
-
getCookiePath
Gets the cookie path.- Returns:
- the cookiePath
-
getCookieMaxAge
Gets the cookie max age.- Returns:
- the cookie max age
-
getCookieSameSite
Gets the cookie same site.- Returns:
- the cookie same site
-
isExplicitlySet
Checks if is explicitly set.- Returns:
- the explicitlySet
-
get
Return the current locale.- Returns:
- the value;
-
prefer
Updates the current locale.- Parameters:
locale
- the locale- Returns:
- the selection for easy chaining
-
getCookie
Returns a cookie that reflects the current selection.- Returns:
- the cookie
-
toString
-