public interface MessageService
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
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_COMPONENT_CODE |
static String |
DEFAULT_NAMESPACE_CODE |
Modifier and Type | Method and Description |
---|---|
Collection<Message> |
getAllMessagesForComponent(String namespace,
String component)
Gets all message objects for the given namespace and component using the default locale
|
Collection<Message> |
getAllMessagesForComponent(String namespace,
String component,
String locale)
Gets all message objects for the given namespace, component, and locale
|
Message |
getMessage(String namespace,
String component,
String key)
Gets the
Message object that has the given namespace, component, key, and the default
system locale |
Message |
getMessage(String namespace,
String component,
String key,
String locale)
Gets the
Message object that has the given namespace, component, key, and locale |
String |
getMessageText(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)
|
String |
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)
|
String |
getMessageText(String namespace,
String component,
String key)
Gets the text for the message that has the given namespace, component, key, and the default
system locale
|
String |
getMessageText(String namespace,
String component,
String key,
String locale)
Gets the text for the message that has the given namespace, component, key, and locale
|
static final String DEFAULT_NAMESPACE_CODE
static final String DEFAULT_COMPONENT_CODE
Message getMessage(String namespace, String component, String key)
Message
object that has the given namespace, component, key, and the default
system localenamespace
- 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 componentMessage getMessage(String namespace, String component, String key, String locale)
Message
object that has the given namespace, component, key, and localenamespace
- 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 returnString getMessageText(String namespace, String component, String key)
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 componentString getMessageText(String namespace, String component, String key, String locale)
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 returnString getMessageText(String key)
key
- key that identifies the message within the default namespace and componentString getMessageText(String key, String locale)
key
- key that identifies the message within the default namespace and componentlocale
- locale code for the message to returnCollection<Message> getAllMessagesForComponent(String namespace, String component)
namespace
- namespace code the message belongs tocomponent
- component code the namespace is associated withCollection<Message> getAllMessagesForComponent(String namespace, String component, String locale)
namespace
- namespace code the message belongs tocomponent
- component code the namespace is associated withlocale
- locale code for the message to returnCopyright © 2005–2016 The Kuali Foundation. All rights reserved.