Interface IScopedLocalizedDatabaseObjectProviding<TData extends Serializable, TLocalization extends IScopedLocalizedDatabaseObject<TData,?>>
- Type Parameters:
TData- type of the localized data. This may be a String, a file object or any other type of data.TLocalization- type of the localized database object that provides the localized data.
public interface IScopedLocalizedDatabaseObjectProviding<TData extends Serializable, TLocalization extends IScopedLocalizedDatabaseObject<TData,?>>
Common interface for all objects (mainly entities) that provide localized data for different scopes.
- Since:
- 8.4.0
- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields -
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 TDatagetLocalizationData(String key, Locale locale) Gets the localized data for the given key (I18N name) and locale.Gets the localized database objects.booleanisDefault(TLocalization localization) Checks if the given localization is the default localization.booleanChecks if the given data is empty.
-
Field Details
-
ATTR_LOCALIZATIONS
- See Also:
-
-
Method Details
-
getKeys
-
getLocales
-
getLocalizations
List<TLocalization> getLocalizations()Gets the localized database objects.- Returns:
- the localized database objects
-
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
-
isDefault
Checks if the given localization is the default localization.- Parameters:
localization- The localization to check.- Returns:
trueif the localization is the default localization,falseotherwise.
-
isEmpty
Checks if the given data is empty.- Parameters:
data- The data to check.- Returns:
trueif the data is empty,falseotherwise.
-