| Interface | osid.locale.CurrencyFormattingSession | ||
|---|---|---|---|
| Implements | osid.OsidSession | ||
| Description |
This session defines methods to format and parse currency amounts. | ||
| Method | getCurrencyType | ||
| Description |
Gets the currency type for amounts used in this session. | ||
| Return | osid.type.Type | the currency type | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getNumericFormatType | ||
| Description |
Gets the numeric format type for the amounts used in this session. | ||
| Return | osid.type.Type | the numeric format type | |
| Compliance | mandatory | This method must be implemented. | |
| Method | canFormatCurrencies | ||
| Description |
Tests if this user can format and parse currencies. 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 | ||
| Return | boolean | false if translation methods are not authorized, true
otherwise | |
| Compliance | mandatory | This method must be implemented. | |
| Method | currencyToString | ||
| Description |
Gets a string representation of a currency including the currency symbol indicated by the currency type. | ||
| Parameters | osid.financials.Currency | amount | a currency value |
| Return | string | the display string | |
| Errors | INVALID_ARGUMENT | amount.getCurrencyType() != getCurrencyType() | |
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | currenciesToStrings | ||
| Description |
Gets a string representation of a list of currency amounts including the currency symbols indicated by the currency type. | ||
| Parameters | osid.financials.Currency[] | amounts | an array of amounts |
| Return | string[] | the display strings | |
| Errors | INVALID_ARGUMENT | amount.getCurrencyType() != getCurrencyType() | |
| NULL_ARGUMENT | amounts is null | ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | stringToCurrency | ||
| Description |
Parses a currency amount. | ||
| Parameters | string | s | a currency string |
| Return | osid.financials.Currency | the currency amount | |
| Errors | INVALID_ARGUMENT | s is not of getCurrencyType() or s is not of
getNumericFormatType() | |
| NULL_ARGUMENT | s is null | ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |