Example usage for com.liferay.portal.kernel.model Portlet isFullPageDisplayable

List of usage examples for com.liferay.portal.kernel.model Portlet isFullPageDisplayable

Introduction

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

Prototype

public boolean isFullPageDisplayable();

Source Link

Usage

From source file:com.liferay.layout.type.controller.full.page.application.internal.controller.FullPageApplicationLayoutTypeController.java

License:Open Source License

@Override
protected void addAttributes(HttpServletRequest request) {
    super.addAttributes(request);

    List<Portlet> portlets = _portletLocalService.getPortlets();

    if (portlets.isEmpty()) {
        return;/*w w  w .j  a v a 2s  .  c  om*/
    }

    portlets = ListUtil.filter(portlets, new PredicateFilter<Portlet>() {

        @Override
        public boolean filter(Portlet portlet) {
            return portlet.isFullPageDisplayable();
        }

    });

    request.setAttribute(FullPageApplicationLayoutTypeControllerWebKeys.FULL_PAGE_APPLICATION_PORTLETS,
            portlets);
}

From source file:com.liferay.site.navigation.menu.item.full.page.application.internal.type.FullPageApplicationSiteNavigationMenuItemType.java

License:Open Source License

private List<Portlet> _getPortlets() {
    List<Portlet> portlets = _portletLocalService.getPortlets();

    if (portlets.isEmpty()) {
        return Collections.emptyList();
    }// w w  w.j  av a 2s.c  om

    portlets = ListUtil.filter(portlets, new PredicateFilter<Portlet>() {

        @Override
        public boolean filter(Portlet portlet) {
            return portlet.isFullPageDisplayable();
        }

    });

    return portlets;
}