@Test public void testLoadCustomizersFallback() { CamelContext context = new DefaultCamelContext(); context.getRegistry().bind("converters", (ContextCustomizer)camelContext -> camelContext.setLoadTypeConverters(true)); List<ContextCustomizer> customizers = RuntimeSupport.configureContextCustomizers(context); assertThat(context.getName()).isNotEqualTo("from-registry"); assertThat(context.getName()).isNotEqualTo("default"); assertThat(context.isLoadTypeConverters()).isFalse(); assertThat(customizers).hasSize(0); Properties properties = new Properties(); properties.setProperty("customizer.name.enabled", "true"); context.getPropertiesComponent().setInitialProperties(properties); customizers = RuntimeSupport.configureContextCustomizers(context); assertThat(context.getName()).isEqualTo("default"); assertThat(customizers).hasSize(1); properties.setProperty("customizer.converters.enabled", "true"); properties.setProperty("customizer.converters.enabled", "true"); context.getPropertiesComponent().setInitialProperties(properties); customizers = RuntimeSupport.configureContextCustomizers(context); assertThat(context.getName()).isEqualTo("default"); assertThat(context.isLoadTypeConverters()).isTrue(); assertThat(customizers).hasSize(2); }
public static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext) { return configureContextCustomizers(hasCamelContext.getCamelContext()); }
RuntimeSupport { public static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext) { return configureContextCustomizers(hasCamelContext.getCamelContext()); } }
RuntimeSupport { public static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext) { return configureContextCustomizers(hasCamelContext.getCamelContext()); } private  RuntimeSupport(); }
RuntimeSupport { public static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext) { return configureContextCustomizers(hasCamelContext.getCamelContext()); } private  RuntimeSupport(); static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext); static List<ContextCustomizer> configureContextCustomizers(CamelContext context); static Map<String, ContextCustomizer> lookupCustomizers(CamelContext context); static ContextCustomizer lookupCustomizerByID(CamelContext context, String customizerId); static Set<String> lookupCustomizerIDs(CamelContext context); static SourceLoader loaderFor(CamelContext context, Source source); static SourceLoader lookupLoaderById(CamelContext context, String loaderId); static SourceLoader lookupLoaderByLanguage(CamelContext context, String loaderId); static SourceLoader lookupLoaderFromResource(CamelContext context, String loaderId); static List<SourceLoader.Interceptor> loadInterceptors(CamelContext context, Source source); static String getRuntimeVersion(); }
RuntimeSupport { public static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext) { return configureContextCustomizers(hasCamelContext.getCamelContext()); } private  RuntimeSupport(); static List<ContextCustomizer> configureContextCustomizers(HasCamelContext hasCamelContext); static List<ContextCustomizer> configureContextCustomizers(CamelContext context); static Map<String, ContextCustomizer> lookupCustomizers(CamelContext context); static ContextCustomizer lookupCustomizerByID(CamelContext context, String customizerId); static Set<String> lookupCustomizerIDs(CamelContext context); static SourceLoader loaderFor(CamelContext context, Source source); static SourceLoader lookupLoaderById(CamelContext context, String loaderId); static SourceLoader lookupLoaderByLanguage(CamelContext context, String loaderId); static SourceLoader lookupLoaderFromResource(CamelContext context, String loaderId); static List<SourceLoader.Interceptor> loadInterceptors(CamelContext context, Source source); static String getRuntimeVersion();  }