Class AbstractLabelPermission.WithValue
java.lang.Object
com.google.gerrit.server.permissions.AbstractLabelPermission.WithValue
- All Implemented Interfaces:
GerritPermission
,ChangePermissionOrLabel
- Direct Known Subclasses:
LabelPermission.WithValue
,LabelRemovalPermission.WithValue
- Enclosing class:
- AbstractLabelPermission
public abstract static class AbstractLabelPermission.WithValue
extends Object
implements ChangePermissionOrLabel
A
AbstractLabelPermission
at a specific value.-
Constructor Summary
ConstructorsConstructorDescriptionWithValue
(AbstractLabelPermission.ForUser forUser, LabelVote label) Construct a reference to an abstract label permission at a specific value. -
Method Summary
Modifier and TypeMethodDescriptionfinal String
A description in the context of an exception message.final boolean
forUser()
ReturnsSELF
orON_BEHALF_OF
(or labelAs).final int
hashCode()
label()
Returns name of the label, e.g.abstract String
final String
toString()
short
value()
Returns specific value of the label, e.g.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
-
Constructor Details
-
WithValue
Construct a reference to an abstract label permission at a specific value.- Parameters:
forUser
-SELF
(default) orON_BEHALF_OF
for labelAs behavior.label
- label name and vote.
-
-
Method Details
-
forUser
ReturnsSELF
orON_BEHALF_OF
(or labelAs). -
label
Returns name of the label, e.g."Code-Review"
. -
value
public short value()Returns specific value of the label, e.g. 1 or 2. -
permissionName
-
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
-