Package org.nuiton.jaxx.runtime.i18n
Interface I18nDecoratorDefinition
-
- All Known Implementing Classes:
DefaultI18nDecoratorDefinition
public interface I18nDecoratorDefinitionTo get all about i18n for a decorator.To create your own, just implements this and make it available via the ServiceLoader mechanism.
The
accept(Decorator)will be used then to find the correct i18n decorator definition to keep.There is one default implementation
DefaultI18nDecoratorDefinitionused as a fallback inI18nDecoratorDefinitions.getDefinition(Decorator)Created on 27/07/2021.
- Since:
- 3.0.0
- Author:
- Tony Chemit - dev@tchemit.fr
- See Also:
I18nDecoratorDefinitions
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description booleanaccept(io.ultreia.java4all.decoration.Decorator decorator)default LinkedHashMap<String,String>computeLabels(io.ultreia.java4all.decoration.Decorator decorator, io.ultreia.java4all.i18n.spi.bean.BeanPropertyI18nKeyProducer labelsBuilder)Build the properties labels for a decorator.Class<?>getDecoratorType(io.ultreia.java4all.decoration.Decorator decorator)
-
-
-
Method Detail
-
accept
boolean accept(io.ultreia.java4all.decoration.Decorator decorator)
- Parameters:
decorator- decorator to inspect- Returns:
trueif it accept to deal with with decorator.
-
getDecoratorType
Class<?> getDecoratorType(io.ultreia.java4all.decoration.Decorator decorator)
- Parameters:
decorator- decorator to inspect- Returns:
- the type used by I18n to decorate properties, might be different of the
DecoratorDefinition.type()...
-
computeLabels
default LinkedHashMap<String,String> computeLabels(io.ultreia.java4all.decoration.Decorator decorator, io.ultreia.java4all.i18n.spi.bean.BeanPropertyI18nKeyProducer labelsBuilder)
Build the properties labels for a decorator.- Parameters:
decorator- decorator to inspectlabelsBuilder- the labels builder used tyo compute labels.- Returns:
- the dictionary of labels (keys are property names, values are properties labels)
-
-