org.jtheque.core.utils
Class Response

java.lang.Object
  extended by org.jtheque.core.utils.Response

public final class Response
extends java.lang.Object

A generic response.

Author:
Baptiste Wicht

Constructor Summary
Response(boolean ok, java.lang.String key)
          Construct a response with a response true or false and a message key.
Response(boolean ok, java.lang.String key, java.lang.String[] replaces)
          Construct a response with a response true or false, a message key and some replaces for the message.
 
Method Summary
 java.lang.String getMessage()
          Return internationalized the message.
 boolean isOk()
          Indicate if the response is true or false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response(boolean ok,
                java.lang.String key)
Construct a response with a response true or false and a message key.

Parameters:
ok - The real response.
key - The message key.

Response

public Response(boolean ok,
                java.lang.String key,
                java.lang.String[] replaces)
Construct a response with a response true or false, a message key and some replaces for the message.

Parameters:
ok - The real response.
key - The message key.
replaces - The message replaces.
Method Detail

isOk

public boolean isOk()
Indicate if the response is true or false.

Returns:
true if the response is ok else false.

getMessage

public java.lang.String getMessage()
Return internationalized the message.

Returns:
The internationalized message.


Copyright © 2009 JTheque. All Rights Reserved.