de.smartics.exceptions.i18n
Interface MessageBean

Package class diagram package MessageBean
All Superinterfaces:
Serializable
All Known Implementing Classes:
AbstractMessageBean

public interface MessageBean
     
     
extends Serializable

Message provider. The message provider may be attached to infrastructure to access message templates and to construct messages.


Method Summary
 Throwable getCause()
          Returns the cause to the exception.
 CauseTrailMessages getCauseTrail()
          Returns the cause trail of messages.
 CauseTrailMessages getCauseTrail(Locale locale)
          Returns the cause trail of messages.
 Code getCode()
          Returns the code the message bean provides messages for.
 LocalizedInfo getLocalizedInfo()
          Returns the localized information that provides access to messages.
 String getMessage(Locale locale, MessageType messageType)
          Returns the message for the given type.
 Messages getMessages(Locale locale)
          Returns the messages for the given locale.
 

Method Detail

getCode

Code getCode()
Returns the code the message bean provides messages for.

Returns:
the code the message bean provides messages for.

getLocalizedInfo

LocalizedInfo getLocalizedInfo()
Returns the localized information that provides access to messages.

Returns:
the localized information that provides access to messages.

getMessage

String getMessage(Locale locale,
                  MessageType messageType)
Returns the message for the given type.

Parameters:
locale - the locale to use.
messageType - the type of message to retrieve.
Returns:
the message or null if there is no message for the given type.

getMessages

Messages getMessages(Locale locale)
Returns the messages for the given locale.

Parameters:
locale - the locale to use.
Returns:
the set of messages set

getCauseTrail

CauseTrailMessages getCauseTrail()
Returns the cause trail of messages. These are all messages of the cause to the root cause.

Returns:
the cause trail of messages.

getCauseTrail

CauseTrailMessages getCauseTrail(Locale locale)
Returns the cause trail of messages. These are all messages of the cause to the root cause.

Parameters:
locale - the locale to use.
Returns:
the cause trail of messages.

getCause

Throwable getCause()
Returns the cause to the exception. May be null.

Returns:
the cause to the exception. May be null.


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