org.broadleafcommerce.core.rating.service
Class RatingServiceImpl

java.lang.Object
  extended by org.broadleafcommerce.core.rating.service.RatingServiceImpl
All Implemented Interfaces:
RatingService

@Service(value="blRatingService")
public class RatingServiceImpl
extends Object
implements RatingService


Constructor Summary
RatingServiceImpl()
           
 
Method Summary
 void deleteRatingSummary(RatingSummary ratingSummary)
           
 void markReviewHelpful(Long reviewId, Customer customer, Boolean helpful)
           
 void rateItem(String itemId, RatingType type, Customer customer, Double rating)
           
 Map<String,RatingSummary> readRatingSummaries(List<String> itemIds, RatingType type)
           
 RatingSummary readRatingSummary(String itemId, RatingType type)
           
 ReviewDetail readReviewByCustomerAndItem(Customer customer, String itemId)
          Reads a ReviewDetail by the given customer and the itemId
 List<ReviewDetail> readReviews(String itemId, RatingType type, int start, int finish, RatingSortType sortBy)
           
 void reviewItem(String itemId, RatingType type, Customer customer, Double rating, String reviewText)
           
 RatingSummary saveRatingSummary(RatingSummary ratingSummary)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatingServiceImpl

public RatingServiceImpl()
Method Detail

deleteRatingSummary

@Transactional(value="blTransactionManager")
public void deleteRatingSummary(RatingSummary ratingSummary)
Specified by:
deleteRatingSummary in interface RatingService

markReviewHelpful

@Transactional(value="blTransactionManager")
public void markReviewHelpful(Long reviewId,
                                            Customer customer,
                                            Boolean helpful)
Specified by:
markReviewHelpful in interface RatingService

rateItem

@Transactional(value="blTransactionManager")
public void rateItem(String itemId,
                                   RatingType type,
                                   Customer customer,
                                   Double rating)
Specified by:
rateItem in interface RatingService

readRatingSummary

public RatingSummary readRatingSummary(String itemId,
                                       RatingType type)
Specified by:
readRatingSummary in interface RatingService

readRatingSummaries

public Map<String,RatingSummary> readRatingSummaries(List<String> itemIds,
                                                     RatingType type)
Specified by:
readRatingSummaries in interface RatingService

readReviews

public List<ReviewDetail> readReviews(String itemId,
                                      RatingType type,
                                      int start,
                                      int finish,
                                      RatingSortType sortBy)
Specified by:
readReviews in interface RatingService

saveRatingSummary

@Transactional(value="blTransactionManager")
public RatingSummary saveRatingSummary(RatingSummary ratingSummary)
Specified by:
saveRatingSummary in interface RatingService

reviewItem

@Transactional(value="blTransactionManager")
public void reviewItem(String itemId,
                                     RatingType type,
                                     Customer customer,
                                     Double rating,
                                     String reviewText)
Specified by:
reviewItem in interface RatingService

readReviewByCustomerAndItem

public ReviewDetail readReviewByCustomerAndItem(Customer customer,
                                                String itemId)
Description copied from interface: RatingService
Reads a ReviewDetail by the given customer and the itemId

Specified by:
readReviewByCustomerAndItem in interface RatingService
Returns:
review, or null if review is not found


Copyright © 2012. All Rights Reserved.