Class DefaultReturnEntryBasedReturnableCheck

java.lang.Object
de.hybris.platform.returns.strategy.impl.DefaultReturnEntryBasedReturnableCheck
All Implemented Interfaces:
ReturnableCheck

public class DefaultReturnEntryBasedReturnableCheck extends Object implements ReturnableCheck
This class is used by DefaultReturnService to provide information, if specified product is returnable. The implemented algorithm will check the corresponding 'returns entries' .
  • Constructor Details

    • DefaultReturnEntryBasedReturnableCheck

      public DefaultReturnEntryBasedReturnableCheck()
  • Method Details

    • perform

      public boolean perform(OrderModel order, AbstractOrderEntryModel orderentry, long returnQuantity)
      Determines if the product is 'returnable' on base of existing returns entries. return false if the 'return quantity' is lesser 1 OR bigger than the total 'order' quantity.
      Specified by:
      perform in interface ReturnableCheck
      Parameters:
      order - the related original order
      orderentry - the ordered product which will be returned
      returnQuantity - the quantity of entries to be returned
      Returns:
      true if product is 'returnable'
    • maxReturnQuantity

      public long maxReturnQuantity(OrderModel order, AbstractOrderEntryModel orderentry)
      Determines the max returnable quantity of the product. Full quantity will be returned, if there are no related 'returns entries'.
      Specified by:
      maxReturnQuantity in interface ReturnableCheck
      Parameters:
      order - the related original order
      orderentry - the ordered product which will be returned
      Returns:
      max returnable quantity of the product
    • getReturnEntry

      protected List<ReturnEntryModel> getReturnEntry(AbstractOrderEntryModel entry)
    • getFlexibleSearchService

      protected FlexibleSearchService getFlexibleSearchService()
    • setFlexibleSearchService

      public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)