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

  • All Superinterfaces:
    com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>, com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
    All Known Implementing Classes:
    DefaultItemListService

    public interface ItemListService<P extends com.broadleafcommerce.cart.client.domain.ItemList>
    extends com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService<P>
    Service for obtaining, updating, deleting, and other operations on item lists.
    Author:
    Jacob Mitash
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void delete​(String listId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Delete an item list by id
      void delete​(P itemList, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Delete an item list
      void deleteAll​(Collection<String> listIds, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Delete multiple item lists by id
      org.springframework.data.domain.Page<P> readAllByContextIdAndAttachItemCount​(Iterable<String> ids, org.springframework.data.domain.Pageable page, cz.jirutka.rsql.parser.ast.Node filters, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads a collection of item lists by a list of IDs, and attaches an item count per list.
      P readByContextId​(String id, boolean hydrate, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Reads an item list by its ID, optionally hydrating the entity.
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService

        create, createAll, createAllAllowingPartialSuccess, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
      • Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.RsqlCrudEntityService

        readAll, readAll, readAll, readAll
    • Method Detail

      • readByContextId

        P readByContextId​(String id,
                          boolean hydrate,
                          @Nullable
                          com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Reads an item list by its ID, optionally hydrating the entity.
        Parameters:
        id - the ID of the item list to retrieve
        hydrate - whether to hydrate the item list or not
        context - the context of the request
        Returns:
        the item list with the given ID
        Throws:
        com.broadleafcommerce.data.tracking.core.exception.EntityMissingException - when no item list with the ID exists
      • readAllByContextIdAndAttachItemCount

        org.springframework.data.domain.Page<P> readAllByContextIdAndAttachItemCount​(Iterable<String> ids,
                                                                                     @Nullable
                                                                                     org.springframework.data.domain.Pageable page,
                                                                                     @Nullable
                                                                                     cz.jirutka.rsql.parser.ast.Node filters,
                                                                                     @Nullable
                                                                                     com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Reads a collection of item lists by a list of IDs, and attaches an item count per list.
        Parameters:
        ids - the IDs of the item lists to retrieve
        page - the requested page of results from the database
        filters - additional filters to apply in the query.
        context - the context of the request
        Returns:
        items lists each with its item count as an attribute
      • delete

        void delete​(P itemList,
                    @Nullable
                    com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Delete an item list
        Parameters:
        itemList - list to delete
        context - the context of the request
      • delete

        void delete​(String listId,
                    @Nullable
                    com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Delete an item list by id
        Specified by:
        delete in interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P extends com.broadleafcommerce.cart.client.domain.ItemList>
        Parameters:
        listId - list id to delete
        context - the context of the request
      • deleteAll

        void deleteAll​(Collection<String> listIds,
                       @Nullable
                       com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
        Delete multiple item lists by id
        Parameters:
        listIds - list ids to delete
        context - the context of the request