Package com.google.gerrit.entities
Class Permission
java.lang.Object
com.google.gerrit.entities.Permission
- All Implemented Interfaces:
Comparable<Permission>
A single permission within an
AccessSection
of a project.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final boolean
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract Permission.Builder
static Permission.Builder
static boolean
canBeOnAllProjects
(String ref, String permissionName) final int
static Permission
static String
extractLabel
(String varName) static String
Returns permission name for the given review label.static String
forLabelAs
(String labelName) Returns permission name to apply a label for another user.static String
forRemoveLabel
(String labelName) Returns permission name to remove a label for another user.boolean
getLabel()
abstract String
getName()
The permission name, eg.getRule
(GroupReference group) abstract com.google.common.collect.ImmutableList<PermissionRule>
getRules()
static boolean
protected abstract boolean
static boolean
Returns true if the permission name is actually for a review label.static boolean
Returns true if the permission is for impersonated review labels.static boolean
isPermission
(String varName) Returns true if the name is recognized as a permission name.static boolean
isRemoveLabel
(String var) Returns true if the permission is for impersonated review labels.final String
toString()
-
Field Details
-
ABANDON
- See Also:
-
ADD_PATCH_SET
- See Also:
-
CREATE
- See Also:
-
CREATE_SIGNED_TAG
- See Also:
-
CREATE_TAG
- See Also:
-
DELETE
- See Also:
-
DELETE_CHANGES
- See Also:
-
DELETE_OWN_CHANGES
- See Also:
-
EDIT_CUSTOM_KEYED_VALUES
- See Also:
-
EDIT_HASHTAGS
- See Also:
-
EDIT_TOPIC_NAME
- See Also:
-
FORGE_AUTHOR
- See Also:
-
FORGE_COMMITTER
- See Also:
-
FORGE_SERVER
- See Also:
-
LABEL
- See Also:
-
LABEL_AS
- See Also:
-
REMOVE_LABEL
- See Also:
-
OWNER
- See Also:
-
PUSH
- See Also:
-
PUSH_MERGE
- See Also:
-
READ
- See Also:
-
REBASE
- See Also:
-
REMOVE_REVIEWER
- See Also:
-
REVERT
- See Also:
-
SUBMIT
- See Also:
-
SUBMIT_AS
- See Also:
-
TOGGLE_WORK_IN_PROGRESS_STATE
- See Also:
-
VIEW_PRIVATE_CHANGES
- See Also:
-
DEF_EXCLUSIVE_GROUP
public static final boolean DEF_EXCLUSIVE_GROUP- See Also:
-
-
Constructor Details
-
Permission
public Permission()
-
-
Method Details
-
isPermission
Returns true if the name is recognized as a permission name. -
hasRange
-
isLabel
Returns true if the permission name is actually for a review label. -
isLabelAs
Returns true if the permission is for impersonated review labels. -
isRemoveLabel
Returns true if the permission is for impersonated review labels. -
forLabel
Returns permission name for the given review label. -
forLabelAs
Returns permission name to apply a label for another user. -
forRemoveLabel
Returns permission name to remove a label for another user. -
extractLabel
-
canBeOnAllProjects
-
getName
The permission name, eg.Permission.SUBMIT
-
isExclusiveGroup
protected abstract boolean isExclusiveGroup() -
getRules
-
builder
-
create
-
getLabel
-
getExclusiveGroup
public boolean getExclusiveGroup() -
getRule
-
compareTo
- Specified by:
compareTo
in interfaceComparable<Permission>
-
toString
-
autoToBuilder
-
toBuilder
-