org.springframework.rules.reporting
Class DefaultMessageTranslatorFactory

java.lang.Object
  extended by org.springframework.rules.reporting.DefaultMessageTranslatorFactory
All Implemented Interfaces:
InitializingBean, MessageSourceAware, MessageTranslatorFactory

public class DefaultMessageTranslatorFactory
extends Object
implements MessageTranslatorFactory, MessageSourceAware, InitializingBean

Author:
Mathias Broekelmann

Constructor Summary
DefaultMessageTranslatorFactory()
           
 
Method Summary
 void afterPropertiesSet()
           
 MessageTranslator createTranslator(ObjectNameResolver resolver)
          Creates a message translator by using the given object name resolver and the default locale
 MessageTranslator createTranslator(ObjectNameResolver resolver, Locale locale)
          Creates a message translator by using the given object name resolver and the locale
 void setMessageSource(MessageSource messageSource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMessageTranslatorFactory

public DefaultMessageTranslatorFactory()
Method Detail

createTranslator

public MessageTranslator createTranslator(ObjectNameResolver resolver)
Description copied from interface: MessageTranslatorFactory
Creates a message translator by using the given object name resolver and the default locale

Specified by:
createTranslator in interface MessageTranslatorFactory
Parameters:
resolver - the object name resolver which is used to resolve a name to use in the translated message for an object name
Returns:
the created message translator instance, must not be null

createTranslator

public MessageTranslator createTranslator(ObjectNameResolver resolver,
                                          Locale locale)
Description copied from interface: MessageTranslatorFactory
Creates a message translator by using the given object name resolver and the locale

Specified by:
createTranslator in interface MessageTranslatorFactory
Parameters:
resolver - the object name resolver which is used to resolve a name to use in the translated message for an object name
locale - the locale for the translated messages, if null the default locale is used
Returns:
the created message translator instance, must not be null

setMessageSource

public void setMessageSource(MessageSource messageSource)
Specified by:
setMessageSource in interface MessageSourceAware

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception


Copyright © 2004-2008 The Spring Framework. All Rights Reserved.