public class LabelPermission extends Object implements ChangePermissionOrLabel
Modifier and Type | Class and Description |
---|---|
static class |
LabelPermission.ForUser |
static class |
LabelPermission.WithValue
A
LabelPermission at a specific value. |
Constructor and Description |
---|
LabelPermission(LabelPermission.ForUser forUser,
LabelType type)
Construct a reference to a label permission.
|
LabelPermission(LabelPermission.ForUser forUser,
String name)
Construct a reference to a label permission.
|
LabelPermission(LabelType type)
Construct a reference to a label permission.
|
LabelPermission(String name)
Construct a reference to a label permission.
|
Modifier and Type | Method and Description |
---|---|
String |
describeForException()
A description in the context of an exception message.
|
boolean |
equals(Object other) |
LabelPermission.ForUser |
forUser() |
int |
hashCode() |
String |
label() |
String |
toString() |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
describeEnumValue
public LabelPermission(LabelType type)
type
- type description of the label.public LabelPermission(LabelPermission.ForUser forUser, LabelType type)
forUser
- SELF
(default) or ON_BEHALF_OF
for labelAs behavior.type
- type description of the label.public LabelPermission(String name)
name
- name of the label, e.g. "Code-Review"
or "Verified"
.public LabelPermission(LabelPermission.ForUser forUser, String name)
forUser
- SELF
(default) or ON_BEHALF_OF
for labelAs behavior.name
- name of the label, e.g. "Code-Review"
or "Verified"
.public LabelPermission.ForUser forUser()
SELF
or ON_BEHALF_OF
(or labelAs).public String label()
"Code-Review"
.public 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