@Test public void computeComponentPathWithComponentNoGroup() { Component component = createComponent("component", null, "1.0.0"); Asset asset = createAsset("path/assetName", component); List<BrowsePath> paths = generator.computeComponentPaths(asset); assertPaths(asList(component.name(), component.version()), paths, true); }
@Override public List<BrowsePath> computeComponentPaths(final Asset asset) { checkNotNull(asset); List<String> paths = new ArrayList<>(); checkArgument(asset.component().isPresent()); Component component = asset.component().get(); if (!Strings2.isBlank(component.namespace())) { paths.add(component.namespace()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePathBuilder.fromPaths(paths, true); }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeComponentPaths(final Asset asset) { checkNotNull(asset); List<String> paths = new ArrayList<>(); checkArgument(asset.component().isPresent()); Component component = asset.component().get(); if (!Strings2.isBlank(component.namespace())) { paths.add(component.namespace()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePathBuilder.fromPaths(paths, true); } }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeComponentPaths(final Asset asset) { checkNotNull(asset); List<String> paths = new ArrayList<>(); checkArgument(asset.component().isPresent()); Component component = asset.component().get(); if (!Strings2.isBlank(component.namespace())) { paths.add(component.namespace()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePathBuilder.fromPaths(paths, true); }  }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeComponentPaths(final Asset asset) { checkNotNull(asset); List<String> paths = new ArrayList<>(); checkArgument(asset.component().isPresent()); Component component = asset.component().get(); if (!Strings2.isBlank(component.namespace())) { paths.add(component.namespace()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePathBuilder.fromPaths(paths, true); }  @Override List<BrowsePath> computeAssetPaths(final Asset asset); @Override List<BrowsePath> computeComponentPaths(final Asset asset); }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeComponentPaths(final Asset asset) { checkNotNull(asset); List<String> paths = new ArrayList<>(); checkArgument(asset.component().isPresent()); Component component = asset.component().get(); if (!Strings2.isBlank(component.namespace())) { paths.add(component.namespace()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePathBuilder.fromPaths(paths, true); }  @Override List<BrowsePath> computeAssetPaths(final Asset asset); @Override List<BrowsePath> computeComponentPaths(final Asset asset); static final String NAME; }