Enum Class PanelUserHandler.PanelMessage

java.lang.Object
java.lang.Enum<PanelUserHandler.PanelMessage>
tv.phantombot.panel.PanelUser.PanelUserHandler.PanelMessage
All Implemented Interfaces:
Serializable, Comparable<PanelUserHandler.PanelMessage>, Constable
Enclosing class:
PanelUserHandler

public static enum PanelUserHandler.PanelMessage extends Enum<PanelUserHandler.PanelMessage>
Messages for use as responses to the web panel
  • Enum Constant Details

  • Method Details

    • values

      public static PanelUserHandler.PanelMessage[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PanelUserHandler.PanelMessage valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getMessage

      public String getMessage()
      Gets the message intended for the web panel to be shown or handled there
      Returns:
      The message for the panel
    • isError

      public boolean isError()
      Indicates if the message is an error or success message
      Returns:
      true if this is message is an error message
    • setResponse

      protected PanelUserHandler.PanelMessage setResponse(String message)
      Overrides the default message for each enum
      Parameters:
      message - the message which should replace the default message
      Returns:
      this
    • getJSONkey

      public String getJSONkey()
      Get the JSON key under which the message should be send to the web panel
      Returns:
      The JSON key under which the message should be send to the web panel