Class AbstractOrderPositionPriceDirective
java.lang.Object
ch.tocco.nice2.optional.webshop.impl.customdata.AbstractOrderPositionPriceDirective
- All Implemented Interfaces:
Nice2TemplateDirective
,freemarker.template.TemplateDirectiveModel
,freemarker.template.TemplateModel
- Direct Known Subclasses:
GetOrderPositionArticlePriceDirective
,GetOrderPositionTotalDirective
public abstract class AbstractOrderPositionPriceDirective
extends Object
implements Nice2TemplateDirective
-
Field Summary
Fields inherited from interface freemarker.template.TemplateModel
NOTHING
-
Constructor Summary
ConstructorDescriptionAbstractOrderPositionPriceDirective
(CommandExecutor commandExecutor, L10N l10N, CurrentArticlePriceService currentArticlePriceService, VatCalculationService vatCalculationService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] templateModels, freemarker.template.TemplateDirectiveBody templateDirectiveBody) protected abstract Optional
<BigDecimal> getAmount
(Entity orderPosition, GetPriceParams.PriceReturnType priceReturnType)
-
Field Details
-
commandExecutor
-
getPriceTask
-
-
Constructor Details
-
AbstractOrderPositionPriceDirective
public AbstractOrderPositionPriceDirective(CommandExecutor commandExecutor, L10N l10N, CurrentArticlePriceService currentArticlePriceService, VatCalculationService vatCalculationService)
-
-
Method Details
-
execute
public void execute(freemarker.core.Environment env, Map params, freemarker.template.TemplateModel[] templateModels, freemarker.template.TemplateDirectiveBody templateDirectiveBody) throws freemarker.template.TemplateException, IOException - Specified by:
execute
in interfacefreemarker.template.TemplateDirectiveModel
- Throws:
freemarker.template.TemplateException
IOException
-
getAmount
protected abstract Optional<BigDecimal> getAmount(Entity orderPosition, GetPriceParams.PriceReturnType priceReturnType)
-