class BrowseServiceImpl extends ComponentSupport implements BrowseService {

  @Override
  public PageResult<Asset> browseComponentAssets(final Repository repository, final String componentId)
  {
    checkNotNull(repository);
    checkNotNull(componentId);
    try (StorageTx storageTx = repository.facet(StorageFacet.class).txSupplier().get()) {
      storageTx.begin();
      Component component = storageTx.findComponent(new DetachedEntityId(componentId));
      if (component == null) {
        return new PageResult<>(0, Collections.emptyList());
      }
      return browseComponentAssetsHelper(storageTx, repository, component);
    }
  }

  @Inject public  BrowseServiceImpl(@Named(GroupType.NAME) final Type groupType,
                           final ComponentEntityAdapter componentEntityAdapter,
                           final VariableResolverAdapterManager variableResolverAdapterManager,
                           final ContentPermissionChecker contentPermissionChecker,
                           final AssetEntityAdapter assetEntityAdapter,
                           final BrowseAssetIterableFactory browseAssetIterableFactory,
                           final BrowseAssetsSqlBuilder browseAssetsSqlBuilder,
                           final BrowseComponentsSqlBuilder browseComponentsSqlBuilder,
                           final BucketStore bucketStore,
                           final RepositoryManager repositoryManager);

}