@Override public ResourceConfig getConfiguration() { return appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return webComponent.appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return webComponent.appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return appHandler.getConfiguration(); }
@Override public void reload() { reload(appHandler.getConfiguration()); }
@Override public void reload() { reload(appHandler.getConfiguration()); }
private ApplicationContext createSpringContext() { ApplicationHandler applicationHandler = injectionManager.getInstance(ApplicationHandler.class); ApplicationContext springContext = (ApplicationContext) applicationHandler.getConfiguration() .getProperty(PARAM_SPRING_CONTEXT); if (springContext == null) { String contextConfigLocation = (String) applicationHandler.getConfiguration() .getProperty(PARAM_CONTEXT_CONFIG_LOCATION); springContext = createXmlSpringConfiguration(contextConfigLocation); } return springContext; }
private ApplicationContext createSpringContext() { ApplicationHandler applicationHandler = locator.getService(ApplicationHandler.class); ApplicationContext springContext = (ApplicationContext) applicationHandler.getConfiguration().getProperty(PARAM_SPRING_CONTEXT); if (springContext == null) { String contextConfigLocation = (String) applicationHandler.getConfiguration().getProperty(PARAM_CONTEXT_CONFIG_LOCATION); springContext = createXmlSpringConfiguration(contextConfigLocation); } return springContext; }
@Override public ResourceConfig getConfiguration() { return jersey.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return appHandler.getConfiguration(); }
@Override public ResourceConfig getConfiguration() { return jersey.getConfiguration(); }
/** * Return an immutable representation of the current {@link ResourceConfig * configuration}. * * @return current configuration of the hosted Jersey application. */ @Override public ResourceConfig getConfiguration() { ApplicationHandler handler = getApplicationHandler(); return handler == null ? null : handler.getConfiguration(); }
private ApplicationContext createSpringContext() { ApplicationHandler applicationHandler = injectionManager.getInstance(ApplicationHandler.class); ApplicationContext springContext = (ApplicationContext) applicationHandler.getConfiguration() .getProperty(PARAM_SPRING_CONTEXT); if (springContext == null) { String contextConfigLocation = (String) applicationHandler.getConfiguration() .getProperty(PARAM_CONTEXT_CONFIG_LOCATION); springContext = createXmlSpringConfiguration(contextConfigLocation); } return springContext; }
private ResourceModel processResourceModel(ResourceModel resourceModel) { final Iterable<RankedProvider<ModelProcessor>> allRankedProviders = Providers.getAllRankedProviders(locator, ModelProcessor.class); final Iterable<ModelProcessor> modelProcessors = Providers.sortRankedProviders(new RankedComparator<ModelProcessor>(), allRankedProviders); for (final ModelProcessor modelProcessor : modelProcessors) { resourceModel = modelProcessor.processResourceModel(resourceModel, getConfiguration()); } return resourceModel; }
private ResourceModel processResourceModel(ResourceModel resourceModel) { final Iterable<RankedProvider<ModelProcessor>> allRankedProviders = Providers.getAllRankedProviders(locator, ModelProcessor.class); final Iterable<ModelProcessor> modelProcessors = Providers.sortRankedProviders(new RankedComparator<ModelProcessor>(), allRankedProviders); for (final ModelProcessor modelProcessor : modelProcessors) { resourceModel = modelProcessor.processResourceModel(resourceModel, getConfiguration()); } return resourceModel; }
@Test public void getConfiguration_ShouldReturnAppHandlerConfiguration() { ResourceConfig config = mock(ResourceConfig.class); when(appHandler.getConfiguration()).thenReturn(config); assertSame(config, container.getConfiguration()); }
@Test public void reload_ConfigGiven_ShouldReloadNewAppHandler() { ResourceConfig config = new ApplicationHandler().getConfiguration(); ApplicationHandler newAppHandler = mock(ApplicationHandler.class); doReturn(newAppHandler).when(container).createNewApplicationHandler(any()); container.reload(config); verify(newAppHandler, times(1)).onReload(container); }