Class DefaultSLFindOrderDiscountValuesStrategy
- java.lang.Object
-
- de.hybris.platform.order.strategies.calculation.impl.servicelayer.DefaultSLFindOrderDiscountValuesStrategy
-
- All Implemented Interfaces:
FindDiscountValuesStrategy,ServiceLayerOnlyCalculationVerifier
public class DefaultSLFindOrderDiscountValuesStrategy extends java.lang.Object implements FindDiscountValuesStrategy
Implementation ofFindDiscountValuesStrategythat resolvesDiscountValues from the order's attachedDiscountModels.
-
-
Constructor Summary
Constructors Constructor Description DefaultSLFindOrderDiscountValuesStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<DiscountValue>findDiscountValues(AbstractOrderEntryModel entry)Find applicableDiscountValues for the target order entry.java.util.List<DiscountValue>findDiscountValues(AbstractOrderModel order)Find applicable globalDiscountValues for the target order.protected DiscountValuegetDiscountValue(DiscountModel discount)booleanisSLOnly()Implement this and return true if you are using only service-layer models-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.order.strategies.calculation.FindDiscountValuesStrategy
getDiscountInformation
-
-
-
-
Method Detail
-
findDiscountValues
public java.util.List<DiscountValue> findDiscountValues(AbstractOrderEntryModel entry) throws CalculationException
Description copied from interface:FindDiscountValuesStrategyFind applicableDiscountValues for the target order entry.- Specified by:
findDiscountValuesin interfaceFindDiscountValuesStrategy- Returns:
- List of
DiscountValues - Throws:
CalculationException
-
findDiscountValues
public java.util.List<DiscountValue> findDiscountValues(AbstractOrderModel order) throws CalculationException
Description copied from interface:FindDiscountValuesStrategyFind applicable globalDiscountValues for the target order. They may originate from the current session's price factory orDiscountModels directly attached to the target order.- Specified by:
findDiscountValuesin interfaceFindDiscountValuesStrategy- Returns:
- List of
DiscountValues - Throws:
CalculationException
-
isSLOnly
public boolean isSLOnly()
Description copied from interface:ServiceLayerOnlyCalculationVerifierImplement this and return true if you are using only service-layer models- Specified by:
isSLOnlyin interfaceServiceLayerOnlyCalculationVerifier- Returns:
- true, if only service-layer models are used
-
getDiscountValue
protected DiscountValue getDiscountValue(DiscountModel discount)
-
-