Package de.hybris.platform.product.impl
Class DefaultPriceService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
de.hybris.platform.product.impl.DefaultPriceService
- All Implemented Interfaces:
PriceService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationContextAware
public class DefaultPriceService
extends AbstractBusinessService
implements PriceService, org.springframework.context.ApplicationContextAware
Default implementation of the
PriceService.- 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.getAllPriceInformation(PriceCriteria priceCriteria) ReturnsProductPriceInformationsproduct price containing all applicable prices, discounts and taxes for the given criteria (product and net/gross state)getPriceInformations(PriceCriteria priceCriteria) Calculates all applicable prices for given criteria.Returns all availablePriceInformationfor the givenProductModeland the current session user.voidsetApplicationContext(org.springframework.context.ApplicationContext ctx) voidsetFindDiscountValuesStrategy(FindDiscountValuesStrategy findDiscountValuesStrategy) voidsetFindPriceStrategy(FindPriceStrategy findPriceStrategy) voidsetFindTaxValuesStrategy(FindTaxValuesStrategy findTaxValuesStrategy) voidsetTimeService(TimeService timeService) voidsetUserNetCheckingStrategy(UserNetCheckingStrategy userNetCheckingStrategy) voidsetUserService(UserService userService) 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, writeReplace
-
Constructor Details
-
DefaultPriceService
public DefaultPriceService()
-
-
Method Details
-
getPriceInformationsForProduct
Description copied from interface:PriceServiceReturns all availablePriceInformationfor the givenProductModeland the current session user.- Specified by:
getPriceInformationsForProductin interfacePriceService- Parameters:
product- the product- Returns:
- an empty list if no price information exists for the product and current session user.
-
getPriceInformations
Description copied from interface:PriceServiceCalculates all applicable prices for given criteria.- Specified by:
getPriceInformationsin interfacePriceService- Parameters:
priceCriteria-PriceCriteria- Returns:
- the list of
PriceInformation
-
getAllPriceInformation
Description copied from interface:PriceServiceReturnsProductPriceInformationsproduct price containing all applicable prices, discounts and taxes for the given criteria (product and net/gross state)This default implementation just calls
FindPriceStrategy.getPriceInformation(BaseCriteria),FindTaxValuesStrategy.getTaxInformation(BaseCriteria)andFindDiscountValuesStrategy.getDiscountInformation(BaseCriteria)and wraps the results inside aProductPriceInformationsobject.- Specified by:
getAllPriceInformationin interfacePriceService- Parameters:
priceCriteria-PriceCriteria- Returns:
ProductPriceInformationsthat contains prices,discount, taxes for given priceCriteria
-
setTimeService
-
setUserService
-
setFindPriceStrategy
-
setFindTaxValuesStrategy
-
setUserNetCheckingStrategy
-
setFindDiscountValuesStrategy
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext ctx) - Specified by:
setApplicationContextin interfaceorg.springframework.context.ApplicationContextAware
-
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()
-