List of usage examples for com.liferay.portal.kernel.model LayoutSetBranch getTheme
public Theme getTheme();
From source file:com.liferay.exportimport.lar.ThemeExporter.java
License:Open Source License
public void exportTheme(PortletDataContext portletDataContext, LayoutSetBranch layoutSetBranch) throws Exception { boolean exportThemeSettings = MapUtil.getBoolean(portletDataContext.getParameterMap(), PortletDataHandlerKeys.THEME_REFERENCE); if (_log.isDebugEnabled()) { _log.debug("Export theme settings " + exportThemeSettings); }/* w w w . j av a 2s . c o m*/ if (!exportThemeSettings) { return; } StagedTheme stagedTheme = ModelAdapterUtil.adapt(layoutSetBranch.getTheme(), Theme.class, StagedTheme.class); if (!portletDataContext.isPerformDirectBinaryImport()) { Element layoutSetBranchElement = portletDataContext.getExportDataElement(layoutSetBranch); portletDataContext.addReferenceElement(layoutSetBranch, layoutSetBranchElement, stagedTheme, PortletDataContext.REFERENCE_TYPE_DEPENDENCY, true); } exportThemeSettings(portletDataContext, stagedTheme.getThemeId(), layoutSetBranch.getColorSchemeId(), layoutSetBranch.getCss()); }