List of usage examples for com.liferay.portal.kernel.service TeamLocalServiceUtil getUserGroupTeams
public static java.util.List<com.liferay.portal.kernel.model.Team> getUserGroupTeams(long userGroupId)
From source file:eu.gerhards.liferay.services.angular.service.impl.AngularTeamServiceImpl.java
License:Open Source License
@Override public java.util.List<com.liferay.portal.kernel.model.Team> getTeamsForUserGroup(long userGroupId) throws PortalException { _log.info("Getting user group teams for user group " + String.valueOf(userGroupId)); _log.debug(" ... security check ..."); this.checkPersonalPermission(AngularActionKeys.LIST_TEAMS); // Check if user has the right to view the group UserGroupPermissionUtil.check(getPermissionChecker(), userGroupId, ActionKeys.VIEW); java.util.List<com.liferay.portal.kernel.model.Team> teams = TeamLocalServiceUtil .getUserGroupTeams(userGroupId); if (teams != null) { for (com.liferay.portal.kernel.model.Team team : teams) { // All teams have also the right to be shown? this.hasResourcePermission(team.getTeamId(), ActionKeys.VIEW); }/*from w w w . ja va2s. c om*/ } _log.debug(" ... returning team list => " + teams); return teams; }