Interface WebLocalizationManager
-
- All Superinterfaces:
EnumWebPersistableState
,Persistable
public interface WebLocalizationManager extends Persistable
This interface defines various queries associated with the internationalization features introduced in MicroStrategy 9.0.- Since:
- MicroStrategy Web 9.0.0
-
-
Field Summary
-
Fields inherited from interface com.microstrategy.utils.serialization.EnumWebPersistableState
BARE_MINIMAL_STATE_INFO, MAXIMAL_STATE_INFO, MINIMAL_STATE_INFO, TYPICAL_STATE_INFO
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Map<EnumLocalizationType,java.util.Locale[]>
getAvailableLocales(int localizationTypes)
Returns the available configuration locales.java.util.Map<EnumLocalizationType,java.util.Locale[]>
getAvailableLocales(int localizationTypes, WebIServerSession session)
Retrieves all the available locales that any user can set on a specific project.java.util.Map<EnumLocalizationType,java.util.Locale[]>
getAvailableLocales(int localizationTypes, WebProjectInstance oProject)
Retrieves all the available locales that any user can set on a specific project.RegionalValues
getLocales(WebUserEntity oUser, WebProjectInstance oProject)
Retrieves the locale of some type at some level.RegionalValues
getResolvedLocales(WebProjectInstance oProject, WebUserEntity oUserEntity)
Retrieves the resolved locale of some type at some level.java.util.Map<java.util.Locale,WebLocaleObjectInfo>
getServerAvailableLocalesLookup()
Note that the language in which the names and descriptors of theWebLocaleObjectInfo
instances retrieved are governed by the underlyingRegionalValues.getDisplayWebLocale()
.java.util.List<WebLocaleObjectInfo>
getServerAvailableLocalesLookupAsList()
Note that the language in which the names and descriptors of theWebLocaleObjectInfo
instances retrieved are governed by the underlyingRegionalValues.getDisplayWebLocale()
.boolean
isFeatureAvailable()
void
setLocale(int localizationTypes, WebUserEntity oUser, WebProjectInstance oProject, java.util.Locale oLocale)
Sets a specific Locale at a specific level and of a specific type.-
Methods inherited from interface com.microstrategy.utils.serialization.Persistable
restoreState, restoreState, saveState, saveState, saveState, saveState
-
-
-
-
Method Detail
-
isFeatureAvailable
boolean isFeatureAvailable()
- Returns:
- whether the new MicroStrategy 9 internationalization features are supported
-
getAvailableLocales
java.util.Map<EnumLocalizationType,java.util.Locale[]> getAvailableLocales(int localizationTypes, WebProjectInstance oProject) throws WebObjectsException
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 inEnumLocalizationType
.oProject
- the project for which the available locales are needed.- Returns:
- Map
. - Throws:
WebObjectsException
- if isFeatureAvailable() returns false or there was some other problem.
-
getAvailableLocales
java.util.Map<EnumLocalizationType,java.util.Locale[]> getAvailableLocales(int localizationTypes, WebIServerSession session) throws WebObjectsException
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 inEnumLocalizationType
.session
- session with which to look up available locales- Returns:
- Map
. - Throws:
WebObjectsException
-
getAvailableLocales
java.util.Map<EnumLocalizationType,java.util.Locale[]> getAvailableLocales(int localizationTypes) throws WebObjectsException
Returns the available configuration locales. If none are available, an empty array is returned.- Parameters:
localizationTypes
- bit set from constants inEnumLocalizationType
.- Returns:
- Map
. - Throws:
WebObjectsException
- if isFeatureAvailable() returns false or there was some other problem.
-
getResolvedLocales
RegionalValues getResolvedLocales(WebProjectInstance oProject, WebUserEntity oUserEntity) throws WebObjectsException
Retrieves the resolved locale of some type at some level.- Parameters:
oUserEntity
- the user/user group for whom to obtain the locale.oProject
- the project for which to obtain the locale.- Returns:
- RegionalValues.
- Throws:
WebObjectsException
- if isFeatureAvailable() returns false or there was some other problem.
-
getLocales
RegionalValues getLocales(WebUserEntity oUser, WebProjectInstance oProject) throws WebObjectsException
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.
-
setLocale
void setLocale(int localizationTypes, WebUserEntity oUser, WebProjectInstance oProject, java.util.Locale oLocale) throws WebObjectsException
Sets a specific Locale at a specific level and of a specific type.- Parameters:
localizationTypes
- bit set from constants inEnumLocalizationType
.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.
-
getServerAvailableLocalesLookup
java.util.Map<java.util.Locale,WebLocaleObjectInfo> getServerAvailableLocalesLookup() throws WebObjectsException
Note that the language in which the names and descriptors of theWebLocaleObjectInfo
instances retrieved are governed by the underlyingRegionalValues.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.
-
getServerAvailableLocalesLookupAsList
java.util.List<WebLocaleObjectInfo> getServerAvailableLocalesLookupAsList() throws WebObjectsException
Note that the language in which the names and descriptors of theWebLocaleObjectInfo
instances retrieved are governed by the underlyingRegionalValues.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.
-
-