Package org.kuali.rice.krad.messages
Interface MessageService
- All Known Implementing Classes:
MessageServiceImpl
public interface MessageService
Message Service API
Messages given within an application can be externalized to a separate repository. Those messages are then retrieved with use of the message service. The API provides various retrieval methods based on how the message is identified
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiongetAllMessagesForComponent(String namespace, String component) Gets all message objects for the given namespace and component using the default localegetAllMessagesForComponent(String namespace, String component, String locale) Gets all message objects for the given namespace, component, and localegetMessage(String namespace, String component, String key) Gets theMessageobject that has the given namespace, component, key, and the default system localegetMessage(String namespace, String component, String key, String locale) Gets theMessageobject that has the given namespace, component, key, and localegetMessageText(String key) Gets the text for the message that has the given key within the default namespace, component, and locale (note the defaults are determined by the service implementation)getMessageText(String key, String locale) Gets the text for the message that has the given key and locale within the default namespace and component (note the defaults are determined by the service implementation)getMessageText(String namespace, String component, String key) Gets the text for the message that has the given namespace, component, key, and the default system localegetMessageText(String namespace, String component, String key, String locale) Gets the text for the message that has the given namespace, component, key, and locale
-
Field Details
-
DEFAULT_NAMESPACE_CODE
- See Also:
-
DEFAULT_COMPONENT_CODE
- See Also:
-
-
Method Details
-
getMessage
Gets theMessageobject that has the given namespace, component, key, and the default system locale- Parameters:
namespace- namespace code the message belongs to, if null the default namespace should be usedcomponent- component code the namespace is associated with, if null the default component should be usedkey- key that identifies the message within the namespace and component- Returns:
- Message matching message object, or null if a message was not found
-
getMessage
Gets theMessageobject that has the given namespace, component, key, and locale- Parameters:
namespace- namespace code the message belongs to, if null the default namespace should be usedcomponent- component code the namespace is associated with, if null the default component should be usedkey- key that identifies the message within the namespace and componentlocale- locale code for the message to return- Returns:
- Message matching message object, or null if a message was not found
-
getMessageText
Gets the text for the message that has the given namespace, component, key, and the default system locale- Parameters:
namespace- namespace code the message belongs to, if null the default namespace should be usedcomponent- component code the namespace is associated with, if null the default component should be usedkey- key that identifies the message within the namespace and component- Returns:
- String text for the matched message, or null if no message was found
-
getMessageText
Gets the text for the message that has the given namespace, component, key, and locale- Parameters:
namespace- namespace code the message belongs to, if null the default namespace should be usedcomponent- component code the namespace is associated with, if null the default component should be usedkey- key that identifies the message within the namespace and componentlocale- locale code for the message to return- Returns:
- String text for the matched message, or null if no message was found
-
getMessageText
Gets the text for the message that has the given key within the default namespace, component, and locale (note the defaults are determined by the service implementation)- Parameters:
key- key that identifies the message within the default namespace and component- Returns:
- String text for the matched message, or null if no message was found
-
getMessageText
Gets the text for the message that has the given key and locale within the default namespace and component (note the defaults are determined by the service implementation)- Parameters:
key- key that identifies the message within the default namespace and componentlocale- locale code for the message to return- Returns:
- String text for the matched message, or null if no message was found
-
getAllMessagesForComponent
Gets all message objects for the given namespace and component using the default locale- Parameters:
namespace- namespace code the message belongs tocomponent- component code the namespace is associated with- Returns:
- Collection<Message> collection of messages that match, or empty collection if no messages are found
-
getAllMessagesForComponent
Gets all message objects for the given namespace, component, and locale- Parameters:
namespace- namespace code the message belongs tocomponent- component code the namespace is associated withlocale- locale code for the message to return- Returns:
- Collection<Message> collection of messages that match, or empty collection if no messages are found
-