use of com.liferay.portal.NoSuchGroupException in project liferay-ide by liferay.
the class WebServerServlet method _getGroupId.
private static long _getGroupId(long companyId, String name) throws Exception {
try {
Group group = GroupLocalServiceUtil.getFriendlyURLGroup(companyId, StringPool.SLASH + name);
return group.getGroupId();
} catch (NoSuchGroupException nsge) {
}
User user = UserLocalServiceUtil.getUserByScreenName(companyId, name);
Group group = user.getGroup();
return group.getGroupId();
}
Aggregations