001
014
015 package com.liferay.portal.model.impl;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.exception.SystemException;
019 import com.liferay.portal.model.Group;
020 import com.liferay.portal.model.UserGroup;
021 import com.liferay.portal.service.GroupLocalServiceUtil;
022
023
027 public class UserGroupImpl extends UserGroupModelImpl implements UserGroup {
028
029 public UserGroupImpl() {
030 }
031
032 public Group getGroup() throws PortalException, SystemException {
033 return GroupLocalServiceUtil.getUserGroupGroup(
034 getCompanyId(), getUserGroupId());
035 }
036
037 public int getPrivateLayoutsPageCount()
038 throws PortalException, SystemException {
039
040 Group group = getGroup();
041
042 return group.getPrivateLayoutsPageCount();
043 }
044
045 public boolean hasPrivateLayouts() throws PortalException, SystemException {
046 if (getPrivateLayoutsPageCount() > 0) {
047 return true;
048 }
049 else {
050 return false;
051 }
052 }
053
054 public int getPublicLayoutsPageCount()
055 throws PortalException, SystemException {
056
057 Group group = getGroup();
058
059 return group.getPublicLayoutsPageCount();
060 }
061
062 public boolean hasPublicLayouts() throws PortalException, SystemException {
063 if (getPublicLayoutsPageCount() > 0) {
064 return true;
065 }
066 else {
067 return false;
068 }
069 }
070
071 }