com.acsinet_solutions.util.text
Class BundleMessageFactory

java.lang.Object
  extended by com.acsinet_solutions.util.text.BundleMessageFactory
All Implemented Interfaces:
MessageFactory

public class BundleMessageFactory
extends java.lang.Object
implements MessageFactory

This is a validation message factory as a service, so internationalized validation messages can easily be configured and obtained this way.

This class was designed especifically to overcome the problem of validation messages comming from different modules ( each with a particular resource bundle ), integrated in a single business logic interaction.

Author:
Santiago Arriaga

Constructor Summary
BundleMessageFactory()
           
 
Method Summary
 java.lang.String getMessage(java.lang.String key, java.lang.Object... args)
          Get a message associated with the given key and optional arguments.
 void setBundle(java.lang.String baseName)
          Set the given bundle into the current class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BundleMessageFactory

public BundleMessageFactory()
Method Detail

setBundle

public final void setBundle(java.lang.String baseName)
Set the given bundle into the current class.


getMessage

public final java.lang.String getMessage(java.lang.String key,
                                         java.lang.Object... args)
Description copied from interface: MessageFactory
Get a message associated with the given key and optional arguments.

Specified by:
getMessage in interface MessageFactory
See Also:
com.acsinet_solutions.cetia3.types.MessageFactory