org.apache.lenya.cms.usecase
Class UsecaseMessage

java.lang.Object
  extended by org.apache.lenya.cms.usecase.UsecaseMessage

public class UsecaseMessage
extends java.lang.Object

A message in a usecase. This an encapsulation for an internationalizable message, containing a message content and potentially some parameters. The parameters correspond to the placeholders in dictionary entries.

Version:
$Id: UsecaseMessage.java 571600 2007-08-31 21:40:20Z rfrovarp $

Constructor Summary
UsecaseMessage(java.lang.String _message)
          Ctor.
UsecaseMessage(java.lang.String _message, java.lang.String[] _params)
          Ctor.
 
Method Summary
 java.lang.String getMessage()
          Retrieve the message content
 java.lang.String[] getParameters()
          Returns the parameters of this message.
 boolean hasParameters()
          Determine if this message has parameters
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsecaseMessage

public UsecaseMessage(java.lang.String _message)
Ctor.

Parameters:
_message - The message.

UsecaseMessage

public UsecaseMessage(java.lang.String _message,
                      java.lang.String[] _params)
Ctor.

Parameters:
_message - The message.
_params - The parameters.
Method Detail

hasParameters

public boolean hasParameters()
Determine if this message has parameters

Returns:
true if the message has parameters

getMessage

public java.lang.String getMessage()
Retrieve the message content

Returns:
the message

getParameters

public java.lang.String[] getParameters()
Returns the parameters of this message. If no parameters are set, an empty String array is returned.

Returns:
the parameters

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
A string representation, the parameters are included as a comma-separated list.


Copyright $ Apache Software Foundation. All Rights Reserved.