Class TranslationDataAdapter
java.lang.Object
de.aristaflow.adept2.model.common.i18n.TranslationDataAdapter
Facilitates the getting of setting of translatable attributes and their
translations.
- Author:
- Patrick Schmidt
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of the specified attribute in the given locale.voidremoveTranslations(Locale locale) Removes all translations for the given locale.voidremoveValue(String attrName, Locale locale) voidSets the value of the specified attribute in the given locale to the given value.
-
Constructor Details
-
TranslationDataAdapter
-
TranslationDataAdapter
-
-
Method Details
-
getTranslatableAttributes
-
getPluginID
-
getValue
Returns the value of the specified attribute in the given locale.- Parameters:
attrName- name of the desired attributelocale- the locale for which to get the translated value; usenullto get the default value- Returns:
- the value of the specified attribute in the given locale; could be
null
-
setValue
Sets the value of the specified attribute in the given locale to the given value.- Parameters:
attrName- name of the desired attributevalue- the new value of the specified attribute in the given localelocale- the locale for which to set the translated value; usenullto set the default value
-
removeValue
- Parameters:
attrName- name of the desired attributelocale- the locale for which to remove the translated value; usenullto remove the default value
-
removeTranslations
Removes all translations for the given locale.- Parameters:
locale- the locale for which to remove all translations
-
getUsedLocales
-