OSID Logo
OSID Specifications
locale package
Version 3.0.0
Release Candidate Preview
Interfaceosid.locale.FormatConversionSession
Implementsosid.OsidSession
Description

This session defines methods to convert text formats.

MethodgetSourceFormatType
Description

Gets the source format type used in this session.

Returnosid.type.Typethe source text format type
CompliancemandatoryThis method must be implemented.
MethodgetTargetFormatType
Description

Gets the target format type used in this session.

Returnosid.type.Typethe target text formattype
CompliancemandatoryThis method must be implemented.
MethodcanConvertFormats
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 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
CompliancemandatoryThis method must be implemented.
MethodconvertFormat
Description

Converts a format.

ParametersstringsourceTextthe string to convert
Returnstringthe resulting string
ErrorsINVALID_ARGUMENT sourceText not of source format
NULL_ARGUMENT sourceText is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.
MethodconvertFormats
Description

Converts formats.

Parametersstring[]sourceTextsthe strings to convert
Returnstring[]the resulting strings
ErrorsINVALID_ARGUMENTa sourceText not of source format
NULL_ARGUMENT sourceTexts is null
OPERATION_FAILEDunable to complete request
PERMISSION_DENIEDauthorization failure
CompliancemandatoryThis method must be implemented.