Example usage for com.liferay.portal.kernel.model Layout isInheritLookAndFeel

List of usage examples for com.liferay.portal.kernel.model Layout isInheritLookAndFeel

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.model Layout isInheritLookAndFeel.

Prototype

public boolean isInheritLookAndFeel();

Source Link

Document

Returns true if the current layout utilizes its LayoutSet 's look and feel options (e.g.

Usage

From source file:com.liferay.layout.admin.web.internal.exportimport.data.handler.LayoutStagedModelDataHandler.java

License:Open Source License

protected void exportTheme(PortletDataContext portletDataContext, Layout layout) throws Exception {

    boolean exportThemeSettings = MapUtil.getBoolean(portletDataContext.getParameterMap(),
            PortletDataHandlerKeys.THEME_REFERENCE);

    if (_log.isDebugEnabled()) {
        _log.debug("Export theme settings " + exportThemeSettings);
    }//from w  w w.j  a v a  2s .  co  m

    if (exportThemeSettings && !portletDataContext.isPerformDirectBinaryImport()
            && !layout.isInheritLookAndFeel()) {

        StagedTheme stagedTheme = new StagedThemeImpl(layout.getTheme());

        Element layoutElement = portletDataContext.getExportDataElement(layout);

        portletDataContext.addReferenceElement(layout, layoutElement, stagedTheme,
                PortletDataContext.REFERENCE_TYPE_DEPENDENCY, true);
    }
}