public class PriceUtilsImpl extends Object implements PriceUtils
| Modifier and Type | Class and Description |
|---|---|
class |
PriceUtilsImpl.Europe1DetailedPrice |
| Modifier and Type | Field and Description |
|---|---|
static String |
PARAM_DATERANGE_FORMAT |
static String |
PARAM_DATERANGE_KEY |
static String |
PARAM_QUANTITY_KEY |
static String |
PARAM_UNIT_KEY |
| Constructor and Description |
|---|
PriceUtilsImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected double |
applyDiscounts(int minQuantity,
double price) |
protected void |
assureValidPrice() |
protected void |
calculate(Product product) |
protected Collection |
createDetailedPrices(Collection priceInfos) |
static String |
formatCurrency(double value,
Currency currency) |
static String |
formatPrice(double value) |
protected List |
getDiscountValues(Collection discountInfos,
Currency curr) |
PriceContainer |
getPriceContainer() |
PriceContainer |
getPriceContainer(Product product)
Returns prices value object that contains information about product prices.
|
PriceContainer |
getPriceContainer(Product product,
PrintPublication publication) |
protected PriceInformation |
getPrimaryPrice(Collection priceInfos)
Simply takes the lowest price as primary price.
|
Date |
getTruncatedDate()
returns a
Date of the current Day at midnight. |
void |
initialize(Product product,
PrintPublication publication)
Initializes bean with new
Product and PrintPublication (if given). |
void |
setPriceContainer(PriceContainer priceContainer) |
protected void |
storeValidityAttributes(Product product) |
public static final String PARAM_UNIT_KEY
public static final String PARAM_QUANTITY_KEY
public static final String PARAM_DATERANGE_KEY
public static final String PARAM_DATERANGE_FORMAT
public static String formatPrice(double value)
protected double applyDiscounts(int minQuantity,
double price)
protected void assureValidPrice()
protected void calculate(Product product) throws JaloPriceFactoryException
JaloPriceFactoryExceptionprotected Collection createDetailedPrices(Collection priceInfos)
public PriceContainer getPriceContainer(Product product)
PriceUtilsPriceUtilsImpl.Europe1DetailedPrice objects that can be used.getPriceContainer in interface PriceUtilsproduct - - that prices will be calculated forPriceContainer objectpublic PriceContainer getPriceContainer(Product product, PrintPublication publication)
getPriceContainer in interface PriceUtilsproduct - - the prices will be calculated forpublication - - publication, if other than in session managerPriceContainer objectprotected List getDiscountValues(Collection discountInfos, Currency curr)
public PriceContainer getPriceContainer()
PriceContainer objectprotected PriceInformation getPrimaryPrice(Collection priceInfos)
priceInfos - public Date getTruncatedDate()
Date of the current Day at midnight. This method can be used when calling
Product.getPriceInformations() to assure that price informations can be cached during one day.public void initialize(Product product, PrintPublication publication)
Product and PrintPublication (if given). Bean data will be recalculated.product - publication - public void setPriceContainer(PriceContainer priceContainer)
priceContainer - protected void storeValidityAttributes(Product product)
Copyright © 2017 SAP SE. All Rights Reserved.