de.smartics.exceptions.i18n
Interface MessageComposer

Package class diagram package MessageComposer
All Known Implementing Classes:
DefaultMessageComposer

public interface MessageComposer

The message composer creates messages from message templates by replacing the place holders with localized parameter values.

Author:
Robert Reiner

Method Summary
 String composeMessage(Throwable exception, Locale locale, ResourceBundle bundle, String keyPrefix, MessageType messageType)
          Creates the message from the message template.
 

Method Detail

composeMessage

String composeMessage(Throwable exception,
                      Locale locale,
                      ResourceBundle bundle,
                      String keyPrefix,
                      MessageType messageType)
Creates the message from the message template.

Parameters:
exception - the instance with the values for the message template's parameters.
locale - the locale to use to format the arguments within the template.
bundle - the resource bundle to fetch the message from.
keyPrefix - the prefix to the key to fetch the message from the bundle. The suffix is provided by the message type.
messageType - the type of message to format. This allows to access the correct index of the exception's value within the template.
Returns:
the message constructed from the template and the exception's member values.


Copyright © 2007-null Kronseder & Reiner GmbH - smartics. All Rights Reserved.