Class AbstractLabelPermission
java.lang.Object
com.google.gerrit.server.permissions.AbstractLabelPermission
- All Implemented Interfaces:
GerritPermission
,ChangePermissionOrLabel
,RefPermissionOrLabel
- Direct Known Subclasses:
LabelPermission
,LabelRemovalPermission
public abstract class AbstractLabelPermission
extends Object
implements ChangePermissionOrLabel, RefPermissionOrLabel
Abstract permission representing a label.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
AAbstractLabelPermission
at a specific value. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractLabelPermission.ForUser
protected final String
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractLabelPermission
(AbstractLabelPermission.ForUser forUser, String name) Construct a reference to an abstract label permission. -
Method Summary
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.gerrit.server.permissions.ChangePermissionOrLabel
hintForException
-
Field Details
-
forUser
-
name
-
-
Constructor Details
-
AbstractLabelPermission
Construct a reference to an abstract label permission.- Parameters:
forUser
-SELF
(default) orON_BEHALF_OF
for labelAs behavior.name
- name of the label, e.g."Code-Review"
or"Verified"
.
-
-
Method Details
-
forUser
ReturnsSELF
orON_BEHALF_OF
(or labelAs). -
label
Returns name of the label, e.g."Code-Review"
. -
permissionPrefix
-
permissionName
- Specified by:
permissionName
in interfaceGerritPermission
-
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
-
hashCode
public final int hashCode() -
equals
-
toString
-