Interface ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>

All Known Implementing Classes:
ExternalItemListProvider

public interface ItemListProvider<P extends com.broadleafcommerce.cart.client.domain.ItemList>
A provider of Item Lists.
Author:
Jacob Mitash
  • Method Summary

    Modifier and Type
    Method
    Description
    create(P itemList, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Creates an item list.
    void
    delete(String listId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Deletes an item list by ID.
    void
    delete(Set<String> listIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Deletes multiple item lists by IDs.
    readById(String listId, boolean hydrate, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Reads a specific item list by its ID and optionally hydrates the items.
    default P
    readById(String listId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Reads a specific item list by its ID.
    org.springframework.data.domain.Page<P>
    readByIds(Set<String> listIds, cz.jirutka.rsql.parser.ast.Node filters, org.springframework.data.domain.Pageable page, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Reads specific item lists by their IDs.
    replace(P itemList, String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Replaces an item list.
    update(P itemList, String id, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    Updates an item list.
  • Method Details

    • readById

      default P readById(String listId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads a specific item list by its ID.
      Parameters:
      listId - the ID of the item list to retrieve
      context - the context of the request
      Returns:
      the item list with the given ID
    • readById

      P readById(String listId, boolean hydrate, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads a specific item list by its ID and optionally hydrates the items.
      Parameters:
      listId - the ID of the item list to retrieve
      hydrate - if true, causes the items to by hydrated
      context - the context of the request
      Returns:
      the item list with the given ID
    • readByIds

      org.springframework.data.domain.Page<P> readByIds(Set<String> listIds, @Nullable cz.jirutka.rsql.parser.ast.Node filters, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads specific item lists by their IDs.
      Parameters:
      listIds - the IDs of the item lists to retrieve
      filters - additional filters to apply in the query.
      page - the requested page of results from the database
      context - the context of the request
      Returns:
      the item lists with the given IDs
    • create

      P create(P itemList, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Creates an item list.
      Parameters:
      itemList - the item list to create
      context - the context of the request
      Returns:
      the created item list
    • replace

      P replace(P itemList, String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Replaces an item list.
      Parameters:
      itemList - the item list to replace with
      id - the ID of the item list
      context - the context of the request
      Returns:
      the replaced item list
    • update

      P update(P itemList, String id, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Updates an item list.
      Parameters:
      itemList - the item list to update with
      id - the ID of the item list
      context - the context of the request
      Returns:
      the updated item list
    • delete

      void delete(String listId, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deletes an item list by ID.
      Parameters:
      listId - the ID of the item list to delete
      context - the context of the request
    • delete

      void delete(Set<String> listIds, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Deletes multiple item lists by IDs.
      Parameters:
      listIds - the list of IDs of the item lists to delete
      context - the context of the request