org.apache.click.service
Class DefaultMessagesMapService

java.lang.Object
  extended by org.apache.click.service.DefaultMessagesMapService
All Implemented Interfaces:
MessagesMapService

public class DefaultMessagesMapService
extends Object
implements MessagesMapService

Provides a default MessagesMapService which returns MessagesMap implementations of the messages map.


Constructor Summary
DefaultMessagesMapService()
           
 
Method Summary
 Map<String,String> createMessagesMap(Class<?> baseClass, String globalResource, Locale locale)
          Return a MessagesMap instance for the target baseClass, global resource name and locale.
 void onDestroy()
          Destroy the MessagesMapService.
 void onInit(ServletContext servletContext)
          Initialize the MessagesMapService with the given application servlet context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessagesMapService

public DefaultMessagesMapService()
Method Detail

onInit

public void onInit(ServletContext servletContext)
            throws Exception
Description copied from interface: MessagesMapService
Initialize the MessagesMapService with the given application servlet context.

This method is invoked after the MessagesMapService has been constructed.

Specified by:
onInit in interface MessagesMapService
Parameters:
servletContext - the application servlet context
Throws:
Exception - if an error occurs initializing the LogService
See Also:
MessagesMapService.onInit(ServletContext)

onDestroy

public void onDestroy()
Description copied from interface: MessagesMapService
Destroy the MessagesMapService.

Specified by:
onDestroy in interface MessagesMapService
See Also:
MessagesMapService.onDestroy()

createMessagesMap

public Map<String,String> createMessagesMap(Class<?> baseClass,
                                            String globalResource,
                                            Locale locale)
Return a MessagesMap instance for the target baseClass, global resource name and locale.

Specified by:
createMessagesMap in interface MessagesMapService
Parameters:
baseClass - the target class
globalResource - the global resource bundle name
locale - the users Locale
Returns:
a MessagesMap instance.
See Also:
MessagesMapService.createMessagesMap(java.lang.Class, java.lang.String, java.util.Locale), MessagesMap.MessagesMap(Class, String)