Package org.silverpeas.core.i18n
Class AbstractBean
- java.lang.Object
-
- org.silverpeas.core.i18n.AbstractI18NBean<BeanTranslation>
-
- org.silverpeas.core.i18n.AbstractBean
-
- All Implemented Interfaces:
Serializable
,I18NBean<BeanTranslation>
,Translatable
,Nameable
- Direct Known Subclasses:
QuestionContainerHeader
,SearchResult
public abstract class AbstractBean extends AbstractI18NBean<BeanTranslation>
The abstraction of Silverpeas's beans.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription(String language)
Gets the description about the bean in the given language.Collection<String>
getLanguages()
String
getName(String language)
Gets the name of the bean in the given language.protected Class<BeanTranslation>
getTranslationType()
-
Methods inherited from class org.silverpeas.core.i18n.AbstractI18NBean
addTranslation, getClonedTranslations, getDescription, getLanguage, getLanguageToDisplay, getName, getNextTranslation, getTranslation, getTranslationId, getTranslations, isRemoveTranslation, setDescription, setLanguage, setName, setRemoveTranslation, setTranslationId, setTranslations, setTranslations
-
-
-
-
Method Detail
-
getTranslationType
protected Class<BeanTranslation> getTranslationType()
- Specified by:
getTranslationType
in classAbstractI18NBean<BeanTranslation>
-
getLanguages
public final Collection<String> getLanguages()
- Overrides:
getLanguages
in classAbstractI18NBean<BeanTranslation>
-
getDescription
public final String getDescription(String language)
Description copied from class:AbstractI18NBean
Gets the description about the bean in the given language. This method is a shortcut of the following code:myBean.getTranslation(language).getDescription();
- Overrides:
getDescription
in classAbstractI18NBean<BeanTranslation>
- Parameters:
language
- the ISO 631-1 code of the language- Returns:
- the description about the bean in the specified language.
-
getName
public final String getName(String language)
Description copied from class:AbstractI18NBean
Gets the name of the bean in the given language. This method is a shortcut of the following code:myBean.getTranslation(language).getName();
- Overrides:
getName
in classAbstractI18NBean<BeanTranslation>
- Parameters:
language
- the ISO 631-1 code of the language- Returns:
- the name of the bean in the specified language.
-
-