List of usage examples for com.liferay.portal.kernel.theme ThemeDisplay setRealUser
public void setRealUser(User realUser)
From source file:com.liferay.journal.search.test.JournalArticleIndexerSummaryTest.java
License:Open Source License
protected ThemeDisplay createThemeDisplay(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception { ThemeDisplay themeDisplay = new ThemeDisplay(); themeDisplay.setCompany(CompanyLocalServiceUtil.getCompany(_group.getCompanyId())); themeDisplay.setLayout(LayoutTestUtil.addLayout(_group)); LayoutSet layoutSet = _group.getPublicLayoutSet(); themeDisplay.setLayoutSet(layoutSet); Theme theme = ThemeLocalServiceUtil.getTheme(_group.getCompanyId(), layoutSet.getThemeId()); themeDisplay.setLookAndFeel(theme, null); themeDisplay.setRealUser(_user); themeDisplay.setRequest(httpServletRequest); themeDisplay.setResponse(httpServletResponse); themeDisplay.setTimeZone(TimeZoneUtil.getDefault()); themeDisplay.setUser(_user);//from www. ja va 2 s . c o m return themeDisplay; }