Interface CustomizedCategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>

Type Parameters:
D - the type of Trackable entity which is the persistent counterpart to a CategoryAsset
All Known Subinterfaces:
CategoryAssetRepository<D>, JpaCategoryAssetRepository<D>
All Known Implementing Classes:
JpaCustomizedCategoryAssetRepository

public interface CustomizedCategoryAssetRepository<D extends com.broadleafcommerce.data.tracking.core.Trackable>
Advanced functionality related to CategoryAsset maintenance and filtering.
Author:
Samarth Dhruva (samarthd)
  • Method Summary

    Modifier and Type
    Method
    Description
    findByCategoryContextId(String categoryContextId, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all of the CategoryAssets for a Category by ID.
    org.springframework.data.domain.Page<D>
    searchAllWithCategoryContextId(String categoryContextId, Boolean isSorted, String searchString, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Finds all CategoryAssets for the given category context ID, optionally filtering by additional search/filter arguments.
  • Method Details

    • searchAllWithCategoryContextId

      @Policy(operationTypes=READ) org.springframework.data.domain.Page<D> searchAllWithCategoryContextId(String categoryContextId, @Nullable Boolean isSorted, @Nullable String searchString, cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all CategoryAssets for the given category context ID, optionally filtering by additional search/filter arguments.

      If searchString is provided, then this method will search for assets whose EntityAsset.url, EntityAsset.title, EntityAsset.altText, or EntityAsset.tags contain it.

      If no searchString is provided, then this method will simply return all assets for the given category.

      This method also supports RSQL filtration via filters.

      Parameters:
      categoryContextId - the value which the category context ID should match against
      isSorted - (optional) if not-null, will restrict results to only include CategoryAssets where CategoryAsset.sorted has the given value
      searchString - (optional) a string which should be found in EntityAsset.url, EntityAsset.title, EntityAsset.altText, or EntityAsset.tags
      filters - additional filters to apply in the query. Should be EmptyNode if no additional filters should be applied.
      page - the requested page of results from the database
      contextInfo - the context to query within
      Returns:
      the assets in the database with the given category context ID, optionally filtered by the given search/filter arguments (if provided)
    • findByCategoryContextId

      @Policy(operationTypes=READ) Stream<D> findByCategoryContextId(String categoryContextId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Finds all of the CategoryAssets for a Category by ID.
      Parameters:
      categoryContextId - Id of the category which's assets to read
      contextInfo - context information around sandboxing and multitenant state
      Returns:
      all of the CategoryAssets for a Category by ID.