public interface CurrencyConversionSession extends OsidSession
This session defines methods to convert currency.
Modifier and Type | Method and Description |
---|---|
boolean |
canConvertCurrency()
Tests if this user can perform currency conversions.
|
Currency[] |
convertCurrencies(Currency[] sourceCurrencyAmounts)
Converts currencies.
|
Currency |
convertCurrency(Currency sourceCurrencyAmount)
Converts currency.
|
Type |
getSourceCurrencyType()
Gets the source currency type used in this session.
|
Type |
getTargetCurrencyType()
Gets the target currency type used in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Type getSourceCurrencyType()
mandatory
- This method must be implemented. Type getTargetCurrencyType()
mandatory
- This method must be implemented. boolean canConvertCurrency()
PERMISSION_DENIED.
This is intended as a hint to an
application that may opt not to offer lookup operations. false
if conversion methods are not authorized,
true
otherwisemandatory
- This method must be implemented. Currency convertCurrency(Currency sourceCurrencyAmount) throws OperationFailedException, PermissionDeniedException
sourceCurrencyAmount
- the currency amount to convertInvalidArgumentException
-
sourceCurrencyAmount.getCurrencyType() !=
getSourcecurrencyType()
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. Currency[] convertCurrencies(Currency[] sourceCurrencyAmounts) throws OperationFailedException, PermissionDeniedException
sourceCurrencyAmounts
- the currency amounts to convertInvalidArgumentException
-
sourceCurrencyAmount.getCurrencyType() !=
getSourcecurrencyType()
NullArgumentException
- sourceCurrencyAmounts
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.