|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
Field Summary | |
---|---|
static String |
DEFAULT_COMPONENT_CODE
|
static String |
DEFAULT_NAMESPACE_CODE
|
Method Summary | |
---|---|
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 |
Field Detail |
---|
static final String DEFAULT_NAMESPACE_CODE
static final String DEFAULT_COMPONENT_CODE
Method Detail |
---|
Message getMessage(String namespace, String component, String key)
Message
object that has the given namespace, component, key, and the default
system 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 component
Message getMessage(String namespace, String component, String key, String locale)
Message
object that has the given namespace, component, key, and 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 return
String 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 component
String 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 return
String getMessageText(String key)
key
- key that identifies the message within the default namespace and component
String getMessageText(String key, String locale)
key
- key that identifies the message within the default namespace and componentlocale
- locale code for the message to return
Collection<Message> getAllMessagesForComponent(String namespace, String component)
namespace
- namespace code the message belongs tocomponent
- component code the namespace is associated with
Collection<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 return
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |