Class DefaultReturnEntryBasedReturnableCheck
- java.lang.Object
-
- de.hybris.platform.returns.strategy.impl.DefaultReturnEntryBasedReturnableCheck
-
- All Implemented Interfaces:
ReturnableCheck
public class DefaultReturnEntryBasedReturnableCheck extends java.lang.Object implements ReturnableCheck
This class is used byDefaultReturnService
to provide information, if specified product is returnable. The implemented algorithm will check the corresponding 'returns entries' .
-
-
Constructor Summary
Constructors Constructor Description DefaultReturnEntryBasedReturnableCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected FlexibleSearchService
getFlexibleSearchService()
protected java.util.List<ReturnEntryModel>
getReturnEntry(AbstractOrderEntryModel entry)
boolean
perform(OrderModel order, AbstractOrderEntryModel orderentry, long returnQuantity)
Determines if the product is 'returnable' on base of existing returns entries entries.void
setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
-
-
Method Detail
-
perform
public boolean perform(OrderModel order, AbstractOrderEntryModel orderentry, long returnQuantity)
Determines if the product is 'returnable' on base of existing returns entries entries. 'True' will be returned, if there are no related 'returns entries' of if the quantity of the related 'returns entries' plus the specified 'return quantity' is less or equals to the total quantity of the ordered items so far.- Specified by:
perform
in 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'
-
getReturnEntry
protected java.util.List<ReturnEntryModel> getReturnEntry(AbstractOrderEntryModel entry)
-
getFlexibleSearchService
protected FlexibleSearchService getFlexibleSearchService()
-
setFlexibleSearchService
public void setFlexibleSearchService(FlexibleSearchService flexibleSearchService)
-
-