Class DefaultReturnEntryBasedReturnableCheck
java.lang.Object
de.hybris.platform.returns.strategy.impl.DefaultReturnEntryBasedReturnableCheck
- All Implemented Interfaces:
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected FlexibleSearchServiceprotected List<ReturnEntryModel>longmaxReturnQuantity(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' on base of existing returns entries.voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
Constructor Details
-
DefaultReturnEntryBasedReturnableCheck
public DefaultReturnEntryBasedReturnableCheck()
-
-
Method Details
-
perform
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:
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. Full quantity will be returned, if there are no related 'returns entries'.- Specified by:
maxReturnQuantityin interfaceReturnableCheck- Parameters:
order- the related original orderorderentry- the ordered product which will be returned- Returns:
- max returnable quantity of the product
-
getReturnEntry
-
getFlexibleSearchService
-
setFlexibleSearchService
-