Package fr.gouv.vitam.common.i18n
Class Messages
java.lang.Object
fr.gouv.vitam.common.i18n.Messages
Internationalization Messages support
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(String key) Determines whether the givenkey
is contained in thisResourceBundle
or its parent bundles.Retrieve all the messagesfinal String
final String
final String
getStringNotEmpty
(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 givenkey
is contained in thisResourceBundle
or its parent bundles.- Parameters:
key
- the resourcekey
- Returns:
true
if the givenkey
is contained in thisResourceBundle
or its parent bundles;false
otherwise.- Throws:
NullPointerException
- ifkey
isnull
-