@Test void getDependencies() { final String compId = client.getJdbcId(); final Dependencies dependencies = base .path("component/dependencies") .queryParam("identifier", compId) .request(APPLICATION_JSON_TYPE) .get(Dependencies.class); assertEquals(1, dependencies.getDependencies().size()); final DependencyDefinition definition = dependencies.getDependencies().get(compId); assertNotNull(definition); assertEquals(1, definition.getDependencies().size()); assertEquals("org.apache.tomee:ziplock:jar:7.0.5", definition.getDependencies().iterator().next()); }
@Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEntity(id)) { final DependencyDefinition deps = ofNullable(virtualComponents.getDependenciesFor(id)) .orElseGet(() -> new DependencyDefinition(emptyList())); dependencies.put(id, deps); } else { final ComponentFamilyMeta.BaseMeta<Object> meta = componentDao.findById(id); dependencies.put(meta.getId(), getDependenciesFor(meta)); } } return new Dependencies(dependencies); }
ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEntity(id)) { final DependencyDefinition deps = ofNullable(virtualComponents.getDependenciesFor(id)) .orElseGet(() -> new DependencyDefinition(emptyList())); dependencies.put(id, deps); } else { final ComponentFamilyMeta.BaseMeta<Object> meta = componentDao.findById(id); dependencies.put(meta.getId(), getDependenciesFor(meta)); } } return new Dependencies(dependencies); } }
ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEntity(id)) { final DependencyDefinition deps = ofNullable(virtualComponents.getDependenciesFor(id)) .orElseGet(() -> new DependencyDefinition(emptyList())); dependencies.put(id, deps); } else { final ComponentFamilyMeta.BaseMeta<Object> meta = componentDao.findById(id); dependencies.put(meta.getId(), getDependenciesFor(meta)); } } return new Dependencies(dependencies); }  }
ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEntity(id)) { final DependencyDefinition deps = ofNullable(virtualComponents.getDependenciesFor(id)) .orElseGet(() -> new DependencyDefinition(emptyList())); dependencies.put(id, deps); } else { final ComponentFamilyMeta.BaseMeta<Object> meta = componentDao.findById(id); dependencies.put(meta.getId(), getDependenciesFor(meta)); } } return new Dependencies(dependencies); }  void clearCache(@Observes final DeployedComponent deployedComponent); @Override Dependencies getDependencies(final String[] ids); @Override StreamingOutput getDependency(final String id); @Override ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query); @Override Response familyIcon(final String id); @Override Response icon(final String id); @Override Map<String, String> migrate(final String id, final int version, final Map<String, String> config); @Override // TODO: max ids.length ComponentDetailList getDetail(final String language, final String[] ids); }
ComponentResourceImpl implements ComponentResource { @Override public Dependencies getDependencies(final String[] ids) { if (ids.length == 0) { return new Dependencies(emptyMap()); } final Map<String, DependencyDefinition> dependencies = new HashMap<>(); for (final String id : ids) { if (virtualComponents.isExtensionEntity(id)) { final DependencyDefinition deps = ofNullable(virtualComponents.getDependenciesFor(id)) .orElseGet(() -> new DependencyDefinition(emptyList())); dependencies.put(id, deps); } else { final ComponentFamilyMeta.BaseMeta<Object> meta = componentDao.findById(id); dependencies.put(meta.getId(), getDependenciesFor(meta)); } } return new Dependencies(dependencies); }  void clearCache(@Observes final DeployedComponent deployedComponent); @Override Dependencies getDependencies(final String[] ids); @Override StreamingOutput getDependency(final String id); @Override ComponentIndices getIndex(final String language, final boolean includeIconContent, final String query); @Override Response familyIcon(final String id); @Override Response icon(final String id); @Override Map<String, String> migrate(final String id, final int version, final Map<String, String> config); @Override // TODO: max ids.length ComponentDetailList getDetail(final String language, final String[] ids);  }