1
22
23 package com.liferay.portal.service;
24
25
26
46 public class GroupServiceUtil {
47 public static com.liferay.portal.model.Group addGroup(
48 java.lang.String name, java.lang.String description, int type,
49 java.lang.String friendlyURL, boolean active,
50 com.liferay.portal.service.ServiceContext serviceContext)
51 throws com.liferay.portal.PortalException,
52 com.liferay.portal.SystemException {
53 return getService()
54 .addGroup(name, description, type, friendlyURL, active,
55 serviceContext);
56 }
57
58 public static com.liferay.portal.model.Group addGroup(long liveGroupId,
59 java.lang.String name, java.lang.String description, int type,
60 java.lang.String friendlyURL, boolean active,
61 com.liferay.portal.service.ServiceContext serviceContext)
62 throws com.liferay.portal.PortalException,
63 com.liferay.portal.SystemException {
64 return getService()
65 .addGroup(liveGroupId, name, description, type, friendlyURL,
66 active, serviceContext);
67 }
68
69 public static void addRoleGroups(long roleId, long[] groupIds)
70 throws com.liferay.portal.PortalException,
71 com.liferay.portal.SystemException {
72 getService().addRoleGroups(roleId, groupIds);
73 }
74
75 public static void deleteGroup(long groupId)
76 throws com.liferay.portal.PortalException,
77 com.liferay.portal.SystemException {
78 getService().deleteGroup(groupId);
79 }
80
81 public static com.liferay.portal.model.Group getGroup(long groupId)
82 throws com.liferay.portal.PortalException,
83 com.liferay.portal.SystemException {
84 return getService().getGroup(groupId);
85 }
86
87 public static com.liferay.portal.model.Group getGroup(long companyId,
88 java.lang.String name)
89 throws com.liferay.portal.PortalException,
90 com.liferay.portal.SystemException {
91 return getService().getGroup(companyId, name);
92 }
93
94 public static java.util.List<com.liferay.portal.model.Group> getManageableGroups(
95 java.lang.String actionId, int max)
96 throws com.liferay.portal.PortalException,
97 com.liferay.portal.SystemException {
98 return getService().getManageableGroups(actionId, max);
99 }
100
101 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
102 java.util.List<com.liferay.portal.model.Organization> organizations) {
103 return getService().getOrganizationsGroups(organizations);
104 }
105
106 public static com.liferay.portal.model.Group getUserGroup(long companyId,
107 long userId)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 return getService().getUserGroup(companyId, userId);
111 }
112
113 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
114 java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
115 return getService().getUserGroupsGroups(userGroups);
116 }
117
118 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
119 long userId, int start, int end)
120 throws com.liferay.portal.PortalException,
121 com.liferay.portal.SystemException {
122 return getService().getUserOrganizationsGroups(userId, start, end);
123 }
124
125 public static boolean hasUserGroup(long userId, long groupId)
126 throws com.liferay.portal.SystemException {
127 return getService().hasUserGroup(userId, groupId);
128 }
129
130 public static java.util.List<com.liferay.portal.model.Group> search(
131 long companyId, java.lang.String name, java.lang.String description,
132 java.lang.String[] params, int start, int end)
133 throws com.liferay.portal.SystemException {
134 return getService()
135 .search(companyId, name, description, params, start, end);
136 }
137
138 public static int searchCount(long companyId, java.lang.String name,
139 java.lang.String description, java.lang.String[] params)
140 throws com.liferay.portal.SystemException {
141 return getService().searchCount(companyId, name, description, params);
142 }
143
144 public static void setRoleGroups(long roleId, long[] groupIds)
145 throws com.liferay.portal.PortalException,
146 com.liferay.portal.SystemException {
147 getService().setRoleGroups(roleId, groupIds);
148 }
149
150 public static void unsetRoleGroups(long roleId, long[] groupIds)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException {
153 getService().unsetRoleGroups(roleId, groupIds);
154 }
155
156 public static com.liferay.portal.model.Group updateFriendlyURL(
157 long groupId, java.lang.String friendlyURL)
158 throws com.liferay.portal.PortalException,
159 com.liferay.portal.SystemException {
160 return getService().updateFriendlyURL(groupId, friendlyURL);
161 }
162
163 public static com.liferay.portal.model.Group updateGroup(long groupId,
164 java.lang.String name, java.lang.String description, int type,
165 java.lang.String friendlyURL, boolean active,
166 com.liferay.portal.service.ServiceContext serviceContext)
167 throws com.liferay.portal.PortalException,
168 com.liferay.portal.SystemException {
169 return getService()
170 .updateGroup(groupId, name, description, type, friendlyURL,
171 active, serviceContext);
172 }
173
174 public static com.liferay.portal.model.Group updateGroup(long groupId,
175 java.lang.String typeSettings)
176 throws com.liferay.portal.PortalException,
177 com.liferay.portal.SystemException {
178 return getService().updateGroup(groupId, typeSettings);
179 }
180
181 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
182 boolean workflowEnabled, int workflowStages,
183 java.lang.String workflowRoleNames)
184 throws com.liferay.portal.PortalException,
185 com.liferay.portal.SystemException {
186 return getService()
187 .updateWorkflow(groupId, workflowEnabled, workflowStages,
188 workflowRoleNames);
189 }
190
191 public static GroupService getService() {
192 if (_service == null) {
193 throw new RuntimeException("GroupService is not set");
194 }
195
196 return _service;
197 }
198
199 public void setService(GroupService service) {
200 _service = service;
201 }
202
203 private static GroupService _service;
204 }