}
private static void _localizeUsers(long companyId) throws Exception {
Company company = CompanyLocalServiceUtil.getCompany(companyId);
ExpandoBridge expandoBridge = company.getExpandoBridge();
String attributeName =
"localizationUpdated_" + PortletPropsValues.COMPANY_DEFAULT_LOCALE;
boolean localizationUpdated = GetterUtil.getBoolean(
expandoBridge.getAttribute(attributeName, false));
if (localizationUpdated) {
return;
}
try {
expandoBridge.addAttribute(
attributeName, ExpandoColumnConstants.BOOLEAN, Boolean.FALSE,
false);
}
catch (DuplicateColumnNameException dcne) {
}
expandoBridge.setAttribute(attributeName, Boolean.TRUE, false);
CompanyLocalServiceUtil.updateCompany(company);
ActionableDynamicQuery actionableDynamicQuery =
new UserActionableDynamicQuery() {