Class MultilingualString
java.lang.Object
org.ametys.plugins.repository.metadata.MultilingualString
Class representing a multilingual String
-
Constructor Summary
ConstructorDescriptionConstruct an empty multilingual stringMultilingualString
(Map<Locale, String> values) Construct an multilingual string -
Method Summary
-
Constructor Details
-
MultilingualString
public MultilingualString()Construct an empty multilingual string -
MultilingualString
Construct an multilingual string- Parameters:
values
- The values of each locale
-
-
Method Details
-
add
Add or replace value for a specific locale.- Parameters:
locale
- The locale. Can not be null.value
- The value for this locale.
-
getValue
Returns the value in the given locale as String.- Parameters:
locale
- the locale of value to retrieve- Returns:
- the value as String or
null
if not found
-
getLocales
Returns the existingLocale
s- Returns:
- the locales
-
getValues
Get all non-empty values- Returns:
- the values
-
hasLocale
Determines if this multilingual string has value for the given locale- Parameters:
locale
- The locale to test- Returns:
true
if a value exists for this locale- Throws:
AmetysRepositoryException
- if an error occurs.
-
equals
-
hashCode
-