Package com.google.gerrit.entities
Class AccessSection
- java.lang.Object
-
- com.google.gerrit.entities.AccessSection
-
- All Implemented Interfaces:
Comparable<AccessSection>
public abstract class AccessSection extends Object implements Comparable<AccessSection>
Portion of aProject
describing access rules.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccessSection.Builder
-
Field Summary
Fields Modifier and Type Field Description static String
ALL
Pattern that matches all references in a project.static String
GLOBAL_CAPABILITIES
Special name given to the global capabilities; not a valid reference.static String
HEADS
Pattern that matches all branches in a project.static String
REGEX_PREFIX
Prefix that triggers a regular expression pattern.
-
Constructor Summary
Constructors Constructor Description AccessSection()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract AccessSection.Builder
autoToBuilder()
static AccessSection.Builder
builder(String name)
int
compareTo(AccessSection o)
static AccessSection
create(String name)
abstract String
getName()
Name of the access section.Permission
getPermission(String name)
abstract com.google.common.collect.ImmutableList<Permission>
getPermissions()
static boolean
isValidRefSectionName(String name)
Returns true if the name is likely to be a valid reference section name.AccessSection.Builder
toBuilder()
String
toString()
-
-
-
Field Detail
-
GLOBAL_CAPABILITIES
public static final String GLOBAL_CAPABILITIES
Special name given to the global capabilities; not a valid reference.- See Also:
- Constant Field Values
-
ALL
public static final String ALL
Pattern that matches all references in a project.- See Also:
- Constant Field Values
-
HEADS
public static final String HEADS
Pattern that matches all branches in a project.- See Also:
- Constant Field Values
-
REGEX_PREFIX
public static final String REGEX_PREFIX
Prefix that triggers a regular expression pattern.- See Also:
- Constant Field Values
-
-
Method Detail
-
getName
public abstract String getName()
Name of the access section. It could be a ref pattern or something else.
-
getPermissions
public abstract com.google.common.collect.ImmutableList<Permission> getPermissions()
-
create
public static AccessSection create(String name)
-
builder
public static AccessSection.Builder builder(String name)
-
isValidRefSectionName
public static boolean isValidRefSectionName(String name)
Returns true if the name is likely to be a valid reference section name.
-
getPermission
public Permission getPermission(String name)
-
compareTo
public final int compareTo(AccessSection o)
- Specified by:
compareTo
in interfaceComparable<AccessSection>
-
toBuilder
public AccessSection.Builder toBuilder()
-
autoToBuilder
protected abstract AccessSection.Builder autoToBuilder()
-
-