use of io.crnk.core.engine.internal.dispatcher.ControllerRegistryBuilder in project crnk-framework by crnk-project.
the class ControllerRegistryBuilderTest method onBuildShouldAddAllControllers.
@Test
public void onBuildShouldAddAllControllers() throws Exception {
// GIVEN
PropertiesProvider propertiesProvider = Mockito.mock(PropertiesProvider.class);
ResourceFilterDirectory resourceFilterDirectory = Mockito.mock(ResourceFilterDirectory.class);
ControllerRegistryBuilder sut = new ControllerRegistryBuilder(null, null, null, propertiesProvider, resourceFilterDirectory, (List) Collections.emptyList());
// WHEN
ControllerRegistry result = sut.build();
// THEN
result.getController(new ResourcePath("path"), "GET");
}
use of io.crnk.core.engine.internal.dispatcher.ControllerRegistryBuilder in project crnk-framework by crnk-project.
the class CrnkBoot method createRequestDispatcher.
private HttpRequestProcessorImpl createRequestDispatcher(ExceptionMapperRegistry exceptionMapperRegistry) {
ControllerRegistryBuilder controllerRegistryBuilder = newControllerRegistryBuilder(resourceRegistry, moduleRegistry.getTypeParser(), objectMapper, propertiesProvider, moduleRegistry.getContext().getResourceFilterDirectory(), moduleRegistry.getResourceModificationFilters());
ControllerRegistry controllerRegistry = controllerRegistryBuilder.build();
this.documentMapper = controllerRegistryBuilder.getDocumentMapper();
QueryAdapterBuilder queryAdapterBuilder;
if (queryParamsBuilder != null) {
queryAdapterBuilder = new QueryParamsAdapterBuilder(queryParamsBuilder, moduleRegistry);
} else {
queryAdapterBuilder = new QuerySpecAdapterBuilder(querySpecDeserializer, moduleRegistry);
}
return new HttpRequestProcessorImpl(moduleRegistry, controllerRegistry, exceptionMapperRegistry, queryAdapterBuilder);
}
Aggregations