Class BeanPropertyI18nKeyProducerSupport
- java.lang.Object
-
- io.ultreia.java4all.i18n.spi.bean.BeanPropertyI18nKeyProducerSupport
-
- All Implemented Interfaces:
BeanPropertyI18nKeyProducer
- Direct Known Subclasses:
DefaultBeanPropertyI18nKeyProducer
public class BeanPropertyI18nKeyProducerSupport extends Object implements BeanPropertyI18nKeyProducer
Created by tchemit on 18/10/2018.- Author:
- Tony Chemit - dev@tchemit.fr
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBeanPropertyI18nKeyProducerSupport(String i18nPrefix)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,String>createMapping()protected Map<String,String>createPropertyKeyMapping()StringgetCommonPrefix()StringgetI18nPropertyKey(Class<?> type, String property)Get the i18n property key for the givenpropertyof the giventype.StringgetI18nTypeKey(Class<?> type)Get the i18n key for the giventype.StringgetPropertyMapping(String property)Map the property (used inBeanPropertyI18nKeyProducer.getI18nPropertyKey(Class, String).protected StringgetPropertyTypeMapping(Class<?> type, String property)
-
-
-
Constructor Detail
-
BeanPropertyI18nKeyProducerSupport
protected BeanPropertyI18nKeyProducerSupport(String i18nPrefix)
-
-
Method Detail
-
getCommonPrefix
public String getCommonPrefix()
- Specified by:
getCommonPrefixin interfaceBeanPropertyI18nKeyProducer
-
getI18nPropertyKey
public String getI18nPropertyKey(Class<?> type, String property)
Description copied from interface:BeanPropertyI18nKeyProducerGet the i18n property key for the givenpropertyof the giventype.- Specified by:
getI18nPropertyKeyin interfaceBeanPropertyI18nKeyProducer- Parameters:
type- type of objectproperty- property name- Returns:
- i18n property key (not translated)
-
getPropertyMapping
public String getPropertyMapping(String property)
Description copied from interface:BeanPropertyI18nKeyProducerMap the property (used inBeanPropertyI18nKeyProducer.getI18nPropertyKey(Class, String).- Specified by:
getPropertyMappingin interfaceBeanPropertyI18nKeyProducer- Parameters:
property- property to map- Returns:
- property mapping found or the incoming value if not specialized.
-
getI18nTypeKey
public String getI18nTypeKey(Class<?> type)
Description copied from interface:BeanPropertyI18nKeyProducerGet the i18n key for the giventype.- Specified by:
getI18nTypeKeyin interfaceBeanPropertyI18nKeyProducer- Parameters:
type- type to use- Returns:
- i18n type key (not translated)
-
-