Interface LocalizedContribution
-
- All Superinterfaces:
Contribution
,Instance<Contribution>
,Nameable
,Securable
,Serializable
,SilverpeasResource
,Translation
- All Known Subinterfaces:
LocalizedAttachment
- All Known Implementing Classes:
Document
,HistorisedDocument
,HistorisedDocumentVersion
,SimpleDocument
,SimpleDocumentVersion
public interface LocalizedContribution extends Contribution, Translation
A contribution produced in a given l10n (Localisation). Such contributions are authored in a given language. They can be either a non-i18n contribution, that is a contribution that is always produced in the default language of Silverpeas, or a localized version of an i18 contribution in a given language.Any contributions in Silverpeas that are a translation of a i18n contribution in a given localization (id est language) should implement this interface.
- Author:
- mmoquillon
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static LocalizedContribution
from(Contribution contribution)
Decorates the specified contribution with the support of l10n.static LocalizedContribution
from(Contribution contribution, String language)
Decorates the specified contribution with the support of l10n and as authored in the specified language.default String
getLanguage()
Gets the language in which this contribution was authored.-
Methods inherited from interface org.silverpeas.core.contribution.model.Contribution
canBeAccessedBy, getContributionType, getDescription, getIdentifier, getModel, getName, getResourcePath, getTitle, isIndexable
-
Methods inherited from interface org.silverpeas.core.security.Securable
canBeDeletedBy, canBeFiledInBy, canBeModifiedBy
-
Methods inherited from interface org.silverpeas.core.SilverpeasResource
getCreationDate, getCreator, getLastUpdateDate, getLastUpdater
-
-
-
-
Method Detail
-
from
static LocalizedContribution from(Contribution contribution)
Decorates the specified contribution with the support of l10n. By default, the language will be the default language in Silverpeas.- Parameters:
contribution
- a contribution.- Returns:
- a localized contribution.
-
from
static LocalizedContribution from(Contribution contribution, String language)
Decorates the specified contribution with the support of l10n and as authored in the specified language.- Parameters:
contribution
- a contribution.language
- the language in which the contribution was authored in the case of an i18n Silverpeas.- Returns:
- a contribution localized in the specified language.
-
getLanguage
default String getLanguage()
Gets the language in which this contribution was authored. By default, returns the default language in Silverpeas.- Specified by:
getLanguage
in interfaceTranslation
- Returns:
- the language at which this contribution was authored.
-
-