@Test public void testImageJson() throws Exception { if (!runTest) { return; } RepositoriesDTO repositories = facade.search("karaf"); assertTrue(!repositories.results.isEmpty()); for (RepositoryDTO repository : repositories.results) { Map<String, String> tags = facade.tags(repository.namespace(), repository.repository()); Set<String> keys = tags.keySet(); assertTrue(!keys.isEmpty()); for (String key : keys) { Object json = facade.imageJson(tags.get(key)); assertTrue(json != null); } } }
public Object imageJson(String imageID) { ArtifactDTO artifact = fromMavenCoordinates(imageID); try { List<ArtifactDTO> results = mavenIndexerFacade.search(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getPackaging(), artifact.getClassifier(), null); if (!results.isEmpty()) { return results.get(0); } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } LOG.debug("No results found for image ID: {}", imageID); return null; }
RegistryFacade { public Object imageJson(String imageID) { ArtifactDTO artifact = fromMavenCoordinates(imageID); try { List<ArtifactDTO> results = mavenIndexerFacade.search(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getPackaging(), artifact.getClassifier(), null); if (!results.isEmpty()) { return results.get(0); } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } LOG.debug("No results found for image ID: {}", imageID); return null; } }
RegistryFacade { public Object imageJson(String imageID) { ArtifactDTO artifact = fromMavenCoordinates(imageID); try { List<ArtifactDTO> results = mavenIndexerFacade.search(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getPackaging(), artifact.getClassifier(), null); if (!results.isEmpty()) { return results.get(0); } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } LOG.debug("No results found for image ID: {}", imageID); return null; } RegistryFacade(); }
RegistryFacade { public Object imageJson(String imageID) { ArtifactDTO artifact = fromMavenCoordinates(imageID); try { List<ArtifactDTO> results = mavenIndexerFacade.search(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getPackaging(), artifact.getClassifier(), null); if (!results.isEmpty()) { return results.get(0); } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } LOG.debug("No results found for image ID: {}", imageID); return null; } RegistryFacade(); File getMavenIndexerCacheDirectory(); @PostConstruct void init(); @PreDestroy void destroy(); RepositoriesDTO search(String query); Map<String, String> tags(String namespace, String repository); Object imageJson(String imageID); }
RegistryFacade { public Object imageJson(String imageID) { ArtifactDTO artifact = fromMavenCoordinates(imageID); try { List<ArtifactDTO> results = mavenIndexerFacade.search(artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion(), artifact.getPackaging(), artifact.getClassifier(), null); if (!results.isEmpty()) { return results.get(0); } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } LOG.debug("No results found for image ID: {}", imageID); return null; } RegistryFacade(); File getMavenIndexerCacheDirectory(); @PostConstruct void init(); @PreDestroy void destroy(); RepositoriesDTO search(String query); Map<String, String> tags(String namespace, String repository); Object imageJson(String imageID); static final String SEPARATOR; }