public class LabelPermission extends java.lang.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,
java.lang.String name)
Construct a reference to a label permission.
|
LabelPermission(LabelType type)
Construct a reference to a label permission.
|
LabelPermission(java.lang.String name)
Construct a reference to a label permission.
|
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() |
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(java.lang.String name)
name
- name of the label, e.g. "Code-Review"
or "Verified"
.public LabelPermission(LabelPermission.ForUser forUser, java.lang.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 java.lang.String label()
"Code-Review"
.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