Example usage for com.liferay.portal.kernel.util PortletCategoryKeys SITE_ADMINISTRATION

List of usage examples for com.liferay.portal.kernel.util PortletCategoryKeys SITE_ADMINISTRATION

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.util PortletCategoryKeys SITE_ADMINISTRATION.

Prototype

String SITE_ADMINISTRATION

To view the source code for com.liferay.portal.kernel.util PortletCategoryKeys SITE_ADMINISTRATION.

Click Source Link

Usage

From source file:com.liferay.application.list.BasePanelApp.java

License:Open Source License

protected Group getGroup(HttpServletRequest request) {
    ThemeDisplay themeDisplay = (ThemeDisplay) request.getAttribute(WebKeys.THEME_DISPLAY);

    Group group = themeDisplay.getScopeGroup();

    if (!group.isControlPanel()) {
        return null;
    }/*w  w  w .ja v a  2s . c om*/

    Portlet portlet = getPortlet();

    String controlPanelEntryCategory = portlet.getControlPanelEntryCategory();

    if (Validator.isNull(controlPanelEntryCategory)
            || !controlPanelEntryCategory.startsWith(PortletCategoryKeys.SITE_ADMINISTRATION)) {

        return null;
    }

    if (groupProvider == null) {
        return null;
    }

    return groupProvider.getGroup(request);
}