@Test void testRouting() { JaxRsApplication app = JaxRsApplication.create(TestApp.class); Optional<String> namedRouting = extension.findNamedRouting(EMPTY_CONFIG, app); assertThat(namedRouting, value(is("admin"))); }
Optional<String> findNamedRouting(io.helidon.config.Config config, JaxRsApplication jaxRsApplication) { return config.get(jaxRsApplication.appClassName() + "." + RoutingName.CONFIG_KEY_NAME) .asString() .or(jaxRsApplication::routingName) .flatMap(it -> RoutingName.DEFAULT_NAME.equals(it) ? Optional.empty() : Optional.of(it)); }
JaxRsCdiExtension implements Extension { Optional<String> findNamedRouting(io.helidon.config.Config config, JaxRsApplication jaxRsApplication) { return config.get(jaxRsApplication.appClassName() + "." + RoutingName.CONFIG_KEY_NAME) .asString() .or(jaxRsApplication::routingName) .flatMap(it -> RoutingName.DEFAULT_NAME.equals(it) ? Optional.empty() : Optional.of(it)); } }
JaxRsCdiExtension implements Extension { Optional<String> findNamedRouting(io.helidon.config.Config config, JaxRsApplication jaxRsApplication) { return config.get(jaxRsApplication.appClassName() + "." + RoutingName.CONFIG_KEY_NAME) .asString() .or(jaxRsApplication::routingName) .flatMap(it -> RoutingName.DEFAULT_NAME.equals(it) ? Optional.empty() : Optional.of(it)); }  }
JaxRsCdiExtension implements Extension { Optional<String> findNamedRouting(io.helidon.config.Config config, JaxRsApplication jaxRsApplication) { return config.get(jaxRsApplication.appClassName() + "." + RoutingName.CONFIG_KEY_NAME) .asString() .or(jaxRsApplication::routingName) .flatMap(it -> RoutingName.DEFAULT_NAME.equals(it) ? Optional.empty() : Optional.of(it)); }  List<JaxRsApplication> applicationsToRun(); void removeApplications(); void removeResourceClasses(); void addResourceClasses(List<Class<?>> resourceClasses); void addApplications(List<JaxRsApplication> applications); void addApplication(Application application); void addApplication(String contextRoot, Application application); String serviceName(); void addSyntheticApplication(List<Class<?>> resourceClasses); }
JaxRsCdiExtension implements Extension { Optional<String> findNamedRouting(io.helidon.config.Config config, JaxRsApplication jaxRsApplication) { return config.get(jaxRsApplication.appClassName() + "." + RoutingName.CONFIG_KEY_NAME) .asString() .or(jaxRsApplication::routingName) .flatMap(it -> RoutingName.DEFAULT_NAME.equals(it) ? Optional.empty() : Optional.of(it)); }  List<JaxRsApplication> applicationsToRun(); void removeApplications(); void removeResourceClasses(); void addResourceClasses(List<Class<?>> resourceClasses); void addApplications(List<JaxRsApplication> applications); void addApplication(Application application); void addApplication(String contextRoot, Application application); String serviceName(); void addSyntheticApplication(List<Class<?>> resourceClasses);  }