Interface BeanPropertyI18nKeyProducer

  • All Known Implementing Classes:
    BeanPropertyI18nKeyProducerSupport, DefaultBeanPropertyI18nKeyProducer

    public interface BeanPropertyI18nKeyProducer
    Produce i18n key for any property of a bean.

    This should be used at application level to make easy translations of your objects.

    Created by tchemit on 18/10/2018.

    Author:
    Tony Chemit - dev@tchemit.fr
    • Method Detail

      • getI18nPropertyKey

        String getI18nPropertyKey​(Class<?> type,
                                  String property)
        Get the i18n property key for the given property of the given type.
        Parameters:
        type - type of object
        property - property name
        Returns:
        i18n property key (not translated)
      • getI18nTypeKey

        String getI18nTypeKey​(Class<?> type)
        Get the i18n key for the given type.
        Parameters:
        type - type to use
        Returns:
        i18n type key (not translated)
      • getPropertyMapping

        String getPropertyMapping​(String property)
        Map the property (used in getI18nPropertyKey(Class, String).
        Parameters:
        property - property to map
        Returns:
        property mapping found or the incoming value if not specialized.
      • getCommonPrefix

        String getCommonPrefix()