Enum AccessPermission
- All Implemented Interfaces:
Serializable
,Comparable<AccessPermission>
,Constable
Defines permissions to allow upload or delete of the digital asset.
The possible types are:
- ALLOWED Allow to upload/delete the digital asset.
- NOT_ALLOWED Not allow to upload/delete the digital asset.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAllows execution of operations on digital asset.Prevents execution of operations on digital asset. -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessPermission
convertBooleanToAccessPermission
(Boolean booleanValue) Converts a boolean value to anAccessPermission
.getFlag()
Identifies this permission.com.onwbp.base.text.UserMessage
getLabel()
Returns a developer-friendly string label.int
Returns the permission's priority.boolean
boolean
min
(AccessPermission otherPermission) Compares permissions and returns the permission with the highest priority.static AccessPermission
Parses the specified flag and returns the correspondingAccessPermission
instance.toString()
static AccessPermission
Returns the enum constant of this type with the specified name.static AccessPermission[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
-
Enum Constant Details
-
ALLOWED
Allows execution of operations on digital asset. -
NOT_ALLOWED
Prevents execution of operations on digital asset.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
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
-
parse
Parses the specified flag and returns the correspondingAccessPermission
instance. -
min
Compares permissions and returns the permission with the highest priority.- Parameters:
otherPermission
- the additional permission used for comparison
-
convertBooleanToAccessPermission
Converts a boolean value to anAccessPermission
. -
getFlag
Identifies this permission. -
getLabel
public com.onwbp.base.text.UserMessage getLabel()Returns a developer-friendly string label. -
getPriority
public int getPriority()Returns the permission's priority. -
toString
- Overrides:
toString
in classEnum<AccessPermission>
-
isAllowed
public boolean isAllowed() -
isNotAllowed
public boolean isNotAllowed()
-