Example usage for com.liferay.portal.kernel.service GroupLocalServiceUtil getUserGroupsGroups

List of usage examples for com.liferay.portal.kernel.service GroupLocalServiceUtil getUserGroupsGroups

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.service GroupLocalServiceUtil getUserGroupsGroups.

Prototype

public static java.util.List<com.liferay.portal.kernel.model.Group> getUserGroupsGroups(
        java.util.List<com.liferay.portal.kernel.model.UserGroup> userGroups)
        throws com.liferay.portal.kernel.exception.PortalException 

Source Link

Document

Returns the groups associated with the user groups.

Usage

From source file:com.liferay.users.admin.web.internal.display.context.UserDisplayContext.java

License:Open Source License

public List<Group> getAllGroups() throws PortalException {
    List<Group> allGroups = new ArrayList<>();

    allGroups.addAll(getGroups());/*ww w.  j av  a 2 s  . c  om*/
    allGroups.addAll(getInheritedSites());
    allGroups.addAll(_getOrganizationRelatedGroups());
    allGroups.addAll(GroupLocalServiceUtil.getOrganizationsGroups(getOrganizations()));
    allGroups.addAll(GroupLocalServiceUtil.getUserGroupsGroups(getUserGroups()));

    return allGroups;
}