Class LocaleMessage

  • All Implemented Interfaces:
    I18n, Message

    public class LocaleMessage
    extends java.lang.Object
    implements Message
    This class is to provide APIs related to locale of specific product supported by VIP, region list of one or multiple locales. On behind the APIs will fetch data from VIP service or local bundle and then wrapper the result as basic java util class to be called by prodcut's codes.
    • Constructor Summary

      Constructors 
      Constructor Description
      LocaleMessage()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      VIPCfg getCfg()  
      java.util.Map<java.lang.String,​java.lang.String> getDisplayLanguagesList​(java.lang.String displayLocale)
      Get the display language map of the configured product
      java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> getRegionList​(java.util.List<java.lang.String> localeList)
      Get the region data from CLDR of supported languages of the configured product
      java.util.List<java.lang.String> getSupportedDisplayNameList​(java.lang.String displayLocale)
      Get supported display name list of the configured product
      java.util.List<java.lang.String> getSupportedLanguageTagList()
      Get the supported language tag list of the configured product
      void setCfg​(VIPCfg cfg)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LocaleMessage

        public LocaleMessage()
    • Method Detail

      • getRegionList

        public java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​java.lang.String>> getRegionList​(java.util.List<java.lang.String> localeList)
        Get the region data from CLDR of supported languages of the configured product
        Parameters:
        localeList - a list contain all supported language tags of the configured product, it could be obtained by function com.vmware.vipclient.i18n.base.instances.LocaleMessage.getSupportedLanguageTagList
        Returns:
        map the key is the supported language tag, value is all region data mapped by language tag
      • getDisplayLanguagesList

        public java.util.Map<java.lang.String,​java.lang.String> getDisplayLanguagesList​(java.lang.String displayLocale)
        Get the display language map of the configured product
        Parameters:
        displayLocale - the display name's localized language of returned result
        Returns:
        a map contains display name mapped by language tag, the names could be localized which determined by the displanLanguage parameter
      • getSupportedLanguageTagList

        public java.util.List<java.lang.String> getSupportedLanguageTagList()
        Get the supported language tag list of the configured product
        Returns:
        a list contains the supported language tags
      • getSupportedDisplayNameList

        public java.util.List<java.lang.String> getSupportedDisplayNameList​(java.lang.String displayLocale)
        Get supported display name list of the configured product
        Parameters:
        displayLocale - a language tag determines the display name's localization
        Returns:
        a list contains the display names
      • getCfg

        public VIPCfg getCfg()
      • setCfg

        public void setCfg​(VIPCfg cfg)