public interface

WebLocalizationManager

implements Persistable
com.microstrategy.web.objects.localization.WebLocalizationManager

Class Overview

This interface defines various queries associated with the internationalization features introduced in MicroStrategy 9.0.

Summary

[Expand]
Inherited Constants
From interface com.microstrategy.utils.serialization.EnumWebPersistableState
Public Methods
abstract Map<EnumLocalizationType, Locale[]> getAvailableLocales(int localizationTypes, WebProjectInstance oProject)
Retrieves all the available locales that any user can set on a specific project.
abstract Map<EnumLocalizationType, Locale[]> getAvailableLocales(int localizationTypes)
Returns the available configuration locales.
abstract Map<EnumLocalizationType, Locale[]> getAvailableLocales(int localizationTypes, WebIServerSession session)
Retrieves all the available locales that any user can set on a specific project.
abstract RegionalValues getLocales(WebUserEntity oUser, WebProjectInstance oProject)
Retrieves the locale of some type at some level.
abstract RegionalValues getResolvedLocales(WebProjectInstance oProject, WebUserEntity oUserEntity)
Retrieves the resolved locale of some type at some level.
abstract Map<Locale, WebLocaleObjectInfo> getServerAvailableLocalesLookup()
Note that the language in which the names and descriptors of the WebLocaleObjectInfo instances retrieved are governed by the underlying getDisplayWebLocale().
abstract boolean isFeatureAvailable()
abstract void setLocale(int localizationTypes, WebUserEntity oUser, WebProjectInstance oProject, Locale oLocale)
Sets a specific Locale at a specific level and of a specific type.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.serialization.Persistable

Public Methods

public abstract Map<EnumLocalizationType, Locale[]> getAvailableLocales (int localizationTypes, WebProjectInstance oProject)

Retrieves all the available locales that any user can set on a specific project. If none are available, an empty array is returned.

Parameters
localizationTypes bit set from constants in EnumLocalizationType.
oProject the project for which the available locales are needed.
Returns
  • Map.
Throws
WebObjectsException if isFeatureAvailable() returns false or there was some other problem.

public abstract Map<EnumLocalizationType, Locale[]> getAvailableLocales (int localizationTypes)

Returns the available configuration locales. If none are available, an empty array is returned.

Parameters
localizationTypes bit set from constants in EnumLocalizationType.
Returns
  • Map.
Throws
WebObjectsException if isFeatureAvailable() returns false or there was some other problem.

public abstract Map<EnumLocalizationType, Locale[]> getAvailableLocales (int localizationTypes, WebIServerSession session)

Retrieves all the available locales that any user can set on a specific project. If none are available, an empty array is returned.

Parameters
localizationTypes bit set from constants in EnumLocalizationType.
session session with which to look up available locales
Returns
  • Map.

public abstract RegionalValues getLocales (WebUserEntity oUser, WebProjectInstance oProject)

Retrieves the locale of some type at some level.

Parameters
oUser the user for whom to obtain the locale. If null, then a user level locale should not be returned (only project or configuration defaults, depending on whether oProject is null).
oProject the project for which to obtain the locale. If null, then the configuration level should be returned for the specific user (which if null then would return the default configuration Locale).
Returns
  • RegionalValues.
Throws
WebObjectsException if isFeatureAvailable() returns false or there was some other problem.

public abstract RegionalValues getResolvedLocales (WebProjectInstance oProject, WebUserEntity oUserEntity)

Retrieves the resolved locale of some type at some level.

Parameters
oProject the project for which to obtain the locale.
oUserEntity the user/user group for whom to obtain the locale.
Returns
  • RegionalValues.
Throws
WebObjectsException if isFeatureAvailable() returns false or there was some other problem.

public abstract Map<Locale, WebLocaleObjectInfo> getServerAvailableLocalesLookup ()

Note that the language in which the names and descriptors of the WebLocaleObjectInfo instances retrieved are governed by the underlying getDisplayWebLocale().

Returns
  • a lookup consisting of available (as declared in the Intelligence Server) Locale -> WebLocaleObjectInfo.
Throws
WebObjectsException thrown if there was a problem obtaining the locales.

public abstract boolean isFeatureAvailable ()

Returns
  • whether the new MicroStrategy 9 internationalization features are supported

public abstract void setLocale (int localizationTypes, WebUserEntity oUser, WebProjectInstance oProject, Locale oLocale)

Sets a specific Locale at a specific level and of a specific type.

Parameters
localizationTypes bit set from constants in EnumLocalizationType.
oUser the user for whom to obtain the locale. If null, then a user level locale should not be set (only project or configuration defaults, depending on whether oProject is null).
oProject the project to modify the locale at. If null, then the configuration level should be set (if oUser is also null, the default configuration level should be set, otherwise the default project level of oProject should be set).
oLocale the Locale to set at the provided level and for the provided type. If null then the Locale should be reset to DEFAULT.
Throws
WebObjectsException if isFeatureAvailable() returns false or there was some other problem.