Enum Class PrivilegeCode

java.lang.Object
java.lang.Enum<PrivilegeCode>
com.aerospike.client.admin.PrivilegeCode
All Implemented Interfaces:
Serializable, Comparable<PrivilegeCode>, Constable

public enum PrivilegeCode extends Enum<PrivilegeCode>
Permission codes define the type of permission granted for a user's role.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    User can perform UDF and SINDEX administration actions.
    User can read data.
    User can read and write data.
    User can read and write data through user defined functions.
    User can perform secondary index administration actions.
    User can perform systems administration functions on a database that do not involve user administration.
    User can truncate data only.
    User can perform user defined function(UDF) administration actions.
    User can edit/remove other users.
    User can write data.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    Privilege code ID used in wire protocol.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Can privilege be scoped with namespace and set.
    fromId(int id)
    Convert ID to privilege code enum.
    Convert code to string.
    Returns the enum constant of this class with the specified name.
    static PrivilegeCode[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Enum

    compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • USER_ADMIN

      public static final PrivilegeCode USER_ADMIN
      User can edit/remove other users. Global scope only.
    • SYS_ADMIN

      public static final PrivilegeCode SYS_ADMIN
      User can perform systems administration functions on a database that do not involve user administration. Examples include server configuration. Global scope only.
    • DATA_ADMIN

      public static final PrivilegeCode DATA_ADMIN
      User can perform UDF and SINDEX administration actions. Global scope only.
    • UDF_ADMIN

      public static final PrivilegeCode UDF_ADMIN
      User can perform user defined function(UDF) administration actions. Examples include create/drop UDF. Global scope only. Requires server version 6.0+
    • SINDEX_ADMIN

      public static final PrivilegeCode SINDEX_ADMIN
      User can perform secondary index administration actions. Examples include create/drop index. Global scope only. Requires server version 6.0+
    • READ

      public static final PrivilegeCode READ
      User can read data.
    • READ_WRITE

      public static final PrivilegeCode READ_WRITE
      User can read and write data.
    • READ_WRITE_UDF

      public static final PrivilegeCode READ_WRITE_UDF
      User can read and write data through user defined functions.
    • WRITE

      public static final PrivilegeCode WRITE
      User can write data.
    • TRUNCATE

      public static final PrivilegeCode TRUNCATE
      User can truncate data only. Requires server version 6.0+
  • Field Details

    • id

      public final int id
      Privilege code ID used in wire protocol.
  • Method Details

    • values

      public static PrivilegeCode[] 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 PrivilegeCode 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
    • canScope

      public boolean canScope()
      Can privilege be scoped with namespace and set.
    • fromId

      public static PrivilegeCode fromId(int id)
      Convert ID to privilege code enum.
    • toString

      public String toString()
      Convert code to string.
      Overrides:
      toString in class Enum<PrivilegeCode>