Interface IMessageInfo
public interface IMessageInfo
Holds the relevant information about a given message
-
Method Summary
Modifier and TypeMethodDescriptiongetDefaultMessage
(boolean includeMessageKeyPrefix) getLocalizedMessage
(boolean includeMessageKeyPrefix) Object[]
boolean
This describes what behavior to do when the message key isn't found.Class<?>
getSystemMessage
(boolean includeMessageKeyPrefix) void
setNotFoundPolicy
(boolean notFoundPolicy)
-
Method Details
-
getNotFoundPolicy
boolean getNotFoundPolicy()This describes what behavior to do when the message key isn't found. By default, an error message will be returned, if this is set to false, then a NULL will be returned instead when the message key is not found. -
setNotFoundPolicy
void setNotFoundPolicy(boolean notFoundPolicy) - See Also:
-
getResourceBundleClass
Class<?> getResourceBundleClass()- Returns:
- the object that is the source of the message
-
getMessageKey
String getMessageKey()- Returns:
- the unique id for this source Object's ResourceBundle
-
getMessageArgs
Object[] getMessageArgs()- Returns:
- the optional array of arguments required to format the message
-
getResourceBundle
ResourceBundle getResourceBundle()- Returns:
- the locale specific resource bundle for this message
-
getSystemResourceBundle
ResourceBundle getSystemResourceBundle()- Returns:
- the portal locale specific resource bundle for this message
-
getLocale
Locale getLocale()- Returns:
- the locale for this message
-
getLocalizedMessage
- Parameters:
includeMessageKeyPrefix
- whether or not to include the message key as a prefix- Returns:
- the localized message
-
getSystemMessage
- Parameters:
includeMessageKeyPrefix
- whether or not to include the message key as a prefix- Returns:
- the portal system message (see
IGlobalProvider.getPortalSystemLocale()
)
-
getDefaultMessage
- Parameters:
includeMessageKeyPrefix
- whether or not to include the message key as a prefix- Returns:
- message using default locale (see
IGlobalProvider.getDefaultLocale()
)
-