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
AAbstractLabelPermission
at a specific value.
-
-
Constructor Summary
Constructors Constructor Description WithValue(AbstractLabelPermission.ForUser forUser, LabelVote label)
Construct a reference to an abstract label permission at a specific value.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
describeForException()
A description in the context of an exception message.boolean
equals(Object other)
AbstractLabelPermission.ForUser
forUser()
ReturnsSELF
orON_BEHALF_OF
(or labelAs).int
hashCode()
String
label()
Returns name of the label, e.g.abstract String
permissionName()
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 Detail
-
WithValue
public WithValue(AbstractLabelPermission.ForUser forUser, LabelVote label)
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 Detail
-
forUser
public AbstractLabelPermission.ForUser forUser()
ReturnsSELF
orON_BEHALF_OF
(or labelAs).
-
label
public String 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
public abstract String permissionName()
-
describeForException
public final 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
-
-