@Test public void getCmTemplate() { when(blueprintView.getBlueprintText()).thenReturn(getBlueprintText("input/clouderamanager.bp")); ApiClusterTemplate generated = generator.getCmTemplate(templatePreparationObject, getHostgroupMappings(), clouderaManagerRepo, null, null); assertMatchesBlueprintAtPath("output/clouderamanager.bp", generated); }
public ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings, ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName) { try { CmTemplateProcessor processor = getCmTemplateProcessor(source); processor.removeDanglingVariableReferences(); updateCmTemplateRepoDetails(processor, clouderaManagerRepoDetails, clouderaManagerProductDetails); updateCmTemplateConfiguration(processor, clouderaManagerRepoDetails, source, hostGroupMappings, sdxContextName); return processor.getTemplate(); } catch (IOException e) { String message = String.format("Unable to update cmTemplate with default properties which was: %s", source.getBlueprintView().getBlueprintText()); LOGGER.warn(message); throw new BlueprintProcessingException(message, e); } }
CentralCmTemplateUpdater implements BlueprintUpdater { public ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings, ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName) { try { CmTemplateProcessor processor = getCmTemplateProcessor(source); processor.removeDanglingVariableReferences(); updateCmTemplateRepoDetails(processor, clouderaManagerRepoDetails, clouderaManagerProductDetails); updateCmTemplateConfiguration(processor, clouderaManagerRepoDetails, source, hostGroupMappings, sdxContextName); return processor.getTemplate(); } catch (IOException e) { String message = String.format("Unable to update cmTemplate with default properties which was: %s", source.getBlueprintView().getBlueprintText()); LOGGER.warn(message); throw new BlueprintProcessingException(message, e); } } }
CentralCmTemplateUpdater implements BlueprintUpdater { public ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings, ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName) { try { CmTemplateProcessor processor = getCmTemplateProcessor(source); processor.removeDanglingVariableReferences(); updateCmTemplateRepoDetails(processor, clouderaManagerRepoDetails, clouderaManagerProductDetails); updateCmTemplateConfiguration(processor, clouderaManagerRepoDetails, source, hostGroupMappings, sdxContextName); return processor.getTemplate(); } catch (IOException e) { String message = String.format("Unable to update cmTemplate with default properties which was: %s", source.getBlueprintView().getBlueprintText()); LOGGER.warn(message); throw new BlueprintProcessingException(message, e); } }  }
CentralCmTemplateUpdater implements BlueprintUpdater { public ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings, ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName) { try { CmTemplateProcessor processor = getCmTemplateProcessor(source); processor.removeDanglingVariableReferences(); updateCmTemplateRepoDetails(processor, clouderaManagerRepoDetails, clouderaManagerProductDetails); updateCmTemplateConfiguration(processor, clouderaManagerRepoDetails, source, hostGroupMappings, sdxContextName); return processor.getTemplate(); } catch (IOException e) { String message = String.format("Unable to update cmTemplate with default properties which was: %s", source.getBlueprintView().getBlueprintText()); LOGGER.warn(message); throw new BlueprintProcessingException(message, e); } }  ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings,
            ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName); CmTemplateProcessor getCmTemplateProcessor(TemplatePreparationObject source); @Override String getBlueprintText(TemplatePreparationObject source); @Override String getVariant(); }
CentralCmTemplateUpdater implements BlueprintUpdater { public ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings, ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName) { try { CmTemplateProcessor processor = getCmTemplateProcessor(source); processor.removeDanglingVariableReferences(); updateCmTemplateRepoDetails(processor, clouderaManagerRepoDetails, clouderaManagerProductDetails); updateCmTemplateConfiguration(processor, clouderaManagerRepoDetails, source, hostGroupMappings, sdxContextName); return processor.getTemplate(); } catch (IOException e) { String message = String.format("Unable to update cmTemplate with default properties which was: %s", source.getBlueprintView().getBlueprintText()); LOGGER.warn(message); throw new BlueprintProcessingException(message, e); } }  ApiClusterTemplate getCmTemplate(TemplatePreparationObject source, Map<String, List<Map<String, String>>> hostGroupMappings,
            ClouderaManagerRepo clouderaManagerRepoDetails, List<ClouderaManagerProduct> clouderaManagerProductDetails, String sdxContextName); CmTemplateProcessor getCmTemplateProcessor(TemplatePreparationObject source); @Override String getBlueprintText(TemplatePreparationObject source); @Override String getVariant();  }