@Override public ExtensionRepository getRepository(String repositoryId) { // Try internal repositories ExtensionRepository repository = this.standardRepositories.get(repositoryId); // Try component repositories ComponentManager componentManager = this.componentManagerProvider.get(); if (componentManager.hasComponent(ExtensionRepository.class, repositoryId)) { try { return componentManager.getInstance(ExtensionRepository.class, repositoryId); } catch (ComponentLookupException e) { this.logger.error("Failed to lookup component", e); } } // Try remote repositories if (repository == null) { repository = this.repositoryManager.getRepository(repositoryId); } return repository; }