Package tv.phantombot.panel.PanelUser
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
Messages for use as responses to the web panel
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPanel useris not allowed to manage other panel usersGeneral Error/Error placeholderPanel useris not allowed to manage other panel usersPanel usercould not be saved correctlyGeneral Success/Success placeholderPanel useralready exitsPanel useroriginates from the botlogin.txtPanel useris disabledPanel usercould not be found -
Method Summary
Modifier and TypeMethodDescriptionGet the JSON key under which the message should be send to the web panelGets the message intended for the web panel to be shown or handled therebooleanisError()Indicates if the message is an error or success messageprotected PanelUserHandler.PanelMessagesetResponse(String message) Overrides the default message for each enumReturns the enum constant of this class with the specified name.static PanelUserHandler.PanelMessage[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
UserNotFound
Panel usercould not be found -
UserAlreadyExists
Panel useralready exits -
UserIsDisabled
Panel useris disabled -
UserIsConfig
Panel useroriginates from the botlogin.txt -
SaveError
Panel usercould not be saved correctly -
CanNotManageError
Panel useris not allowed to manage other panel users -
InsufficientPermissions
Panel useris not allowed to manage other panel users -
Error
General Error/Error placeholder -
Success
General Success/Success placeholder
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
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:
trueif this is message is an error message
-
setResponse
Overrides the default message for each enum- Parameters:
message- the message which should replace the default message- Returns:
this
-
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
-