public class ProjectConfig extends VersionedMetaData implements ValidationError.Sink
VersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMMENTLINK |
static java.lang.String |
PROJECT_CONFIG |
inserter, newTree, reader, revision
Constructor and Description |
---|
ProjectConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName) |
Modifier and Type | Method and Description |
---|---|
void |
addSubscribeSection(com.google.gerrit.common.data.SubscribeSection s) |
static CommentLinkInfoImpl |
buildCommentLink(org.eclipse.jgit.lib.Config cfg,
java.lang.String name,
boolean allowRaw) |
void |
error(ValidationError error) |
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<CommentLinkInfoImpl> |
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() |
com.google.gerrit.reviewdb.client.Project.NameKey |
getName() |
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.Map<com.google.gerrit.reviewdb.client.Project.NameKey,com.google.gerrit.common.data.SubscribeSection> |
getSubscribeSections() |
java.util.Collection<com.google.gerrit.common.data.SubscribeSection> |
getSubscribeSections(com.google.gerrit.reviewdb.client.Branch.NameKey branch) |
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.
|
void |
putNotifyConfig(java.lang.String name,
NotifyConfig nc) |
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.AccessSection section,
com.google.gerrit.common.data.Permission permission) |
void |
remove(com.google.gerrit.common.data.AccessSection section,
com.google.gerrit.common.data.Permission permission,
com.google.gerrit.common.data.PermissionRule rule) |
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, getPathInfos, getRevision, load, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
public 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.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public static ProjectConfig read(MetaDataUpdate update, org.eclipse.jgit.lib.ObjectId id) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public static CommentLinkInfoImpl buildCommentLink(org.eclipse.jgit.lib.Config cfg, java.lang.String name, boolean allowRaw) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public com.google.gerrit.reviewdb.client.Project.NameKey getName()
public 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 java.util.Map<com.google.gerrit.reviewdb.client.Project.NameKey,com.google.gerrit.common.data.SubscribeSection> getSubscribeSections()
public java.util.Collection<com.google.gerrit.common.data.SubscribeSection> getSubscribeSections(com.google.gerrit.reviewdb.client.Branch.NameKey branch)
public void addSubscribeSection(com.google.gerrit.common.data.SubscribeSection s)
public void remove(com.google.gerrit.common.data.AccessSection section)
public void remove(com.google.gerrit.common.data.AccessSection section, com.google.gerrit.common.data.Permission permission)
public void remove(com.google.gerrit.common.data.AccessSection section, com.google.gerrit.common.data.Permission permission, com.google.gerrit.common.data.PermissionRule rule)
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 void putNotifyConfig(java.lang.String name, NotifyConfig nc)
public java.util.Map<java.lang.String,com.google.gerrit.common.data.LabelType> getLabelSections()
public java.util.Collection<CommentLinkInfoImpl> 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 VersionedMetaData
protected void onLoad() throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaData
onLoad
in class VersionedMetaData
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public PluginConfig getPluginConfig(java.lang.String pluginName)
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaData
onSave
in class VersionedMetaData
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public static final java.lang.String validMaxObjectSizeLimit(java.lang.String value) throws org.eclipse.jgit.errors.ConfigInvalidException
org.eclipse.jgit.errors.ConfigInvalidException
public void error(ValidationError error)
error
in interface ValidationError.Sink