Class OrderItemOfferUtils

java.lang.Object
com.broadleafcommerce.orderoperation.service.util.OrderItemOfferUtils

public class OrderItemOfferUtils extends Object
Utility class to aid in processing OrderItems regarding offers.
Author:
Sunny Yu
  • Constructor Summary

    Constructors
    Constructor
    Description
    OrderItemOfferUtils(com.fasterxml.jackson.databind.ObjectMapper mapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.fasterxml.jackson.databind.ObjectMapper
     
    List<com.broadleafcommerce.order.common.domain.OfferItemDetail>
    getQualifierOrderItemDetails(com.broadleafcommerce.order.client.domain.OrderItem item)
    Gets the offer qualifier OfferItemDetails that the given OrderItem was a target of.
    getQualifierOrderItemIds(com.broadleafcommerce.order.client.domain.OrderItem item)
    Retrieves the offer qualifier OrderItem.getId() from the given target OrderItem.
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    boolean
    isFreeGiftItem(com.broadleafcommerce.order.client.domain.OrderItem item)
    Identifies if the given OrderItem is a free gift item.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • OrderItemOfferUtils

      public OrderItemOfferUtils(com.fasterxml.jackson.databind.ObjectMapper mapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
  • Method Details

    • isFreeGiftItem

      public boolean isFreeGiftItem(com.broadleafcommerce.order.client.domain.OrderItem item)
      Identifies if the given OrderItem is a free gift item.
      Parameters:
      item - OrderItem to check against
      Returns:
      true if the given OrderItem is a free gift item, otherwise false
    • getQualifierOrderItemDetails

      public List<com.broadleafcommerce.order.common.domain.OfferItemDetail> getQualifierOrderItemDetails(com.broadleafcommerce.order.client.domain.OrderItem item)
      Gets the offer qualifier OfferItemDetails that the given OrderItem was a target of.
      Parameters:
      item - the OrderItem to get the offer qualifier OfferItemDetails from
      Returns:
      the offer qualifier OfferItemDetails that the given OrderItem was a target of
    • getQualifierOrderItemIds

      public List<String> getQualifierOrderItemIds(com.broadleafcommerce.order.client.domain.OrderItem item)
      Retrieves the offer qualifier OrderItem.getId() from the given target OrderItem.
      Parameters:
      item - the OrderItem to retrieve the target OrderItem.getId() from
      Returns:
      the target OrderItem.getId() from the given OrderItem
    • getMapper

      protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()