@Test public void computeAssetPathWithNoComponent() { Asset asset = createAsset("/path/asset"); List<BrowsePath> paths = generator.computeAssetPaths(asset); assertPaths(asList("path", "asset"), paths); }
@Override public List<BrowsePath> computeAssetPaths(final Asset asset) { checkNotNull(asset); if (asset.component().isPresent()) { List<BrowsePath> paths = computeComponentPaths(asset); String lastSegment = lastSegment(asset.path()); BrowsePathBuilder.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset); } }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeAssetPaths(final Asset asset) { checkNotNull(asset); if (asset.component().isPresent()) { List<BrowsePath> paths = computeComponentPaths(asset); String lastSegment = lastSegment(asset.path()); BrowsePathBuilder.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset); } } }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeAssetPaths(final Asset asset) { checkNotNull(asset); if (asset.component().isPresent()) { List<BrowsePath> paths = computeComponentPaths(asset); String lastSegment = lastSegment(asset.path()); BrowsePathBuilder.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset); } }  }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeAssetPaths(final Asset asset) { checkNotNull(asset); if (asset.component().isPresent()) { List<BrowsePath> paths = computeComponentPaths(asset); String lastSegment = lastSegment(asset.path()); BrowsePathBuilder.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset); } }  @Override List<BrowsePath> computeAssetPaths(final Asset asset); @Override List<BrowsePath> computeComponentPaths(final Asset asset); }
DefaultBrowseNodeGenerator extends ComponentPathBrowseNodeGenerator { @Override public List<BrowsePath> computeAssetPaths(final Asset asset) { checkNotNull(asset); if (asset.component().isPresent()) { List<BrowsePath> paths = computeComponentPaths(asset); String lastSegment = lastSegment(asset.path()); BrowsePathBuilder.appendPath(paths, lastSegment); return paths; } else { return super.computeAssetPaths(asset); } }  @Override List<BrowsePath> computeAssetPaths(final Asset asset); @Override List<BrowsePath> computeComponentPaths(final Asset asset); static final String NAME; }