com.zphinx.spine.message
Class DisplayMessage

java.lang.Object
  extended by com.zphinx.spine.message.DisplayMessage
Direct Known Subclasses:
DisplayError

public class DisplayMessage
extends Object

DisplayMessage represents a single message generated within the spine framework which can be displayed to the user. It can retrieve messages from a predefined resource bundle which is available system wide.

Version:
$1.0

Copyright ©Zphinx Software Solutions

Author:
David Ladapo

Constructor Summary
DisplayMessage()
          Default Constructor
DisplayMessage(String message)
          Constructor which accepts a message key
DisplayMessage(String message, Object[] arguments)
          Constructs a DisplayMessage with parametric replacements
 
Method Summary
 Object[] getArguments()
          Gets the arguments for the specified message
 String getMessage()
          Gets the message key
 void setArguments(Object[] arguments)
          Sets the arguments for the specified message
 void setMessage(String message)
          Sets the message key
 void setMessage(String message, Object[] arguments)
          Sets a message with parametric replacements
 String toString()
          Returns the value of the message contained in this message
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DisplayMessage

public DisplayMessage()
Default Constructor


DisplayMessage

public DisplayMessage(String message)
Constructor which accepts a message key

Parameters:
message - The message key by which this object derives the appropriate message

DisplayMessage

public DisplayMessage(String message,
                      Object[] arguments)
Constructs a DisplayMessage with parametric replacements

Parameters:
message - The string which represents the key by which this message is discovered
arguments - The arguments to use for parametric replacements
Method Detail

getMessage

public String getMessage()
Gets the message key

Returns:
the message

setMessage

public void setMessage(String message)
Sets the message key

Parameters:
message - the message to set

setMessage

public void setMessage(String message,
                       Object[] arguments)
Sets a message with parametric replacements

Parameters:
message - the message to set

toString

public String toString()
Returns the value of the message contained in this message

Overrides:
toString in class Object

getArguments

public Object[] getArguments()
Gets the arguments for the specified message

Returns:
the arguments

setArguments

public void setArguments(Object[] arguments)
Sets the arguments for the specified message

Parameters:
arguments - the arguments to set