1
14
15 package com.liferay.portal.model.impl;
16
17 import com.liferay.portal.kernel.exception.PortalException;
18 import com.liferay.portal.kernel.exception.SystemException;
19 import com.liferay.portal.model.Group;
20 import com.liferay.portal.model.UserGroup;
21 import com.liferay.portal.service.GroupLocalServiceUtil;
22
23
29 public class UserGroupImpl extends UserGroupModelImpl implements UserGroup {
30
31 public UserGroupImpl() {
32 }
33
34 public Group getGroup() throws PortalException, SystemException {
35 return GroupLocalServiceUtil.getUserGroupGroup(
36 getCompanyId(), getUserGroupId());
37 }
38
39 public int getPrivateLayoutsPageCount()
40 throws PortalException, SystemException {
41
42 Group group = getGroup();
43
44 return group.getPrivateLayoutsPageCount();
45 }
46
47 public boolean hasPrivateLayouts() throws PortalException, SystemException {
48 if (getPrivateLayoutsPageCount() > 0) {
49 return true;
50 }
51 else {
52 return false;
53 }
54 }
55
56 public int getPublicLayoutsPageCount()
57 throws PortalException, SystemException {
58
59 Group group = getGroup();
60
61 return group.getPublicLayoutsPageCount();
62 }
63
64 public boolean hasPublicLayouts() throws PortalException, SystemException {
65 if (getPublicLayoutsPageCount() > 0) {
66 return true;
67 }
68 else {
69 return false;
70 }
71 }
72
73 }