Class DefaultConsignmentBasedReturnableCheck

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

public class DefaultConsignmentBasedReturnableCheck extends Object implements ReturnableCheck
This class is used by DefaultReturnService to provide information, if specified product is returnable.
  • Constructor Details

    • DefaultConsignmentBasedReturnableCheck

      public DefaultConsignmentBasedReturnableCheck()
  • Method Details

    • perform

      public boolean perform(OrderModel order, AbstractOrderEntryModel orderentry, long returnQuantity)
      Determines if the product is 'returnable'.
      The following checks are implemented:
      • FALSE: if the 'return quantity' is lesser 1 OR bigger than the total 'order' quantity
      • TRUE: if the maxReturnQuantity is bigger than specified 'return 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.
      The following checks are implemented:
      • -1: if there are no consignments at all
      • -1: if a matching consignment entry is not found
      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
    • getModelService

      protected ModelService getModelService()
    • setModelService

      public void setModelService(ModelService modelService)