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 user
is not allowed to manage other panel usersGeneral Error/Error placeholderPanel user
is not allowed to manage other panel usersPanel user
could not be saved correctlyGeneral Success/Success placeholderPanel user
already exitsPanel user
originates from the botlogin.txtPanel user
is disabledPanel user
could 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 thereboolean
isError()
Indicates if the message is an error or success messageprotected PanelUserHandler.PanelMessage
setResponse
(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 user
could not be found -
UserAlreadyExists
Panel user
already exits -
UserIsDisabled
Panel user
is disabled -
UserIsConfig
Panel user
originates from the botlogin.txt -
SaveError
Panel user
could not be saved correctly -
CanNotManageError
Panel user
is not allowed to manage other panel users -
InsufficientPermissions
Panel user
is 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:
true
if 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
-