Package com.google.gerrit.entities
Class AccessSection
java.lang.Object
com.google.gerrit.entities.AccessSection
- All Implemented Interfaces:
Comparable<AccessSection>
Portion of a
Project
describing access rules.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Pattern that matches all references in a project.static final String
Special name given to the global capabilities; not a valid reference.static final String
Pattern that matches all branches in a project.static final String
Prefix that triggers a regular expression pattern. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract AccessSection.Builder
static AccessSection.Builder
final int
static AccessSection
abstract String
getName()
Name of the access section.A compiled regular expression in casegetName()
is a regular expression.getPermission
(String name) abstract com.google.common.collect.ImmutableList<Permission>
static boolean
isValidRefSectionName
(String name) Returns true if the name is likely to be a valid reference section name.final String
toString()
-
Field Details
-
GLOBAL_CAPABILITIES
Special name given to the global capabilities; not a valid reference.- See Also:
-
ALL
Pattern that matches all references in a project.- See Also:
-
HEADS
Pattern that matches all branches in a project.- See Also:
-
REGEX_PREFIX
Prefix that triggers a regular expression pattern.- See Also:
-
-
Constructor Details
-
AccessSection
public AccessSection()
-
-
Method Details
-
getName
Name of the access section. It could be a ref pattern or something else. -
getNamePattern
A compiled regular expression in casegetName()
is a regular expression. This is memoized to save callers from compiling patterns for every use. -
getPermissions
-
create
-
builder
-
isValidRefSectionName
Returns true if the name is likely to be a valid reference section name. -
getPermission
-
compareTo
- Specified by:
compareTo
in interfaceComparable<AccessSection>
-
toString
-
toBuilder
-
autoToBuilder
-