Class LocalisationResolver

java.lang.Object
de.aristaflow.adept2.model.common.defaultimplementation.DefaultWrappingProxy<PluginDataContainer>
de.aristaflow.adept2.model.common.i18n.LocalisationResolver
All Implemented Interfaces:
Localiser, WrappingProxy, Serializable, InvocationHandler

public class LocalisationResolver extends de.aristaflow.adept2.model.common.defaultimplementation.DefaultWrappingProxy<PluginDataContainer> implements Localiser
Transparently resolves translations of localised model objects.

Note the order in which to apply wrappers for localisation! They need to be applied before the system data consumer ( ParameterRefResolver )!

See Also:
  • Field Details

    • PLUGIN_LOCALISED

      public static final String PLUGIN_LOCALISED
      The plug-in ID for localisations. FIXME move somewhere else
      See Also:
  • Constructor Details

    • LocalisationResolver

      public LocalisationResolver(PluginDataContainer target, Locale locale)
      Default constructor.
      Parameters:
      target - The target object, containing translation data in the plug-in data.
      locale - The target locale.
  • Method Details

    • invokeSpecific

      public Pair<Boolean,Object> invokeSpecific(Object proxy, Method method, Object[] args) throws Throwable
      Specified by:
      invokeSpecific in class de.aristaflow.adept2.model.common.defaultimplementation.DefaultWrappingProxy<PluginDataContainer>
      Throws:
      Throwable
    • getLocale

      public Locale getLocale()
      Description copied from interface: Localiser
      Gets the Locale that should be used or that is used for localisation of this object or a related object.
      Specified by:
      getLocale in interface Localiser
      Returns:
      The Locale that should be used or that is used for localisation of this object or a related object.