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

All Known Subinterfaces:
CategoryRepository<D>, JpaCategoryRepository<D>
All Known Implementing Classes:
JpaCustomizedCategoryRepository

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

    Modifier and Type
    Method
    Description
    findAllByContextId(Iterable<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Returns all the Categories that match the contextIds.
    findAllByContextIdIn(Collection<String> contextIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
    Retrieves all categories whose context IDs match any of the given IDs.
    findAllByUrls(Iterable<String> urls, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds categories by the given urls.
    findByUrl(String url, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Finds a category by the given url.
  • Method Details

    • findAllByContextIdIn

      @Policy(operationTypes=READ) Stream<D> findAllByContextIdIn(@NonNull Collection<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Retrieves all categories whose context IDs match any of the given IDs.
      Parameters:
      contextIds - the context IDs to query for
      contextInfo - context information around sandbox and multitenant state
      Returns:
      all categories whose context IDs match any of the given IDs
    • findByUrl

      @Policy(operationTypes=READ) Optional<D> findByUrl(String url, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds a category by the given url.
      Parameters:
      url - the url to look by
      context - the current context to look in
      Returns:
      The Category matching the url, or Optional.empty() if none found
    • findAllByUrls

      @Policy(operationTypes=READ) List<D> findAllByUrls(Iterable<String> urls, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Finds categories by the given urls.
      Parameters:
      urls - the urls to look by
      context - the current context to look in
      Returns:
      The Category matching the urls.
    • findAllByContextId

      @Policy(operationTypes=READ) List<D> findAllByContextId(Iterable<String> contextIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Returns all the Categories that match the contextIds.
      Parameters:
      contextIds - IDs to match against
      context - the current context to look in
      Returns:
      All the Categories that match the contextIds.