Enum NamespacePermission
- java.lang.Object
-
- java.lang.Enum<NamespacePermission>
-
- org.apache.accumulo.core.security.NamespacePermission
-
- All Implemented Interfaces:
Serializable
,Comparable<NamespacePermission>
public enum NamespacePermission extends Enum<NamespacePermission>
Accumulo namespace permissions. Each permission has an associated byte ID.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALTER_NAMESPACE
ALTER_TABLE
BULK_IMPORT
CREATE_TABLE
DROP_NAMESPACE
DROP_TABLE
GRANT
READ
WRITE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NamespacePermission
getEquivalent(SystemPermission permission)
static NamespacePermission
getEquivalent(TablePermission permission)
byte
getId()
Gets the byte ID of this permission.static NamespacePermission
getPermissionById(byte id)
Gets the permission matching the given byte ID.static List<String>
printableValues()
Returns a list of printable permission values.static NamespacePermission
valueOf(String name)
Returns the enum constant of this type with the specified name.static NamespacePermission[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ
public static final NamespacePermission READ
-
WRITE
public static final NamespacePermission WRITE
-
ALTER_NAMESPACE
public static final NamespacePermission ALTER_NAMESPACE
-
GRANT
public static final NamespacePermission GRANT
-
ALTER_TABLE
public static final NamespacePermission ALTER_TABLE
-
CREATE_TABLE
public static final NamespacePermission CREATE_TABLE
-
DROP_TABLE
public static final NamespacePermission DROP_TABLE
-
BULK_IMPORT
public static final NamespacePermission BULK_IMPORT
-
DROP_NAMESPACE
public static final NamespacePermission DROP_NAMESPACE
-
-
Method Detail
-
values
public static NamespacePermission[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (NamespacePermission c : NamespacePermission.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static NamespacePermission valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException
- if the argument is null
-
getId
public byte getId()
Gets the byte ID of this permission.- Returns:
- byte ID
-
printableValues
public static List<String> printableValues()
Returns a list of printable permission values.- Returns:
- list of namespace permission values, as "Namespace." + permission name
-
getPermissionById
public static NamespacePermission getPermissionById(byte id)
Gets the permission matching the given byte ID.- Parameters:
id
- byte ID- Returns:
- system permission
- Throws:
IndexOutOfBoundsException
- if the byte ID is invalid
-
getEquivalent
public static NamespacePermission getEquivalent(TablePermission permission)
-
getEquivalent
public static NamespacePermission getEquivalent(SystemPermission permission)
-
-