Package fr.gouv.vitam.common.i18n
Class Messages
java.lang.Object
fr.gouv.vitam.common.i18n.Messages
Internationalization Messages support
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsKey(String key) Determines whether the givenkeyis contained in thisResourceBundleor its parent bundles.Retrieve all the messagesfinal Stringfinal Stringfinal StringgetStringNotEmpty(String key, Object... args)
-
Field Details
-
DEFAULT_LOCALE
Default Locale
-
-
Constructor Details
-
Messages
Constructor using default Locale (FRENCH)- Parameters:
bundleName- the bundle name
-
Messages
Constructor- Parameters:
bundleName- the bundle namelocale- the Local object
-
-
Method Details
-
getAllMessages
Retrieve all the messages- Returns:
- map of messages
-
getString
- Parameters:
key- the key of the message- Returns:
- the associated message
-
getString
- Parameters:
key- the key of the messageargs- the arguments to use as MessageFormat.format(mesg, args)- Returns:
- the associated message
-
getStringNotEmpty
- Parameters:
key- the key of the messageargs- the arguments to use as MessageFormat.format(mesg, args)- Returns:
- the associated message, !key! if value is null or empty
-
getLocale
- Returns:
- the current Locale
-
containsKey
Determines whether the givenkeyis contained in thisResourceBundleor its parent bundles.- Parameters:
key- the resourcekey- Returns:
trueif the givenkeyis contained in thisResourceBundleor its parent bundles;falseotherwise.- Throws:
NullPointerException- ifkeyisnull
-