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,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
BundleCurrentFactoryFindPricingStrategy,FindPricingForConfigurableProductsStrategy,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 usesOrderManager.getPriceFactory()which will retrieve the default one according to system settings.- See Also:
- Serialized Form
-
-
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, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description FindPricingWithCurrentPriceFactoryStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()Invoked by a BeanFactory after it has set all bean properties supplied.PriceValuefindBasePrice(AbstractOrderEntryModel entry)Resolves price value for the givenAbstractOrderEntryModel.java.util.List<DiscountValue>findDiscountValues(AbstractOrderEntryModel entry)Find applicableDiscountValues for the target order entry.java.util.List<DiscountValue>findDiscountValues(AbstractOrderModel order)Find applicable globalDiscountValues for the target order.java.util.CollectionfindTaxValues(AbstractOrderEntryModel entry)Resolves tax value for the givenAbstractOrderEntryModelbasing on the underlying implementation.PriceFactorygetCurrentPriceFactory()java.util.List<DiscountInformation>getDiscountInformation(BaseCriteria priceCriteria)Get discountsDiscountInformations for given criteria.java.util.List<PriceInformation>getPriceInformation(BaseCriteria baseCriteria)Get prices informationPriceInformationfor given criteria.java.util.List<TaxInformation>getTaxInformation(BaseCriteria priceCriteria)Get taxes informationTaxInformationfor given criteria.booleanisNetUser(UserModel user)Implement this to define whether a user should be treated as net or gross customer.voidsetApplicationContext(org.springframework.context.ApplicationContext ctx)-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.hybris.platform.order.strategies.calculation.ServiceLayerOnlyCalculationVerifier
isSLOnly
-
-
-
-
Method Detail
-
findTaxValues
public java.util.Collection findTaxValues(AbstractOrderEntryModel entry) throws CalculationException
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
public PriceValue findBasePrice(AbstractOrderEntryModel entry) throws CalculationException
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 java.util.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
public java.util.List<DiscountValue> findDiscountValues(AbstractOrderModel order) throws CalculationException
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
public java.util.List<PriceInformation> getPriceInformation(BaseCriteria baseCriteria)
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
public java.util.List<DiscountInformation> getDiscountInformation(BaseCriteria priceCriteria)
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
public java.util.List<TaxInformation> getTaxInformation(BaseCriteria priceCriteria)
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
public boolean isNetUser(UserModel user)
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
-
afterPropertiesSet
public void afterPropertiesSet() throws java.lang.ExceptionDescription 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:
java.lang.Exception- See Also:
InitializingBean.afterPropertiesSet()
-
getCurrentPriceFactory
public PriceFactory getCurrentPriceFactory()
-
-