Interface ILocalizationProviding<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TLocalization extends ILocalization<TBase,LocalizationId>>
-
- Type Parameters:
TBase
- type of the base entity that is providing localization.TLocalization
- type of the localization.
- All Known Implementing Classes:
ClientAuthenticator
,EndUserState
,ProjectPortalTag
,Projekt
,SystemAuthenticator
,UserPortal
public interface ILocalizationProviding<TBase extends de.xima.cmn.dao.interfaces.IEntity<Long>,TLocalization extends ILocalization<TBase,LocalizationId>>
Common interface for all objects (mainly entities) that have got localization entities for the purpose of internationalization.- Since:
- 8.2.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default Set<String>
getKeys()
Gets the keys provided by this object.default Set<Locale>
getLocales()
Gets the locales provided by this object.default TLocalization
getLocalization(String key, Locale locale)
Gets the localized database object for the given key (I18N name) and locale.default String
getLocalizationData(String key, Locale locale)
Gets the localized data for the given key (I18N name) and locale.List<TLocalization>
getLocalizations()
Gets the localized database objects.@NotNull Locale
getLocalizationsDefaultLocale()
Gets the default locale for this providing object.TLocalization
newLocalization()
Creates a new localization object.default void
setLocalization(Locale locale, String i18nKey, String i18nValue)
-
-
-
Method Detail
-
getKeys
default Set<String> getKeys()
Gets the keys provided by this object. The keys are the I18N names identifying the localized database objects.- Returns:
- the keys provided by this object
-
getLocales
default Set<Locale> getLocales()
Gets the locales provided by this object.- Returns:
- the locales provided by this object
-
getLocalizations
List<TLocalization> getLocalizations()
Gets the localized database objects.- Returns:
- the localized database objects
-
getLocalizationsDefaultLocale
@NotNull @NotNull Locale getLocalizationsDefaultLocale()
Gets the default locale for this providing object.- Returns:
- the default locale for this providing object
-
getLocalization
default TLocalization getLocalization(String key, Locale locale)
Gets the localized database object for the given key (I18N name) and locale.- Parameters:
key
- to get the localized database object forlocale
- to get the localized database object for.- Returns:
- The localized database object for the given key (I18N name) and locale
-
getLocalizationData
default String getLocalizationData(String key, Locale locale)
Gets the localized data for the given key (I18N name) and locale.- Parameters:
key
- to get the localized data forlocale
- to get the localized data for.- Returns:
- The localized data for the given key (I18N name) and locale
-
newLocalization
TLocalization newLocalization()
Creates a new localization object.- Returns:
- a new localization object
-
-