Class I18nInterceptor.LocaleHandlerAdapter

java.lang.Object
org.apache.struts2.interceptor.I18nInterceptor.LocaleHandlerAdapter
All Implemented Interfaces:
LocaleHandler, I18nInterceptor.LocaleHandler
Direct Known Subclasses:
I18nInterceptor.AcceptLanguageLocaleHandler, I18nInterceptor.CookieLocaleHandler, I18nInterceptor.RequestLocaleHandler, I18nInterceptor.SessionLocaleHandler
Enclosing class:
I18nInterceptor

@Deprecated(forRemoval=true, since="7.2.0") protected abstract class I18nInterceptor.LocaleHandlerAdapter extends Object implements I18nInterceptor.LocaleHandler
Deprecated, for removal: This API element is subject to removal in a future version.
Since 7.2.0, use the top-level handler classes in org.apache.struts2.interceptor.i18n. Scheduled for removal in the next release cycle.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    Looks for an explicit locale override in request-scoped sources.
    read(ActionInvocation invocation)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Reads locale from persistent/context sources when LocaleHandler.find() did not resolve one.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Indicates if the locale should be persisted for the current request.
    store(ActionInvocation invocation, Locale locale)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Persists the resolved locale when storage is enabled for the current handler.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocaleHandlerAdapter

      protected LocaleHandlerAdapter(LocaleHandler delegate)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • find

      public Locale find()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: LocaleHandler
      Looks for an explicit locale override in request-scoped sources.
      Specified by:
      find in interface LocaleHandler
      Returns:
      a locale override or null when no explicit override is present
    • read

      public Locale read(ActionInvocation invocation)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: LocaleHandler
      Reads locale from persistent/context sources when LocaleHandler.find() did not resolve one.
      Specified by:
      read in interface LocaleHandler
      Parameters:
      invocation - current action invocation
      Returns:
      resolved locale or null when no locale could be resolved
    • store

      public Locale store(ActionInvocation invocation, Locale locale)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: LocaleHandler
      Persists the resolved locale when storage is enabled for the current handler.
      Specified by:
      store in interface LocaleHandler
      Parameters:
      invocation - current action invocation
      locale - locale to store
      Returns:
      the effective locale to apply to the invocation context
    • shouldStore

      public boolean shouldStore()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: LocaleHandler
      Indicates if the locale should be persisted for the current request.
      Specified by:
      shouldStore in interface LocaleHandler
      Returns:
      true when LocaleHandler.store(ActionInvocation, Locale) should be invoked