Enum Class ChangePermission
- All Implemented Interfaces:
GerritPermission
,ChangePermissionOrLabel
,Serializable
,Comparable<ChangePermission>
,java.lang.constant.Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe change can't be abandoned if its current patch set is locked.A new patch set can't be added if the patch set is locked for the change.The change can't be rebased if its current patch set is locked.Permission that is required for a user to rebase a change on behalf of the uploader.The change can't be restored if its current patch set is locked. -
Method Summary
Modifier and TypeMethodDescriptionA description in the context of an exception message.A hint that explains under which conditions this permission is permitted.static ChangePermission
Returns the enum constant of this class with the specified name.static ChangePermission[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
READ
-
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
-
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_DESCRIPTION
-
EDIT_CUSTOM_KEYED_VALUES
-
EDIT_HASHTAGS
-
EDIT_TOPIC_NAME
-
REMOVE_REVIEWER
-
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
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
. -
REBASE_ON_BEHALF_OF_UPLOADER
Permission that is required for a user to rebase a change on behalf of the uploader.This only covers the permissions of the rebaser (aka the impersonating user).
In addition rebase on behalf of the uploader requires the uploader (aka the impersonated user) to have permissions to create the new patch set. These permissions need to be checked separately.
-
REVERT
-
SUBMIT
-
SUBMIT_AS
-
TOGGLE_WORK_IN_PROGRESS_STATE
-
-
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
-
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
-
hintForException
Description copied from interface:ChangePermissionOrLabel
A hint that explains under which conditions this permission is permitted.This is useful for permissions that are not directly assigned but are indirectly permitted by the user having other permissions or being the change owner.
- Specified by:
hintForException
in interfaceChangePermissionOrLabel
-