Enum ChangePermission
- java.lang.Object
-
- java.lang.Enum<ChangePermission>
-
- com.google.gerrit.server.permissions.ChangePermission
-
- All Implemented Interfaces:
GerritPermission
,ChangePermissionOrLabel
,Serializable
,Comparable<ChangePermission>
public enum ChangePermission extends Enum<ChangePermission> implements ChangePermissionOrLabel
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ABANDON
The change can't be abandoned if its current patch set is locked.ADD_PATCH_SET
A new patch set can't be added if the patch set is locked for the change.DELETE
EDIT_ASSIGNEE
EDIT_DESCRIPTION
EDIT_HASHTAGS
EDIT_TOPIC_NAME
READ
REBASE
The change can't be rebased if its current patch set is locked.REMOVE_REVIEWER
RESTORE
The change can't be restored if its current patch set is locked.REVERT
SUBMIT
SUBMIT_AS
TOGGLE_WORK_IN_PROGRESS_STATE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
describeForException()
A description in the context of an exception message.static ChangePermission
valueOf(String name)
Returns the enum constant of this type with the specified name.static ChangePermission[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
READ
public static final ChangePermission READ
-
RESTORE
public static final ChangePermission RESTORE
The change can't be restored if its current patch set is locked.Before checking this permission, the caller should first verify the current patch set of the change is not locked by calling
PatchSetUtil.isPatchSetLocked
.
-
DELETE
public static final ChangePermission DELETE
-
ABANDON
public static final ChangePermission ABANDON
The change can't be abandoned if its current patch set is locked.Before checking this permission, the caller should first verify the current patch set of the change is not locked by calling
PatchSetUtil.isPatchSetLocked
.
-
EDIT_ASSIGNEE
public static final ChangePermission EDIT_ASSIGNEE
-
EDIT_DESCRIPTION
public static final ChangePermission EDIT_DESCRIPTION
-
EDIT_HASHTAGS
public static final ChangePermission EDIT_HASHTAGS
-
EDIT_TOPIC_NAME
public static final ChangePermission EDIT_TOPIC_NAME
-
REMOVE_REVIEWER
public static final ChangePermission REMOVE_REVIEWER
-
ADD_PATCH_SET
public static final ChangePermission ADD_PATCH_SET
A new patch set can't be added if the patch set is locked for the change.Before checking this permission, the caller should first verify the current patch set of the change is not locked by calling
PatchSetUtil.isPatchSetLocked
.
-
REBASE
public static final ChangePermission REBASE
The change can't be rebased if its current patch set is locked.Before checking this permission, the caller should first verify the current patch set of the change is not locked by calling
PatchSetUtil.isPatchSetLocked
.
-
REVERT
public static final ChangePermission REVERT
-
SUBMIT
public static final ChangePermission SUBMIT
-
SUBMIT_AS
public static final ChangePermission SUBMIT_AS
-
TOGGLE_WORK_IN_PROGRESS_STATE
public static final ChangePermission TOGGLE_WORK_IN_PROGRESS_STATE
-
-
Method Detail
-
values
public static ChangePermission[] 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 (ChangePermission c : ChangePermission.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ChangePermission 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
-
describeForException
public String describeForException()
Description copied from interface:GerritPermission
A description in the context of an exception message.Should be grammatical when used in the construction "not permitted: [description] on [resource]", although individual
PermissionBackend
implementations may vary the wording.- Specified by:
describeForException
in interfaceGerritPermission
-
-