Class RuntimeLocalizationFunctions

    • Constructor Detail

      • RuntimeLocalizationFunctions

        public RuntimeLocalizationFunctions()
    • Method Detail

      • SearchDefaultLocalizationTokens

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable SearchDefaultLocalizationTokens​(java.lang.String searchExpression)
                                                  throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a list of Default tokens matching search expression.
        Parameters:
        searchExpression - search pattern - STRING
        Returns:
        result Localization tokens - INFOTABLE - Aspects {dataShape:LocalizationToken}
        Throws:
        java.lang.Exception - If an error occurs
      • GetEffectiveTokens

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetEffectiveTokens()
                                     throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a list of effective tokens based on language setting for current user.
        Returns:
        result Localization tokens - INFOTABLE - Aspects {dataShape:LocalizationToken}
        Throws:
        java.lang.Exception - If an error occurs
      • GetEffectiveTokensForLanguage

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetEffectiveTokensForLanguage​(java.lang.String language)
                                                throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a table of tokens and values, given an ordered list of language preferences.
        Parameters:
        language - Language code - STRING
        Returns:
        result Localization tokens and values - INFOTABLE - Aspects {dataShape:LocalizationToken}
        Throws:
        java.lang.Exception - If an error occurs
      • ExportLocalizationTables

        @ThingworxExtensionApiMethod(since={6,6})
        public org.w3c.dom.Document ExportLocalizationTables​(java.lang.String prefix)
                                                      throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Export localization tables, optionally with a token name filter.
        Parameters:
        prefix - Token prefix - STRING
        Returns:
        result Localization tokens - XML
        Throws:
        java.lang.Exception - If an error occurs
      • GetEffectiveToken

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetEffectiveToken​(java.lang.String token)
                                           throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a token based on language setting for current user.
        Parameters:
        token - Token - STRING
        Returns:
        result Localization tokens - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetEffectiveTokenForLanguage

        @ThingworxExtensionApiMethod(since={6,6})
        public java.lang.String GetEffectiveTokenForLanguage​(java.lang.String language,
                                                             java.lang.String token)
                                                      throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a token for a specific language.
        Parameters:
        language - Language code - STRING
        token - Token - STRING
        Returns:
        result Localization tokens - STRING
        Throws:
        java.lang.Exception - If an error occurs
      • GetLanguages

        @ThingworxExtensionApiMethod(since={6,6})
        public InfoTable GetLanguages()
                               throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a list of languages defined on this system.


        Get a list of configured languages along with useful properties of each.
        Returns:
        InfoTable, one row per language, with properties name, description, avatar, common name, native name.
        Throws:
        java.lang.Exception
      • GetEffectiveTokensByName

        @ThingworxExtensionApiMethod(since={9,3})
        public InfoTable GetEffectiveTokensByName​(InfoTable names)
                                           throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a list of tokens with the provided names.
        Parameters:
        names - Localization token names - INFOTABLE
        Returns:
        result Localization tokens - INFOTABLE - Aspects {dataShape:LocalizationToken}
        Throws:
        java.lang.Exception - If an error occurs
      • GetEffectiveTokensForLanguageByName

        @ThingworxExtensionApiMethod(since={9,3})
        public InfoTable GetEffectiveTokensForLanguageByName​(java.lang.String language,
                                                             InfoTable names)
                                                      throws java.lang.Exception
        Service Category:
        Localization
        Service Description:
        Return a list of tokens with the provided names, given an ordered list of language preferences.
        Parameters:
        language - Language code - STRING
        names - Localization token names - INFOTABLE
        Returns:
        result Localization tokens - INFOTABLE - Aspects {dataShape:LocalizationToken}
        Throws:
        java.lang.Exception - If an error occurs