Class ContributionLocalizationBundle
- java.lang.Object
-
- org.silverpeas.core.contribution.model.ContributionLocalizationBundle
-
public class ContributionLocalizationBundle extends Object
LocalizationBundle
dedicated toContribution
instances.Useful to gets localized labels, for example, according to the type of a contribution and also according to the component which is handling the contribution.
It exists two possible bundle repositories:- a main one:
org.silverpeas.contribution.multilang.contribution.properties
- an optional component specific one:
org.silverpeas.[component name].multilang .contribution.properties
- the component specific bundle if it defines the key
- the main bundle otherwise
MissingResourceException
is thrown.- Author:
- silveryocha
- a main one:
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContributionLocalizationBundle
getByInstanceAndLanguage(Contribution contribution, String language)
Gets theContributionLocalizationBundle
for aContribution
adapted from a specified language.String
getUiMessageTitleByType()
Gets the title of the contribution, according to its type, for UI messages.String
getUiMessageTitleByTypeAndProperty(String property)
Gets the title of the contribution, according to its type and a property, for UI messages.
-
-
-
Method Detail
-
getByInstanceAndLanguage
public static ContributionLocalizationBundle getByInstanceAndLanguage(Contribution contribution, String language)
Gets theContributionLocalizationBundle
for aContribution
adapted from a specified language.- Parameters:
contribution
- aContribution
instance.language
- the aimed language for bundles.- Returns:
- an initialized
ContributionLocalizationBundle
instance.
-
getUiMessageTitleByType
public String getUiMessageTitleByType()
Gets the title of the contribution, according to its type, for UI messages.- Returns:
- a formatted string.
-
-