Class HeapBasedLocalizationStorage
java.lang.Object
org.somda.sdc.glue.provider.localization.helper.HeapBasedLocalizationStorage
- All Implemented Interfaces:
LocalizationStorage
Default implementation of LocalizationStorage.
Localized texts are stored in heap (Map) and can be added during runtime.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds provided collection of localized texts to the LocalizationStorage.voidAdds provided localized text to the LocalizationStorage.getLocalizedText(List<String> references, BigInteger version, List<String> languages) Gets a localized text that is referenced in the MDIB.Gets a list of all supported languages.
-
Constructor Details
-
HeapBasedLocalizationStorage
public HeapBasedLocalizationStorage()
-
-
Method Details
-
getSupportedLanguages
Description copied from interface:LocalizationStorageGets a list of all supported languages.- Specified by:
getSupportedLanguagesin interfaceLocalizationStorage- Returns:
- a list of supported language identifiers.
-
getLocalizedText
public List<LocalizedText> getLocalizedText(List<String> references, @Nullable BigInteger version, List<String> languages) Description copied from interface:LocalizationStorageGets a localized text that is referenced in the MDIB.- Specified by:
getLocalizedTextin interfaceLocalizationStorage- Parameters:
references- a zero or more reference names of the texts that are requested. If empty list is provided localized texts are not filtered by reference.version- of the referenced text that is requested. The latest version is used if parameter is null.languages- a zero or more language identifiers to get different translations of the requested text. If empty list is provided localized texts are not filtered by language.- Returns:
- a list of
LocalizedTexttexts that matches search criteria.
-
addLocalizedText
Adds provided localized text to the LocalizationStorage.- Parameters:
text- theLocalizedTextto be added to the storage.
-
addAllLocalizedTexts
Adds provided collection of localized texts to the LocalizationStorage.- Parameters:
texts- a collection ofLocalizedTextto be added to the storage.
-