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,java.io.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 thePriceService.- 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 DefaultPriceService()
-
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.ProductPriceInformationsgetAllPriceInformation(PriceCriteria priceCriteria)ReturnsProductPriceInformationsproduct price containing all applicable prices, discounts and taxes for the given criteria (product and net/gross state)java.util.List<PriceInformation>getPriceInformations(PriceCriteria priceCriteria)Calculates all applicable prices for given criteria.java.util.List<PriceInformation>getPriceInformationsForProduct(ProductModel product)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, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
getPriceInformationsForProduct
public java.util.List<PriceInformation> getPriceInformationsForProduct(ProductModel product)
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
public java.util.List<PriceInformation> getPriceInformations(PriceCriteria priceCriteria)
Description copied from interface:PriceServiceCalculates all applicable prices for given criteria.- Specified by:
getPriceInformationsin interfacePriceService- Parameters:
priceCriteria-PriceCriteria- Returns:
- the list of
PriceInformation
-
getAllPriceInformation
public ProductPriceInformations getAllPriceInformation(PriceCriteria priceCriteria)
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
public void setTimeService(TimeService timeService)
-
setUserService
public void setUserService(UserService userService)
-
setFindPriceStrategy
public void setFindPriceStrategy(FindPriceStrategy findPriceStrategy)
-
setFindTaxValuesStrategy
public void setFindTaxValuesStrategy(FindTaxValuesStrategy findTaxValuesStrategy)
-
setUserNetCheckingStrategy
public void setUserNetCheckingStrategy(UserNetCheckingStrategy userNetCheckingStrategy)
-
setFindDiscountValuesStrategy
public void setFindDiscountValuesStrategy(FindDiscountValuesStrategy findDiscountValuesStrategy)
-
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()
-
-