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
Modifier and TypeMethodDescriptiongetKeys()Gets the keys provided by this object.Gets the locales provided by this object.default TLocalizationgetLocalization(String key, Locale locale) Gets the localized database object for the given key (I18N name) and locale.default StringgetLocalizationData(String key, Locale locale) Gets the localized data for the given key (I18N name) and locale.Gets the localized database objects.@NotNull LocaleGets the default locale for this providing object.Creates a new localization object.default voidsetLocalization(Locale locale, String i18nKey, String i18nValue)
-
Method Details
-
getKeys
-
getLocales
-
getLocalizations
List<TLocalization> getLocalizations()Gets the localized database objects.- Returns:
- the localized database objects
-
getLocalizationsDefaultLocale
Gets the default locale for this providing object.- Returns:
- the default locale for this providing object
-
getLocalization
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
-
newLocalization
TLocalization newLocalization()Creates a new localization object.- Returns:
- a new localization object
-
setLocalization
-