Class DefaultTmaPriceDataFactory
java.lang.Object
de.hybris.platform.commercefacades.product.impl.DefaultPriceDataFactory
de.hybris.platform.b2ctelcofacades.price.impl.DefaultTmaPriceDataFactory
- All Implemented Interfaces:
TmaPriceDataFactory,de.hybris.platform.commercefacades.product.PriceDataFactory,Serializable
public class DefaultTmaPriceDataFactory
extends de.hybris.platform.commercefacades.product.impl.DefaultPriceDataFactory
implements TmaPriceDataFactory
Default implementation of the
PriceDataFactory to always create
SubscriptionPricePlanData.- Since:
- 6.7
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(PriceDataType priceType, BigDecimal value, CurrencyModel currency) Creates a PriceData object with a formatted currency string based on the price type and currency.create(PriceDataType priceType, BigDecimal value, String currencyIso) Creates a PriceData object with a formatted currency string based on the price type and currency ISO code.protected PriceDataformatPriceValue(BigDecimal value, CurrencyModel currency) Obtains a formatted string for the given price value and currency.getPriceDataTypeForProduct(ProductModel product) Returns thePriceDataTypefor the given.getValueForPrice(PriceData price) Retrieves the price value of aPriceData.Methods inherited from class de.hybris.platform.commercefacades.product.impl.DefaultPriceDataFactory
adjustDigits, adjustSymbol, createCurrencyFormat, createNumberFormat, formatPrice, getCommerceCommonI18NService, getCommonI18NService, getI18NService, setCommerceCommonI18NService, setCommonI18NService, setI18NService
-
Constructor Details
-
DefaultTmaPriceDataFactory
public DefaultTmaPriceDataFactory()
-
-
Method Details
-
create
public SubscriptionPricePlanData create(PriceDataType priceType, BigDecimal value, String currencyIso) Description copied from interface:TmaPriceDataFactoryCreates a PriceData object with a formatted currency string based on the price type and currency ISO code.- Specified by:
createin interfacede.hybris.platform.commercefacades.product.PriceDataFactory- Specified by:
createin interfaceTmaPriceDataFactory- Overrides:
createin classde.hybris.platform.commercefacades.product.impl.DefaultPriceDataFactory- Parameters:
priceType- price type of the resulting price datavalue- price amountcurrencyIso- currency ISO code determining the currency- Returns:
- a newly created
SubscriptionPricePlanData
-
create
public SubscriptionPricePlanData create(PriceDataType priceType, BigDecimal value, CurrencyModel currency) Description copied from interface:TmaPriceDataFactoryCreates a PriceData object with a formatted currency string based on the price type and currency.- Specified by:
createin interfacede.hybris.platform.commercefacades.product.PriceDataFactory- Specified by:
createin interfaceTmaPriceDataFactory- Overrides:
createin classde.hybris.platform.commercefacades.product.impl.DefaultPriceDataFactory- Parameters:
priceType- price type of the resulting price datavalue- price amountcurrency- currency to be used by the price- Returns:
- a newly created
SubscriptionPricePlanData
-
getValueForPrice
Description copied from interface:TmaPriceDataFactoryRetrieves the price value of aPriceData. The priorities are the following:- if the price has recurring charges, return the first recurring charge
- if the price has a value, return the value
- if the price has one time charges, return the first one time charge
- Specified by:
getValueForPricein interfaceTmaPriceDataFactory- Parameters:
price- price for which to retrieve the value- Returns:
- price value considering the priorities mentioned above
-
getPriceDataTypeForProduct
Description copied from interface:TmaPriceDataFactoryReturns thePriceDataTypefor the given.- Specified by:
getPriceDataTypeForProductin interfaceTmaPriceDataFactory- Parameters:
product- product to retrieve the price data type for- Returns:
- price data type for the product given
-
formatPriceValue
Description copied from interface:TmaPriceDataFactoryObtains a formatted string for the given price value and currency.- Specified by:
formatPriceValuein interfaceTmaPriceDataFactory- Parameters:
value- the price valuecurrency- the currency- Returns:
- formatted String with the price value and currency
-
createPriceData
- Overrides:
createPriceDatain classde.hybris.platform.commercefacades.product.impl.DefaultPriceDataFactory
-