code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Override
public void addAgentIfNew(String uuid) {
EnvironmentAgentConfig envAgentConfig = new EnvironmentAgentConfig(uuid);
if (!agents.contains(envAgentConfig)) {
agents.add(envAgentConfig);
}
} | Understands the current persistent information related to a logical grouping of machines | addAgentIfNew | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void removeAgent(String uuid) {
agents.remove(new EnvironmentAgentConfig(uuid));
} | Understands the current persistent information related to a logical grouping of machines | removeAgent | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean hasName(final CaseInsensitiveString environmentName) {
return name.equals(environmentName);
} | Understands the current persistent information related to a logical grouping of machines | hasName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void addPipeline(final CaseInsensitiveString pipelineName) {
pipelines.add(new EnvironmentPipelineConfig(pipelineName));
} | Understands the current persistent information related to a logical grouping of machines | addPipeline | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void removePipeline(final CaseInsensitiveString pipelineName) {
pipelines.remove(new EnvironmentPipelineConfig(pipelineName));
} | Understands the current persistent information related to a logical grouping of machines | removePipeline | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean contains(String pipelineName) {
return pipelines.containsPipelineNamed(new CaseInsensitiveString(pipelineName));
} | Understands the current persistent information related to a logical grouping of machines | contains | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void validateContainsOnlyPipelines(List<CaseInsensitiveString> pipelineNames) {
pipelines.validateContainsOnlyPipelines(name, pipelineNames);
} | Understands the current persistent information related to a logical grouping of machines | validateContainsOnlyPipelines | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public CaseInsensitiveString name() {
return name;
} | Understands the current persistent information related to a logical grouping of machines | name | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
public void setName(CaseInsensitiveString name) {
this.name = name;
} | Understands the current persistent information related to a logical grouping of machines | setName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentAgentsConfig getAgents() {
return agents;
} | Understands the current persistent information related to a logical grouping of machines | getAgents | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
public void setAgents(List<EnvironmentAgentConfig> agents) {
this.agents.clear();
this.agents.addAll(agents);
} | Understands the current persistent information related to a logical grouping of machines | setAgents | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
EnvironmentConfig that = as(EnvironmentConfig.class, o);
if (that == null)
return false;
if (agents != null ? !agents.equals(that.getAgents()) : that.getAgents() != null) {
... | Understands the current persistent information related to a logical grouping of machines | equals | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public int hashCode() {
int result = (name != null ? name.hashCode() : 0);
result = 31 * result + (agents != null ? agents.hashCode() : 0);
result = 31 * result + (pipelines != null ? pipelines.hashCode() : 0);
result = 31 * result + (variables != null ? variables.hashCode(... | Understands the current persistent information related to a logical grouping of machines | hashCode | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
private static <T> T as(Class<T> clazz, Object o) {
if (clazz.isInstance(o)) {
return clazz.cast(o);
}
return null;
} | Understands the current persistent information related to a logical grouping of machines | as | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
} | Understands the current persistent information related to a logical grouping of machines | toString | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void addEnvironmentVariable(String name, String value) {
variables.add(new EnvironmentVariableConfig(name.trim(), value));
} | Understands the current persistent information related to a logical grouping of machines | addEnvironmentVariable | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void addEnvironmentVariable(EnvironmentVariableConfig variableConfig) {
variables.add(variableConfig);
} | Understands the current persistent information related to a logical grouping of machines | addEnvironmentVariable | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentVariableContext createEnvironmentContext() {
EnvironmentVariableContext context = new EnvironmentVariableContext(GO_ENVIRONMENT_NAME, str(name));
variables.addTo(context);
return context;
} | Understands the current persistent information related to a logical grouping of machines | createEnvironmentContext | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public List<CaseInsensitiveString> getPipelineNames() {
return pipelines.stream().map(EnvironmentPipelineConfig::getName).collect(toCollection(ArrayList::new));
} | Understands the current persistent information related to a logical grouping of machines | getPipelineNames | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentPipelinesConfig getPipelines() {
return pipelines;
} | Understands the current persistent information related to a logical grouping of machines | getPipelines | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
public void setPipelines(List<EnvironmentPipelineConfig> pipelines) {
this.pipelines.clear();
this.pipelines.addAll(pipelines);
} | Understands the current persistent information related to a logical grouping of machines | setPipelines | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean hasVariable(String variableName) {
return variables.hasVariable(variableName);
} | Understands the current persistent information related to a logical grouping of machines | hasVariable | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentVariablesConfig getVariables() {
return variables;
} | Understands the current persistent information related to a logical grouping of machines | getVariables | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
public void setVariables(EnvironmentVariablesConfig environmentVariables) {
this.variables = environmentVariables;
} | Understands the current persistent information related to a logical grouping of machines | setVariables | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@SuppressWarnings("unchecked")
@Override
public void setConfigAttributes(Object attributes) {
if (attributes == null) {
return;
}
Map<String, String> attributeMap = (Map<String, String>) attributes;
if (attributeMap.containsKey(NAME_FIELD)) {
name = new C... | Understands the current persistent information related to a logical grouping of machines | setConfigAttributes | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentVariablesConfig getPlainTextVariables() {
return variables.getPlainTextVariables();
} | Understands the current persistent information related to a logical grouping of machines | getPlainTextVariables | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentVariablesConfig getSecureVariables() {
return variables.getSecureVariables();
} | Understands the current persistent information related to a logical grouping of machines | getSecureVariables | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentConfig getLocal() {
return this.isLocal() ? this : null;
} | Understands the current persistent information related to a logical grouping of machines | getLocal | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public ConfigOrigin getOrigin() {
return origin;
} | Understands the current persistent information related to a logical grouping of machines | getOrigin | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public void setOrigins(ConfigOrigin origins) {
this.origin = origins;
this.variables.forEach(envVarConfig -> envVarConfig.setOrigins(origins));
} | Understands the current persistent information related to a logical grouping of machines | setOrigins | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentPipelinesConfig getRemotePipelines() {
return this.isLocal() ? new EnvironmentPipelinesConfig() : this.pipelines;
} | Understands the current persistent information related to a logical grouping of machines | getRemotePipelines | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public EnvironmentAgentsConfig getLocalAgents() {
return this.isLocal() ? this.agents : new EnvironmentAgentsConfig();
} | Understands the current persistent information related to a logical grouping of machines | getLocalAgents | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean isLocal() {
return this.origin == null || this.origin.isLocal();
} | Understands the current persistent information related to a logical grouping of machines | isLocal | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean isEnvironmentEmpty() {
return variables.isEmpty() && agents.isEmpty() && pipelines.isEmpty();
} | Understands the current persistent information related to a logical grouping of machines | isEnvironmentEmpty | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean containsPipelineRemotely(CaseInsensitiveString pipelineName) {
return !this.isLocal() && this.containsPipeline(pipelineName);
} | Understands the current persistent information related to a logical grouping of machines | containsPipelineRemotely | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean containsAgentRemotely(String uuid) {
return !this.isLocal() && this.hasAgent(uuid);
} | Understands the current persistent information related to a logical grouping of machines | containsAgentRemotely | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
@Override
public boolean containsEnvironmentVariableRemotely(String variableName) {
return !this.isLocal() && this.getVariables().hasVariable(variableName);
} | Understands the current persistent information related to a logical grouping of machines | containsEnvironmentVariableRemotely | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/BasicEnvironmentConfig.java | Apache-2.0 |
public static <T> T instantiateConfigElement(GoCipher goCipher, Class<T> toGenerate) {
try {
boolean isPasswordEncrypter = PasswordEncrypter.class.isAssignableFrom(toGenerate);
Constructor<T> tConstructor = isPasswordEncrypter ? toGenerate.getDeclaredConstructor(GoCipher.class) : toGener... | Understands creating instance of a config element class | instantiateConfigElement | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigElementInstantiator.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigElementInstantiator.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof ConfigSaveValidationContext that)) {
return false;
}
if (immediateParent != null ? !immediateParent.equals(that.immediateParent) : that.immediateParent != n... | Understands providing right state required to validate a given config element | equals | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public int hashCode() {
int result = immediateParent != null ? immediateParent.hashCode() : 0;
result = 31 * result + (parentContext != null ? parentContext.hashCode() : 0);
return result;
} | Understands providing right state required to validate a given config element | hashCode | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public ConfigSaveValidationContext withParent(Validatable current) {
return new ConfigSaveValidationContext(current, this);
} | Understands providing right state required to validate a given config element | withParent | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public CruiseConfig getCruiseConfig() {
return loadFirstOfType(CruiseConfig.class);
} | Understands providing right state required to validate a given config element | getCruiseConfig | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public RulesValidationContext getRulesValidationContext() {
RulesAware rulesAware = loadFirstOfType(RulesAware.class);
return new RulesValidationContext(rulesAware.allowedActions(), rulesAware.allowedTypes());
} | Understands providing right state required to validate a given config element | getRulesValidationContext | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public PolicyValidationContext getPolicyValidationContext() {
PolicyAware policyAware = loadFirstOfType(PolicyAware.class);
return new PolicyValidationContext(policyAware.allowedActions(), policyAware.allowedTypes());
} | Understands providing right state required to validate a given config element | getPolicyValidationContext | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public ConfigReposConfig getConfigRepos() {
return getCruiseConfig().getConfigRepos();
} | Understands providing right state required to validate a given config element | getConfigRepos | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public JobConfig getJob() {
return loadFirstOfType(JobConfig.class);
} | Understands providing right state required to validate a given config element | getJob | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
private <T> T loadFirstOfType(Class<T> klass) {
T obj = getFirstOfType(klass);
if (obj == null) {
throw new IllegalArgumentException(String.format("Could not find an object of type '%s'.", klass.getCanonicalName()));
}
return obj;
} | Understands providing right state required to validate a given config element | loadFirstOfType | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@SuppressWarnings("unchecked")
private <T> T getFirstOfType(Class<T> klass) {
return (T) objectOfType.computeIfAbsent(klass, this::_getFirstOfType);
} | Understands providing right state required to validate a given config element | getFirstOfType | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@SuppressWarnings("unchecked")
private <T> T _getFirstOfType(Class<T> klass) {
if (parentContext != null) {
T obj = parentContext.getFirstOfType(klass);
if (obj != null) {
return obj;
}
}
if (immediateParent == null) {
return n... | Understands providing right state required to validate a given config element | _getFirstOfType | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public StageConfig getStage() {
return loadFirstOfType(StageConfig.class);
} | Understands providing right state required to validate a given config element | getStage | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public PipelineConfig getPipeline() {
return loadFirstOfType(PipelineConfig.class);
} | Understands providing right state required to validate a given config element | getPipeline | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public PipelineTemplateConfig getTemplate() {
return loadFirstOfType(PipelineTemplateConfig.class);
} | Understands providing right state required to validate a given config element | getTemplate | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public PipelineConfig getPipelineConfigByName(CaseInsensitiveString pipelineName) {
return getCruiseConfig().getPipelineConfigByName(pipelineName);
} | Understands providing right state required to validate a given config element | getPipelineConfigByName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean shouldCheckConfigRepo() {
return true;
} | Understands providing right state required to validate a given config element | shouldCheckConfigRepo | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public SecurityConfig getServerSecurityConfig() {
return getCruiseConfig().server().security();
} | Understands providing right state required to validate a given config element | getServerSecurityConfig | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean doesTemplateExist(CaseInsensitiveString template) {
return getCruiseConfig().getTemplates().hasTemplateNamed(template);
} | Understands providing right state required to validate a given config element | doesTemplateExist | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public SCM findScmById(String scmID) {
return getCruiseConfig().getSCMs().find(scmID);
} | Understands providing right state required to validate a given config element | findScmById | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public PackageRepository findPackageById(String packageId) {
return getCruiseConfig().getPackageRepositories().findPackageRepositoryHaving(packageId);
} | Understands providing right state required to validate a given config element | findPackageById | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public String getParentDisplayName() {
return getParentType().getAnnotation(ConfigTag.class).value();
} | Understands providing right state required to validate a given config element | getParentDisplayName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
private Class<? extends Validatable> getParentType() {
return getParent().getClass();
} | Understands providing right state required to validate a given config element | getParentType | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public Validatable getParent() {
return immediateParent;
} | Understands providing right state required to validate a given config element | getParent | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean isWithinTemplates() {
return hasParentOfType(TemplatesConfig.class);
} | Understands providing right state required to validate a given config element | isWithinTemplates | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean isWithinPipelines() {
return hasParentOfType(PipelineConfigs.class);
} | Understands providing right state required to validate a given config element | isWithinPipelines | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean isWithinEnvironment() {
return hasParentOfType(EnvironmentConfig.class);
} | Understands providing right state required to validate a given config element | isWithinEnvironment | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
private <T> boolean hasParentOfType(Class<T> validatable) {
return getFirstOfType(validatable) != null;
} | Understands providing right state required to validate a given config element | hasParentOfType | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public PipelineConfigs getPipelineGroup() {
return loadFirstOfType(PipelineConfigs.class);
} | Understands providing right state required to validate a given config element | getPipelineGroup | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public EnvironmentConfig getEnvironment() {
return loadFirstOfType(EnvironmentConfig.class);
} | Understands providing right state required to validate a given config element | getEnvironment | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public String toString() {
return "ValidationContext{" +
"immediateParent=" + immediateParent +
", parentContext=" + parentContext +
'}';
} | Understands providing right state required to validate a given config element | toString | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean isValidProfileId(String profileId) {
return this.getCruiseConfig().getElasticConfig().getProfiles().find(profileId) != null;
} | Understands providing right state required to validate a given config element | isValidProfileId | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public ClusterProfiles getClusterProfiles() {
return this.getCruiseConfig().getElasticConfig().getClusterProfiles();
} | Understands providing right state required to validate a given config element | getClusterProfiles | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean shouldNotCheckRole() {
return isWithinTemplates();
} | Understands providing right state required to validate a given config element | shouldNotCheckRole | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public ArtifactStores artifactStores() {
return this.getCruiseConfig().getArtifactStores();
} | Understands providing right state required to validate a given config element | artifactStores | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
public static ConfigSaveValidationContext forChain(Validatable... validatables) {
ConfigSaveValidationContext tail = new ConfigSaveValidationContext(null);
for (Validatable validatable : validatables) {
tail = tail.withParent(validatable);
}
return tail;
} | Understands providing right state required to validate a given config element | forChain | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public MaterialConfigs getAllMaterialsByFingerPrint(String fingerprint) {
if (fingerprintToMaterials == null || fingerprintToMaterials.isEmpty()) {
primeForMaterialValidations();
}
MaterialConfigs matchingMaterials = fingerprintToMaterials.get(fingerprint);
retu... | Understands providing right state required to validate a given config element | getAllMaterialsByFingerPrint | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public Map<CaseInsensitiveString, Boolean> getPipelineToMaterialAutoUpdateMapByFingerprint(String fingerprint) {
Map<CaseInsensitiveString, Boolean> map = new HashMap<>();
getCruiseConfig().getAllPipelineConfigs().forEach(pipeline -> pipeline.materialConfigs().stream()
.fil... | Understands providing right state required to validate a given config element | getPipelineToMaterialAutoUpdateMapByFingerprint | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
private void primeForMaterialValidations() {
CruiseConfig cruiseConfig = getCruiseConfig();
fingerprintToMaterials = new HashMap<>();
for (PipelineConfig pipelineConfig : cruiseConfig.getAllPipelineConfigs()) {
for (MaterialConfig material : pipelineConfig.materialConfigs()) {
... | Understands providing right state required to validate a given config element | primeForMaterialValidations | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/ConfigSaveValidationContext.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EncryptedVariableValueConfig that = (EncryptedVariableValueConfig) o;
if (value != null ? !value.equals... | Understands encrypted values for env variables | equals | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EncryptedVariableValueConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EncryptedVariableValueConfig.java | Apache-2.0 |
@Override
public int hashCode() {
return value != null ? value.hashCode() : 0;
} | Understands encrypted values for env variables | hashCode | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EncryptedVariableValueConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EncryptedVariableValueConfig.java | Apache-2.0 |
public String getValue() {
return value;
} | Understands encrypted values for env variables | getValue | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EncryptedVariableValueConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EncryptedVariableValueConfig.java | Apache-2.0 |
public boolean hasUuid(String uuid) {
return this.uuid.equals(uuid);
} | Understands a reference to an existing agent that is associated to an Environment | hasUuid | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
public boolean validateUuidPresent(CaseInsensitiveString name, Set<String> uuids) {
if (uuids == null || !uuids.contains(uuid)) {
this.addError(UUID, format("Environment '%s' has an invalid agent uuid '%s'", name, uuid));
}
return errors().isEmpty();
} | Understands a reference to an existing agent that is associated to an Environment | validateUuidPresent | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
public String getUuid() {
return uuid;
} | Understands a reference to an existing agent that is associated to an Environment | getUuid | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
public void setUuid(String uuid) {
this.uuid = uuid;
} | Understands a reference to an existing agent that is associated to an Environment | setUuid | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnvironmentAgentConfig that = (EnvironmentAgentConfig) o;
if (uuid != null ? !uuid.equals(that.uuid) : ... | Understands a reference to an existing agent that is associated to an Environment | equals | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
@Override
public int hashCode() {
return uuid != null ? uuid.hashCode() : 0;
} | Understands a reference to an existing agent that is associated to an Environment | hashCode | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
@Override
public void validate(ValidationContext validationContext) {
} | Understands a reference to an existing agent that is associated to an Environment | validate | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
@Override
public ConfigErrors errors() {
return configErrors;
} | Understands a reference to an existing agent that is associated to an Environment | errors | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
@Override
public void addError(String fieldName, String message) {
configErrors.add(fieldName, message);
} | Understands a reference to an existing agent that is associated to an Environment | addError | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentConfig.java | Apache-2.0 |
@Override
public void validate(ValidationContext validationContext) {
} | Understands references to existing agents that are associated to an Environment | validate | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | Apache-2.0 |
@Override
public ConfigErrors errors() {
return configErrors;
} | Understands references to existing agents that are associated to an Environment | errors | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | Apache-2.0 |
@Override
public void addError(String fieldName, String message) {
configErrors.add(fieldName, message);
} | Understands references to existing agents that are associated to an Environment | addError | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | Apache-2.0 |
public List<String> getUuids() {
return this.stream().map(EnvironmentAgentConfig::getUuid).collect(toList());
} | Understands references to existing agents that are associated to an Environment | getUuids | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | Apache-2.0 |
@SuppressWarnings("unchecked")
@Override
public void setConfigAttributes(Object attributes) {
if (attributes != null) {
this.clear();
((List<Map<String, String>>) attributes).forEach(attributeMap -> this.add(new EnvironmentAgentConfig(attributeMap.get("uuid"))));
}
} | Understands references to existing agents that are associated to an Environment | setConfigAttributes | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentAgentsConfig.java | Apache-2.0 |
default List<ConfigErrors> getAllErrors() {
return ErrorCollector.getAllErrors(this);
} | Understands the current persistent information related to a logical grouping of machines | getAllErrors | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentConfig.java | Apache-2.0 |
@Override
default boolean hasSecretParams() {
return getVariables().hasSecretParams();
} | Understands the current persistent information related to a logical grouping of machines | hasSecretParams | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentConfig.java | Apache-2.0 |
@Override
default SecretParams getSecretParams() {
return getVariables().getSecretParams();
} | Understands the current persistent information related to a logical grouping of machines | getSecretParams | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentConfig.java | Apache-2.0 |
public CaseInsensitiveString getName() {
return name;
} | Understands a reference to an existing pipeline that is associated to an Environment | getName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | Apache-2.0 |
public void setName(String pipelineName) {
setName(new CaseInsensitiveString(pipelineName));
} | Understands a reference to an existing pipeline that is associated to an Environment | setName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | Apache-2.0 |
public void setName(CaseInsensitiveString pipelineName) {
this.name = pipelineName;
} | Understands a reference to an existing pipeline that is associated to an Environment | setName | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | Apache-2.0 |
public boolean isReferenceOf(List<CaseInsensitiveString> pipelineNames) {
boolean matched = false;
for (CaseInsensitiveString name : pipelineNames) {
matched = sameAs(name) || matched;
}
return matched;
} | Understands a reference to an existing pipeline that is associated to an Environment | isReferenceOf | java | gocd/gocd | config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/EnvironmentPipelineConfig.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.