public static class LabelPermission.WithValue extends java.lang.Object implements ChangePermissionOrLabel
LabelPermission
at a specific value.Constructor and Description |
---|
WithValue(LabelPermission.ForUser forUser,
LabelType type,
LabelValue value)
Construct a reference to a label at a specific value.
|
WithValue(LabelPermission.ForUser forUser,
LabelType type,
short value)
Construct a reference to a label at a specific value.
|
WithValue(LabelPermission.ForUser forUser,
LabelVote label)
Construct a reference to a label at a specific value.
|
WithValue(LabelPermission.ForUser forUser,
java.lang.String name,
short value)
Construct a reference to a label at a specific value.
|
WithValue(LabelType type,
LabelValue value)
Construct a reference to a label at a specific value.
|
WithValue(LabelType type,
short value)
Construct a reference to a label at a specific value.
|
WithValue(LabelVote label)
Construct a reference to a label at a specific value.
|
WithValue(java.lang.String name,
short value)
Construct a reference to a label at a specific value.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
describeForException()
A description in the context of an exception message.
|
boolean |
equals(java.lang.Object other) |
LabelPermission.ForUser |
forUser() |
int |
hashCode() |
java.lang.String |
label() |
java.lang.String |
toString() |
short |
value() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
describeEnumValue
public WithValue(LabelType type, LabelValue value)
type
- description of the label.value
- numeric score assigned to the label.public WithValue(LabelType type, short value)
type
- description of the label.value
- numeric score assigned to the label.public WithValue(LabelPermission.ForUser forUser, LabelType type, LabelValue value)
forUser
- SELF
(default) or ON_BEHALF_OF
for labelAs behavior.type
- description of the label.value
- numeric score assigned to the label.public WithValue(LabelPermission.ForUser forUser, LabelType type, short value)
forUser
- SELF
(default) or ON_BEHALF_OF
for labelAs behavior.type
- description of the label.value
- numeric score assigned to the label.public WithValue(java.lang.String name, short value)
name
- name of the label, e.g. "Code-Review"
or "Verified"
.value
- numeric score assigned to the label.public WithValue(LabelPermission.ForUser forUser, java.lang.String name, short value)
forUser
- SELF
(default) or ON_BEHALF_OF
for labelAs behavior.name
- name of the label, e.g. "Code-Review"
or "Verified"
.value
- numeric score assigned to the label.public WithValue(LabelVote label)
label
- label name and vote.public WithValue(LabelPermission.ForUser forUser, LabelVote label)
forUser
- SELF
(default) or ON_BEHALF_OF
for labelAs behavior.label
- label name and vote.public LabelPermission.ForUser forUser()
SELF
or ON_BEHALF_OF
(or labelAs).public java.lang.String label()
"Code-Review"
.public short value()
public java.lang.String describeForException()
GerritPermission
Should be grammatical when used in the construction "not permitted: [description] on
[resource]", although individual PermissionBackend
implementations may vary the
wording.
describeForException
in interface GerritPermission
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object