List of usage examples for com.liferay.portal.kernel.model LayoutTypeController isFullPageDisplayable
public boolean isFullPageDisplayable();
From source file:com.liferay.portlet.configuration.icon.maximize.internal.MaximizePortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); if (!GetterUtil.getBoolean(themeDisplay.getThemeSetting("show-maximize-minimize-application-links"))) { return false; }/*from www.j av a 2 s .c om*/ Layout layout = themeDisplay.getLayout(); if (!layout.isTypePortlet()) { return false; } LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); LayoutTypeController layoutTypeController = layoutTypePortlet.getLayoutTypeController(); if (layoutTypeController.isFullPageDisplayable()) { return false; } Portlet portlet = (Portlet) portletRequest.getAttribute(WebKeys.RENDER_PORTLET); if (!portlet.hasWindowState(portletRequest.getResponseContentType(), WindowState.MAXIMIZED)) { return false; } Group group = themeDisplay.getScopeGroup(); if (!themeDisplay.isSignedIn() || (group.hasStagingGroup() && !group.isStagingGroup()) || !hasUpdateLayoutPermission(themeDisplay)) { if (!PropsValues.LAYOUT_GUEST_SHOW_MAX_ICON) { return false; } } return true; }
From source file:com.liferay.portlet.configuration.icon.minimize.internal.MinimizePortletConfigurationIcon.java
License:Open Source License
@Override public boolean isShow(PortletRequest portletRequest) { ThemeDisplay themeDisplay = (ThemeDisplay) portletRequest.getAttribute(WebKeys.THEME_DISPLAY); if (!GetterUtil.getBoolean(themeDisplay.getThemeSetting("show-maximize-minimize-application-links"))) { return false; }/*ww w . j av a 2s . co m*/ Layout layout = themeDisplay.getLayout(); if (!layout.isTypePortlet()) { return false; } LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); LayoutTypeController layoutTypeController = layoutTypePortlet.getLayoutTypeController(); if (layoutTypeController.isFullPageDisplayable()) { return false; } Portlet portlet = (Portlet) portletRequest.getAttribute(WebKeys.RENDER_PORTLET); if (!portlet.hasWindowState(portletRequest.getResponseContentType(), WindowState.MINIMIZED)) { return false; } Group group = themeDisplay.getScopeGroup(); if (!themeDisplay.isSignedIn() || (group.hasStagingGroup() && !group.isStagingGroup()) || !hasUpdateLayoutPermission(themeDisplay)) { if (!PropsValues.LAYOUT_GUEST_SHOW_MIN_ICON) { return false; } } return true; }
From source file:com.liferay.product.navigation.control.menu.web.internal.AddContentProductNavigationControlMenuEntry.java
License:Open Source License
@Override public boolean isShow(HttpServletRequest request) throws PortalException { ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY); if (themeDisplay.isStateMaximized()) { return false; }//w w w. ja v a 2 s . com Layout layout = themeDisplay.getLayout(); if (!layout.isTypePortlet()) { return false; } if (_staging.isIncomplete(layout)) { return false; } LayoutTypePortlet layoutTypePortlet = themeDisplay.getLayoutTypePortlet(); LayoutTypeController layoutTypeController = layoutTypePortlet.getLayoutTypeController(); if (layoutTypeController.isFullPageDisplayable()) { return false; } if (!hasAddContentOrApplicationPermission(themeDisplay)) { return false; } if (!(hasUpdateLayoutPermission(themeDisplay) || hasCustomizePermission(themeDisplay))) { return false; } return super.isShow(request); }