Class PriceFactorySwitcher
- All Implemented Interfaces:
ItemLifecycleListener,PriceFactory,Serializable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory
Europe1PriceFactory.CachedTax, Europe1PriceFactory.CachedTaxValue, Europe1PriceFactory.DiscountRowMatchComparator, Europe1PriceFactory.PriceRowInfoComparator, Europe1PriceFactory.PriceRowMatchComparator, Europe1PriceFactory.TaxRowMatchComparatorNested classes/interfaces inherited from class de.hybris.platform.jalo.extension.Extension
Extension.RestrictedLanguagesProvider, Extension.RightsProviderNested classes/interfaces inherited from class de.hybris.platform.jalo.Manager
Manager.GenericManagerSingletonCreator, Manager.ManagerSingletonCreator -
Field Summary
Fields inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory
MATCH_ANY, MATCH_BY_PRODUCT_ID, USE_FAST_ALGORITHMSFields inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
DEFAULT_INITIAL_ATTRIBUTES, PRODUCT2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER, PRODUCT2OWNEUROPE1PRICESOWNEUROPE1PRICESHANDLER, PRODUCT2OWNEUROPE1TAXESOWNEUROPE1TAXESHANDLER, USER2OWNEUROPE1DISCOUNTSOWNEUROPE1DISCOUNTSHANDLER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllPriceInformations(SessionContext ctx, Product product, Date date, boolean net) Calculates a product price quote containing all applicable prices, discounts and taxes for the given product and net/gross state.getBasePrice(AbstractOrderEntry entry) override to define the base price of an order entrygetDiscountValues(AbstractOrder order) override to define (global) discounts for an order.override to define discount values for an order entry.getProductDiscountInformations(SessionContext ctx, Product product, Date date, boolean net) override this to show all discounts which may apply to the given productgetProductPriceInformations(SessionContext ctx, Product product, Date date, boolean net) Override this to show all prices available for the given productgetProductTaxInformations(SessionContext ctx, Product product, Date date) override this to show all taxes which apply to the given productgetTaxValues(AbstractOrderEntry entry) override to define tax values for an order entry.booleanoverride to define whether a user should be treated as net or gross customer.voidsetDiscountService(DiscountService discountService) voidsetFindDiscountValuesStrategy(FindDiscountValuesStrategy findDiscountValuesStrategy) voidsetFindPriceStrategy(FindPriceStrategy findPriceStrategy) voidsetFindTaxValuesStrategy(FindTaxValuesStrategy findTaxValuesStrategy) voidsetModelService(ModelService modelService) voidsetPriceService(PriceService priceService) voidsetPricingCustomizationDetector(PricingCustomizationDetector pricingCustomizationDetector) voidsetTaxService(TaxService taxService) voidsetUserNetCheckingStrategy(UserNetCheckingStrategy userNetCheckingStrategy) Methods inherited from class de.hybris.platform.europe1.jalo.Europe1PriceFactory
adjustDate, appendProductConditions, appendUserConditions, beforeItemCreation, checkAllDiscountRows, checkAllDiscountRows, checkAllGlobalDiscountRows, checkAllGlobalDiscountRows, checkAllPriceRows, checkAllPriceRows, checkAllTaxRows, checkAllTaxRows, checkBeforeItemRemoval, createDiscountRow, createDiscountRow, createEssentialData, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createPriceRow, createPriceRow, createProductTaxGroup, createProjectData, createTaxRow, createTaxRow, createTaxRow, createUserPriceGroup, createUserTaxGroup, extractProductId, extractProductId, fillTaxCache, filterDiscountRows4Price, filterPriceRows, filterPriceRows4Info, filterPriceRows4Price, filterTaxRows4Price, getCachedTaxes, getCounterpartItem, getCounterpartItem, getCounterpartItem, getDiscountInformations, getEnumFromContextOrItem, getEnumFromGroups, getEurope1Discounts, getEurope1Discounts, getEurope1Discounts, getEurope1Discounts, getEurope1Prices, getEurope1Prices, getEurope1Taxes, getEurope1Taxes, getInstance, getPDG, getPDG, getPDTRowsQueryBuilderFor, getPPG, getPPG, getPriceInformations, getProductDiscountRows, getProductDiscountRows, getProductDiscountRowsFast, getProductPriceRows, getProductPriceRows, getProductPriceRowsFast, getProductTaxGroup, getProductTaxRows, getProductTaxRows, getProductTaxRowsFast, getPTG, getPTG, getRealPartOfPriceRows, getSuperCachedTaxes, getTaxInformations, getUDG, getUDG, getUDG, getUPG, getUPG, getUPG, getUserGlobalDiscountRows, getUserPriceGroup, getUserTaxGroup, getUTG, getUTG, getUTG, init, invalidateTaxCache, isCachingTaxes, isCreatorDisabled, matchDiscountRows, matchPriceRowForPrice, matchPriceRowsForInfo, matchTaxRows, notifyItemRemoval, queryDiscounts4Price, queryPriceRows4Price, queryPriceRows4Price, queryTax4Price, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, removeRowsFor, setEurope1Discounts, setEurope1Discounts, setEurope1Discounts, setEurope1Discounts, setEurope1Prices, setEurope1Prices, setEurope1Taxes, setEurope1Taxes, setRetrieveChannelStrategy, superQueryTax4PriceMethods inherited from class de.hybris.platform.europe1.jalo.GeneratedEurope1PriceFactory
addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Discounts, addToOwnEurope1Prices, addToOwnEurope1Prices, addToOwnEurope1Taxes, addToOwnEurope1Taxes, createDiscountRow, createDiscountRow, createGlobalDiscountRow, createGlobalDiscountRow, createPriceRow, createPriceRow, createTaxRow, createTaxRow, getDefaultAttributeModes, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PDG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PPG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_PTG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UDG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UPG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getEurope1PriceFactory_UTG, getName, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Discounts, getOwnEurope1Prices, getOwnEurope1Prices, getOwnEurope1Taxes, getOwnEurope1Taxes, getUserDiscountGroup, getUserDiscountGroup, getUserPriceGroup, getUserPriceGroup, getUserTaxGroup, getUserTaxGroup, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Discounts, removeFromOwnEurope1Prices, removeFromOwnEurope1Prices, removeFromOwnEurope1Taxes, removeFromOwnEurope1Taxes, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PDG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PPG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_PTG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UDG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UPG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setEurope1PriceFactory_UTG, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Discounts, setOwnEurope1Prices, setOwnEurope1Prices, setOwnEurope1Taxes, setOwnEurope1Taxes, setUserDiscountGroup, setUserDiscountGroup, setUserPriceGroup, setUserPriceGroup, setUserTaxGroup, setUserTaxGroupMethods inherited from class de.hybris.platform.jalo.order.price.AbstractPriceFactory
getAllPriceInformations, getProductDiscountInformations, getProductPriceInformations, getProductTaxInformationsMethods inherited from class de.hybris.platform.jalo.extension.Extension
checkBeforeInitialization, createSampleData, getCreatorDescription, getCreatorName, getCreatorParameterDefault, getCreatorParameterNames, getCreatorParameterPossibleValues, getRemote, notifyInitializationEnd, notifyInitializationStart, onFirstSessionCreation, writeReplaceMethods inherited from class de.hybris.platform.jalo.Manager
afterItemCreation, destroy, extractNonRequiredRemoteFromItem, extractRequiredRemoteFromItem, getAllValuesSessionContext, getAttribute, getAttributeMap, getFirstItemByAttribute, getFirstItemByAttribute, getRemoteManagerClass, getSession, getSingletonManagerInstance, getTenant, getTransientObject, getTransientObjectMap, setAttribute, setTenant, setTransientObject, wrap
-
Constructor Details
-
PriceFactorySwitcher
public PriceFactorySwitcher()
-
-
Method Details
-
getAllPriceInformations
public ProductPriceInformations getAllPriceInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryCalculates a product price quote containing all applicable prices, discounts and taxes for the given product and net/gross state.This default implementation just calls
AbstractPriceFactory.getProductPriceInformations(Product, Date, boolean),AbstractPriceFactory.getProductTaxInformations(Product, Date)andAbstractPriceFactory.getProductDiscountInformations(Product, Date, boolean)and wraps the results inside aProductPriceInformationsobject.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
AbstractPriceFactory.getProductPriceInformations(Product, Date, boolean),AbstractPriceFactory.getProductTaxInformations(Product, Date)andAbstractPriceFactory.getProductDiscountInformations(Product, Date, boolean)since these methods are called byProductdirectly.- Specified by:
getAllPriceInformationsin interfacePriceFactory- Overrides:
getAllPriceInformationsin classEurope1PriceFactory- Throws:
JaloPriceFactoryException- if a calculation error occured
-
getProductPriceInformations
public List<PriceInformation> getProductPriceInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryOverride this to show all prices available for the given product- Specified by:
getProductPriceInformationsin interfacePriceFactory- Overrides:
getProductPriceInformationsin classEurope1PriceFactoryproduct- the productnet- the net/gross state of the requested prices- Returns:
- a list of
PriceInformationobjects - Throws:
JaloPriceFactoryException- if price calculation error occured
-
getProductTaxInformations
public List<TaxInformation> getProductTaxInformations(SessionContext ctx, Product product, Date date) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryoverride this to show all taxes which apply to the given product- Specified by:
getProductTaxInformationsin interfacePriceFactory- Overrides:
getProductTaxInformationsin classEurope1PriceFactoryproduct- the product- Returns:
- a list of
TaxInformationobjects - Throws:
JaloPriceFactoryException- if price calculation error occured
-
getProductDiscountInformations
public List<DiscountInformation> getProductDiscountInformations(SessionContext ctx, Product product, Date date, boolean net) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryoverride this to show all discounts which may apply to the given product- Specified by:
getProductDiscountInformationsin interfacePriceFactory- Overrides:
getProductDiscountInformationsin classEurope1PriceFactoryproduct- the product- Returns:
- a list of
DiscountInformationobjects - Throws:
JaloPriceFactoryException- if price calculation error occured
-
isNetUser
Description copied from class:AbstractPriceFactoryoverride to define whether a user should be treated as net or gross customer.- Specified by:
isNetUserin interfacePriceFactory- Overrides:
isNetUserin classAbstractPriceFactory- Returns:
- false as default
-
getTaxValues
Description copied from class:AbstractPriceFactoryoverride to define tax values for an order entry.- Specified by:
getTaxValuesin interfacePriceFactory- Overrides:
getTaxValuesin classEurope1PriceFactory- Returns:
- empty list as default
- Throws:
JaloPriceFactoryException
-
getBasePrice
Description copied from class:AbstractPriceFactoryoverride to define the base price of an order entry- Specified by:
getBasePricein interfacePriceFactory- Overrides:
getBasePricein classEurope1PriceFactory- Returns:
- a price with the order's currency iso code, 0.0 as value and the order's net status
- Throws:
JaloPriceFactoryException
-
getDiscountValues
public List<DiscountValue> getDiscountValues(AbstractOrderEntry entry) throws JaloPriceFactoryException Description copied from class:AbstractPriceFactoryoverride to define discount values for an order entry.- Specified by:
getDiscountValuesin interfacePriceFactory- Overrides:
getDiscountValuesin classEurope1PriceFactory- Returns:
- empty list as default
- Throws:
JaloPriceFactoryException
-
getDiscountValues
Description copied from class:AbstractPriceFactoryoverride to define (global) discounts for an order. these discounts are applied to the whole order, not just to one entry likeAbstractPriceFactory.getDiscountValues(AbstractOrderEntry)- Specified by:
getDiscountValuesin interfacePriceFactory- Overrides:
getDiscountValuesin classEurope1PriceFactory- Returns:
- empty list as default
- Throws:
JaloPriceFactoryException
-
setModelService
-
setTaxService
-
setDiscountService
-
setPriceService
-
setUserNetCheckingStrategy
-
setFindPriceStrategy
-
setFindTaxValuesStrategy
-
setFindDiscountValuesStrategy
-
setPricingCustomizationDetector
public void setPricingCustomizationDetector(PricingCustomizationDetector pricingCustomizationDetector)
-