public class DummyPriceFactoryImpl extends Object implements PriceFactory
| Constructor and Description |
|---|
DummyPriceFactoryImpl() |
| Modifier and Type | Method and Description |
|---|---|
ProductPriceInformations |
getAllPriceInformations(SessionContext ctx,
Product product,
Date date,
boolean net)
Implement this to calculates a product price quote containing all applicable prices, discounts and taxes for the
given product and net/gross state.
|
PriceValue |
getBasePrice(AbstractOrderEntry entry)
Implement this to define the
base price of an order entry |
List |
getDiscountValues(AbstractOrder order)
Implement this to define
(global) discount values for an order. |
List |
getDiscountValues(AbstractOrderEntry entry)
Implement this to define
discount values for an order entry. |
List |
getProductDiscountInformations(SessionContext ctx,
Product product,
Date date,
boolean net)
Implement this to show all discounts which may apply to the given product
|
List |
getProductPriceInformations(SessionContext ctx,
Product product,
Date date,
boolean net)
Implement this to show all prices available for the given product
|
List |
getProductTaxInformations(SessionContext ctx,
Product product,
Date date)
Implement this to show all taxes which apply to the given product
|
Collection |
getTaxValues(AbstractOrderEntry entry)
Implement this to define
tax values for an order entry. |
boolean |
isNetUser(User user)
Implement this to define whether a user should be treated as net or gross customer.
|
public ProductPriceInformations getAllPriceInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException
PriceFactory
This default implementation just calls
PriceFactory.getProductPriceInformations(SessionContext, Product, Date, boolean),
PriceFactory.getProductTaxInformations(SessionContext, Product, Date ) and
PriceFactory.getProductDiscountInformations(SessionContext, Product, Date, boolean )
and wraps the results inside a ProductPriceInformations object.
Override to define the prices, taxes and discounts for all occasions when no order or order entry is available,
e.g. for product lists. Please take care also to override
PriceFactory.getProductPriceInformations(SessionContext, Product, Date, boolean ),
PriceFactory.getProductTaxInformations(SessionContext, Product, Date) and
PriceFactory.getProductDiscountInformations(SessionContext, Product, Date, boolean ) since these methods
are called by Product directly.
getAllPriceInformations in interface PriceFactoryJaloPriceFactoryException - if a calculation error occuredpublic PriceValue getBasePrice(AbstractOrderEntry entry) throws JaloPriceFactoryException
PriceFactorybase price of an order entrygetBasePrice in interface PriceFactoryJaloPriceFactoryExceptionpublic List getDiscountValues(AbstractOrder order) throws JaloPriceFactoryException
PriceFactory(global) discount values for an order.
These discount values are applied to the whole order, not just to one entry like
PriceFactory.getDiscountValues(AbstractOrderEntry)getDiscountValues in interface PriceFactoryJaloPriceFactoryExceptionpublic List getDiscountValues(AbstractOrderEntry entry) throws JaloPriceFactoryException
PriceFactorydiscount values for an order entry.getDiscountValues in interface PriceFactoryJaloPriceFactoryExceptionpublic List getProductDiscountInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException
PriceFactorygetProductDiscountInformations in interface PriceFactoryproduct - the productDiscountInformation objectsJaloPriceFactoryException - if price calculation error occuredpublic List getProductPriceInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException
PriceFactorygetProductPriceInformations in interface PriceFactoryproduct - the productnet - the net/gross state of the requested pricesPriceInformation objectsJaloPriceFactoryException - if price calculation error occuredpublic List getProductTaxInformations(SessionContext ctx, Product product, Date date) throws JaloPriceFactoryException
PriceFactorygetProductTaxInformations in interface PriceFactoryproduct - the productTaxInformation objectsJaloPriceFactoryException - if price calculation error occuredpublic Collection getTaxValues(AbstractOrderEntry entry) throws JaloPriceFactoryException
PriceFactorytax values for an order entry.getTaxValues in interface PriceFactoryJaloPriceFactoryExceptionpublic boolean isNetUser(User user)
PriceFactoryisNetUser in interface PriceFactoryCopyright © 2017 SAP SE. All Rights Reserved.