Class DatabaseMessageProvider
java.lang.Object
org.kuali.rice.krad.messages.providers.DatabaseMessageProvider
- All Implemented Interfaces:
MessageProvider
Implementation of
MessageProvider that stores messages in a database- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllMessagesForComponent(String namespace, String component, String locale) Gets all message objects for the given namespace, component, and localegetMessage(String namespace, String component, String key, String locale) Gets theMessageobject that has the given namespace, component, key, and localeprotected Collection<Message> getMessageByCriteria(String namespace, String component, String key, String locale) Performs a query using theLookupServiceto retrieve messages that match the given namespace, component, name, and locale.voidsetLookupService(LookupService lookupService)
-
Constructor Details
-
DatabaseMessageProvider
public DatabaseMessageProvider()
-
-
Method Details
-
getMessage
Description copied from interface:MessageProviderGets theMessageobject that has the given namespace, component, key, and locale- Specified by:
getMessagein interfaceMessageProvider- Parameters:
namespace- namespace code the message belongs tocomponent- component code the namespace is associated withkey- 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
- See Also:
-
getAllMessagesForComponent
public Collection<Message> getAllMessagesForComponent(String namespace, String component, String locale) Description copied from interface:MessageProviderGets all message objects for the given namespace, component, and locale- Specified by:
getAllMessagesForComponentin interfaceMessageProvider- 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
- See Also:
-
getMessageByCriteria
protected Collection<Message> getMessageByCriteria(String namespace, String component, String key, String locale) Performs a query using theLookupServiceto retrieve messages that match the given namespace, component, name, and locale. Not parameters maybe empty in which case they will not be added to the criteria- Parameters:
namespace- namespace code to search forcomponent- component code to search forkey- key of the parameter to findlocale- locale code to search for- Returns:
- Collection<Message> matching messages or empty collection if not are found
-
getLookupService
-
setLookupService
-