jp.terasoluna.fw.service.thin
Class BLogicMessage

java.lang.Object
  Extend the abovejp.terasoluna.fw.service.thin.BLogicMessage
All implemented interfaces:
java.io.Serializable

public class BLogicMessage
extends java.lang.Object
implements java.io.Serializable

Message information class.

It is generated at the time of setting the message after receiving the execution result of business logic. Message can be fetched from message resource by specifying the resource bundle key of message in first argument and replacement string in second argument(variable arguments) of constructor. First argument can also be used as it is in the form of message string without fetching the message from mesage resource. In such a case, specify that message string in first argument and false in second argument.

For usage example, refer to AbstractBLogicAction.

See Also:
AbstractBLogicAction, Serialized form

Field Summary
protected  java.lang.String key
          Message KEY.
protected  boolean resource
          Is the key a bundle key (true) or a literal value (false).
private static long serialVersionUID
          Serial version ID
protected  java.lang.Object[] values
          Array wherein replacement string is stored.
 
Constructor Summary
BLogicMessage(java.lang.String key)
          Constructor.
BLogicMessage(java.lang.String key, boolean resource)
          Constructor.
BLogicMessage(java.lang.String key, java.lang.Object... values)
          Constructor.
 
Method Summary
 java.lang.String getKey()
          Fetch message KEY.
 java.lang.Object[] getValues()
          Fetch the array wherein replacement string is stored.
 boolean isResource()
          Decide whether the key is bundle key or a literal value.
 
Method inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Details

serialVersionUID

private static final long serialVersionUID
Serial version ID

See Also:
Constant field value

key

protected java.lang.String key
Message KEY.


values

protected java.lang.Object[] values
Array wherein replacement string is stored.


resource

protected boolean resource
Is the key a bundle key (true) or a literal value (false).

Constructor Details

BLogicMessage

public BLogicMessage(java.lang.String key)
Constructor.

Parameter:
key - Message KEY

BLogicMessage

public BLogicMessage(java.lang.String key,
                     java.lang.Object... values)
Constructor.

Parameter:
key - Message KEY
values - Replacement string

BLogicMessage

public BLogicMessage(java.lang.String key,
                     boolean resource)
Constructor.

Parameter:
key - Message KEY
resource - Is the key a bundle key (true) or a literal value(false).
Method Details

getKey

public java.lang.String getKey()
Fetch message KEY.

Returns:
Message KEY

getValues

public java.lang.Object[] getValues()
Fetch array wherein replacement string is stored.

Returns:
Array wherein message is stored

isResource

public boolean isResource()
Decide whether the key is bundle key or a literal value.

Returns:
true if the key is bundle key