Class ValidationMessagesMap
java.lang.Object
de.knightsoftnet.validators.client.ValidationMessagesMap
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidaddMessage(String code, String lang, String localizedMessage) add message to message map.static voidaddMessage(String code, Locale locale, String localizedMessage) add message to message map.static voidaddMessages(String code, Map<String, String> localizedMap) add message to message map.static StringgetMessage(String code, String lang) get localized message for code.static StringgetMessage(String code, Locale locale) get localized message for code.getMessages(String code) get localized messages for code.static booleanisEmpty()test if message map is empty.
-
Constructor Details
-
ValidationMessagesMap
public ValidationMessagesMap()
-
-
Method Details
-
addMessages
add message to message map.- Parameters:
code- code of the messagelocalizedMap- localized map
-
addMessage
add message to message map.- Parameters:
code- code of the messagelocale- localization of the messagelocalizedMessage- localized message
-
addMessage
add message to message map.- Parameters:
code- code of the messagelang- localization of the messagelocalizedMessage- localized message
-
getMessages
get localized messages for code.- Parameters:
code- code of the message- Returns:
- localized message in all available languages
-
getMessage
get localized message for code.- Parameters:
code- code of the messagelocale- localization of the message- Returns:
- localized message or null if not exists
-
getMessage
get localized message for code.- Parameters:
code- code of the messagelang- localization of the message- Returns:
- localized message or null if not exists
-
isEmpty
public static boolean isEmpty()test if message map is empty.
-