@Test public void computeAssetPathWithComponentNameOnly() { Component component = createComponent("component", null, null); Asset asset = createAsset("path/assetName"); List<BrowsePaths> paths = generator.computeAssetPaths(asset, component); assertPaths(asList(component.name(), "assetName"), paths); }
@Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String lastSegment = lastSegment(asset.name()); BrowsePaths.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset, component); } }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String lastSegment = lastSegment(asset.name()); BrowsePaths.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset, component); } } }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String lastSegment = lastSegment(asset.name()); BrowsePaths.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset, component); } }  }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String lastSegment = lastSegment(asset.name()); BrowsePaths.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset, component); } }  @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> computeAssetPaths(final Asset asset, @Nullable final Component component) { checkNotNull(asset); if (component != null) { List<BrowsePaths> paths = computeComponentPaths(asset, component); String lastSegment = lastSegment(asset.name()); BrowsePaths.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset, component); } }  @Override List<BrowsePaths> computeAssetPaths(final Asset asset, @Nullable final Component component); @Override List<BrowsePaths> computeComponentPaths(final Asset asset, final Component component);  }