use of io.crnk.legacy.internal.QueryParamsAdapterBuilder in project crnk-framework by crnk-project.
the class CrnkBootTest method setQueryParamsBuilder.
@Test
public void setQueryParamsBuilder() {
CrnkBoot boot = new CrnkBoot();
boot.setServiceDiscoveryFactory(serviceDiscoveryFactory);
boot.setDefaultServiceUrlProvider(mock(ServiceUrlProvider.class));
QueryParamsBuilder deserializer = mock(QueryParamsBuilder.class);
boot.setQueryParamsBuilds(deserializer);
boot.boot();
HttpRequestProcessorImpl requestDispatcher = boot.getRequestDispatcher();
QueryAdapterBuilder queryAdapterBuilder = requestDispatcher.getQueryAdapterBuilder();
Assert.assertTrue(queryAdapterBuilder instanceof QueryParamsAdapterBuilder);
}
use of io.crnk.legacy.internal.QueryParamsAdapterBuilder 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