Class FindPricingWithCurrentPriceFactoryStrategy
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.order.strategies.calculation.impl.FindPricingWithCurrentPriceFactoryStrategy
- All Implemented Interfaces:
FindDiscountValuesStrategy,FindPriceStrategy,FindTaxValuesStrategy,ServiceLayerOnlyCalculationVerifier,UserNetCheckingStrategy,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
BundleCurrentFactoryFindPricingStrategy,FindSubscriptionPricingWithCurrentPriceFactoryStrategy
public class FindPricingWithCurrentPriceFactoryStrategy
extends AbstractBusinessService
implements FindPriceStrategy, FindDiscountValuesStrategy, FindTaxValuesStrategy, UserNetCheckingStrategy, org.springframework.context.ApplicationContextAware
Default implementation of price, taxes and discounts resolver strategies (
FindPriceStrategy,
FindDiscountValuesStrategy, FindTaxValuesStrategy) that resolves values for calculation from current
session's price factory. If no session price factory is set it uses OrderManager.getPriceFactory() which will
retrieve the default one according to system settings.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked by a BeanFactory after it has set all bean properties supplied.Resolves price value for the givenAbstractOrderEntryModel.Find applicableDiscountValues for the target order entry.Find applicable globalDiscountValues for the target order.Resolves tax value for the givenAbstractOrderEntryModelbasing on the underlying implementation.getDiscountInformation(BaseCriteria priceCriteria) Get discountsDiscountInformations for given criteria.getPriceInformation(BaseCriteria baseCriteria) Get prices informationPriceInformationfor given criteria.getTaxInformation(BaseCriteria priceCriteria) Get taxes informationTaxInformationfor given criteria.booleanImplement this to define whether a user should be treated as net or gross customer.voidsetApplicationContext(org.springframework.context.ApplicationContext ctx) voidsetFindDiscountValuesHooks(List<FindDiscountValuesHook> findDiscountValuesHooks) voidsetFindPriceHooks(List<FindPriceHook> findPriceHooks) Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
getCurrentTenant, setBeanName, setCurrentTenant, writeReplaceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.hybris.platform.order.strategies.calculation.ServiceLayerOnlyCalculationVerifier
isSLOnly
-
Constructor Details
-
FindPricingWithCurrentPriceFactoryStrategy
public FindPricingWithCurrentPriceFactoryStrategy()
-
-
Method Details
-
findTaxValues
Description copied from interface:FindTaxValuesStrategyResolves tax value for the givenAbstractOrderEntryModelbasing on the underlying implementation.- Specified by:
findTaxValuesin interfaceFindTaxValuesStrategy- Parameters:
entry-AbstractOrderEntryModel- Returns:
- collection of
TaxValues - Throws:
CalculationException
-
findBasePrice
Description copied from interface:FindPriceStrategyResolves price value for the givenAbstractOrderEntryModel. Please refer toFindPricingWithCurrentPriceFactoryStrategy, which resolves the price according to the current price factory.- Specified by:
findBasePricein interfaceFindPriceStrategy- Parameters:
entry-AbstractOrderEntryModel- Returns:
PriceValue- Throws:
CalculationException
-
findDiscountValues
public 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
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
-
getPriceInformation
Description copied from interface:FindPriceStrategyGet prices informationPriceInformationfor given criteria.- Specified by:
getPriceInformationin interfaceFindPriceStrategy- Parameters:
baseCriteria-BaseCriteria- Returns:
- the
Listof allPriceInformations which matching baseCriteria. If no matching prices were found, an empty collection is returned.
-
getDiscountInformation
Description copied from interface:FindDiscountValuesStrategyGet discountsDiscountInformations for given criteria.- Specified by:
getDiscountInformationin interfaceFindDiscountValuesStrategy- Parameters:
priceCriteria-BaseCriteria- Returns:
- the
Listof allDiscountInformations which matching baseCriteria. If no matching discounts were found, an empty collection is returned.
-
getTaxInformation
Description copied from interface:FindTaxValuesStrategyGet taxes informationTaxInformationfor given criteria.- Specified by:
getTaxInformationin interfaceFindTaxValuesStrategy- Parameters:
priceCriteria-BaseCriteria- Returns:
- the
Listof allTaxInformations which matching baseCriteria. If no matching taxes were found, an empty collection is returned.
-
isNetUser
Description copied from interface:UserNetCheckingStrategyImplement this to define whether a user should be treated as net or gross customer.- Specified by:
isNetUserin interfaceUserNetCheckingStrategy- Returns:
- true, if the given user is treated as a net customer
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext ctx) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
setFindDiscountValuesHooks
-
setFindPriceHooks
-
getFindDiscountValuesHooks
-
getFindPriceHooks
-
afterPropertiesSet
Description copied from class:AbstractServiceInvoked by a BeanFactory after it has set all bean properties supplied. Overwrite this method for adding/implementing additional code into the service. Important note: Please call alwayssuper.afterPropertiesSet()before or the java serialization won't work.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractService- Throws:
Exception- See Also:
-
InitializingBean.afterPropertiesSet()
-
getCurrentPriceFactory
-