Interface LocaleManager

All Superinterfaces:
AutoCloseable, Closeable, LocaleProfile, OsidManager, OsidManager, OsidProfile, Sourceable

public interface LocaleManager extends OsidManager, LocaleProfile

The locale manager provides access to locale sessions and provides interoperability tests for various aspects of this service. The sessions included in this manager are:

  • TranslationSession : a session translate strings
  • TranslationAdminSession: a session to update the string translations for a locale
  • NumericFormattingSession : a session for formatting and parsing numbers
  • CalendarFormattingSession : a session for formatting and parsing dates and times
  • CurrencyFormattingSession : a session for formatting and parsing currency amounts
  • CoordinateFormattingSession : a session for formatting and parsing coordinates
  • UnitConversionSession : a session to convert measurement units
  • CurrencyConversionSession: a session to convert currency
  • CalendarConversionSession : a session to convert dates across calendars
  • CoordinateConversionSession : a session to convert coordinate systems
  • SpatialUnitConversionSession : a session to convert spatial units
  • FormatConversionSession : a session to convert text formats
  • CalendarInfoSession : a session for examining calendaring and time systems
  • Method Details

    • getTranslationSession

      TranslationSession getTranslationSession() throws OperationFailedException
      Gets an OsidSession associated with the language translation service.
      Returns:
      a TranslationSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsTranslation() is false
      Compliance:
      optional - This method must be implemented if {@code supportsTranslation()} is {@code true} .
    • getTranslationSessionForType

      TranslationSession getTranslationSessionForType(Type sourceLanguageType, Type sourceScriptType, Type targetLanguageType, Type targetScriptType) throws OperationFailedException
      Gets an OsidSession associated with the language translation service and the given language and script types.
      Parameters:
      sourceLanguageType - the type of the source language
      sourceScriptType - the type of the source script
      targetLanguageType - the type of the target language
      targetScriptType - the type of the target script
      Returns:
      a TranslationSession
      Throws:
      NullArgumentException - sourceLanguageType, sourceScriptType, targetLanguageType or targetScriptType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsTranslation() or supportsVisibleFederation() is false
      UnsupportedException - supportsLanguageTypesForTranslation(sourceLanguageType, sourceScriptType, targetLanguageType, targetScriptType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsTranslation()} and {@code supportsVisibleFederation()} are {@code true} .
    • getTranslationAdminSession

      TranslationAdminSession getTranslationAdminSession() throws OperationFailedException
      Gets a language translation administration service for updating a locale dictionary.
      Returns:
      a TranslationAdminSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsTranslationAdmin() is false
      Compliance:
      optional - This method must be implemented if {@code supportsTranslationAdmin()} is {@code true} .
    • getTranslationAdminSessionForType

      TranslationAdminSession getTranslationAdminSessionForType(Type sourceLanguageType, Type sourceScriptType, Type targetLanguageType, Type targetScriptType) throws OperationFailedException
      Gets a language trabslation administration service for updating a locale dictionary using the given language and script types.
      Parameters:
      sourceLanguageType - the type of the source language
      sourceScriptType - the type of the source script
      targetLanguageType - the type of the target language
      targetScriptType - the type of the target script
      Returns:
      a TranslationAdminSession
      Throws:
      NullArgumentException - sourceLanguageType, sourceScriptType, targetLanguageType or targetScriptType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsTranslationAdmin() or supportsVisibleFederation() is false
      UnsupportedException - supportsLanguageTypesForTranslation(sourceLanguageType, sourceScriptType, targetLanguageType, targetScriptType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsTranslationAdmin()} and {@code supportsVisibleFederation()} are {@code true} .
    • getNumericFormattingSession

      NumericFormattingSession getNumericFormattingSession() throws OperationFailedException
      Gets an OsidSession associated with the numeric formatting service.
      Returns:
      a NumericFormattingSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsNumericFormatting() is false
      Compliance:
      optional - This method must be implemented if {@code supportsNumericFormatting()} is {@code true} .
    • getNumericFormattingSessionForType

      NumericFormattingSession getNumericFormattingSessionForType(Type numericFormatType) throws OperationFailedException
      Gets an OsidSession associated with the numeric formatting service and the given numeric format type.
      Parameters:
      numericFormatType - the type of the numeric format
      Returns:
      a NumericFormattingSession
      Throws:
      NullArgumentException - numericFormatType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsNumericFormatting() or supportsVisibleFederation() is false
      UnsupportedException - supportsNumericFormatType(numericFormatType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsNumericFormatting()} and {@code supportsVisibleFederation()} are {@code true} .
    • getCalendarFormattingSession

      CalendarFormattingSession getCalendarFormattingSession() throws OperationFailedException
      Gets an OsidSession associated with the calendar formatting service.
      Returns:
      a CalendarFormattingSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCalendarFormatting() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarFormatting()} is {@code true} .
    • getCalendarFormattingSessionForType

      CalendarFormattingSession getCalendarFormattingSessionForType(Type calendarType, Type calendarFormatType, Type timeType, Type timeFormatType) throws OperationFailedException
      Gets an OsidSession associated with the calendar formatting service and the given calendar and time types.
      Parameters:
      calendarType - the type of the calendar
      calendarFormatType - the type of the calendar format
      timeType - the type of the time system
      timeFormatType - the type of the time format
      Returns:
      a CalendarFormattingSession
      Throws:
      NullArgumentException - calendarType, calendarFormatType, timeType or timeFormatType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCalendarFormatting() or supportsVisibleFederation() is false
      UnsupportedException - supportsCalendarTypesForFormattinge(calendarType, calendarFormatType, timeType, timeFormatType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarFormatting()} and {@code supportsVisibleFederation()} are {@code true} .
    • getCurrencyFormattingSession

      CurrencyFormattingSession getCurrencyFormattingSession() throws OperationFailedException
      Gets an OsidSession associated with the currency formatting service.
      Returns:
      a CurrencyFormattingSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCurrencyFormatting() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCurrencyFormatting()} is {@code true} .
    • getCurrencyFormattingSessionForType

      CurrencyFormattingSession getCurrencyFormattingSessionForType(Type currencyType, Type numericFormatType) throws OperationFailedException
      Gets an OsidSession associated with the currency formatting service and the given currency and numeric format types.
      Parameters:
      currencyType - the type of the currency
      numericFormatType - the type of the numeric format
      Returns:
      a CurrencyFormattingSession
      Throws:
      NullArgumentException - currencyType or numericFormatType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCurrencyFormatting() or supportsVisibleFederation() is false
      UnsupportedException - supportsCurrencyTypesForFomatting(currencyType, numericFormatType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCurrencyFormatting()} and {@code supportsVisibleFederation()} are {@code true} .
    • getCoordinateFormattingSession

      CoordinateFormattingSession getCoordinateFormattingSession() throws OperationFailedException
      Gets an OsidSession associated with the coordinate formatting service.
      Returns:
      a CoordinateFormattingSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCoordinateFormatting() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCoordinateFormatting()} is {@code true} .
    • getCoordinateFormattingSessionForType

      CoordinateFormattingSession getCoordinateFormattingSessionForType(Type coordinateType, Type coordinateFormatType) throws OperationFailedException
      Gets an OsidSession associated with the coordinate formatting service and the given coordinate and format types.
      Parameters:
      coordinateType - the type of the coordinate
      coordinateFormatType - the type of the coordinate format
      Returns:
      a CoordinateFormattingSession
      Throws:
      NullArgumentException - coordinateType or coordinateFormatType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCoordinateFormatting() or supportsVisibleFederation() is false
      UnsupportedException - supportsCoordinateTypesForFomatting(coordinateType, coordinateFormatType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCoordinateFormatting()} and {@code supportsVisibleFederation()} are {@code true} .
    • getUnitConversionSession

      UnitConversionSession getUnitConversionSession() throws OperationFailedException
      Gets a unit conversion session.
      Returns:
      a UnitConversionSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsUnitConversion() is false
      Compliance:
      optional - This method must be implemented if {@code supportsUnitConversion()} is {@code true} .
    • getCurrencyConversionSession

      CurrencyConversionSession getCurrencyConversionSession() throws OperationFailedException
      Gets a currency conversion session.
      Returns:
      a CurrencyConversionSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCurrencyConversion() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCurrencyConversion()} is {@code true} .
    • getCurrencyConversionSessionForType

      CurrencyConversionSession getCurrencyConversionSessionForType(Type sourceCurrencyType, Type targetCurrencyType) throws OperationFailedException
      Gets an OsidSession associated with the currency conversion service and the given currency types.
      Parameters:
      sourceCurrencyType - the type of the source currency
      targetCurrencyType - the type of the target currency
      Returns:
      a CurrencyConversionSession
      Throws:
      NullArgumentException - sourceCurrencyType or targetCurrencyType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCurrencyConversion() or supportsVisibleFederation() is false
      UnsupportedException - supportsCurrencyTypesForConversion(sourceCurrencyType, targetCurrencyType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCurrencyConversion()} and {@code supportsVisibleFederation()} are {@code true} .
    • getCalendarConversionSession

      CalendarConversionSession getCalendarConversionSession() throws OperationFailedException
      Gets a calendar conversion session.
      Returns:
      a CalendarConversionSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCalendarConversion() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarConversion()} is {@code true} .
    • getCalendarConversionSessionForType

      CalendarConversionSession getCalendarConversionSessionForType(Type sourceCalendarType, Type sourceTimeType, Type targetCalendarType, Type targetTimeType) throws OperationFailedException
      Gets an OsidSession associated with the calendar conversion service and the given calendar types.
      Parameters:
      sourceCalendarType - the type of the source calendar
      sourceTimeType - the type of the source time
      targetCalendarType - the type of the target calendar
      targetTimeType - the type of the target time
      Returns:
      a CalendarConversionSession
      Throws:
      NullArgumentException - sourceCalendarType, sourceTimeType , targetCalendarType or targetTimeType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCalendarConversion() or supportsVisibleFederation() is false
      UnsupportedException - supportsCalendarTypesForConversion(sourceCalendarType, targetCalendarType) or supportsTimeTypesForConversion(sourceTimeType, targetTimeType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarConversion()} and {@code supportsVisibleFederation()} are {@code true} .
    • getCoordinateConversionSession

      CoordinateConversionSession getCoordinateConversionSession() throws OperationFailedException
      Gets a coordinate conversion session.
      Returns:
      a CoordinateConversionSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCoordinateConversion() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCoordinateConversion()} is {@code true} .
    • getCoordinateConversionSessionForType

      CoordinateConversionSession getCoordinateConversionSessionForType(Type sourceCoordinateType, Type targetCoordinateType) throws OperationFailedException
      Gets an OsidSession associated with the coordinate conversion service and the given coordinate types.
      Parameters:
      sourceCoordinateType - the type of the source coordinate
      targetCoordinateType - the type of the target coordinate
      Returns:
      a CoordinateConversionSession
      Throws:
      NullArgumentException - sourceCoordinateType or targetCoordinateType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCoordinateConversion() or supportsVisibleFederation() is false
      UnsupportedException - supportsCoordinateRecordTypesForConversion(sourceCoordinateType, targetCoordinateType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCoordinateConversion()} and {@code supportsVisibleFederation()} are {@code true} .
    • getSpatialUnitConversionSession

      SpatialUnitConversionSession getSpatialUnitConversionSession() throws OperationFailedException
      Gets a spatial unit conversion session.
      Returns:
      a SpatialUnitConversionSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsSpatialUnitConversion() is false
      Compliance:
      optional - This method must be implemented if {@code supportsSpatialUnitConversion()} is {@code true} .
    • getSpatialUnitConversionSessionForType

      SpatialUnitConversionSession getSpatialUnitConversionSessionForType(Type sourceSpatialUnitRecordType, Type targetSpatialUnitRecordType) throws OperationFailedException
      Gets an OsidSession associated with the spatial unit conversion service and the given spatial unit record types.
      Parameters:
      sourceSpatialUnitRecordType - the type of the source spatial unit record
      targetSpatialUnitRecordType - the type of the target spatial unit record
      Returns:
      a SpatialUnitConversionSession
      Throws:
      NullArgumentException - sourceSpatialUnitRecordType or targetSpatialUnitRecordType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsSpatialUnitConversion() or supportsVisibleFederation() is false
      UnsupportedException - supportsSpatialUnitRecordTypesForConversion(sourceSpatialUnitRecordType, targetSpatialUnitRecordType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsSpatialUnitConversion()} and {@code supportsVisibleFederation()} are {@code true} .
    • getFormatConversionSession

      FormatConversionSession getFormatConversionSession() throws OperationFailedException
      Gets a text format conversion session.
      Returns:
      a FormatConversionSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsFormatConversion() is false
      Compliance:
      optional - This method must be implemented if {@code supportsFormatConversion()} is {@code true} .
    • getFormatConversionSessionForType

      FormatConversionSession getFormatConversionSessionForType(Type sourceFormatType, Type targetFormatType) throws OperationFailedException
      Gets an OsidSession associated with the text format conversion service and the given format types.
      Parameters:
      sourceFormatType - the type of the text format
      targetFormatType - the type of the text format
      Returns:
      a FormatConversionSession
      Throws:
      NullArgumentException - sourceFormatType or targetFormatType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsFormatConversion() or supportsVisibleFederation() is false
      UnsupportedException - supportsFormatTypesForConversion(sourceFormatType, targetFormatRecordType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsFormatConversion()} and {@code supportsVisibleFederation()} are {@code true} .
    • getCalendarInfoSession

      CalendarInfoSession getCalendarInfoSession() throws OperationFailedException
      Gets a calendar informational session session.
      Returns:
      a CalendarInfoSession
      Throws:
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCalendarInfo() is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarInfo()} is {@code true} .
    • getCalendarInfoSessionForType

      CalendarInfoSession getCalendarInfoSessionForType(Type calendarType, Type timeType) throws OperationFailedException
      Gets an OsidSession associated with the calendar informational service and the given calendar and time types.
      Parameters:
      calendarType - the type of the calendar
      timeType - the type of the time system
      Returns:
      a CalendarInfoSession
      Throws:
      NullArgumentException - calendarType or timeType is null
      OperationFailedException - unable to complete request
      UnimplementedException - supportsCalendarType() or supportsVisibleFederation() is false
      UnsupportedException - supportsCalendarTimeTypes(calendarType, timeType) is false
      Compliance:
      optional - This method must be implemented if {@code supportsCalendarInfo()} and {@code supportsVisibleFederation()} are {@code true} .