protected ThemeDisplay getThemeDisplay(SecurityToken securityToken) throws Exception { long userIdLong = GetterUtil.getLong(securityToken.getViewerId()); User user = UserLocalServiceUtil.getUserById(userIdLong); Company company = CompanyLocalServiceUtil.getCompanyById(user.getCompanyId()); ThemeDisplay themeDisplay = new ThemeDisplay(); themeDisplay.setCompany(company); themeDisplay.setLocale(user.getLocale()); themeDisplay.setUser(user); return themeDisplay; }