Package com.google.gerrit.server.git
Class ProjectConfig
- java.lang.Object
- 
- com.google.gerrit.server.git.VersionedMetaData
- 
- com.google.gerrit.server.git.ProjectConfig
 
 
- 
- All Implemented Interfaces:
- ValidationError.Sink
 
 public class ProjectConfig extends VersionedMetaData implements ValidationError.Sink 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.google.gerrit.server.git.VersionedMetaDataVersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static StringACCESSstatic StringCOMMENTLINKstatic StringPROJECT_CONFIG
 - 
Constructor SummaryConstructors Constructor Description ProjectConfig(Project.NameKey projectName)
 - 
Method Summary- 
Methods inherited from class com.google.gerrit.server.git.VersionedMetaDatacommit, commitToNewRef, getObjectId, getPathInfos, getRevision, load, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
 
- 
 
- 
- 
- 
Field Detail- 
COMMENTLINKpublic static final String COMMENTLINK - See Also:
- Constant Field Values
 
 - 
PROJECT_CONFIGpublic static final String PROJECT_CONFIG - See Also:
- Constant Field Values
 
 - 
ACCESSpublic static final String ACCESS - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ProjectConfigpublic ProjectConfig(Project.NameKey projectName) 
 
- 
 - 
Method Detail- 
readpublic static ProjectConfig read(MetaDataUpdate update) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException - Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
readpublic static ProjectConfig read(MetaDataUpdate update, org.eclipse.jgit.lib.ObjectId id) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException - Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
readpublic static ProjectConfig read(org.eclipse.jgit.lib.Repository repo, Project.NameKey name) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException - Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
buildCommentLinkpublic static CommentLinkInfoImpl buildCommentLink(org.eclipse.jgit.lib.Config cfg, String name, boolean allowRaw) throws IllegalArgumentException - Throws:
- IllegalArgumentException
 
 - 
getNamepublic Project.NameKey getName() 
 - 
getProjectpublic Project getProject() 
 - 
getAccountsSectionpublic AccountsSection getAccountsSection() 
 - 
getAccessSectionpublic AccessSection getAccessSection(String name) 
 - 
getAccessSectionpublic AccessSection getAccessSection(String name, boolean create) 
 - 
getAccessSectionspublic Collection<AccessSection> getAccessSections() 
 - 
getBranchOrderSectionpublic BranchOrderSection getBranchOrderSection() 
 - 
getSubscribeSectionspublic Map<Project.NameKey,SubscribeSection> getSubscribeSections() 
 - 
getSubscribeSectionspublic Collection<SubscribeSection> getSubscribeSections(Branch.NameKey branch) 
 - 
addSubscribeSectionpublic void addSubscribeSection(SubscribeSection s) 
 - 
removepublic void remove(AccessSection section) 
 - 
removepublic void remove(AccessSection section, Permission permission) 
 - 
removepublic void remove(AccessSection section, Permission permission, PermissionRule rule) 
 - 
replacepublic void replace(AccessSection section) 
 - 
getContributorAgreementpublic ContributorAgreement getContributorAgreement(String name) 
 - 
getContributorAgreementpublic ContributorAgreement getContributorAgreement(String name, boolean create) 
 - 
getContributorAgreementspublic Collection<ContributorAgreement> getContributorAgreements() 
 - 
removepublic void remove(ContributorAgreement section) 
 - 
replacepublic void replace(ContributorAgreement section) 
 - 
getNotifyConfigspublic Collection<NotifyConfig> getNotifyConfigs() 
 - 
putNotifyConfigpublic void putNotifyConfig(String name, NotifyConfig nc) 
 - 
getCommentLinkSectionspublic Collection<CommentLinkInfoImpl> getCommentLinkSections() 
 - 
addCommentLinkSectionpublic void addCommentLinkSection(CommentLinkInfoImpl commentLink) 
 - 
getMimeTypespublic ConfiguredMimeTypes getMimeTypes() 
 - 
resolvepublic GroupReference resolve(AccountGroup group) 
 - 
resolvepublic GroupReference resolve(GroupReference group) 
 - 
getGrouppublic GroupReference getGroup(AccountGroup.UUID uuid) - Returns:
- the group reference, if the group is used by at least one rule.
 
 - 
getGrouppublic GroupReference getGroup(String groupName) - Returns:
- the group reference corresponding to the specified group name if the group is used by at least one rule or plugin value.
 
 - 
getAllGroupUUIDspublic Set<AccountGroup.UUID> getAllGroupUUIDs() - Returns:
- set of all groups used by this configuration.
 
 - 
getRulesIdpublic org.eclipse.jgit.lib.ObjectId getRulesId() - Returns:
- the project's rules.pl ObjectId, if present in the branch. Null if it doesn't exist.
 
 - 
getMaxObjectSizeLimitpublic long getMaxObjectSizeLimit() - Returns:
- the maxObjectSizeLimit configured on this project, or zero if not configured.
 
 - 
getCheckReceivedObjectspublic boolean getCheckReceivedObjects() - Returns:
- the checkReceivedObjects for this project, default is true.
 
 - 
updateGroupNamespublic boolean updateGroupNames(GroupBackend groupBackend) Check all GroupReferences use current group name, repairing stale ones.- Parameters:
- groupBackend- cache to use when looking up group information by UUID.
- Returns:
- true if one or more group names was stale.
 
 - 
getValidationErrorspublic List<ValidationError> getValidationErrors() Get the validation errors, if any were discovered during load.- Returns:
- list of errors; empty list if there are no errors.
 
 - 
getRefNameprotected String getRefName() - Specified by:
- getRefNamein class- VersionedMetaData
- Returns:
- name of the reference storing this configuration.
 
 - 
onLoadprotected void onLoad() throws IOException, org.eclipse.jgit.errors.ConfigInvalidExceptionDescription copied from class:VersionedMetaDataSet up the metadata, parsing any state from the loaded revision.- Specified by:
- onLoadin class- VersionedMetaData
- Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
getPluginConfigpublic PluginConfig getPluginConfig(String pluginName) 
 - 
onSaveprotected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws IOException, org.eclipse.jgit.errors.ConfigInvalidExceptionDescription copied from class:VersionedMetaDataSave any changes to the metadata in a commit.- Specified by:
- onSavein class- VersionedMetaData
- Returns:
- true if the commit should proceed, false to abort.
- Throws:
- IOException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
validMaxObjectSizeLimitpublic static String validMaxObjectSizeLimit(String value) throws org.eclipse.jgit.errors.ConfigInvalidException - Throws:
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
errorpublic void error(ValidationError error) - Specified by:
- errorin interface- ValidationError.Sink
 
 - 
hasLegacyPermissionspublic boolean hasLegacyPermissions() 
 
- 
 
-