use of com.b2international.snowowl.core.internal.ResourceRepository in project snow-owl by b2ihealthcare.
the class ResourceRepositoryRequest method execute.
@Override
public R execute(ServiceProvider context) {
ResourceRepository resourceRepository = context.service(ResourceRepository.class);
return resourceRepository.read(searcher -> {
// TODO check health
DefaultRepositoryContext repository = new DefaultRepositoryContext(context, RepositoryInfo.of(RESOURCE_REPOSITORY_ID, Health.GREEN, null, List.of()));
repository.bind(RevisionIndex.class, resourceRepository);
repository.bind(Searcher.class, searcher.searcher());
repository.bind(RevisionSearcher.class, searcher);
repository.bind(ContextConfigurer.class, ContextConfigurer.NOOP);
repository.bind(BaseRevisionBranching.class, resourceRepository.branching());
return next(repository);
});
}
Aggregations