public class ProjectConfig extends VersionedMetaData
VersionedMetaData.BatchMetaDataUpdate| Modifier and Type | Field and Description |
|---|---|
static String |
COMMENTLINK |
static 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,
String name,
boolean allowRaw) |
com.google.gerrit.common.data.AccessSection |
getAccessSection(String name) |
com.google.gerrit.common.data.AccessSection |
getAccessSection(String name,
boolean create) |
Collection<com.google.gerrit.common.data.AccessSection> |
getAccessSections() |
AccountsSection |
getAccountsSection() |
Set<com.google.gerrit.reviewdb.client.AccountGroup.UUID> |
getAllGroupUUIDs() |
BranchOrderSection |
getBranchOrderSection() |
boolean |
getCheckReceivedObjects() |
Collection<CommentLinkInfo> |
getCommentLinkSections() |
com.google.gerrit.common.data.ContributorAgreement |
getContributorAgreement(String name) |
com.google.gerrit.common.data.ContributorAgreement |
getContributorAgreement(String name,
boolean create) |
Collection<com.google.gerrit.common.data.ContributorAgreement> |
getContributorAgreements() |
com.google.gerrit.common.data.GroupReference |
getGroup(com.google.gerrit.reviewdb.client.AccountGroup.UUID uuid) |
Map<String,com.google.gerrit.common.data.LabelType> |
getLabelSections() |
long |
getMaxObjectSizeLimit() |
ConfiguredMimeTypes |
getMimeTypes() |
Collection<NotifyConfig> |
getNotifyConfigs() |
PluginConfig |
getPluginConfig(String pluginName) |
com.google.gerrit.reviewdb.client.Project |
getProject() |
protected String |
getRefName() |
org.eclipse.jgit.lib.ObjectId |
getRulesId() |
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 String |
validMaxObjectSizeLimit(String value) |
commit, commitToNewRef, getObjectId, getRevision, load, load, load, load, openUpdate, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, setpublic static final String COMMENTLINK
public static final String PROJECT_CONFIG
public ProjectConfig(com.google.gerrit.reviewdb.client.Project.NameKey projectName)
public static ProjectConfig read(MetaDataUpdate update) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic static ProjectConfig read(MetaDataUpdate update, org.eclipse.jgit.lib.ObjectId id) throws IOException, org.eclipse.jgit.errors.ConfigInvalidException
IOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic static CommentLinkInfo buildCommentLink(org.eclipse.jgit.lib.Config cfg, String name, boolean allowRaw) throws IllegalArgumentException
IllegalArgumentExceptionpublic com.google.gerrit.reviewdb.client.Project getProject()
public AccountsSection getAccountsSection()
public com.google.gerrit.common.data.AccessSection getAccessSection(String name)
public com.google.gerrit.common.data.AccessSection getAccessSection(String name, boolean create)
public 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(String name)
public com.google.gerrit.common.data.ContributorAgreement getContributorAgreement(String name, boolean create)
public 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 Collection<NotifyConfig> getNotifyConfigs()
public 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 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 List<ValidationError> getValidationErrors()
protected String getRefName()
getRefName in class VersionedMetaDataprotected void onLoad()
throws IOException,
org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaDataonLoad in class VersionedMetaDataIOExceptionorg.eclipse.jgit.errors.ConfigInvalidExceptionpublic PluginConfig getPluginConfig(String pluginName)
protected boolean onSave(org.eclipse.jgit.lib.CommitBuilder commit)
throws IOException,
org.eclipse.jgit.errors.ConfigInvalidException
VersionedMetaDataonSave in class VersionedMetaDataIOExceptionorg.eclipse.jgit.errors.ConfigInvalidException