| Interface | osid.locale.FormatConversionSession | ||
|---|---|---|---|
| Implements | osid.OsidSession | ||
| Used By | osid.locale.LocaleManager | ||
osid.locale.LocaleProxyManager | |||
| Description |
This session defines methods to convert text formats. | ||
| Method | getSourceFormatType | ||
| Description |
Gets the source format type used in this session. | ||
| Return | osid.type.Type | the source text format type | |
| Compliance | mandatory | This method must be implemented. | |
| Method | getTargetFormatType | ||
| Description |
Gets the target format type used in this session. | ||
| Return | osid.type.Type | the target text format type | |
| Compliance | mandatory | This method must be implemented. | |
| Method | canConvertFormats | ||
| Description |
Tests if this user can perform text format. 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 conversion methods are not authorized,
true otherwise | |
| Compliance | mandatory | This method must be implemented. | |
| Method | convertFormat | ||
| Description |
Converts a format. | ||
| Parameters | string | sourceText | the string to convert |
| Return | string | the resulting string | |
| Errors | INVALID_ARGUMENT | sourceText not of source format | |
| NULL_ARGUMENT | sourceText is null | ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |
| Method | convertFormats | ||
| Description |
Converts formats. | ||
| Parameters | string[] | sourceTexts | the strings to convert |
| Return | string[] | the resulting strings | |
| Errors | INVALID_ARGUMENT | a sourceText not of source format | |
| NULL_ARGUMENT | sourceTexts is null | ||
| OPERATION_FAILED | unable to complete request | ||
| PERMISSION_DENIED | authorization failure | ||
| Compliance | mandatory | This method must be implemented. | |