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
public PipelineConfig getCopyForEditing() { PipelineConfig pipelineConfig = (PipelineConfig) clone(); if (pipelineConfig.hasTemplate()) { pipelineConfig.clear(); } return pipelineConfig; }
Understands how a cruise pipeline is configured by the user
getCopyForEditing
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean dependsOn(final CaseInsensitiveString pipelineName) { for (MaterialConfig material : materialConfigs) { if (material instanceof DependencyMaterialConfig && ((DependencyMaterialConfig) material).getPipelineName().equals(pipelineName)) { return true; } ...
Understands how a cruise pipeline is configured by the user
dependsOn
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<DependencyMaterialConfig> dependencyMaterialConfigs() { List<DependencyMaterialConfig> materialConfigs = new ArrayList<>(); for (MaterialConfig material : this.materialConfigs) { if (material instanceof DependencyMaterialConfig) { materialConfigs.add((DependencyMa...
Understands how a cruise pipeline is configured by the user
dependencyMaterialConfigs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasVariableInScope(String variableName) { if (variables.hasVariable(variableName)) { return true; } for (StageConfig stageConfig : this) { if (stageConfig.hasVariableInScope(variableName)) { return true; } } retur...
Understands how a cruise pipeline is configured by the user
hasVariableInScope
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<CaseInsensitiveString> upstreamPipelines() { return materialConfigs.getDependentPipelineNames(); }
Understands how a cruise pipeline is configured by the user
upstreamPipelines
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasMaterial(MaterialConfig material) { return materialConfigs.hasMaterialWithFingerprint(material); }
Understands how a cruise pipeline is configured by the user
hasMaterial
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setParams(ParamsConfig paramsConfig) { this.params = paramsConfig; }
Understands how a cruise pipeline is configured by the user
setParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setParams(List<ParamConfig> paramsConfig) { setParams(new ParamsConfig(paramsConfig)); }
Understands how a cruise pipeline is configured by the user
setParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public ParamResolver applyOver(ParamResolver enclosingScope) { return enclosingScope.override(CLONER.deepClone(params)); }
Understands how a cruise pipeline is configured by the user
applyOver
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public ParamsConfig getParams() { return params; }
Understands how a cruise pipeline is configured by the user
getParams
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public void setConfigAttributes(Object attributes) { setConfigAttributes(attributes, null); }
Understands how a cruise pipeline is configured by the user
setConfigAttributes
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@SuppressWarnings("unchecked") public void setConfigAttributes(Object attributes, TaskFactory taskFactory) { if (attributes == null) { return; } Map<String, Object> attributeMap = (Map<String, Object>) attributes; if (attributeMap.containsKey(NAME)) { setName(...
Understands how a cruise pipeline is configured by the user
setConfigAttributes
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setName(String name) { this.name = new CaseInsensitiveString(name); }
Understands how a cruise pipeline is configured by the user
setName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setName(CaseInsensitiveString name) { this.name = name; }
Understands how a cruise pipeline is configured by the user
setName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void setConfigurationType(Map<String, Object> attributeMap) { String configurationType = (String) attributeMap.get(CONFIGURATION_TYPE); if (configurationType.equals(CONFIGURATION_TYPE_STAGES)) { return; } if (configurationType.equals(CONFIGURATION_TYPE_TEMPLATE)) { ...
Understands how a cruise pipeline is configured by the user
setConfigurationType
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void setIntegrationType(Map<String, Object> attributeMap) { trackingTool = TrackingTool.createTrackingTool(attributeMap); }
Understands how a cruise pipeline is configured by the user
setIntegrationType
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public String getConfigurationType() { if (hasTemplate()) { return CONFIGURATION_TYPE_TEMPLATE; } return CONFIGURATION_TYPE_STAGES; }
Understands how a cruise pipeline is configured by the user
getConfigurationType
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void incrementIndex(StageConfig stageToBeMoved) { moveStage(stageToBeMoved, 1); }
Understands how a cruise pipeline is configured by the user
incrementIndex
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void decrementIndex(StageConfig stageToBeMoved) { moveStage(stageToBeMoved, -1); }
Understands how a cruise pipeline is configured by the user
decrementIndex
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void moveStage(StageConfig moveMeStage, int moveBy) { int current = this.indexOf(moveMeStage); if (current == -1) { throw new RuntimeException(format("Cannot find the stage '%s' in pipeline '%s'", moveMeStage.name(), name())); } this.remove(moveMeStage); this....
Understands how a cruise pipeline is configured by the user
moveStage
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<StageConfig> allStagesBefore(CaseInsensitiveString stage) { List<StageConfig> stages = new ArrayList<>(); for (StageConfig stageConfig : this) { if (stage.equals(stageConfig.name())) { break; } stages.add(stageConfig); } ret...
Understands how a cruise pipeline is configured by the user
allStagesBefore
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<StageConfig> validStagesForFetchArtifact(PipelineConfig downstreamPipeline, CaseInsensitiveString currentDownstreamStage) { for (DependencyMaterialConfig dependencyMaterial : downstreamPipeline.dependencyMaterialConfigs()) { if (dependencyMaterial.getPipelineName().equals(name)) { ...
Understands how a cruise pipeline is configured by the user
validStagesForFetchArtifact
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<PipelineConfig> allFirstLevelUpstreamPipelines(CruiseConfig cruiseConfig) { List<PipelineConfig> pipelinesForFetchArtifact = new ArrayList<>(); for (DependencyMaterialConfig dependencyMaterial : dependencyMaterialConfigs()) { pipelinesForFetchArtifact.add(cruiseConfig.pipelineCon...
Understands how a cruise pipeline is configured by the user
allFirstLevelUpstreamPipelines
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public CommentRenderer getCommentRenderer() { return trackingTool(); }
Understands how a cruise pipeline is configured by the user
getCommentRenderer
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void validateNameUniqueness(Map<CaseInsensitiveString, PipelineConfig> pipelineNameMap) { PipelineConfig pipelineWithSameName = pipelineNameMap.get(name); if (pipelineWithSameName == null) { pipelineNameMap.put(name, this); } else { pipelineWithSameName.nameConflic...
Understands how a cruise pipeline is configured by the user
validateNameUniqueness
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
private void nameConflictError() { errors.add(NAME, format("You have defined multiple pipelines called '%s'. Pipeline names are case-insensitive and must be unique.", name)); }
Understands how a cruise pipeline is configured by the user
nameConflictError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<FetchTask> getFetchTasks() { List<FetchTask> fetchTasks = new ArrayList<>(); for (StageConfig stage : this) { for (JobConfig job : stage.getJobs()) { for (Task task : job.tasks()) { if (task instanceof FetchTask) { fetch...
Understands how a cruise pipeline is configured by the user
getFetchTasks
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void cleanupAllUsagesOfRole(Role roleToDelete) { for (StageConfig stageConfig : this) { stageConfig.cleanupAllUsagesOfRole(roleToDelete); } }
Understands how a cruise pipeline is configured by the user
cleanupAllUsagesOfRole
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void templatize(CaseInsensitiveString templateName) { clear(); this.templateName = templateName; this.templateApplied = false; }
Understands how a cruise pipeline is configured by the user
templatize
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean hasMaterialWithFingerprint(MaterialConfig materialConfig) { return this.materialConfigs.hasMaterialWithFingerprint(materialConfig); }
Understands how a cruise pipeline is configured by the user
hasMaterialWithFingerprint
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<PackageMaterialConfig> packageMaterialConfigs() { return materialConfigs().stream() .filter(materialConfig -> materialConfig instanceof PackageMaterialConfig) .map(x -> (PackageMaterialConfig) x) .collect(Collectors.toList()); }
Understands how a cruise pipeline is configured by the user
packageMaterialConfigs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public List<PluggableSCMMaterialConfig> pluggableSCMMaterialConfigs() { return materialConfigs().stream() .filter(materialConfig -> materialConfig instanceof PluggableSCMMaterialConfig) .map(x -> (PluggableSCMMaterialConfig) x) .collect(Collectors.toList()); }
Understands how a cruise pipeline is configured by the user
pluggableSCMMaterialConfigs
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public ConfigOrigin getOrigin() { return origin; }
Understands how a cruise pipeline is configured by the user
getOrigin
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public void setOrigins(ConfigOrigin origins) { this.origin = origins; }
Understands how a cruise pipeline is configured by the user
setOrigins
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setOrigin(ConfigOrigin origin) { this.origin = origin; }
Understands how a cruise pipeline is configured by the user
setOrigin
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public boolean isLocal() { return origin == null || this.origin.isLocal(); }
Understands how a cruise pipeline is configured by the user
isLocal
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setLock(boolean lock) { if (lock) this.lockExplicitly(); else this.unlockExplicitly(); }
Understands how a cruise pipeline is configured by the user
setLock
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public String getOriginDisplayName() { return getOrigin() != null ? getOrigin().displayName() : new FileConfigOrigin().displayName(); }
Understands how a cruise pipeline is configured by the user
getOriginDisplayName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public void setDisplayOrderWeight(int displayOrderWeight) { this.displayOrderWeight = displayOrderWeight; }
Understands how a cruise pipeline is configured by the user
setDisplayOrderWeight
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
public int getDisplayOrderWeight() { return displayOrderWeight; }
Understands how a cruise pipeline is configured by the user
getDisplayOrderWeight
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/PipelineConfig.java
Apache-2.0
@Override public void process(CruiseConfig cruiseConfig) { for (PipelineConfig pipelineConfig : cruiseConfig.getAllPipelineConfigs()) { if (pipelineConfig.hasTemplate()) { CaseInsensitiveString templateName = pipelineConfig.getTemplateName(); PipelineTemplateConfi...
Understands de-referencing template body into pipeline
process
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateExpansionPreprocessor.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateExpansionPreprocessor.java
Apache-2.0
public List<PipelineEditabilityInfo> getPipelines() { return pipelines; }
Understands a custom data structure for templates to editable pipelines.
getPipelines
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
Apache-2.0
public CaseInsensitiveString getTemplateName() { return templateName; }
Understands a custom data structure for templates to editable pipelines.
getTemplateName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
Apache-2.0
public boolean canEditTemplate() { return canEdit; }
Understands a custom data structure for templates to editable pipelines.
canEditTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
Apache-2.0
public boolean isAdminUser() { return isAdmin; }
Understands a custom data structure for templates to editable pipelines.
isAdminUser
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TemplateToPipelines that = (TemplateToPipelines) o; if (canEdit != that.canEdit) return false; if (isAdmin != that.isAdmin) return false; ...
Understands a custom data structure for templates to editable pipelines.
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
Apache-2.0
@Override public int hashCode() { int result = pipelines.hashCode(); result = 31 * result + templateName.hashCode(); result = 31 * result + (canEdit ? 1 : 0); result = 31 * result + (isAdmin ? 1 : 0); return result; }
Understands a custom data structure for templates to editable pipelines.
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TemplateToPipelines.java
Apache-2.0
public String getTimerSpec() { return timerSpec; }
Understands Configuration of a Pipeline cron timer
getTimerSpec
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
public boolean shouldTriggerOnlyOnChanges() { return onlyOnChanges; }
Understands Configuration of a Pipeline cron timer
shouldTriggerOnlyOnChanges
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
public boolean getOnlyOnChanges(){ return onlyOnChanges; }
Understands Configuration of a Pipeline cron timer
getOnlyOnChanges
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
public void setOnlyOnChanges(boolean onlyOnChanges){ this.onlyOnChanges = onlyOnChanges; }
Understands Configuration of a Pipeline cron timer
setOnlyOnChanges
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
public static TimerConfig createTimer(Object attributes) { @SuppressWarnings("unchecked") Map<String, String> timerConfigMap = (Map<String, String>) attributes; String timerSpec = timerConfigMap.get(TIMER_SPEC); if (timerSpec.isEmpty()) { return null; } String onlyOnC...
Understands Configuration of a Pipeline cron timer
createTimer
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
public boolean validateTree(ValidationContext validationContext) { validate(validationContext); return errors().isEmpty(); }
Understands Configuration of a Pipeline cron timer
validateTree
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
@Override public void validate(ValidationContext validationContext) { if (timerSpec == null) { errors.add(TIMER_SPEC, "Timer Spec can not be null."); return; } try { new CronExpression(timerSpec); } catch (ParseException pe) { errors.ad...
Understands Configuration of a Pipeline cron timer
validate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
@Override public ConfigErrors errors() { return errors; }
Understands Configuration of a Pipeline cron timer
errors
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
@Override public void addError(String fieldName, String message) { errors.add(fieldName, message); }
Understands Configuration of a Pipeline cron timer
addError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } TimerConfig that = (TimerConfig) o; return Objects.equals(timerSpec, that.timerSpec); }
Understands Configuration of a Pipeline cron timer
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
@Override public int hashCode() { return timerSpec != null ? timerSpec.hashCode() : 0; }
Understands Configuration of a Pipeline cron timer
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/TimerConfig.java
Apache-2.0
@Override public CaseInsensitiveString getName() { return name; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
public CaseInsensitiveString getMaterialName() { return name; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getMaterialName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public final Map<String, Object> getSqlCriteria() { if (sqlCriteria == null) { Map<String, Object> map = new LinkedHashMap<>(); map.put("type", type); appendCriteria(map); sqlCriteria = Collections.unmodifiableMap(map); } return sqlCr...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getSqlCriteria
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public final Map<String, Object> getAttributesForScope() { Map<String, Object> map = new LinkedHashMap<>(); map.put("type", type); map.put("autoUpdate", isAutoUpdate()); appendCriteria(map); return Collections.unmodifiableMap(map); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getAttributesForScope
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public String getFingerprint() { if (fingerprint == null) { fingerprint = generateFingerprintFromCriteria(getSqlCriteria()); } return fingerprint; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getFingerprint
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public String getPipelineUniqueFingerprint() { if (pipelineUniqueFingerprint == null) { Map<String, Object> basicCriteria = new LinkedHashMap<>(getSqlCriteria()); appendPipelineUniqueCriteria(basicCriteria); pipelineUniqueFingerprint = generateFingerprintFromCri...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getPipelineUniqueFingerprint
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
private String generateFingerprintFromCriteria(Map<String, Object> sqlCriteria) { List<String> list = new ArrayList<>(); for (Map.Entry<String, Object> criteria : sqlCriteria.entrySet()) { list.add(new StringBuilder().append(criteria.getKey()).append("=").append(criteria.getValue()).toString...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
generateFingerprintFromCriteria
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public String getTruncatedDisplayName() { String displayName = getDisplayName(); if (displayName.length() > TRUNCATED_NAME_MAX_LENGTH) { StringBuilder builder = new StringBuilder(); builder.append(displayName, 0, TRUNCATED_NAME_MAX_LENGTH / 2); builder.a...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getTruncatedDisplayName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public void setName(final CaseInsensitiveString name) { this.name = name; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
setName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public void setName(String name) { this.name = new CaseInsensitiveString(name); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
setName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public final String getType() { return type; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getType
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public String getShortRevision(String revision) { return revision; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
getShortRevision
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public final void validate(ValidationContext validationContext) { if (name != null && !StringUtils.isBlank(CaseInsensitiveString.str(name)) && !new NameTypeValidator().isNameValid(name)) { errors().add(MATERIAL_NAME, NameTypeValidator.errorMessage("material", name)); } ...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
validate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public boolean validateTree(ValidationContext validationContext) { validate(validationContext); validateExtras(validationContext); return errors().isEmpty(); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
validateTree
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public ConfigErrors errors() { return errors; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
errors
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public void addError(String fieldName, String message) { errors.add(fieldName, message); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
addError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public void validateNameUniqueness(Map<CaseInsensitiveString, AbstractMaterialConfig> map) { if (CaseInsensitiveString.isBlank(getName())) { return; } CaseInsensitiveString currentMaterialName = getName(); AbstractMaterialConfig materialWithSameName = map.get(cu...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
validateNameUniqueness
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public boolean isSameFlyweight(MaterialConfig other) { return getFingerprint().equals(other.getFingerprint()); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
isSameFlyweight
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
private void addNameConflictError() { errors.add("materialName", String.format( "You have defined multiple materials called '%s'. " + "Material names are case-insensitive and must be unique. " + "Note that for dependency materials the default mater...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
addNameConflictError
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } AbstractMaterialConfig that = (AbstractMaterialConfig) o; if (name != null ? !name.equals(that.name) : ...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
equals
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public int hashCode() { int result = name != null ? name.hashCode() : 0; result = 31 * result + (type != null ? type.hashCode() : 0); return result; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
hashCode
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public String toString() { return String.format("AbstractMaterial{name=%s, type=%s}", name, type); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
toString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@SuppressWarnings("unchecked") @Override public void setConfigAttributes(Object attributes) { resetCachedIdentityAttributes();//TODO: BUG: update this after making changes to attributes, because this is thread unsafe if primed by another thread when initialization is half way through(and the returning A...
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
setConfigAttributes
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override public boolean isUsedInLabelTemplate(PipelineConfig pipelineConfig) { CaseInsensitiveString materialName = getName(); return materialName != null && pipelineConfig.getLabelTemplate().toLowerCase().contains(String.format("${%s}", materialName.toLower())); }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
isUsedInLabelTemplate
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
protected void resetCachedIdentityAttributes() { sqlCriteria = null; pipelineUniqueFingerprint = null; }
CAREFUL!, this should be the same as the one used in migration 47_create_new_materials.sql
resetCachedIdentityAttributes
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/AbstractMaterialConfig.java
Apache-2.0
@Override protected void appendPipelineUniqueCriteria(Map<String, Object> basicCriteria) { basicCriteria.put("dest", folder); }
Understands a source control repository and its configuration
appendPipelineUniqueCriteria
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
@Override public boolean matches(String name, String regex) { if (regex.startsWith("/")) { regex = regex.substring(1); } return name.matches(regex); }
Understands a source control repository and its configuration
matches
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final GoCipher getGoCipher() { return goCipher; }
Understands a source control repository and its configuration
getGoCipher
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final void setUserName(String userName) { this.userName = userName; }
Understands a source control repository and its configuration
setUserName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final String getUserName() { return userName; }
Understands a source control repository and its configuration
getUserName
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
@Deprecated(since = "Use `getUserName` instead") public String getUsername() { return getUserName(); }
Understands a source control repository and its configuration
getUsername
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final String getPassword() { return currentPassword(); }
Understands a source control repository and its configuration
getPassword
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
protected void resetPassword(String passwordToSet) { if (isBlank(passwordToSet)) { encryptedPassword = null; } setPasswordIfNotBlank(passwordToSet); }
Understands a source control repository and its configuration
resetPassword
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
@PostConstruct public final void ensureEncrypted() { this.userName = stripToNull(this.userName); setPasswordIfNotBlank(password); }
Understands a source control repository and its configuration
ensureEncrypted
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
private void setPasswordIfNotBlank(String password) { this.password = stripToNull(password); this.encryptedPassword = stripToNull(encryptedPassword); if (this.password == null) { return; } try { this.encryptedPassword = this.goCipher.encrypt(password); ...
Understands a source control repository and its configuration
setPasswordIfNotBlank
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final String currentPassword() { try { return isBlank(encryptedPassword) ? null : this.goCipher.decrypt(encryptedPassword); } catch (Exception e) { throw new RuntimeException("Could not decrypt the password to get the real password", e); } }
Understands a source control repository and its configuration
currentPassword
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final void setEncryptedPassword(String encryptedPassword) { this.encryptedPassword = encryptedPassword; }
Understands a source control repository and its configuration
setEncryptedPassword
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public final String getEncryptedPassword() { return encryptedPassword; }
Understands a source control repository and its configuration
getEncryptedPassword
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
@Override public Filter filter() { if (filter == null) { return new Filter(); } return filter; }
Understands a source control repository and its configuration
filter
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public String getFilterAsString() { return filter().getStringForDisplay(); }
Understands a source control repository and its configuration
getFilterAsString
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public Filter rawFilter() { return filter; }
Understands a source control repository and its configuration
rawFilter
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0
public void setFilter(Filter filter) { this.filter = filter; }
Understands a source control repository and its configuration
setFilter
java
gocd/gocd
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
https://github.com/gocd/gocd/blob/master/config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Apache-2.0