@Test public void computeAssetPathWithComponent() { Component component = createComponent("component", "group", "1.0.0"); Asset asset = createAsset("path/assetName", component); List<BrowsePath> paths = generator.computeAssetPaths(asset); assertPaths(asList(component.namespace(), component.name(), component.version(), "assetName"), 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; }