Class RuntimeLocalizationFunctions

All Implemented Interfaces:
IConfigurableObject, INotScriptFriendly, ISupportsDeprecation, IDiffableObject, IAvatar, IEntityLifeCycleEvent, IPersistable, IServiceProvider, ITaggableObject, IDependencyScannableObject, IEntityDefinition, IPersistableObject<String>, IDesignTimeSecurable, IDesignTimeSecurableEntity, IRunTimeSecurable, IRunTimeSecurableEntity, ISecurable, IVisibilitySecurable, IVisibilitySecurableEntity, IAspectContainer, INamedObject, Serializable

@ThingworxExtensionApiClass(since={6,6}, canInstantiate=true) public class RuntimeLocalizationFunctions extends Resource
See Also:
  • Constructor Details

    • RuntimeLocalizationFunctions

      public RuntimeLocalizationFunctions()
  • Method Details

    • SearchDefaultLocalizationTokens

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable SearchDefaultLocalizationTokens(String searchExpression) throws 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:
      Exception - If an error occurs
    • GetEffectiveTokens

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetEffectiveTokens() throws 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:
      Exception - If an error occurs
    • GetEffectiveTokensForLanguage

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetEffectiveTokensForLanguage(String language) throws 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:
      Exception - If an error occurs
    • ExportLocalizationTables

      @ThingworxExtensionApiMethod(since={6,6}) public Document ExportLocalizationTables(String prefix) throws 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:
      Exception - If an error occurs
    • GetEffectiveToken

      @ThingworxExtensionApiMethod(since={6,6}) public String GetEffectiveToken(String token) throws 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:
      Exception - If an error occurs
    • GetEffectiveTokenForLanguage

      @ThingworxExtensionApiMethod(since={6,6}) public String GetEffectiveTokenForLanguage(String language, String token) throws 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:
      Exception - If an error occurs
    • GetLanguages

      @ThingworxExtensionApiMethod(since={6,6}) public InfoTable GetLanguages() throws 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:
      Exception
    • GetEffectiveTokensByName

      @ThingworxExtensionApiMethod(since={9,3}) public InfoTable GetEffectiveTokensByName(InfoTable names) throws 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:
      Exception - If an error occurs
    • GetEffectiveTokensForLanguageByName

      @ThingworxExtensionApiMethod(since={9,3}) public InfoTable GetEffectiveTokensForLanguageByName(String language, InfoTable names) throws 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:
      Exception - If an error occurs