List of usage examples for com.liferay.portal.kernel.portlet PortletRequestModel getThemeDisplayModel
public ThemeDisplayModel getThemeDisplayModel()
From source file:com.liferay.journal.util.impl.JournalUtil.java
License:Open Source License
public static Map<String, String> getTokens(long articleGroupId, PortletRequestModel portletRequestModel, ThemeDisplay themeDisplay) throws PortalException { Map<String, String> tokens = new HashMap<>(); if (themeDisplay != null) { _populateTokens(tokens, articleGroupId, themeDisplay); } else if (portletRequestModel != null) { ThemeDisplayModel themeDisplayModel = portletRequestModel.getThemeDisplayModel(); if (themeDisplayModel != null) { try { _populateTokens(tokens, articleGroupId, themeDisplayModel); } catch (Exception e) { if (_log.isWarnEnabled()) { _log.warn(e, e);/*from w w w .jav a2s .c o m*/ } } } } return tokens; }