Interface CustomerRatingService<D extends RatingDetail>

All Known Implementing Classes:
DefaultCustomerRatingService

public interface CustomerRatingService<D extends RatingDetail>
Actions that customers can perform with their Rating Details.
Author:
Cade Rea (cade-rea)
  • Method Details

    • readAllRatingsByCustomer

      org.springframework.data.domain.Page<D> readAllRatingsByCustomer(String customerId, @Nullable org.springframework.data.domain.Pageable page, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Read all of a customer's RatingDetails
      Parameters:
      customerId - The customer that created the rating.
      page - information about which page of results to return from the database
      contextInfo - Context information around sandbox and multitenant state.
      Returns:
      A page of RatingDetail
    • addRatingByCustomer

      D addRatingByCustomer(RatingRequest ratingRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Add a new RatingDetail. This will also update the corresponding RatingSummary.
      Parameters:
      ratingRequest - The data to populate the detail.
      context - Context information around sandbox and multitenant state.
      Returns:
      A persisted RatingDetail
    • updateRatingByCustomer

      D updateRatingByCustomer(String id, RatingRequest ratingRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Update an existing RatingDetail. The status will reset to PENDING if there is a review title or review text. This will also update the corresponding RatingSummary.
      Parameters:
      id - The id of the RatingDetail to edit.
      ratingRequest - The data to populate the detail.
      context - Context information around sandbox and multitenant state.
      Returns:
      The updated RatingDetail
    • deleteRatingByCustomer

      void deleteRatingByCustomer(String id, String customerId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Delete a rating. This will also update the corresponding RatingSummary.
      Parameters:
      id - The id of the RatingDetail to delete.
      customerId - The customer that owns the RatingDetail to delete
      context - Context information around sandbox and multitenant state.