org.loom.i18n
Interface MessagesRepositoryFactory

All Known Implementing Classes:
DefaultMessagesRepositoryFactory, ReloadableMessagesRepositoryFactory

public interface MessagesRepositoryFactory

Instantiates and caches the MessageRepository instances


Method Summary
 void addBrowserMessage(java.lang.String messageKey)
          Add a JSON message key.
 java.util.Locale getDefaultLocale()
           
 MessagesRepository getRepository(java.util.Locale locale)
          Return the MessagesRepository instance corresponding to this Locale.
 void setBrowserMessages(java.util.Set<java.lang.String> browserMessages)
          Replace the current set of JSON keys.
 

Method Detail

getRepository

MessagesRepository getRepository(java.util.Locale locale)
Return the MessagesRepository instance corresponding to this Locale.


addBrowserMessage

void addBrowserMessage(java.lang.String messageKey)
Add a JSON message key.

Parameters:
messageKey - the message key to be added

setBrowserMessages

void setBrowserMessages(java.util.Set<java.lang.String> browserMessages)
Replace the current set of JSON keys. This is the list of messages keys that will be sent to the browser as a JSON object.

Parameters:
browserMessages - the new set of JSON keys

getDefaultLocale

java.util.Locale getDefaultLocale()
Returns:
the locale applied by default. Defaults to Locale.getDefaultLocale()