it.eng.spagobi.utilities.messages
Class MessageBuilder

java.lang.Object
  extended by it.eng.spagobi.utilities.messages.MessageBuilder
All Implemented Interfaces:
IMessageBuilder

public class MessageBuilder
extends java.lang.Object
implements IMessageBuilder

The implementation of IMessageBuilder


Constructor Summary
MessageBuilder()
           
 
Method Summary
 java.lang.String getMessage(java.lang.String code)
          Returns the message associated with code in the default bundle
 java.lang.String getMessage(java.lang.String code, javax.servlet.http.HttpServletRequest request)
          Returns the message associated with code in the default bundle
 java.lang.String getMessage(java.lang.String code, java.lang.String bundle)
          Returns the message associated with code in the given bundle
 java.lang.String getMessage(java.lang.String code, java.lang.String bundle, javax.servlet.http.HttpServletRequest request)
          Returns the message associated with code in the given bundle
 java.lang.String getMessageTextFromResource(java.lang.String resourceName)
          Gets a localized information text given the resource name which contains the text information.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageBuilder

public MessageBuilder()
Method Detail

getMessageTextFromResource

public java.lang.String getMessageTextFromResource(java.lang.String resourceName)
Gets a localized information text given the resource name which contains the text information.

Specified by:
getMessageTextFromResource in interface IMessageBuilder
Parameters:
resourceName - The complete name of the resource. The resource will be searched into the classpath of the application
Returns:
A string containing the text

getMessage

public java.lang.String getMessage(java.lang.String code)
Description copied from interface: IMessageBuilder
Returns the message associated with code in the default bundle

Specified by:
getMessage in interface IMessageBuilder

getMessage

public java.lang.String getMessage(java.lang.String code,
                                   java.lang.String bundle)
Description copied from interface: IMessageBuilder
Returns the message associated with code in the given bundle

Specified by:
getMessage in interface IMessageBuilder
Returns:
the message associated with code in the given bundle

getMessage

public java.lang.String getMessage(java.lang.String code,
                                   javax.servlet.http.HttpServletRequest request)
Description copied from interface: IMessageBuilder
Returns the message associated with code in the default bundle

Specified by:
getMessage in interface IMessageBuilder

getMessage

public java.lang.String getMessage(java.lang.String code,
                                   java.lang.String bundle,
                                   javax.servlet.http.HttpServletRequest request)
Description copied from interface: IMessageBuilder
Returns the message associated with code in the given bundle

Specified by:
getMessage in interface IMessageBuilder
Returns:
the message associated with code in the given bundle