Rename instances of TransferConfig to transferConfig

This makes it easier to see what type of config we're looking at
without having to jump up to where it's defined.

Change-Id: I6bed5de1b081a7f1e3e4143852564b19de2b0225
This commit is contained in:
David Pursehouse
2018-08-03 16:02:25 +01:00
parent 6a260ba187
commit 7b0bb0f103
3 changed files with 13 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ public class ConfigInfoImpl extends ConfigInfo {
public ConfigInfoImpl( public ConfigInfoImpl(
boolean serverEnableSignedPush, boolean serverEnableSignedPush,
ProjectControl control, ProjectControl control,
TransferConfig config, TransferConfig transferConfig,
DynamicMap<ProjectConfigEntry> pluginConfigEntries, DynamicMap<ProjectConfigEntry> pluginConfigEntries,
PluginConfigFactory cfgFactory, PluginConfigFactory cfgFactory,
AllProjectsName allProjects, AllProjectsName allProjects,
@@ -100,11 +100,12 @@ public class ConfigInfoImpl extends ConfigInfo {
MaxObjectSizeLimitInfo maxObjectSizeLimit = new MaxObjectSizeLimitInfo(); MaxObjectSizeLimitInfo maxObjectSizeLimit = new MaxObjectSizeLimitInfo();
maxObjectSizeLimit.value = maxObjectSizeLimit.value =
config.getEffectiveMaxObjectSizeLimit(projectState) == config.getMaxObjectSizeLimit() transferConfig.getEffectiveMaxObjectSizeLimit(projectState)
? config.getFormattedMaxObjectSizeLimit() == transferConfig.getMaxObjectSizeLimit()
? transferConfig.getFormattedMaxObjectSizeLimit()
: p.getMaxObjectSizeLimit(); : p.getMaxObjectSizeLimit();
maxObjectSizeLimit.configuredValue = p.getMaxObjectSizeLimit(); maxObjectSizeLimit.configuredValue = p.getMaxObjectSizeLimit();
maxObjectSizeLimit.inheritedValue = config.getFormattedMaxObjectSizeLimit(); maxObjectSizeLimit.inheritedValue = transferConfig.getFormattedMaxObjectSizeLimit();
this.maxObjectSizeLimit = maxObjectSizeLimit; this.maxObjectSizeLimit = maxObjectSizeLimit;
this.submitType = p.getSubmitType(); this.submitType = p.getSubmitType();

View File

@@ -29,7 +29,7 @@ import com.google.inject.Singleton;
@Singleton @Singleton
public class GetConfig implements RestReadView<ProjectResource> { public class GetConfig implements RestReadView<ProjectResource> {
private final boolean serverEnableSignedPush; private final boolean serverEnableSignedPush;
private final TransferConfig config; private final TransferConfig transferConfig;
private final DynamicMap<ProjectConfigEntry> pluginConfigEntries; private final DynamicMap<ProjectConfigEntry> pluginConfigEntries;
private final PluginConfigFactory cfgFactory; private final PluginConfigFactory cfgFactory;
private final AllProjectsName allProjects; private final AllProjectsName allProjects;
@@ -38,13 +38,13 @@ public class GetConfig implements RestReadView<ProjectResource> {
@Inject @Inject
public GetConfig( public GetConfig(
@EnableSignedPush boolean serverEnableSignedPush, @EnableSignedPush boolean serverEnableSignedPush,
TransferConfig config, TransferConfig transferConfig,
DynamicMap<ProjectConfigEntry> pluginConfigEntries, DynamicMap<ProjectConfigEntry> pluginConfigEntries,
PluginConfigFactory cfgFactory, PluginConfigFactory cfgFactory,
AllProjectsName allProjects, AllProjectsName allProjects,
DynamicMap<RestView<ProjectResource>> views) { DynamicMap<RestView<ProjectResource>> views) {
this.serverEnableSignedPush = serverEnableSignedPush; this.serverEnableSignedPush = serverEnableSignedPush;
this.config = config; this.transferConfig = transferConfig;
this.pluginConfigEntries = pluginConfigEntries; this.pluginConfigEntries = pluginConfigEntries;
this.allProjects = allProjects; this.allProjects = allProjects;
this.cfgFactory = cfgFactory; this.cfgFactory = cfgFactory;
@@ -56,7 +56,7 @@ public class GetConfig implements RestReadView<ProjectResource> {
return new ConfigInfoImpl( return new ConfigInfoImpl(
serverEnableSignedPush, serverEnableSignedPush,
resource.getControl(), resource.getControl(),
config, transferConfig,
pluginConfigEntries, pluginConfigEntries,
cfgFactory, cfgFactory,
allProjects, allProjects,

View File

@@ -58,7 +58,7 @@ public class PutConfig implements RestModifyView<ProjectResource, ConfigInput> {
private final Provider<MetaDataUpdate.User> metaDataUpdateFactory; private final Provider<MetaDataUpdate.User> metaDataUpdateFactory;
private final ProjectCache projectCache; private final ProjectCache projectCache;
private final ProjectState.Factory projectStateFactory; private final ProjectState.Factory projectStateFactory;
private final TransferConfig config; private final TransferConfig transferConfig;
private final DynamicMap<ProjectConfigEntry> pluginConfigEntries; private final DynamicMap<ProjectConfigEntry> pluginConfigEntries;
private final PluginConfigFactory cfgFactory; private final PluginConfigFactory cfgFactory;
private final AllProjectsName allProjects; private final AllProjectsName allProjects;
@@ -71,7 +71,7 @@ public class PutConfig implements RestModifyView<ProjectResource, ConfigInput> {
Provider<MetaDataUpdate.User> metaDataUpdateFactory, Provider<MetaDataUpdate.User> metaDataUpdateFactory,
ProjectCache projectCache, ProjectCache projectCache,
ProjectState.Factory projectStateFactory, ProjectState.Factory projectStateFactory,
TransferConfig config, TransferConfig transferConfig,
DynamicMap<ProjectConfigEntry> pluginConfigEntries, DynamicMap<ProjectConfigEntry> pluginConfigEntries,
PluginConfigFactory cfgFactory, PluginConfigFactory cfgFactory,
AllProjectsName allProjects, AllProjectsName allProjects,
@@ -81,7 +81,7 @@ public class PutConfig implements RestModifyView<ProjectResource, ConfigInput> {
this.metaDataUpdateFactory = metaDataUpdateFactory; this.metaDataUpdateFactory = metaDataUpdateFactory;
this.projectCache = projectCache; this.projectCache = projectCache;
this.projectStateFactory = projectStateFactory; this.projectStateFactory = projectStateFactory;
this.config = config; this.transferConfig = transferConfig;
this.pluginConfigEntries = pluginConfigEntries; this.pluginConfigEntries = pluginConfigEntries;
this.cfgFactory = cfgFactory; this.cfgFactory = cfgFactory;
this.allProjects = allProjects; this.allProjects = allProjects;
@@ -176,7 +176,7 @@ public class PutConfig implements RestModifyView<ProjectResource, ConfigInput> {
return new ConfigInfoImpl( return new ConfigInfoImpl(
serverEnableSignedPush, serverEnableSignedPush,
state.controlFor(user.get()), state.controlFor(user.get()),
config, transferConfig,
pluginConfigEntries, pluginConfigEntries,
cfgFactory, cfgFactory,
allProjects, allProjects,