use of io.crnk.core.module.internal.ResourceFilterDirectoryImpl in project crnk-framework by crnk-project.
the class ModuleRegistry method init.
/**
* Initializes the {@link ModuleRegistry} and applies all pending changes.
* After the initialization completed, it is not possible to add any further
* modules.
*
* @param objectMapper object mapper
*/
public void init(ObjectMapper objectMapper) {
PreconditionUtil.assertEquals("already initialized", InitializedState.NOT_INITIALIZED, initializedState);
this.initializedState = InitializedState.INITIALIZING;
this.objectMapper = objectMapper;
this.objectMapper.registerModules(getJacksonModules());
initializeModules();
applyRepositoryRegistrations();
ExceptionMapperLookup exceptionMapperLookup = getExceptionMapperLookup();
ExceptionMapperRegistryBuilder mapperRegistryBuilder = new ExceptionMapperRegistryBuilder();
exceptionMapperRegistry = mapperRegistryBuilder.build(exceptionMapperLookup);
filterBehaviorProvider = new ResourceFilterDirectoryImpl(aggregatedModule.getResourceFilters(), httpRequestContextProvider, resourceRegistry);
this.initializedState = InitializedState.INITIALIZED;
}
Aggregations