@Test public void powerpointService() throws TemplateLoadException { assertNotNull(powerPointService); powerPointService.validateTemplate(); }
@SuppressWarnings("resource") @Bean public PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService) { final TemplateSource templateSource = () -> { final Optional<String> maybeTemplateFile = getConfig(configService).flatMap(powerPointConfig -> Optional.ofNullable(StringUtils.defaultIfBlank(powerPointConfig.getTemplateFile(), null))); return maybeTemplateFile.isPresent() ? new FileInputStream(maybeTemplateFile.get()) : TemplateSource.DEFAULT.getInputStream(); }; final TemplateSettingsSource templateSettingsSource = () -> getConfig(configService) .map(this::getTemplateSettings) .orElse(TemplateSettingsSource.DEFAULT.getSettings()); return new PowerPointServiceImpl(templateSource, templateSettingsSource); }
ExportConfiguration { @SuppressWarnings("resource") @Bean public PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService) { final TemplateSource templateSource = () -> { final Optional<String> maybeTemplateFile = getConfig(configService).flatMap(powerPointConfig -> Optional.ofNullable(StringUtils.defaultIfBlank(powerPointConfig.getTemplateFile(), null))); return maybeTemplateFile.isPresent() ? new FileInputStream(maybeTemplateFile.get()) : TemplateSource.DEFAULT.getInputStream(); }; final TemplateSettingsSource templateSettingsSource = () -> getConfig(configService) .map(this::getTemplateSettings) .orElse(TemplateSettingsSource.DEFAULT.getSettings()); return new PowerPointServiceImpl(templateSource, templateSettingsSource); } }
ExportConfiguration { @SuppressWarnings("resource") @Bean public PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService) { final TemplateSource templateSource = () -> { final Optional<String> maybeTemplateFile = getConfig(configService).flatMap(powerPointConfig -> Optional.ofNullable(StringUtils.defaultIfBlank(powerPointConfig.getTemplateFile(), null))); return maybeTemplateFile.isPresent() ? new FileInputStream(maybeTemplateFile.get()) : TemplateSource.DEFAULT.getInputStream(); }; final TemplateSettingsSource templateSettingsSource = () -> getConfig(configService) .map(this::getTemplateSettings) .orElse(TemplateSettingsSource.DEFAULT.getSettings()); return new PowerPointServiceImpl(templateSource, templateSettingsSource); }  }
ExportConfiguration { @SuppressWarnings("resource") @Bean public PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService) { final TemplateSource templateSource = () -> { final Optional<String> maybeTemplateFile = getConfig(configService).flatMap(powerPointConfig -> Optional.ofNullable(StringUtils.defaultIfBlank(powerPointConfig.getTemplateFile(), null))); return maybeTemplateFile.isPresent() ? new FileInputStream(maybeTemplateFile.get()) : TemplateSource.DEFAULT.getInputStream(); }; final TemplateSettingsSource templateSettingsSource = () -> getConfig(configService) .map(this::getTemplateSettings) .orElse(TemplateSettingsSource.DEFAULT.getSettings()); return new PowerPointServiceImpl(templateSource, templateSettingsSource); }  @SuppressWarnings("resource") @Bean PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService); }
ExportConfiguration { @SuppressWarnings("resource") @Bean public PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService) { final TemplateSource templateSource = () -> { final Optional<String> maybeTemplateFile = getConfig(configService).flatMap(powerPointConfig -> Optional.ofNullable(StringUtils.defaultIfBlank(powerPointConfig.getTemplateFile(), null))); return maybeTemplateFile.isPresent() ? new FileInputStream(maybeTemplateFile.get()) : TemplateSource.DEFAULT.getInputStream(); }; final TemplateSettingsSource templateSettingsSource = () -> getConfig(configService) .map(this::getTemplateSettings) .orElse(TemplateSettingsSource.DEFAULT.getSettings()); return new PowerPointServiceImpl(templateSource, templateSettingsSource); }  @SuppressWarnings("resource") @Bean PowerPointService powerPointService(final ConfigService<? extends FindConfig<?, ?>> configService);  }