Enum AccessPermission
- java.lang.Object
-
- java.lang.Enum<AccessPermission>
-
- com.orchestranetworks.addon.dama.ext.enumeration.AccessPermission
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<AccessPermission>
public enum AccessPermission extends java.lang.Enum<AccessPermission>
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
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALLOWED
Allows execution of operations on digital asset.NOT_ALLOWED
Prevents execution of operations on digital asset.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AccessPermission
convertBooleanToAccessPermission(java.lang.Boolean booleanValue)
Converts a boolean value to anAccessPermission
.java.lang.String
getFlag()
Identifies this permission.com.onwbp.base.text.UserMessage
getLabel()
Returns a developer-friendly string label.int
getPriority()
Returns the permission's priority.boolean
isAllowed()
boolean
isNotAllowed()
AccessPermission
min(AccessPermission otherPermission)
Compares permissions and returns the permission with the highest priority.static AccessPermission
parse(java.lang.String flag)
Parses the specified flag and returns the correspondingAccessPermission
instance.java.lang.String
toString()
static AccessPermission
valueOf(java.lang.String name)
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.
-
-
-
Enum Constant Detail
-
ALLOWED
public static final AccessPermission ALLOWED
Allows execution of operations on digital asset.
-
NOT_ALLOWED
public static final AccessPermission NOT_ALLOWED
Prevents execution of operations on digital asset.
-
-
Method Detail
-
values
public static AccessPermission[] 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 (AccessPermission c : AccessPermission.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AccessPermission valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
parse
public static AccessPermission parse(java.lang.String flag)
Parses the specified flag and returns the correspondingAccessPermission
instance.
-
min
public AccessPermission min(AccessPermission otherPermission)
Compares permissions and returns the permission with the highest priority.- Parameters:
otherPermission
- the additional permission used for comparison
-
convertBooleanToAccessPermission
public static AccessPermission convertBooleanToAccessPermission(java.lang.Boolean booleanValue)
Converts a boolean value to anAccessPermission
.
-
getFlag
public java.lang.String 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
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<AccessPermission>
-
isAllowed
public boolean isAllowed()
-
isNotAllowed
public boolean isNotAllowed()
-
-