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

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

Introduction

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

Prototype

public static java.util.List<com.liferay.portal.kernel.model.Group> getActiveGroups(long companyId,
        boolean active) 

Source Link

Document

Returns all the active or inactive groups associated with the company.

Usage

From source file:eu.gerhards.liferay.services.angular.service.impl.AngularGroupServiceImpl.java

License:Open Source License

@Override
public List<Group> getActiveGroups(long companyId) throws PortalException {

    _log.info("Getting all groups for company id: " + String.valueOf(companyId));

    _log.debug("    ... security check ...");

    PortalPermissionUtil.check(getPermissionChecker(), AngularActionKeys.LIST_USER_GROUPS);

    _log.debug("   ... getting information ...");

    List<Group> activeGroup = GroupLocalServiceUtil.getActiveGroups(companyId, true);
    return activeGroup;
}

From source file:eu.gerhards.liferay.services.angular.service.impl.AngularGroupServiceImpl.java

License:Open Source License

@Override
public List<Group> getInactiveGroups(long companyId) throws PortalException {

    _log.info("Getting all groups for company id: " + String.valueOf(companyId));

    _log.debug("    ... security check ...");

    PortalPermissionUtil.check(getPermissionChecker(), AngularActionKeys.LIST_USER_GROUPS);

    _log.debug("   ... getting information ...");

    List<Group> inactiveGroups = GroupLocalServiceUtil.getActiveGroups(companyId, false);
    return inactiveGroups;
}

From source file:eu.gerhards.liferay.services.angular.service.impl.AngularSiteServiceImpl.java

License:Open Source License

@Override
public List<Group> getActiveSites(long companyId) throws PortalException {

    _log.info("Getting all sites for company id: " + String.valueOf(companyId));

    _log.debug("    ... security check ...");

    PortalPermissionUtil.check(getPermissionChecker(), AngularActionKeys.LIST_PAGES);

    _log.debug("   ... getting information ...");

    List<Group> activeGroups = GroupLocalServiceUtil.getActiveGroups(companyId, true);
    List<Group> sites = null;

    if (activeGroups != null && activeGroups.size() > 0) {
        sites = this.filterSites(activeGroups);
    }//ww  w. j av  a2s .c o  m
    return sites;
}

From source file:eu.gerhards.liferay.services.angular.service.impl.AngularSiteServiceImpl.java

License:Open Source License

@Override
public List<Group> getInactiveSites(long companyId) throws PortalException {

    _log.info("Getting all sites for company id: " + String.valueOf(companyId));

    _log.debug("    ... security check ...");

    PortalPermissionUtil.check(getPermissionChecker(), AngularActionKeys.LIST_PAGES);

    _log.debug("   ... getting information ...");

    List<Group> inactiveGroups = GroupLocalServiceUtil.getActiveGroups(companyId, false);
    List<Group> sites = null;

    if (inactiveGroups != null && inactiveGroups.size() > 0) {
        sites = this.filterSites(inactiveGroups);
    }/*from ww  w.  j a v a 2s  . c  o m*/

    return sites;
}