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)