Enum Class Perm

java.lang.Object
java.lang.Enum<Perm>
org.basex.core.users.Perm
All Implemented Interfaces:
Serializable, Comparable<Perm>, java.lang.constant.Constable

public enum Perm extends Enum<Perm>
User permissions.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Enum Constant Details

    • NONE

      public static final Perm NONE
      No permissions.
    • READ

      public static final Perm READ
      Read permission (local+global).
    • WRITE

      public static final Perm WRITE
      Write permission (local+global).
    • CREATE

      public static final Perm CREATE
      Create permission (global).
    • ADMIN

      public static final Perm ADMIN
      Admin permission (global).
  • Field Details

    • VALUES

      public static final Perm[] VALUES
      Cached enums (faster).
  • Method Details

    • values

      public static Perm[] 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 Perm 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
    • get

      public static Perm get(String perm)
      Returns a permission matching the specified string.
      Parameters:
      perm - permission string
      Returns:
      permission, or null if no match is found
    • toString

      public String toString()
      Overrides:
      toString in class Enum<Perm>