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

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

Introduction

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

Prototype

public static java.util.List<com.liferay.portal.kernel.model.Group> getUserGroupsRelatedGroups(
        java.util.List<com.liferay.portal.kernel.model.UserGroup> userGroups) 

Source Link

Document

Returns all the groups related to the user groups.

Usage

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

License:Open Source License

public List<Group> getInheritedSites() throws PortalException {
    List<Group> inheritedSites = GroupLocalServiceUtil.getUserGroupsRelatedGroups(getUserGroups());

    for (Group group : _getOrganizationRelatedGroups()) {
        if (!inheritedSites.contains(group)) {
            inheritedSites.add(group);// w  w  w.  jav  a2s  . c o m
        }
    }

    return inheritedSites;
}