Locale operations - script to Java migration

For the Locale operations, not all of the script operations from the Script API are implemented in the Java™ API. Alternative Java code is provided for those script operations that are not implemented in the Java API.

Table 1. Script operations and alternative Java code for the Locale operations
Script operation Alternative Java code
new Locale() new java.util.Locale();
getLocalizedSpecNames() Retrieve all specs and invoke isLocalized () on each of them.
getLocaleCode() java.util.Locale.toString()
getLocaleDisplayName() java.util.Locale.getDisplayName();
addToCompanyLocales() Company.addLocales(List<Locale> locales)
removeFromCompanyLocales() Company.removeLocales(List<Locale> locales)
getUserLocale() User.getUserSettingValue(UserSetting.LOCALE)
getCompanyLocales () Company.getLocales()
getDefaultLocale Company.getDefaultLocale()
getDefaultACGName() Company.getDefaultAccessControlGroup()
getDefaultSpecName() Company.getDefaultSpec()
getDefaultOrgHierarchyName() Company.getDefaultOrganizationHierarchy()
getDefaultLktHierarchyName() Company.getDefaultLookupTableHierarchy()
getDefaultAttrCollectionName() Company.getDefaultAttributeCollection(Spec spec)