public class ProjectConfig extends VersionedMetaData implements ValidationError.Sink
Modifier and Type | Class and Description |
---|---|
static class |
ProjectConfig.Factory |
VersionedMetaData.BatchMetaDataUpdate, VersionedMetaData.PathInfo
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACCESS |
static java.lang.String |
COMMENTLINK |
static java.lang.String |
KEY_ALLOW_POST_SUBMIT |
static java.lang.String |
KEY_BRANCH |
static java.lang.String |
KEY_CAN_OVERRIDE |
static java.lang.String |
KEY_COPY_ALL_SCORES_IF_NO_CHANGE |
static java.lang.String |
KEY_COPY_ALL_SCORES_IF_NO_CODE_CHANGE |
static java.lang.String |
KEY_COPY_ALL_SCORES_ON_MERGE_FIRST_PARENT_UPDATE |
static java.lang.String |
KEY_COPY_ALL_SCORES_ON_TRIVIAL_REBASE |
static java.lang.String |
KEY_COPY_MAX_SCORE |
static java.lang.String |
KEY_COPY_MIN_SCORE |
static java.lang.String |
KEY_DEFAULT_VALUE |
static java.lang.String |
KEY_FUNCTION |
static java.lang.String |
KEY_IGNORE_SELF_APPROVAL |
static java.lang.String |
KEY_VALUE |
static java.lang.String |
LABEL |
static java.lang.String |
PROJECT_CONFIG |
inserter, newTree, projectName, reader, revision, rw
Modifier and Type | Method and Description |
---|---|
void |
addCommentLinkSection(CommentLinkInfoImpl commentLink) |
void |
addSubscribeSection(SubscribeSection s) |
static CommentLinkInfoImpl |
buildCommentLink(org.eclipse.jgit.lib.Config cfg,
java.lang.String name,
boolean allowRaw) |
void |
error(ValidationError error) |
AccessSection |
getAccessSection(java.lang.String name) |
AccessSection |
getAccessSection(java.lang.String name,
boolean create) |
java.util.Collection<AccessSection> |
getAccessSections() |
AccountsSection |
getAccountsSection() |
java.util.Set<AccountGroup.UUID> |
getAllGroupUUIDs() |
BranchOrderSection |
getBranchOrderSection() |
boolean |
getCheckReceivedObjects() |
java.util.Collection<CommentLinkInfoImpl> |
getCommentLinkSections() |
ContributorAgreement |
getContributorAgreement(java.lang.String name) |
ContributorAgreement |
getContributorAgreement(java.lang.String name,
boolean create) |
java.util.Collection<ContributorAgreement> |
getContributorAgreements() |
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getExtensionPanelSections() |
GroupReference |
getGroup(AccountGroup.UUID uuid) |
GroupReference |
getGroup(java.lang.String groupName) |
java.util.Map<java.lang.String,LabelType> |
getLabelSections() |
long |
getMaxObjectSizeLimit() |
ConfiguredMimeTypes |
getMimeTypes() |
Project.NameKey |
getName() |
java.util.Collection<NotifyConfig> |
getNotifyConfigs() |
PluginConfig |
getPluginConfig(java.lang.String pluginName) |
Project |
getProject() |
protected java.lang.String |
getRefName() |
org.eclipse.jgit.lib.ObjectId |
getRulesId() |
java.util.Map<Project.NameKey,SubscribeSection> |
getSubscribeSections() |
java.util.Collection<SubscribeSection> |
getSubscribeSections(Branch.NameKey branch) |
java.util.List<ValidationError> |
getValidationErrors()
Get the validation errors, if any were discovered during load.
|
boolean |
hasLegacyPermissions() |
void |
load(org.eclipse.jgit.lib.Repository repo) |
void |
load(org.eclipse.jgit.lib.Repository repo,
org.eclipse.jgit.lib.ObjectId revision) |
void |
load(org.eclipse.jgit.revwalk.RevWalk rw,
org.eclipse.jgit.lib.ObjectId revision) |
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) |
void |
remove(AccessSection section) |
void |
remove(AccessSection section,
Permission permission) |
void |
remove(AccessSection section,
Permission permission,
PermissionRule rule) |
void |
remove(ContributorAgreement section) |
void |
replace(AccessSection section) |
void |
replace(ContributorAgreement section) |
GroupReference |
resolve(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, readConfig, readFile, readTree, readUTF8, saveConfig, saveFile, saveUTF8, set, set, set
public static final java.lang.String COMMENTLINK
public static final java.lang.String LABEL
public static final java.lang.String KEY_FUNCTION
public static final java.lang.String KEY_DEFAULT_VALUE
public static final java.lang.String KEY_COPY_MIN_SCORE
public static final java.lang.String KEY_ALLOW_POST_SUBMIT
public static final java.lang.String KEY_IGNORE_SELF_APPROVAL
public static final java.lang.String KEY_COPY_MAX_SCORE
public static final java.lang.String KEY_COPY_ALL_SCORES_ON_MERGE_FIRST_PARENT_UPDATE
public static final java.lang.String KEY_COPY_ALL_SCORES_ON_TRIVIAL_REBASE
public static final java.lang.String KEY_COPY_ALL_SCORES_IF_NO_CODE_CHANGE
public static final java.lang.String KEY_COPY_ALL_SCORES_IF_NO_CHANGE
public static final java.lang.String KEY_VALUE
public static final java.lang.String KEY_CAN_OVERRIDE
public static final java.lang.String KEY_BRANCH
public static final java.lang.String PROJECT_CONFIG
public static final java.lang.String ACCESS
public static CommentLinkInfoImpl buildCommentLink(org.eclipse.jgit.lib.Config cfg, java.lang.String name, boolean allowRaw) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public void addCommentLinkSection(CommentLinkInfoImpl commentLink)
public void load(org.eclipse.jgit.lib.Repository repo) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public void load(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.ObjectId revision) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public void load(org.eclipse.jgit.revwalk.RevWalk rw, org.eclipse.jgit.lib.ObjectId revision) throws java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException
java.io.IOException
org.eclipse.jgit.errors.ConfigInvalidException
public Project.NameKey getName()
public Project getProject()
public AccountsSection getAccountsSection()
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getExtensionPanelSections()
public AccessSection getAccessSection(java.lang.String name)
public AccessSection getAccessSection(java.lang.String name, boolean create)
public java.util.Collection<AccessSection> getAccessSections()
public BranchOrderSection getBranchOrderSection()
public java.util.Map<Project.NameKey,SubscribeSection> getSubscribeSections()
public java.util.Collection<SubscribeSection> getSubscribeSections(Branch.NameKey branch)
public void addSubscribeSection(SubscribeSection s)
public void remove(AccessSection section)
public void remove(AccessSection section, Permission permission)
public void remove(AccessSection section, Permission permission, PermissionRule rule)
public void replace(AccessSection section)
public ContributorAgreement getContributorAgreement(java.lang.String name)
public ContributorAgreement getContributorAgreement(java.lang.String name, boolean create)
public java.util.Collection<ContributorAgreement> getContributorAgreements()
public void remove(ContributorAgreement section)
public void replace(ContributorAgreement section)
public java.util.Collection<NotifyConfig> getNotifyConfigs()
public void putNotifyConfig(java.lang.String name, NotifyConfig nc)
public java.util.Map<java.lang.String,LabelType> getLabelSections()
public java.util.Collection<CommentLinkInfoImpl> getCommentLinkSections()
public ConfiguredMimeTypes getMimeTypes()
public GroupReference resolve(GroupReference group)
public GroupReference getGroup(AccountGroup.UUID uuid)
public GroupReference getGroup(java.lang.String groupName)
public java.util.Set<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 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
public boolean hasLegacyPermissions()