Class RatingAggregation

java.lang.Object
com.skava.ratingandreviews.batch.RatingAggregation

@Component public class RatingAggregation extends Object

RatingAggregation class

This Class provides aggregate and triggerEvent methods which is used to produce the rating summary process collection and trigger event with the details of collectionId, itemId, ratingsCount, ratingDistribution, finalRating, storeId, authToken .

  • Field Details

  • Constructor Details

  • Method Details

    • aggregate

      public void aggregate(RatingReviewDomain ratingsReviewsDomain, String storeId, String authToken)
      aggregate method is used to create rating summary domain in which accumulatedTotal, finalRating,ratingCount,ratingDistribution,collectionId and itemId of ratingReviewdomain and maximum rating is stored and from here the event is triggered with the help of trigger event function with required details.
      Parameters:
      ratingsReviewsDomain - Holds the collection id and item id of the microservice.
      storeId - Holds the identifier of the store of the microservice.
      authToken - Holds the authToken of the microservice.