public abstract class LocalizedObject
extends java.lang.Object
implements java.io.Serializable
| Constructor and Description |
|---|
LocalizedObject() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<java.util.Locale> |
getAvailableLocales() |
protected java.lang.String |
getTranslation(java.lang.String attribute,
java.util.Locale locale) |
protected boolean |
isTranslationExists(java.lang.String attribute,
java.lang.String value)
Checks a value exists (case insensitive) for the specified attribute.
|
void |
removeTranslationsOtherThan(java.util.Locale[] locales)
Removes any
Locale from this object that are not in the specified locales. |
protected void |
setTranslation(java.lang.String attribute,
java.util.Locale locale,
java.lang.String value) |
void |
updateTranslations(LocalizedObject localizedObject)
This method update localizedObject given in param by setting the translations from this localizedObject.
|
protected java.lang.String getTranslation(java.lang.String attribute,
java.util.Locale locale)
protected void setTranslation(java.lang.String attribute,
java.util.Locale locale,
java.lang.String value)
protected boolean isTranslationExists(java.lang.String attribute,
java.lang.String value)
attribute - value - public final void updateTranslations(LocalizedObject localizedObject)
localizedObject - the LocalizedObject instance containing the data.public void removeTranslationsOtherThan(java.util.Locale[] locales)
Locale from this object that are not in the specified locales.
locales[0] should be the default languagelocales - protected java.util.List<java.util.Locale> getAvailableLocales()