Managing Multi-Language Attributes in Existing Trigger - Precisely_EnterWorks - EnterWorks - 11.0

EnterWorks Guide

Product type
Software
Portfolio
Verify
Product family
EnterWorks
Product
Precisely EnterWorks
Precisely EnterWorks > EnterWorks
Version
11.0
Language
English
Product name
Precisely EnterWorks
Title
EnterWorks Guide
Copyright
2024
First publish date
2007
Last updated
2025-01-07
Published on
2025-01-07T07:44:20.997000

If the existing trigger deals with non-default multi-language values, the getCurDiffMap() includes them using the following naming convention: F_<formatAttrId>_<langExt> where <formatAttrId> is the internal ID for the attribute and <langExt> is the language extension. This is the form the attribute name must be in order to update a non-default multi-language attribute. The Change Notification class has a method that provides lookup maps to facilitate dealing with multi-language attributes:

ChangeNotificationTrigger.getMultiLanguageAttributesForRepository(DBQuery dbQuery, 
	String repository Name, ArrayList<String> multiLanguageSystemNames,
	HashMap<String,String> extensionForSystemName, HashMap<String,String>
	attributeForSystemName, HashSet<String>languageExtensions,
	HashMap<String,String> systemNameForAttributeWithExtension);
  • dbQuery – the caller must pass in a valid DBQuery object
  • repositoryName – name of the repository being processed by the trigger
  • multiLanguageSystemNames – empty ArrayList to be populated with the list of the system names (e.g., F_100000_es) for all multi-language attributes.
  • extensionForSystemName – empty HashMap to be populated with a lookup for the extension for each system name (e.g, es for F_100000_es)
  • attributeForSystemName – empty HashMap to be populated with a lookup for the attribute name for each system name (e.g., Brand Name for F_100000_es)
  • languageExtensions – empty HashSet to be populated with a list of only the active multi-languages (except the default)
  • systemNameForAttributeWithExtension – empty HashMap to be populated with a lookup for the system name for each user-friendly attribute name with language extension (e.g., F_100000_es for Brand Name_es)