@Override public Config getRawTemplateConfig() throws SpecNotFoundException, TemplateException { ensureTemplatesResolved(); return getRawTemplateConfigHelper(Sets.<JobTemplate>newHashSet()); }
private Config getRawTemplateConfigHelper(Set<JobTemplate> alreadyInheritedTemplates) throws SpecNotFoundException, TemplateException { Config rawTemplate = getLocalRawTemplate(); for (JobTemplate template : Lists.reverse(this.superTemplates)) { if (!alreadyInheritedTemplates.contains(template)) { alreadyInheritedTemplates.add(template); Config thisFallback = template instanceof InheritingJobTemplate ? ((InheritingJobTemplate) template).getRawTemplateConfigHelper(alreadyInheritedTemplates) : template.getRawTemplateConfig(); rawTemplate = rawTemplate.withFallback(thisFallback); } } return rawTemplate; }
@Override public Config getRawTemplateConfig() throws SpecNotFoundException, TemplateException { ensureTemplatesResolved(); return getRawTemplateConfigHelper(Sets.<JobTemplate>newHashSet()); }
private Config getRawTemplateConfigHelper(Set<JobTemplate> alreadyInheritedTemplates) throws SpecNotFoundException, TemplateException { Config rawTemplate = getLocalRawTemplate(); for (JobTemplate template : Lists.reverse(this.superTemplates)) { if (!alreadyInheritedTemplates.contains(template)) { alreadyInheritedTemplates.add(template); Config thisFallback = template instanceof InheritingJobTemplate ? ((InheritingJobTemplate) template).getRawTemplateConfigHelper(alreadyInheritedTemplates) : template.getRawTemplateConfig(); rawTemplate = rawTemplate.withFallback(thisFallback); } } return rawTemplate; }