@Test public void testTags() 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()); } }
public Map<String, String> tags(String namespace, String repository) { Map<String, String> answer = new HashMap<String, String>(); try { List<ArtifactDTO> results = mavenIndexerFacade.search(namespace, repository, null, null, "image", null); for (ArtifactDTO result : results) { if (result.getPackaging().equals("zip")) { answer.put(result.getVersion(), toMavenCoordinates(result)); } } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } return answer; }
RegistryFacade { public Map<String, String> tags(String namespace, String repository) { Map<String, String> answer = new HashMap<String, String>(); try { List<ArtifactDTO> results = mavenIndexerFacade.search(namespace, repository, null, null, "image", null); for (ArtifactDTO result : results) { if (result.getPackaging().equals("zip")) { answer.put(result.getVersion(), toMavenCoordinates(result)); } } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } return answer; } }
RegistryFacade { public Map<String, String> tags(String namespace, String repository) { Map<String, String> answer = new HashMap<String, String>(); try { List<ArtifactDTO> results = mavenIndexerFacade.search(namespace, repository, null, null, "image", null); for (ArtifactDTO result : results) { if (result.getPackaging().equals("zip")) { answer.put(result.getVersion(), toMavenCoordinates(result)); } } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } return answer; } RegistryFacade(); }
RegistryFacade { public Map<String, String> tags(String namespace, String repository) { Map<String, String> answer = new HashMap<String, String>(); try { List<ArtifactDTO> results = mavenIndexerFacade.search(namespace, repository, null, null, "image", null); for (ArtifactDTO result : results) { if (result.getPackaging().equals("zip")) { answer.put(result.getVersion(), toMavenCoordinates(result)); } } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } return answer; } 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 Map<String, String> tags(String namespace, String repository) { Map<String, String> answer = new HashMap<String, String>(); try { List<ArtifactDTO> results = mavenIndexerFacade.search(namespace, repository, null, null, "image", null); for (ArtifactDTO result : results) { if (result.getPackaging().equals("zip")) { answer.put(result.getVersion(), toMavenCoordinates(result)); } } } catch (IOException e) { LOG.debug("Failed to fetch results from indexer facade", e); } return answer; } 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; }