org.openmrs.messagesource
Class PresentationMessage

java.lang.Object
  extended by org.openmrs.messagesource.PresentationMessage

public class PresentationMessage
extends java.lang.Object

A PresentationMessage is a textual message presented to a user along with qualifying information like the code, locale and a description. ABKTODO: This is really part of the presentation layer, and should be part of a separate model package rather than included with the domain model. Possibly move all this to its own package? Or into org.openmrs.api.context?


Constructor Summary
PresentationMessage(java.lang.String code, java.util.Locale locale, java.lang.String message, java.lang.String description)
          Create a new, fully specified PresentationMessage.
 
Method Summary
 java.lang.String getCode()
          Returns the look-up key for the message.
 java.lang.String getDescription()
          Gets the description, which should indicate the meaning or intended use of the message.
 java.util.Locale getLocale()
          Returns the locale within which the message is expressed.
 java.lang.String getMessage()
          Returns the text of the message.
 void setCode(java.lang.String code)
          Sets the look-up key for the message.
 void setDescription(java.lang.String description)
           
 void setLocale(java.util.Locale locale)
          Sets the locale of the message.
 void setMessage(java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PresentationMessage

public PresentationMessage(java.lang.String code,
                           java.util.Locale locale,
                           java.lang.String message,
                           java.lang.String description)
Create a new, fully specified PresentationMessage.

Parameters:
code - the look-up key for the message
locale - locale within which the message is expressed
message - text of the message
description - description of the meaning or intended use of the message
Method Detail

getCode

public java.lang.String getCode()
Returns the look-up key for the message. This is the programmatic reference for the message, typically used when the message is retrieved from a MessageSource.

Returns:
the code

setCode

public void setCode(java.lang.String code)
Sets the look-up key for the message.

Parameters:
code - the code to set

getLocale

public java.util.Locale getLocale()
Returns the locale within which the message is expressed.

Returns:
the locale

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale of the message.

Parameters:
locale - the locale to set

getMessage

public java.lang.String getMessage()
Returns the text of the message. This is what should be presented to the user.

Returns:
the message

setMessage

public void setMessage(java.lang.String message)
Parameters:
message - the message to set

getDescription

public java.lang.String getDescription()
Gets the description, which should indicate the meaning or intended use of the message.

Returns:
the description

setDescription

public void setDescription(java.lang.String description)
Parameters:
description - the description to set

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change