1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class GroupLocalServiceUtil {
42 public static com.liferay.portal.model.Group addGroup(
43 com.liferay.portal.model.Group group)
44 throws com.liferay.portal.SystemException {
45 return getService().addGroup(group);
46 }
47
48 public static com.liferay.portal.model.Group createGroup(long groupId) {
49 return getService().createGroup(groupId);
50 }
51
52 public static void deleteGroup(long groupId)
53 throws com.liferay.portal.PortalException,
54 com.liferay.portal.SystemException {
55 getService().deleteGroup(groupId);
56 }
57
58 public static void deleteGroup(com.liferay.portal.model.Group group)
59 throws com.liferay.portal.SystemException {
60 getService().deleteGroup(group);
61 }
62
63 @SuppressWarnings("rawtypes")
64 public static java.util.List dynamicQuery(
65 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
66 throws com.liferay.portal.SystemException {
67 return getService().dynamicQuery(dynamicQuery);
68 }
69
70 @SuppressWarnings("rawtypes")
71 public static java.util.List dynamicQuery(
72 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
73 int end) throws com.liferay.portal.SystemException {
74 return getService().dynamicQuery(dynamicQuery, start, end);
75 }
76
77 @SuppressWarnings("rawtypes")
78 public static java.util.List dynamicQuery(
79 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
80 int end,
81 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
82 throws com.liferay.portal.SystemException {
83 return getService()
84 .dynamicQuery(dynamicQuery, start, end, orderByComparator);
85 }
86
87 public static int dynamicQueryCount(
88 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
89 throws com.liferay.portal.SystemException {
90 return getService().dynamicQueryCount(dynamicQuery);
91 }
92
93 public static com.liferay.portal.model.Group getGroup(long groupId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 return getService().getGroup(groupId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Group> getGroups(
100 int start, int end) throws com.liferay.portal.SystemException {
101 return getService().getGroups(start, end);
102 }
103
104 public static int getGroupsCount()
105 throws com.liferay.portal.SystemException {
106 return getService().getGroupsCount();
107 }
108
109 public static com.liferay.portal.model.Group updateGroup(
110 com.liferay.portal.model.Group group)
111 throws com.liferay.portal.SystemException {
112 return getService().updateGroup(group);
113 }
114
115 public static com.liferay.portal.model.Group updateGroup(
116 com.liferay.portal.model.Group group, boolean merge)
117 throws com.liferay.portal.SystemException {
118 return getService().updateGroup(group, merge);
119 }
120
121 public static com.liferay.portal.model.Group addGroup(long userId,
122 java.lang.String className, long classPK, java.lang.String name,
123 java.lang.String description, int type, java.lang.String friendlyURL,
124 boolean active, com.liferay.portal.service.ServiceContext serviceContext)
125 throws com.liferay.portal.PortalException,
126 com.liferay.portal.SystemException {
127 return getService()
128 .addGroup(userId, className, classPK, name, description,
129 type, friendlyURL, active, serviceContext);
130 }
131
132 public static com.liferay.portal.model.Group addGroup(long userId,
133 java.lang.String className, long classPK, long liveGroupId,
134 java.lang.String name, java.lang.String description, int type,
135 java.lang.String friendlyURL, boolean active,
136 com.liferay.portal.service.ServiceContext serviceContext)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException {
139 return getService()
140 .addGroup(userId, className, classPK, liveGroupId, name,
141 description, type, friendlyURL, active, serviceContext);
142 }
143
144 public static void addRoleGroups(long roleId, long[] groupIds)
145 throws com.liferay.portal.SystemException {
146 getService().addRoleGroups(roleId, groupIds);
147 }
148
149 public static void addUserGroups(long userId, long[] groupIds)
150 throws com.liferay.portal.SystemException {
151 getService().addUserGroups(userId, groupIds);
152 }
153
154 public static void checkSystemGroups(long companyId)
155 throws com.liferay.portal.PortalException,
156 com.liferay.portal.SystemException {
157 getService().checkSystemGroups(companyId);
158 }
159
160 public static java.util.List<com.liferay.portal.model.Group> getCompanyGroups(
161 long companyId, int start, int end)
162 throws com.liferay.portal.SystemException {
163 return getService().getCompanyGroups(companyId, start, end);
164 }
165
166 public static int getCompanyGroupsCount(long companyId)
167 throws com.liferay.portal.SystemException {
168 return getService().getCompanyGroupsCount(companyId);
169 }
170
171 public static com.liferay.portal.model.Group getFriendlyURLGroup(
172 long companyId, java.lang.String friendlyURL)
173 throws com.liferay.portal.PortalException,
174 com.liferay.portal.SystemException {
175 return getService().getFriendlyURLGroup(companyId, friendlyURL);
176 }
177
178 public static com.liferay.portal.model.Group getGroup(long companyId,
179 java.lang.String name)
180 throws com.liferay.portal.PortalException,
181 com.liferay.portal.SystemException {
182 return getService().getGroup(companyId, name);
183 }
184
185 public static java.util.List<com.liferay.portal.model.Group> getGroups(
186 long[] groupIds)
187 throws com.liferay.portal.PortalException,
188 com.liferay.portal.SystemException {
189 return getService().getGroups(groupIds);
190 }
191
192 public static com.liferay.portal.model.Group getLayoutGroup(
193 long companyId, long plid)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 return getService().getLayoutGroup(companyId, plid);
197 }
198
199 public static java.util.List<com.liferay.portal.model.Group> getNoLayoutsGroups(
200 java.lang.String className, boolean privateLayout, int start, int end)
201 throws com.liferay.portal.SystemException {
202 return getService()
203 .getNoLayoutsGroups(className, privateLayout, start, end);
204 }
205
206 public static java.util.List<com.liferay.portal.model.Group> getNullFriendlyURLGroups()
207 throws com.liferay.portal.SystemException {
208 return getService().getNullFriendlyURLGroups();
209 }
210
211 public static com.liferay.portal.model.Group getOrganizationGroup(
212 long companyId, long organizationId)
213 throws com.liferay.portal.PortalException,
214 com.liferay.portal.SystemException {
215 return getService().getOrganizationGroup(companyId, organizationId);
216 }
217
218 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
219 java.util.List<com.liferay.portal.model.Organization> organizations) {
220 return getService().getOrganizationsGroups(organizations);
221 }
222
223 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsRelatedGroups(
224 java.util.List<com.liferay.portal.model.Organization> organizations)
225 throws com.liferay.portal.SystemException {
226 return getService().getOrganizationsRelatedGroups(organizations);
227 }
228
229 public static java.util.List<com.liferay.portal.model.Group> getRoleGroups(
230 long roleId) throws com.liferay.portal.SystemException {
231 return getService().getRoleGroups(roleId);
232 }
233
234 public static com.liferay.portal.model.Group getStagingGroup(
235 long liveGroupId)
236 throws com.liferay.portal.PortalException,
237 com.liferay.portal.SystemException {
238 return getService().getStagingGroup(liveGroupId);
239 }
240
241 public static com.liferay.portal.model.Group getUserGroup(long companyId,
242 long userId)
243 throws com.liferay.portal.PortalException,
244 com.liferay.portal.SystemException {
245 return getService().getUserGroup(companyId, userId);
246 }
247
248 public static com.liferay.portal.model.Group getUserGroupGroup(
249 long companyId, long userGroupId)
250 throws com.liferay.portal.PortalException,
251 com.liferay.portal.SystemException {
252 return getService().getUserGroupGroup(companyId, userGroupId);
253 }
254
255 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
256 long userId)
257 throws com.liferay.portal.PortalException,
258 com.liferay.portal.SystemException {
259 return getService().getUserGroups(userId);
260 }
261
262 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
263 long userId, boolean inherit)
264 throws com.liferay.portal.PortalException,
265 com.liferay.portal.SystemException {
266 return getService().getUserGroups(userId, inherit);
267 }
268
269 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
270 long userId, int start, int end)
271 throws com.liferay.portal.PortalException,
272 com.liferay.portal.SystemException {
273 return getService().getUserGroups(userId, start, end);
274 }
275
276 public static java.util.List<com.liferay.portal.model.Group> getUserGroups(
277 long userId, boolean inherit, int start, int end)
278 throws com.liferay.portal.PortalException,
279 com.liferay.portal.SystemException {
280 return getService().getUserGroups(userId, inherit, start, end);
281 }
282
283 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
284 java.util.List<com.liferay.portal.model.UserGroup> userGroups) {
285 return getService().getUserGroupsGroups(userGroups);
286 }
287
288 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsRelatedGroups(
289 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
290 throws com.liferay.portal.SystemException {
291 return getService().getUserGroupsRelatedGroups(userGroups);
292 }
293
294 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
295 long userId, int start, int end)
296 throws com.liferay.portal.PortalException,
297 com.liferay.portal.SystemException {
298 return getService().getUserOrganizationsGroups(userId, start, end);
299 }
300
301 public static boolean hasRoleGroup(long roleId, long groupId)
302 throws com.liferay.portal.SystemException {
303 return getService().hasRoleGroup(roleId, groupId);
304 }
305
306 public static boolean hasStagingGroup(long liveGroupId)
307 throws com.liferay.portal.SystemException {
308 return getService().hasStagingGroup(liveGroupId);
309 }
310
311 public static boolean hasUserGroup(long userId, long groupId)
312 throws com.liferay.portal.SystemException {
313 return getService().hasUserGroup(userId, groupId);
314 }
315
316 public static java.util.List<com.liferay.portal.model.Group> search(
317 long companyId, java.lang.String name, java.lang.String description,
318 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
319 int start, int end) throws com.liferay.portal.SystemException {
320 return getService()
321 .search(companyId, name, description, params, start, end);
322 }
323
324 public static java.util.List<com.liferay.portal.model.Group> search(
325 long companyId, java.lang.String name, java.lang.String description,
326 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
327 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
328 throws com.liferay.portal.SystemException {
329 return getService()
330 .search(companyId, name, description, params, start, end, obc);
331 }
332
333 public static int searchCount(long companyId, java.lang.String name,
334 java.lang.String description,
335 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
336 throws com.liferay.portal.SystemException {
337 return getService().searchCount(companyId, name, description, params);
338 }
339
340 public static void setRoleGroups(long roleId, long[] groupIds)
341 throws com.liferay.portal.SystemException {
342 getService().setRoleGroups(roleId, groupIds);
343 }
344
345 public static void unsetRoleGroups(long roleId, long[] groupIds)
346 throws com.liferay.portal.SystemException {
347 getService().unsetRoleGroups(roleId, groupIds);
348 }
349
350 public static void unsetUserGroups(long userId, long[] groupIds)
351 throws com.liferay.portal.SystemException {
352 getService().unsetUserGroups(userId, groupIds);
353 }
354
355 public static com.liferay.portal.model.Group updateFriendlyURL(
356 long groupId, java.lang.String friendlyURL)
357 throws com.liferay.portal.PortalException,
358 com.liferay.portal.SystemException {
359 return getService().updateFriendlyURL(groupId, friendlyURL);
360 }
361
362 public static com.liferay.portal.model.Group updateGroup(long groupId,
363 java.lang.String name, java.lang.String description, int type,
364 java.lang.String friendlyURL, boolean active,
365 com.liferay.portal.service.ServiceContext serviceContext)
366 throws com.liferay.portal.PortalException,
367 com.liferay.portal.SystemException {
368 return getService()
369 .updateGroup(groupId, name, description, type, friendlyURL,
370 active, serviceContext);
371 }
372
373 public static com.liferay.portal.model.Group updateGroup(long groupId,
374 java.lang.String typeSettings)
375 throws com.liferay.portal.PortalException,
376 com.liferay.portal.SystemException {
377 return getService().updateGroup(groupId, typeSettings);
378 }
379
380 public static void updateTagsAsset(long userId,
381 com.liferay.portal.model.Group group,
382 java.lang.String[] tagsCategories, java.lang.String[] tagsEntries)
383 throws com.liferay.portal.PortalException,
384 com.liferay.portal.SystemException {
385 getService().updateTagsAsset(userId, group, tagsCategories, tagsEntries);
386 }
387
388 public static com.liferay.portal.model.Group updateWorkflow(long groupId,
389 boolean workflowEnabled, int workflowStages,
390 java.lang.String workflowRoleNames)
391 throws com.liferay.portal.PortalException,
392 com.liferay.portal.SystemException {
393 return getService()
394 .updateWorkflow(groupId, workflowEnabled, workflowStages,
395 workflowRoleNames);
396 }
397
398 public static GroupLocalService getService() {
399 if (_service == null) {
400 _service = (GroupLocalService)PortalBeanLocatorUtil.locate(GroupLocalService.class.getName());
401
402 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class,
403 "_service");
404 MethodCache.remove(GroupLocalService.class);
405 }
406
407 return _service;
408 }
409
410 public void setService(GroupLocalService service) {
411 MethodCache.remove(GroupLocalService.class);
412
413 _service = service;
414
415 ReferenceRegistry.registerReference(GroupLocalServiceUtil.class,
416 "_service");
417 MethodCache.remove(GroupLocalService.class);
418 }
419
420 private static GroupLocalService _service;
421 }