Search in sources :

Example 1 with ResourceRepository

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);
    });
}
Also used : DefaultRepositoryContext(com.b2international.snowowl.core.repository.DefaultRepositoryContext) ResourceRepository(com.b2international.snowowl.core.internal.ResourceRepository)

Aggregations

ResourceRepository (com.b2international.snowowl.core.internal.ResourceRepository)1 DefaultRepositoryContext (com.b2international.snowowl.core.repository.DefaultRepositoryContext)1