Package com.google.gerrit.entities
Class CachedProjectConfig
- java.lang.Object
-
- com.google.gerrit.entities.CachedProjectConfig
-
public abstract class CachedProjectConfig extends Object
Cached representation of values parsed fromProjectConfig
.This class is immutable and thread-safe.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CachedProjectConfig.Builder
-
Constructor Summary
Constructors Constructor Description CachedProjectConfig()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static CachedProjectConfig.Builder
builder()
Optional<AccessSection>
getAccessSection(String refName)
Returns theAccessSection
with to the given name.com.google.common.collect.ImmutableSet<String>
getAccessSectionNames()
Returns allAccessSection
names.abstract com.google.common.collect.ImmutableSortedMap<String,AccessSection>
getAccessSections()
Returns a map ofAccessSection
s keyed by their name.abstract AccountsSection
getAccountsSection()
Returns the account section containing visibility information about accounts.com.google.common.collect.ImmutableSet<AccountGroup.UUID>
getAllGroupUUIDs()
Returns a set of all groups used by this configuration.abstract Optional<BranchOrderSection>
getBranchOrderSection()
Returns theBranchOrderSection
containing the order in which branches should be shown.abstract boolean
getCheckReceivedObjects()
Returnstrue
if received objects should be checked for validity.abstract com.google.common.collect.ImmutableMap<String,StoredCommentLinkInfo>
getCommentLinkSections()
ReturnsStoredCommentLinkInfo
keyed by their name.abstract com.google.common.collect.ImmutableMap<String,ContributorAgreement>
getContributorAgreements()
Returns theContributorAgreement
s keyed by their name.abstract com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableList<String>>
getExtensionPanelSections()
Returns a list of panel sections keyed by title.Optional<GroupReference>
getGroup(AccountGroup.UUID uuid)
Returns the group reference for aAccountGroup.UUID
, if the group is used by at least one rule.Optional<GroupReference>
getGroupByName(String name)
Returns the group reference for matching the givenname
, if the group is used by at least one rule.abstract com.google.common.collect.ImmutableMap<AccountGroup.UUID,GroupReference>
getGroups()
abstract com.google.common.collect.ImmutableMap<String,LabelType>
getLabelSections()
Returns theLabelType
s keyed by their name.abstract long
getMaxObjectSizeLimit()
Returns the maximum allowed object size.abstract ConfiguredMimeTypes
getMimeTypes()
Returns configuredConfiguredMimeTypes
s.abstract com.google.common.collect.ImmutableMap<String,NotifyConfig>
getNotifySections()
Returns theNotifyConfig
s keyed by their name.abstract com.google.common.collect.ImmutableMap<String,ImmutableConfig>
getParsedProjectLevelConfigs()
abstract com.google.common.collect.ImmutableMap<String,String>
getPluginConfigs()
abstract Project
getProject()
abstract com.google.common.collect.ImmutableMap<String,String>
getProjectLevelConfigs()
abstract Optional<org.eclipse.jgit.lib.ObjectId>
getRevision()
Returns the SHA1 of therefs/meta/config
branch.abstract Optional<org.eclipse.jgit.lib.ObjectId>
getRulesId()
Returns the blob ID of therules.pl
file, if present.abstract com.google.common.collect.ImmutableMap<String,SubmitRequirement>
getSubmitRequirementSections()
Returns theSubmitRequirement
s keyed by their name.abstract com.google.common.collect.ImmutableMap<Project.NameKey,SubscribeSection>
getSubscribeSections()
ReturnsSubscribeSection
keyed by theProject.NameKey
they reference.com.google.common.collect.ImmutableList<SubscribeSection>
getSubscribeSections(BranchNameKey branch)
abstract CachedProjectConfig.Builder
toBuilder()
-
-
-
Method Detail
-
getProject
public abstract Project getProject()
-
getGroups
public abstract com.google.common.collect.ImmutableMap<AccountGroup.UUID,GroupReference> getGroups()
-
getAllGroupUUIDs
public com.google.common.collect.ImmutableSet<AccountGroup.UUID> getAllGroupUUIDs()
Returns a set of all groups used by this configuration.
-
getGroup
public Optional<GroupReference> getGroup(AccountGroup.UUID uuid)
Returns the group reference for aAccountGroup.UUID
, if the group is used by at least one rule.
-
getGroupByName
public Optional<GroupReference> getGroupByName(@Nullable String name)
Returns the group reference for matching the givenname
, if the group is used by at least one rule.
-
getAccountsSection
public abstract AccountsSection getAccountsSection()
Returns the account section containing visibility information about accounts.
-
getAccessSections
public abstract com.google.common.collect.ImmutableSortedMap<String,AccessSection> getAccessSections()
Returns a map ofAccessSection
s keyed by their name.
-
getAccessSection
public Optional<AccessSection> getAccessSection(String refName)
Returns theAccessSection
with to the given name.
-
getAccessSectionNames
public com.google.common.collect.ImmutableSet<String> getAccessSectionNames()
Returns allAccessSection
names.
-
getBranchOrderSection
public abstract Optional<BranchOrderSection> getBranchOrderSection()
Returns theBranchOrderSection
containing the order in which branches should be shown.
-
getContributorAgreements
public abstract com.google.common.collect.ImmutableMap<String,ContributorAgreement> getContributorAgreements()
Returns theContributorAgreement
s keyed by their name.
-
getNotifySections
public abstract com.google.common.collect.ImmutableMap<String,NotifyConfig> getNotifySections()
Returns theNotifyConfig
s keyed by their name.
-
getLabelSections
public abstract com.google.common.collect.ImmutableMap<String,LabelType> getLabelSections()
Returns theLabelType
s keyed by their name.
-
getSubmitRequirementSections
public abstract com.google.common.collect.ImmutableMap<String,SubmitRequirement> getSubmitRequirementSections()
Returns theSubmitRequirement
s keyed by their name.
-
getMimeTypes
public abstract ConfiguredMimeTypes getMimeTypes()
Returns configuredConfiguredMimeTypes
s.
-
getSubscribeSections
public abstract com.google.common.collect.ImmutableMap<Project.NameKey,SubscribeSection> getSubscribeSections()
ReturnsSubscribeSection
keyed by theProject.NameKey
they reference.
-
getCommentLinkSections
public abstract com.google.common.collect.ImmutableMap<String,StoredCommentLinkInfo> getCommentLinkSections()
ReturnsStoredCommentLinkInfo
keyed by their name.
-
getRulesId
public abstract Optional<org.eclipse.jgit.lib.ObjectId> getRulesId()
Returns the blob ID of therules.pl
file, if present.
-
getRevision
public abstract Optional<org.eclipse.jgit.lib.ObjectId> getRevision()
Returns the SHA1 of therefs/meta/config
branch.
-
getMaxObjectSizeLimit
public abstract long getMaxObjectSizeLimit()
Returns the maximum allowed object size.
-
getCheckReceivedObjects
public abstract boolean getCheckReceivedObjects()
Returnstrue
if received objects should be checked for validity.
-
getExtensionPanelSections
public abstract com.google.common.collect.ImmutableMap<String,com.google.common.collect.ImmutableList<String>> getExtensionPanelSections()
Returns a list of panel sections keyed by title.
-
getSubscribeSections
public com.google.common.collect.ImmutableList<SubscribeSection> getSubscribeSections(BranchNameKey branch)
-
getPluginConfigs
public abstract com.google.common.collect.ImmutableMap<String,String> getPluginConfigs()
-
getProjectLevelConfigs
public abstract com.google.common.collect.ImmutableMap<String,String> getProjectLevelConfigs()
-
getParsedProjectLevelConfigs
public abstract com.google.common.collect.ImmutableMap<String,ImmutableConfig> getParsedProjectLevelConfigs()
-
builder
public static CachedProjectConfig.Builder builder()
-
toBuilder
public abstract CachedProjectConfig.Builder toBuilder()
-
-