Package com.aerospike.client.admin
Enum Class PrivilegeCode
- All Implemented Interfaces:
Serializable
,Comparable<PrivilegeCode>
,Constable
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 ConstantDescriptionUser 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canScope()
Can privilege be scoped with namespace and set.static PrivilegeCode
fromId
(int id) Convert ID to privilege code enum.toString()
Convert code to string.static PrivilegeCode
Returns the enum constant of this class with the specified name.static PrivilegeCode[]
values()
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
-
Enum Constant Details
-
USER_ADMIN
User can edit/remove other users. Global scope only. -
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
User can perform UDF and SINDEX administration actions. Global scope only. -
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
User can perform secondary index administration actions. Examples include create/drop index. Global scope only. Requires server version 6.0+ -
READ
User can read data. -
READ_WRITE
User can read and write data. -
READ_WRITE_UDF
User can read and write data through user defined functions. -
WRITE
User can write data. -
TRUNCATE
User can truncate data only. Requires server version 6.0+
-
-
Field Details
-
id
public final int idPrivilege code ID used in wire protocol.
-
-
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
-
canScope
public boolean canScope()Can privilege be scoped with namespace and set. -
fromId
Convert ID to privilege code enum. -
toString
Convert code to string.- Overrides:
toString
in classEnum<PrivilegeCode>
-