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

This session defines methods to convert text formats.

MethodgetSourceFormatType
Description

Gets the source format type used in this session.

Returnosid.type.Type the source text format type
Compliancemandatory This method must be implemented.
MethodgetTargetFormatType
Description

Gets the target format type used in this session.

Returnosid.type.Type the target text format type
Compliancemandatory This 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
Compliancemandatory This method must be implemented.
MethodconvertFormat
Description

Converts a format.

ParametersstringsourceText the string to convert
Returnstring the resulting string
ErrorsINVALID_ARGUMENT sourceText not of source format
NULL_ARGUMENT sourceText is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.
MethodconvertFormats
Description

Converts formats.

Parametersstring[]sourceTexts the strings to convert
Returnstring[] the resulting strings
ErrorsINVALID_ARGUMENT a sourceText not of source format
NULL_ARGUMENT sourceTexts is null
OPERATION_FAILED unable to complete request
PERMISSION_DENIED authorization failure
Compliancemandatory This method must be implemented.