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
    • 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 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.
      • 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 in EnumLocalizationType.
        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 in EnumLocalizationType.
        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 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.