Interface ILocalizationProviding<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,​TLocale extends ILocalization<TBase>>

  • Type Parameters:
    TBase - type of the base entity that is providing localization.
    TLocale - type of the localization.
    All Known Implementing Classes:
    ClientPortalConfig, Projekt, UserPortal, UserPortalAuthConfig, UserPortalState, UserPortalTag

    public interface ILocalizationProviding<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,​TLocale extends ILocalization<TBase>>
    Common interface for all objects (mainly entities) that have got localisation entities for the purpose of internationalisation.
    Since:
    8.2.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • getLocalizations

        List<TLocale> getLocalizations()
        Gets the localisation entities
        Returns:
        the localisation entities
      • setLocalizations

        void setLocalizations​(List<TLocale> entities)
        Sets the i18n name
        Parameters:
        entities - the entities for localisation to set
      • getLocalizationsByI18nName

        default Map<String,​Map<Locale,​String>> getLocalizationsByI18nName()
        Gets the localizations grouped by the I18N name (map key).
        Returns:
        the localizations grouped by the I18N name (map key) as an immutable map.
      • getLocalizationsByI18nName

        default Map<Locale,​String> getLocalizationsByI18nName​(String i18nName)
        Gets the localizations for the given I18N name.
        Parameters:
        i18nName - to get the localizations for
        Returns:
        the localizations for the given I18N name as an immutable map.
      • getLocalizationsByLocale

        default Map<Locale,​Map<String,​String>> getLocalizationsByLocale()
        Gets the localizations grouped by the locale (map key).
        Returns:
        the localizations grouped by the locale (map key) as an immutable map.
      • getLocalizationsByLocale

        default Map<String,​String> getLocalizationsByLocale​(@Nullable
                                                                  Locale locale)
        Gets the localizations for the given locale.
        Parameters:
        locale - to get the localizations for. May be null for getting the default localizations.
        Returns:
        the localizations for the given locale as an immutable map.
      • getLocalization

        default String getLocalization​(String i18nName,
                                       @Nullable
                                       Locale locale)
        Gets the localization for the given I18N name and locale.
        Parameters:
        i18nName - to get the localization for
        locale - to get the localization for. May be null for getting the default localization.
        Returns:
        the localization for the given I18N name and locale