master
Phillip Webb 11 years ago
parent da7ae4a63b
commit f57c4a09ee
  1. 29
      spring-webmvc/src/main/java/org/springframework/web/servlet/LocaleResolver.java

@ -17,6 +17,7 @@
package org.springframework.web.servlet;
import java.util.Locale;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -50,22 +51,22 @@ import javax.servlet.http.HttpServletResponse;
*/
public interface LocaleResolver {
/**
* Resolve the current locale via the given request.
* Can return a default locale as fallback in any case.
* @param request the request to resolve the locale for
* @return the current locale (never {@code null})
*/
/**
* Resolve the current locale via the given request. Can return a default locale as
* fallback in any case.
* @param request the request to resolve the locale for
* @return the current locale (never {@code null})
*/
Locale resolveLocale(HttpServletRequest request);
/**
* Set the current locale to the given one.
* @param request the request to be used for locale modification
* @param response the response to be used for locale modification
* @param locale the new locale, or {@code null} to clear the locale
* @throws UnsupportedOperationException if the LocaleResolver implementation
* does not support dynamic changing of the locale
*/
/**
* Set the current locale to the given one.
* @param request the request to be used for locale modification
* @param response the response to be used for locale modification
* @param locale the new locale, or {@code null} to clear the locale
* @throws UnsupportedOperationException if the LocaleResolver implementation does not
* support dynamic changing of the locale
*/
void setLocale(HttpServletRequest request, HttpServletResponse response, Locale locale);
}

Loading…
Cancel
Save