@Test public void computeComponentPathWithComponentNameOnly() { Component component = createComponent("component", null, null); Asset asset = createAsset("path/assetName"); List<BrowsePaths> paths = generator.computeComponentPaths(asset, component); assertPaths(singletonList(component.name()), paths, true); }
@Override public List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component) { List<String> paths = new ArrayList<>(); if (!Strings2.isBlank(component.group())) { paths.add(component.group()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePaths.fromPaths(paths, true); }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component) { List<String> paths = new ArrayList<>(); if (!Strings2.isBlank(component.group())) { paths.add(component.group()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePaths.fromPaths(paths, true); } }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component) { List<String> paths = new ArrayList<>(); if (!Strings2.isBlank(component.group())) { paths.add(component.group()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePaths.fromPaths(paths, true); }  }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component) { List<String> paths = new ArrayList<>(); if (!Strings2.isBlank(component.group())) { paths.add(component.group()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePaths.fromPaths(paths, true); }  @Override List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component); @Override List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component); }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component) { List<String> paths = new ArrayList<>(); if (!Strings2.isBlank(component.group())) { paths.add(component.group()); } paths.add(component.name()); if (!Strings2.isBlank(component.version())) { paths.add(component.version()); } return BrowsePaths.fromPaths(paths, true); }  @Override List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component); @Override List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component);  }