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,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 the
B2BCurrencyConversionService- See Also:
- 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, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconvertAmount(Double amount, CurrencyModel sourceCurrency, CurrencyModel targetCurrency) Used to convert amount from one currency to anotherformatCurrencyAmount(Locale locale, CurrencyModel currency, double amount) Formats the currency amount for the correct localeMethods 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
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultB2BCurrencyConversionService
public DefaultB2BCurrencyConversionService()
-
-
Method Details
-
convertAmount
public Double convertAmount(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
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
-