Class DefaultB2BCurrencyConversionService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.b2b.services.impl.DefaultB2BCurrencyConversionService
-
- All Implemented Interfaces:
B2BCurrencyConversionService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultB2BCurrencyConversionService extends AbstractBusinessService implements B2BCurrencyConversionService
Default implementation of theB2BCurrencyConversionService- See Also:
- Serialized Form
- Spring Bean ID:
- b2bCurrencyConversionService
-
-
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 DefaultB2BCurrencyConversionService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.DoubleconvertAmount(java.lang.Double amount, CurrencyModel sourceCurrency, CurrencyModel targetCurrency)Used to convert amount from one currency to anotherjava.lang.StringformatCurrencyAmount(java.util.Locale locale, CurrencyModel currency, double amount)Formats the currency amount for the correct locale-
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
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
convertAmount
public java.lang.Double convertAmount(java.lang.Double amount, CurrencyModel sourceCurrency, CurrencyModel targetCurrency)Description copied from interface:B2BCurrencyConversionServiceUsed to convert amount from one currency to another- Specified by:
convertAmountin interfaceB2BCurrencyConversionService- Parameters:
amount- the dollar amount to convertsourceCurrency- the current currency typetargetCurrency- the currency in which to convert to- Returns:
- converted amount
-
formatCurrencyAmount
public java.lang.String formatCurrencyAmount(java.util.Locale locale, CurrencyModel currency, double amount)Description copied from interface:B2BCurrencyConversionServiceFormats the currency amount for the correct locale- Specified by:
formatCurrencyAmountin interfaceB2BCurrencyConversionService- Parameters:
locale- the local in which to format forcurrency- the currency typeamount- the dollar amount- Returns:
- the String representation of the currency correctly formatted
-
-