Class PriceLabelHandler
- java.lang.Object
-
- com.hybris.backoffice.labels.impl.PriceLabelHandler
-
- All Implemented Interfaces:
LabelHandler<java.lang.Double,CurrencyModel>
public class PriceLabelHandler extends java.lang.Object implements LabelHandler<java.lang.Double,CurrencyModel>
-
-
Constructor Summary
Constructors Constructor Description PriceLabelHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadjustDecimalFormatter(java.util.Currency javaCurrency, CurrencyModel currencyModel, java.util.Locale currentLocale, java.text.DecimalFormat decimalFormatter)protected voidadjustFractionPart(java.lang.Integer digits, java.text.DecimalFormat decimalFormat)protected java.text.DecimalFormatSymbolsgetDecimalFormatSymbols(java.util.Currency currency, java.lang.String currencySymbol, java.util.Locale currentLocale)I18NServicegetI18NService()java.lang.StringgetLabel(java.lang.Double price, CurrencyModel currencyModel)protected java.text.NumberFormatgetNumberFormatForNonJavaCurrency(CurrencyModel currencyModel)protected java.text.NumberFormatgetNumberFormatter(java.util.Currency javaCurrency, CurrencyModel currencyModel)voidsetI18NService(I18NService i18NService)
-
-
-
Method Detail
-
getLabel
public java.lang.String getLabel(java.lang.Double price, CurrencyModel currencyModel)- Specified by:
getLabelin interfaceLabelHandler<java.lang.Double,CurrencyModel>- Parameters:
price- object to be labelled with the {@param modifier}.currencyModel- object used to define how the label should be calculated.- Returns:
- a string that represents the passed-in object using the given modifier.
-
getNumberFormatForNonJavaCurrency
protected java.text.NumberFormat getNumberFormatForNonJavaCurrency(CurrencyModel currencyModel)
-
getNumberFormatter
protected java.text.NumberFormat getNumberFormatter(java.util.Currency javaCurrency, CurrencyModel currencyModel)
-
adjustDecimalFormatter
protected void adjustDecimalFormatter(java.util.Currency javaCurrency, CurrencyModel currencyModel, java.util.Locale currentLocale, java.text.DecimalFormat decimalFormatter)
-
getDecimalFormatSymbols
protected java.text.DecimalFormatSymbols getDecimalFormatSymbols(java.util.Currency currency, java.lang.String currencySymbol, java.util.Locale currentLocale)
-
adjustFractionPart
protected void adjustFractionPart(java.lang.Integer digits, java.text.DecimalFormat decimalFormat)
-
getI18NService
public I18NService getI18NService()
-
setI18NService
public void setI18NService(I18NService i18NService)
-
-