Example usage for com.liferay.portal.kernel.theme PortletDisplay isShowExportImportIcon

List of usage examples for com.liferay.portal.kernel.theme PortletDisplay isShowExportImportIcon

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.theme PortletDisplay isShowExportImportIcon.

Prototype

public boolean isShowExportImportIcon() 

Source Link

Usage

From source file:com.liferay.exportimport.web.internal.portlet.configuration.icon.ExportImportPortletConfigurationIcon.java

License:Open Source License

@Override
public boolean isShow(PortletRequest portletRequest) {
    ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY);

    PortletDisplay portletDisplay = themeDisplay.getPortletDisplay();

    if (!portletDisplay.isShowExportImportIcon()) {
        return false;
    }// w w  w.  j  a v a 2 s . c  o  m

    try {
        return GroupPermissionUtil.contains(themeDisplay.getPermissionChecker(), themeDisplay.getScopeGroup(),
                ActionKeys.EXPORT_IMPORT_PORTLET_INFO);
    } catch (PortalException pe) {

        // LPS-52675

        if (_log.isDebugEnabled()) {
            _log.debug(pe, pe);
        }

        return false;
    }
}