Class MessagedResult

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

public class MessagedResult extends Object
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 Details

  • 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

      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
    • MessagedResult

      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
    • MessagedResult

      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:
      html -
      state - the state of the display html.
  • Method Details

    • getResult

      public boolean getResult()
    • setResult

      public void setResult(boolean result)
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
    • isFatal

      public boolean isFatal()
    • isWarning

      public boolean isWarning()