Class DefaultConsignmentBasedReturnableCheck
- java.lang.Object
-
- de.hybris.platform.returns.strategy.impl.DefaultConsignmentBasedReturnableCheck
-
- All Implemented Interfaces:
ReturnableCheck
public class DefaultConsignmentBasedReturnableCheck extends java.lang.Object implements ReturnableCheck
This class is used byDefaultReturnServiceto provide information, if specified product is returnable.
-
-
Constructor Summary
Constructors Constructor Description DefaultConsignmentBasedReturnableCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ModelServicegetModelService()booleanperform(OrderModel order, AbstractOrderEntryModel orderentry, long returnQuantity)Determines if the product is 'returnable'.voidsetModelService(ModelService modelService)
-
-
-
Method Detail
-
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
- FALSE: if there are no consignments at all
- TRUE: if the status is SHIPEPD and the specified 'return quantity' is lower or equal than the 'shipped 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'
-
getModelService
protected ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
-