Class DefaultConsignmentBasedReturnableCheck
java.lang.Object
de.hybris.platform.returns.strategy.impl.DefaultConsignmentBasedReturnableCheck
- All Implemented Interfaces:
ReturnableCheck
This class is used by
DefaultReturnService to provide information, if
specified product is returnable.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ModelServicelongmaxReturnQuantity(OrderModel order, AbstractOrderEntryModel orderentry) Determines the max returnable quantity of the product.booleanperform(OrderModel order, AbstractOrderEntryModel orderentry, long returnQuantity) Determines if the product is 'returnable'.voidsetModelService(ModelService modelService)
-
Constructor Details
-
DefaultConsignmentBasedReturnableCheck
public DefaultConsignmentBasedReturnableCheck()
-
-
Method Details
-
perform
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:
performin interfaceReturnableCheck- Parameters:
order- the related original orderorderentry- the ordered product which will be returnedreturnQuantity- the quantity of entries to be returned- Returns:
- true if product is 'returnable'
-
maxReturnQuantity
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:
maxReturnQuantityin interfaceReturnableCheck- Parameters:
order- the related original orderorderentry- the ordered product which will be returned- Returns:
- max returnable quantity of the product
-
getModelService
-
setModelService
-