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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static String
PLUGIN_LOCALISED
The plug-in ID for localisations.
-
Constructor Summary
Constructors Constructor Description LocalisationResolver(PluginDataContainer target, Locale locale)
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Locale
getLocale()
Gets theLocale
that should be used or that is used for localisation of this object or a related object.Pair<Boolean,Object>
invokeSpecific(Object proxy, Method method, Object[] args)
-
Methods inherited from class de.aristaflow.adept2.model.common.defaultimplementation.DefaultWrappingProxy
invoke, unwrap
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.aristaflow.adept2.model.common.WrappingProxy
isWrapperFor, unwrap
-
-
-
-
Field Detail
-
PLUGIN_LOCALISED
public static final String PLUGIN_LOCALISED
The plug-in ID for localisations. FIXME move somewhere else- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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 Detail
-
invokeSpecific
public Pair<Boolean,Object> invokeSpecific(Object proxy, Method method, Object[] args) throws Throwable
- Specified by:
invokeSpecific
in classde.aristaflow.adept2.model.common.defaultimplementation.DefaultWrappingProxy<PluginDataContainer>
- Throws:
Throwable
-
-