Enum Class RoleEnum

java.lang.Object
java.lang.Enum<RoleEnum>
wizardquest.auth.RoleEnum
All Implemented Interfaces:
Serializable, Comparable<RoleEnum>, Constable

public enum RoleEnum extends Enum<RoleEnum>
Enumerates the roles a user can have. A user can have only 1 of these roles.
  • Enum Constant Details

    • PLAYER

      public static final RoleEnum PLAYER
    • DESIGNER

      public static final RoleEnum DESIGNER
    • DEVELOPER

      public static final RoleEnum DEVELOPER
  • Method Details

    • values

      public static RoleEnum[] 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 RoleEnum 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
    • getJSONName

      public String getJSONName()
      Gets the name of the role according to the settings JSON specification
      Returns:
      the name of the role.
    • convertJSONToEnum

      public static RoleEnum convertJSONToEnum(String jsonName)
      Converts the user's role from string format in the JSON file to a RoleEnum object.
      Parameters:
      jsonName - the user role specified in the JSON file.
      Returns:
      the user role as a RoleEnum object.