Class UnitConverter
java.lang.Object
com.caplin.motif.fx.ret.common.utility.UnitConverter
-
Field Summary
-
Constructor Summary
ConstructorDescriptionUnitConverter
(AdapterConfiguration adapterConfiguration) UnitConverter
(AdapterConfiguration adapterConfiguration, GoodForAmountUtility goodForAmountUtility) -
Method Summary
Modifier and TypeMethodDescriptionconvertFromOZTAmount
(String currencyPair, String amount, String unit) convertToDisplayedAmount
(String requestId, String assetClass, String amount, String currencyPair, String unit) Anything converted from a traded amount with this method will only be an approximation of what was actually tradedconvertToDisplayedGFA
(String assetClass, String gfa, String currencyPair, String unit) convertToOZTAmount
(String currencyPair, String amount, String unit) convertToTradableAmount
(String requestId, String assetClass, String amount, String currencyPair, String unit)
-
Field Details
-
TRADED_UNIT
- See Also:
-
-
Constructor Details
-
UnitConverter
public UnitConverter(AdapterConfiguration adapterConfiguration) throws DataSourceConfigurationException - Throws:
DataSourceConfigurationException
-
UnitConverter
public UnitConverter(AdapterConfiguration adapterConfiguration, GoodForAmountUtility goodForAmountUtility) throws DataSourceConfigurationException - Throws:
DataSourceConfigurationException
-
-
Method Details
-
getAllPreciousMetalsCurrencyPairs
-
convertToTradableAmount
public String convertToTradableAmount(String requestId, String assetClass, String amount, String currencyPair, String unit) throws ConversionException - Throws:
ConversionException
-
convertToDisplayedAmount
public String convertToDisplayedAmount(String requestId, String assetClass, String amount, String currencyPair, String unit) throws ConversionException Anything converted from a traded amount with this method will only be an approximation of what was actually traded- Throws:
ConversionException
-
convertToDisplayedGFA
public String convertToDisplayedGFA(String assetClass, String gfa, String currencyPair, String unit) throws ConversionException - Throws:
ConversionException
-
convertToOZTAmount
public String convertToOZTAmount(String currencyPair, String amount, String unit) throws ConversionException - Throws:
ConversionException
-
convertFromOZTAmount
public String convertFromOZTAmount(String currencyPair, String amount, String unit) throws ConversionException - Throws:
ConversionException
-