public class ProjectConfig extends VersionedMetaData
VersionedMetaData.BatchMetaDataUpdate| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
COMMENTLINK |
static java.lang.String |
PROJECT_CONFIG |
inserter, newTree, reader| Constructor and Description |
|---|
ProjectConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName) |
| Modifier and Type | Method and Description |
|---|---|
static CommentLinkInfo |
buildCommentLink(org.eclipse.jgit.lib.Config cfg,
java.lang.String name,
boolean allowRaw) |
com.google.gerrit.common.data.AccessSection |
getAccessSection(java.lang.String name) |
com.google.gerrit.common.data.AccessSection |
getAccessSection(java.lang.String name,
boolean create) |
java.util.Collection<com.google.gerrit.common.data.AccessSection> |
getAccessSections() |
AccountsSection |
getAccountsSection() |
java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> |
getAllGroupUUIDs() |
BranchOrderSection |
getBranchOrderSection() |
boolean |
getCheckReceivedObjects() |
java.util.Collection<CommentLinkInfo> |
getCommentLinkSections() |
com.google.gerrit.common.data.ContributorAgreement |
getContributorAgreement(java.lang.String name) |
com.google.gerrit.common.data.ContributorAgreement |
getContributorAgreement(java.lang.String name,
boolean create) |
java.util.Collection<com.google.gerrit.common.data.ContributorAgreement> |
getContributorAgreements() |
com.google.gerrit.common.data.GroupReference |
getGroup(com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid) |
java.util.Map<java.lang.String,com.google.gerrit.common.data.LabelType> |
getLabelSections() |
long |
getMaxObjectSizeLimit() |
ConfiguredMimeTypes |
getMimeTypes() |
java.util.Collection<NotifyConfig> |
getNotifyConfigs() |
PluginConfig |
getPluginConfig(java.lang.String pluginName) |
com.google.gerrit.reviewdb.client.Project |
getProject() |
protected java.lang.String |
getRefName() |
org.eclipse.jgit.lib.ObjectId |
getRulesId() |
java.util.List<ValidationError> |
getValidationErrors()
Get the validation errors, if any were discovered during load.
|
protected void |
onLoad()
Set up the metadata, parsing any state from the loaded revision.
|
protected boolean |
onSave(org.eclipse.jgit.lib.CommitBuilder commit)
Save any changes to the metadata in a commit.
|
static ProjectConfig |
read(MetaDataUpdate update) |
static ProjectConfig |
read(MetaDataUpdate update,
org.eclipse.jgit.lib.ObjectId id) |
void |
remove(com.google.gerrit.common.data.AccessSection section) |
void |
remove(com.google.gerrit.common.data.ContributorAgreement section) |
void |
replace(com.google.gerrit.common.data.AccessSection section) |
void |
replace(com.google.gerrit.common.data.ContributorAgreement section) |
com.google.gerrit.common.data.GroupReference |
resolve(com.google.gerrit.reviewdb.client.AccountGroup group) |
com.google.gerrit.common.data.GroupReference |
resolve(com.google.gerrit.common.data.GroupReference group) |
boolean |
updateGroupNames(GroupBackend groupBackend)
Check all GroupReferences use current group name, repairing stale ones.
|
static java.lang.String |
validMaxObjectSizeLimit(java.lang.String value) |
commit, commitToNewRef, getObjectId, getRevision, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, setpublic static final java.lang.String COMMENTLINK
public static final java.lang.String PROJECT_CONFIG
public ProjectConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName)
public static ProjectConfig read(MetaDataUpdate update) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic static ProjectConfig read(MetaDataUpdate update, org.eclipse.jgit.lib.ObjectId id) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic static CommentLinkInfo buildCommentLink(org.eclipse.jgit.lib.Config cfg, java.lang.String name, boolean allowRaw) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic com.google.gerrit.reviewdb.client.Project getProject()
public AccountsSection getAccountsSection()
public com.google.gerrit.common.data.AccessSection getAccessSection(java.lang.String name)
public com.google.gerrit.common.data.AccessSection getAccessSection(java.lang.String name,
boolean create)
public java.util.Collection<com.google.gerrit.common.data.AccessSection> getAccessSections()
public BranchOrderSection getBranchOrderSection()
public void remove(com.google.gerrit.common.data.AccessSection section)
public void replace(com.google.gerrit.common.data.AccessSection section)
public com.google.gerrit.common.data.ContributorAgreement getContributorAgreement(java.lang.String name)
public com.google.gerrit.common.data.ContributorAgreement getContributorAgreement(java.lang.String name,
boolean create)
public java.util.Collection<com.google.gerrit.common.data.ContributorAgreement> getContributorAgreements()
public void remove(com.google.gerrit.common.data.ContributorAgreement section)
public void replace(com.google.gerrit.common.data.ContributorAgreement section)
public java.util.Collection<NotifyConfig> getNotifyConfigs()
public java.util.Map<java.lang.String,com.google.gerrit.common.data.LabelType> getLabelSections()
public java.util.Collection<CommentLinkInfo> getCommentLinkSections()
public ConfiguredMimeTypes getMimeTypes()
public com.google.gerrit.common.data.GroupReference resolve(com.google.gerrit.reviewdb.client.AccountGroup group)
public com.google.gerrit.common.data.GroupReference resolve(com.google.gerrit.common.data.GroupReference group)
public com.google.gerrit.common.data.GroupReference getGroup(com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid)
public java.util.Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> getAllGroupUUIDs()
public org.eclipse.jgit.lib.ObjectId getRulesId()
public long getMaxObjectSizeLimit()
public boolean getCheckReceivedObjects()
public boolean updateGroupNames(GroupBackend groupBackend)
groupBackend - cache to use when looking up group information by UUID.public java.util.List<ValidationError> getValidationErrors()
protected java.lang.String getRefName()
getRefName in class VersionedMetaDataprotected void onLoad()
throws java.io.IOException,
org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaDataonLoad in class VersionedMetaDatajava.io.IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic PluginConfig getPluginConfig(java.lang.String pluginName)
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit)
throws java.io.IOException,
org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaDataonSave in class VersionedMetaDatajava.io.IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic static final java.lang.String validMaxObjectSizeLimit(java.lang.String value)
throws org.eclipse.jgit.errors.ConfigInvalidException
org.eclipse.jgit.errors.ConfigInvalidException