org.formproc.message
Class AbstractMessageProvider

java.lang.Object
  |
  +--org.formproc.message.AbstractMessageProvider
All Implemented Interfaces:
MessageProvider
Direct Known Subclasses:
InlineMessageProvider, ResourceBundleMessageProvider

public abstract class AbstractMessageProvider
extends java.lang.Object
implements MessageProvider

Abstract base class which implements the MessageProvider interface.

Author:
Anthony Eden

Constructor Summary
AbstractMessageProvider()
           
 
Method Summary
abstract  java.lang.String getMessage(java.util.Locale locale)
          Get the message for the given locale.
 void loadConfiguration(com.anthonyeden.lib.config.Configuration configuration)
          Load the message provider's configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMessageProvider

public AbstractMessageProvider()
Method Detail

getMessage

public abstract java.lang.String getMessage(java.util.Locale locale)
                                     throws java.lang.Exception
Get the message for the given locale.

Specified by:
getMessage in interface MessageProvider
Parameters:
locale - The Locale
Returns:
The message
Throws:
java.lang.Exception

loadConfiguration

public void loadConfiguration(com.anthonyeden.lib.config.Configuration configuration)
                       throws com.anthonyeden.lib.config.ConfigurationException
Load the message provider's configuration. The default implementation provided here does nothing. Subclasses can override this method to load configuration information for the message provider.

Specified by:
loadConfiguration in interface MessageProvider
Parameters:
configuration - The Configuration object
Throws:
ConfiguratioinException
com.anthonyeden.lib.config.ConfigurationException


Copyright (c) 2001-2003 Anthony Eden. All Rights Reserved.