OSID Logo
OSID Specifications
locale package
Version 3.1.0
Interfaceosid.locale.CurrencyConversionSession
Implementsosid.OsidSession
Used Byosid.locale.LocaleManager
osid.locale.LocaleProxyManager
Description

This session defines methods to convert currency.

MethodgetSourceCurrencyType
Description

Gets the source currency type used in this session.

Returnosid.type.Type the source currency
Compliancemandatory This method must be implemented.
MethodgetTargetCurrencyType
Description

Gets the target currency type used in this session.

Returnosid.type.Type the target currency
Compliancemandatory This method must be implemented.
MethodcanConvertCurrency
Description

Tests if this user can perform currency conversions. A return of true does not guarantee successful authorization. A return of false indicates that it is known all methods in this session will result in a PERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer lookup operations.

Returnboolean false if conversion methods are not authorized, true otherwise
Compliancemandatory This method must be implemented.
MethodconvertCurrency
Description

Converts currency.

Parametersosid.financials.CurrencysourceCurrencyAmount the currency amount to convert
Returnosid.financials.Currency resulting currency units
ErrorsINVALID_ARGUMENT sourceCurrencyAmount.getCurrencyType()!= getSourcecurrencyType()
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodconvertCurrencies
Description

Converts currencies.

Parametersosid.financials.Currency[]sourceCurrencyAmounts the currency amounts to convert
Returnosid.financials.Currency[] resulting currency units
ErrorsINVALID_ARGUMENT sourceCurrencyAmount.getCurrencyType()!= getSourcecurrencyType()
NULL_ARGUMENT sourceCurrencyAmounts is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.