Class MessagedResult
java.lang.Object
com.atlassian.jira.issue.fields.util.MessagedResult
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.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMessagedResult
(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 normalMessagedResult
(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. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
isFatal()
boolean
void
setMessage
(String message) void
setResult
(boolean result)
-
Field Details
-
NORMAL
public static final int NORMAL- See Also:
-
WARNING
public static final int WARNING- See Also:
-
FATAL
public static final int FATAL- See Also:
-
-
Constructor Details
-
MessagedResult
public MessagedResult(boolean result) Constructs a message result with a null message whose state is normal.- Parameters:
result
- was the result of the operation
-
MessagedResult
Constructs a message result whose state is normal- Parameters:
result
- was the result of the operationmessage
- the message about the state and the result
-
MessagedResult
Used to construct a messaged result.- Parameters:
result
- was the result of the operationmessage
- the message about the state and the resultstate
- can be NORMAL, WARNING or FATAL if result is false, otherwise this is ignored
-
MessagedResult
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:
html
-state
- the state of the display html.
-
-
Method Details
-
getResult
public boolean getResult() -
setResult
public void setResult(boolean result) -
getMessage
-
setMessage
-
isFatal
public boolean isFatal() -
isWarning
public boolean isWarning()
-