org.formproc.message
Class InlineMessageProvider

java.lang.Object
  |
  +--org.formproc.message.AbstractMessageProvider
        |
        +--org.formproc.message.InlineMessageProvider
All Implemented Interfaces:
MessageProvider

public class InlineMessageProvider
extends AbstractMessageProvider

Implementation of the MessageProvider interface which expects the messages to be stored inline in the configuration information.

Author:
Anthony Eden

Constructor Summary
InlineMessageProvider()
          Default constructor.
 
Method Summary
 java.lang.String getMessage(java.util.Locale locale)
          Get the message for the given locale.
 java.lang.String getMessageElementName()
          Get the element name which is used for finding the inline messages.
 void loadConfiguration(com.anthonyeden.lib.config.Configuration configuration)
          Load the message provider's configuration.
 void setMessageElementName(java.lang.String messageElementName)
          Set the element name which is used for finding the inline messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InlineMessageProvider

public InlineMessageProvider()
Default constructor.

Method Detail

getMessage

public 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
Specified by:
getMessage in class AbstractMessageProvider
Parameters:
locale - The Locale
Returns:
The message
Throws:
java.lang.Exception

getMessageElementName

public java.lang.String getMessageElementName()
Get the element name which is used for finding the inline messages. The default value is "message".

Returns:
The message element name

setMessageElementName

public void setMessageElementName(java.lang.String messageElementName)
Set the element name which is used for finding the inline messages.

Parameters:
messageElementName - The new message element name

loadConfiguration

public void loadConfiguration(com.anthonyeden.lib.config.Configuration configuration)
                       throws com.anthonyeden.lib.config.ConfigurationException
Load the message provider's configuration.

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


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