public class

MessagedResult

extends Object
java.lang.Object
   ↳ com.atlassian.jira.issue.fields.util.MessagedResult

Class Overview

This class wraps a boolean result and allows the result creator to specify a string message about the result and allows a false result to be classified as Normal, a Warning, or a Fatal error.

Summary

Constants
int FATAL
int NORMAL
int WARNING
Public Constructors
MessagedResult(boolean result)
Constructs a message result with a null message whose state is normal.
MessagedResult(boolean result, String message)
Constructs a message result whose state is normal
MessagedResult(boolean result, String message, int state)
Used to construct a messaged result.
MessagedResult(String html, int state)
Use this to specify the state of the html message.
Public Methods
String getMessage()
boolean getResult()
boolean isFatal()
boolean isWarning()
void setMessage(String message)
void setResult(boolean result)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final int FATAL

Constant Value: 2 (0x00000002)

public static final int NORMAL

Constant Value: 0 (0x00000000)

public static final int WARNING

Constant Value: 1 (0x00000001)

Public Constructors

public MessagedResult (boolean result)

Constructs a message result with a null message whose state is normal.

Parameters
result was the result of the operation

public MessagedResult (boolean result, String message)

Constructs a message result whose state is normal

Parameters
result was the result of the operation
message the message about the state and the result

public MessagedResult (boolean result, String message, int state)

Used to construct a messaged result.

Parameters
result was the result of the operation
message the message about the state and the result
state can be NORMAL, WARNING or FATAL if result is false, otherwise this is ignored

public MessagedResult (String html, int state)

Use this to specify the state of the html message. Error indicates that the operation can not proceed, Warning inidicates that the message will be displayed to the user but that the operation can proceed, and Normal means that everything is ok.

Parameters
state the state of the display html.

Public Methods

public String getMessage ()

public boolean getResult ()

public boolean isFatal ()

public boolean isWarning ()

public void setMessage (String message)

public void setResult (boolean result)