001
014
015 package com.liferay.portal.service.http;
016
017 import com.liferay.portal.kernel.log.Log;
018 import com.liferay.portal.kernel.log.LogFactoryUtil;
019 import com.liferay.portal.kernel.util.MethodHandler;
020 import com.liferay.portal.kernel.util.MethodKey;
021 import com.liferay.portal.security.auth.HttpPrincipal;
022 import com.liferay.portal.service.GroupServiceUtil;
023
024
054 public class GroupServiceHttp {
055 public static com.liferay.portal.model.Group addGroup(
056 HttpPrincipal httpPrincipal, long liveGroupId, java.lang.String name,
057 java.lang.String description, int type, java.lang.String friendlyURL,
058 boolean site, boolean active,
059 com.liferay.portal.service.ServiceContext serviceContext)
060 throws com.liferay.portal.kernel.exception.PortalException,
061 com.liferay.portal.kernel.exception.SystemException {
062 try {
063 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
064 "addGroup", _addGroupParameterTypes0);
065
066 MethodHandler methodHandler = new MethodHandler(methodKey,
067 liveGroupId, name, description, type, friendlyURL, site,
068 active, serviceContext);
069
070 Object returnObj = null;
071
072 try {
073 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
074 }
075 catch (Exception e) {
076 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
077 throw (com.liferay.portal.kernel.exception.PortalException)e;
078 }
079
080 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
081 throw (com.liferay.portal.kernel.exception.SystemException)e;
082 }
083
084 throw new com.liferay.portal.kernel.exception.SystemException(e);
085 }
086
087 return (com.liferay.portal.model.Group)returnObj;
088 }
089 catch (com.liferay.portal.kernel.exception.SystemException se) {
090 _log.error(se, se);
091
092 throw se;
093 }
094 }
095
096 public static com.liferay.portal.model.Group addGroup(
097 HttpPrincipal httpPrincipal, java.lang.String name,
098 java.lang.String description, int type, java.lang.String friendlyURL,
099 boolean site, boolean active,
100 com.liferay.portal.service.ServiceContext serviceContext)
101 throws com.liferay.portal.kernel.exception.PortalException,
102 com.liferay.portal.kernel.exception.SystemException {
103 try {
104 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
105 "addGroup", _addGroupParameterTypes1);
106
107 MethodHandler methodHandler = new MethodHandler(methodKey, name,
108 description, type, friendlyURL, site, active, serviceContext);
109
110 Object returnObj = null;
111
112 try {
113 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
114 }
115 catch (Exception e) {
116 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
117 throw (com.liferay.portal.kernel.exception.PortalException)e;
118 }
119
120 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
121 throw (com.liferay.portal.kernel.exception.SystemException)e;
122 }
123
124 throw new com.liferay.portal.kernel.exception.SystemException(e);
125 }
126
127 return (com.liferay.portal.model.Group)returnObj;
128 }
129 catch (com.liferay.portal.kernel.exception.SystemException se) {
130 _log.error(se, se);
131
132 throw se;
133 }
134 }
135
136 public static void addRoleGroups(HttpPrincipal httpPrincipal, long roleId,
137 long[] groupIds)
138 throws com.liferay.portal.kernel.exception.PortalException,
139 com.liferay.portal.kernel.exception.SystemException {
140 try {
141 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
142 "addRoleGroups", _addRoleGroupsParameterTypes2);
143
144 MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
145 groupIds);
146
147 try {
148 TunnelUtil.invoke(httpPrincipal, methodHandler);
149 }
150 catch (Exception e) {
151 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
152 throw (com.liferay.portal.kernel.exception.PortalException)e;
153 }
154
155 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
156 throw (com.liferay.portal.kernel.exception.SystemException)e;
157 }
158
159 throw new com.liferay.portal.kernel.exception.SystemException(e);
160 }
161 }
162 catch (com.liferay.portal.kernel.exception.SystemException se) {
163 _log.error(se, se);
164
165 throw se;
166 }
167 }
168
169 public static void deleteGroup(HttpPrincipal httpPrincipal, long groupId)
170 throws com.liferay.portal.kernel.exception.PortalException,
171 com.liferay.portal.kernel.exception.SystemException {
172 try {
173 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
174 "deleteGroup", _deleteGroupParameterTypes3);
175
176 MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
177
178 try {
179 TunnelUtil.invoke(httpPrincipal, methodHandler);
180 }
181 catch (Exception e) {
182 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
183 throw (com.liferay.portal.kernel.exception.PortalException)e;
184 }
185
186 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
187 throw (com.liferay.portal.kernel.exception.SystemException)e;
188 }
189
190 throw new com.liferay.portal.kernel.exception.SystemException(e);
191 }
192 }
193 catch (com.liferay.portal.kernel.exception.SystemException se) {
194 _log.error(se, se);
195
196 throw se;
197 }
198 }
199
200 public static com.liferay.portal.model.Group getGroup(
201 HttpPrincipal httpPrincipal, long groupId)
202 throws com.liferay.portal.kernel.exception.PortalException,
203 com.liferay.portal.kernel.exception.SystemException {
204 try {
205 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
206 "getGroup", _getGroupParameterTypes4);
207
208 MethodHandler methodHandler = new MethodHandler(methodKey, groupId);
209
210 Object returnObj = null;
211
212 try {
213 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
214 }
215 catch (Exception e) {
216 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
217 throw (com.liferay.portal.kernel.exception.PortalException)e;
218 }
219
220 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
221 throw (com.liferay.portal.kernel.exception.SystemException)e;
222 }
223
224 throw new com.liferay.portal.kernel.exception.SystemException(e);
225 }
226
227 return (com.liferay.portal.model.Group)returnObj;
228 }
229 catch (com.liferay.portal.kernel.exception.SystemException se) {
230 _log.error(se, se);
231
232 throw se;
233 }
234 }
235
236 public static com.liferay.portal.model.Group getGroup(
237 HttpPrincipal httpPrincipal, long companyId, java.lang.String name)
238 throws com.liferay.portal.kernel.exception.PortalException,
239 com.liferay.portal.kernel.exception.SystemException {
240 try {
241 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
242 "getGroup", _getGroupParameterTypes5);
243
244 MethodHandler methodHandler = new MethodHandler(methodKey,
245 companyId, name);
246
247 Object returnObj = null;
248
249 try {
250 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
251 }
252 catch (Exception e) {
253 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
254 throw (com.liferay.portal.kernel.exception.PortalException)e;
255 }
256
257 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
258 throw (com.liferay.portal.kernel.exception.SystemException)e;
259 }
260
261 throw new com.liferay.portal.kernel.exception.SystemException(e);
262 }
263
264 return (com.liferay.portal.model.Group)returnObj;
265 }
266 catch (com.liferay.portal.kernel.exception.SystemException se) {
267 _log.error(se, se);
268
269 throw se;
270 }
271 }
272
273 public static java.util.List<com.liferay.portal.model.Group> getManageableSites(
274 HttpPrincipal httpPrincipal,
275 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max)
276 throws com.liferay.portal.kernel.exception.PortalException,
277 com.liferay.portal.kernel.exception.SystemException {
278 try {
279 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
280 "getManageableSites", _getManageableSitesParameterTypes6);
281
282 MethodHandler methodHandler = new MethodHandler(methodKey,
283 portlets, max);
284
285 Object returnObj = null;
286
287 try {
288 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
289 }
290 catch (Exception e) {
291 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
292 throw (com.liferay.portal.kernel.exception.PortalException)e;
293 }
294
295 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
296 throw (com.liferay.portal.kernel.exception.SystemException)e;
297 }
298
299 throw new com.liferay.portal.kernel.exception.SystemException(e);
300 }
301
302 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
303 }
304 catch (com.liferay.portal.kernel.exception.SystemException se) {
305 _log.error(se, se);
306
307 throw se;
308 }
309 }
310
311 public static java.util.List<com.liferay.portal.model.Group> getOrganizationsGroups(
312 HttpPrincipal httpPrincipal,
313 java.util.List<com.liferay.portal.model.Organization> organizations)
314 throws com.liferay.portal.kernel.exception.PortalException,
315 com.liferay.portal.kernel.exception.SystemException {
316 try {
317 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
318 "getOrganizationsGroups",
319 _getOrganizationsGroupsParameterTypes7);
320
321 MethodHandler methodHandler = new MethodHandler(methodKey,
322 organizations);
323
324 Object returnObj = null;
325
326 try {
327 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
328 }
329 catch (Exception e) {
330 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
331 throw (com.liferay.portal.kernel.exception.PortalException)e;
332 }
333
334 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
335 throw (com.liferay.portal.kernel.exception.SystemException)e;
336 }
337
338 throw new com.liferay.portal.kernel.exception.SystemException(e);
339 }
340
341 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
342 }
343 catch (com.liferay.portal.kernel.exception.SystemException se) {
344 _log.error(se, se);
345
346 throw se;
347 }
348 }
349
350 public static com.liferay.portal.model.Group getUserGroup(
351 HttpPrincipal httpPrincipal, long companyId, long userId)
352 throws com.liferay.portal.kernel.exception.PortalException,
353 com.liferay.portal.kernel.exception.SystemException {
354 try {
355 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
356 "getUserGroup", _getUserGroupParameterTypes8);
357
358 MethodHandler methodHandler = new MethodHandler(methodKey,
359 companyId, userId);
360
361 Object returnObj = null;
362
363 try {
364 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
365 }
366 catch (Exception e) {
367 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
368 throw (com.liferay.portal.kernel.exception.PortalException)e;
369 }
370
371 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
372 throw (com.liferay.portal.kernel.exception.SystemException)e;
373 }
374
375 throw new com.liferay.portal.kernel.exception.SystemException(e);
376 }
377
378 return (com.liferay.portal.model.Group)returnObj;
379 }
380 catch (com.liferay.portal.kernel.exception.SystemException se) {
381 _log.error(se, se);
382
383 throw se;
384 }
385 }
386
387 public static java.util.List<com.liferay.portal.model.Group> getUserGroupsGroups(
388 HttpPrincipal httpPrincipal,
389 java.util.List<com.liferay.portal.model.UserGroup> userGroups)
390 throws com.liferay.portal.kernel.exception.PortalException,
391 com.liferay.portal.kernel.exception.SystemException {
392 try {
393 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
394 "getUserGroupsGroups", _getUserGroupsGroupsParameterTypes9);
395
396 MethodHandler methodHandler = new MethodHandler(methodKey,
397 userGroups);
398
399 Object returnObj = null;
400
401 try {
402 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
403 }
404 catch (Exception e) {
405 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
406 throw (com.liferay.portal.kernel.exception.PortalException)e;
407 }
408
409 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
410 throw (com.liferay.portal.kernel.exception.SystemException)e;
411 }
412
413 throw new com.liferay.portal.kernel.exception.SystemException(e);
414 }
415
416 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
417 }
418 catch (com.liferay.portal.kernel.exception.SystemException se) {
419 _log.error(se, se);
420
421 throw se;
422 }
423 }
424
425 public static java.util.List<com.liferay.portal.model.Group> getUserOrganizationsGroups(
426 HttpPrincipal httpPrincipal, long userId, int start, int end)
427 throws com.liferay.portal.kernel.exception.PortalException,
428 com.liferay.portal.kernel.exception.SystemException {
429 try {
430 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
431 "getUserOrganizationsGroups",
432 _getUserOrganizationsGroupsParameterTypes10);
433
434 MethodHandler methodHandler = new MethodHandler(methodKey, userId,
435 start, end);
436
437 Object returnObj = null;
438
439 try {
440 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
441 }
442 catch (Exception e) {
443 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
444 throw (com.liferay.portal.kernel.exception.PortalException)e;
445 }
446
447 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
448 throw (com.liferay.portal.kernel.exception.SystemException)e;
449 }
450
451 throw new com.liferay.portal.kernel.exception.SystemException(e);
452 }
453
454 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
455 }
456 catch (com.liferay.portal.kernel.exception.SystemException se) {
457 _log.error(se, se);
458
459 throw se;
460 }
461 }
462
463 public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
464 HttpPrincipal httpPrincipal, long userId,
465 java.lang.String[] classNames, boolean includeControlPanel, int max)
466 throws com.liferay.portal.kernel.exception.PortalException,
467 com.liferay.portal.kernel.exception.SystemException {
468 try {
469 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
470 "getUserPlaces", _getUserPlacesParameterTypes11);
471
472 MethodHandler methodHandler = new MethodHandler(methodKey, userId,
473 classNames, includeControlPanel, max);
474
475 Object returnObj = null;
476
477 try {
478 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
479 }
480 catch (Exception e) {
481 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
482 throw (com.liferay.portal.kernel.exception.PortalException)e;
483 }
484
485 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
486 throw (com.liferay.portal.kernel.exception.SystemException)e;
487 }
488
489 throw new com.liferay.portal.kernel.exception.SystemException(e);
490 }
491
492 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
493 }
494 catch (com.liferay.portal.kernel.exception.SystemException se) {
495 _log.error(se, se);
496
497 throw se;
498 }
499 }
500
501 public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
502 HttpPrincipal httpPrincipal, long userId,
503 java.lang.String[] classNames, int max)
504 throws com.liferay.portal.kernel.exception.PortalException,
505 com.liferay.portal.kernel.exception.SystemException {
506 try {
507 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
508 "getUserPlaces", _getUserPlacesParameterTypes12);
509
510 MethodHandler methodHandler = new MethodHandler(methodKey, userId,
511 classNames, max);
512
513 Object returnObj = null;
514
515 try {
516 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
517 }
518 catch (Exception e) {
519 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
520 throw (com.liferay.portal.kernel.exception.PortalException)e;
521 }
522
523 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
524 throw (com.liferay.portal.kernel.exception.SystemException)e;
525 }
526
527 throw new com.liferay.portal.kernel.exception.SystemException(e);
528 }
529
530 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
531 }
532 catch (com.liferay.portal.kernel.exception.SystemException se) {
533 _log.error(se, se);
534
535 throw se;
536 }
537 }
538
539 public static java.util.List<com.liferay.portal.model.Group> getUserPlaces(
540 HttpPrincipal httpPrincipal, java.lang.String[] classNames, int max)
541 throws com.liferay.portal.kernel.exception.PortalException,
542 com.liferay.portal.kernel.exception.SystemException {
543 try {
544 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
545 "getUserPlaces", _getUserPlacesParameterTypes13);
546
547 MethodHandler methodHandler = new MethodHandler(methodKey,
548 classNames, max);
549
550 Object returnObj = null;
551
552 try {
553 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
554 }
555 catch (Exception e) {
556 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
557 throw (com.liferay.portal.kernel.exception.PortalException)e;
558 }
559
560 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
561 throw (com.liferay.portal.kernel.exception.SystemException)e;
562 }
563
564 throw new com.liferay.portal.kernel.exception.SystemException(e);
565 }
566
567 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
568 }
569 catch (com.liferay.portal.kernel.exception.SystemException se) {
570 _log.error(se, se);
571
572 throw se;
573 }
574 }
575
576 public static java.util.List<com.liferay.portal.model.Group> getUserSites(
577 HttpPrincipal httpPrincipal)
578 throws com.liferay.portal.kernel.exception.PortalException,
579 com.liferay.portal.kernel.exception.SystemException {
580 try {
581 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
582 "getUserSites", _getUserSitesParameterTypes14);
583
584 MethodHandler methodHandler = new MethodHandler(methodKey);
585
586 Object returnObj = null;
587
588 try {
589 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
590 }
591 catch (Exception e) {
592 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
593 throw (com.liferay.portal.kernel.exception.PortalException)e;
594 }
595
596 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
597 throw (com.liferay.portal.kernel.exception.SystemException)e;
598 }
599
600 throw new com.liferay.portal.kernel.exception.SystemException(e);
601 }
602
603 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
604 }
605 catch (com.liferay.portal.kernel.exception.SystemException se) {
606 _log.error(se, se);
607
608 throw se;
609 }
610 }
611
612 public static boolean hasUserGroup(HttpPrincipal httpPrincipal,
613 long userId, long groupId)
614 throws com.liferay.portal.kernel.exception.SystemException {
615 try {
616 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
617 "hasUserGroup", _hasUserGroupParameterTypes15);
618
619 MethodHandler methodHandler = new MethodHandler(methodKey, userId,
620 groupId);
621
622 Object returnObj = null;
623
624 try {
625 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
626 }
627 catch (Exception e) {
628 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
629 throw (com.liferay.portal.kernel.exception.SystemException)e;
630 }
631
632 throw new com.liferay.portal.kernel.exception.SystemException(e);
633 }
634
635 return ((Boolean)returnObj).booleanValue();
636 }
637 catch (com.liferay.portal.kernel.exception.SystemException se) {
638 _log.error(se, se);
639
640 throw se;
641 }
642 }
643
644 public static java.util.List<com.liferay.portal.model.Group> search(
645 HttpPrincipal httpPrincipal, long companyId, java.lang.String name,
646 java.lang.String description, java.lang.String[] params, int start,
647 int end)
648 throws com.liferay.portal.kernel.exception.PortalException,
649 com.liferay.portal.kernel.exception.SystemException {
650 try {
651 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
652 "search", _searchParameterTypes16);
653
654 MethodHandler methodHandler = new MethodHandler(methodKey,
655 companyId, name, description, params, start, end);
656
657 Object returnObj = null;
658
659 try {
660 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
661 }
662 catch (Exception e) {
663 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
664 throw (com.liferay.portal.kernel.exception.PortalException)e;
665 }
666
667 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
668 throw (com.liferay.portal.kernel.exception.SystemException)e;
669 }
670
671 throw new com.liferay.portal.kernel.exception.SystemException(e);
672 }
673
674 return (java.util.List<com.liferay.portal.model.Group>)returnObj;
675 }
676 catch (com.liferay.portal.kernel.exception.SystemException se) {
677 _log.error(se, se);
678
679 throw se;
680 }
681 }
682
683 public static int searchCount(HttpPrincipal httpPrincipal, long companyId,
684 java.lang.String name, java.lang.String description,
685 java.lang.String[] params)
686 throws com.liferay.portal.kernel.exception.SystemException {
687 try {
688 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
689 "searchCount", _searchCountParameterTypes17);
690
691 MethodHandler methodHandler = new MethodHandler(methodKey,
692 companyId, name, description, params);
693
694 Object returnObj = null;
695
696 try {
697 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
698 }
699 catch (Exception e) {
700 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
701 throw (com.liferay.portal.kernel.exception.SystemException)e;
702 }
703
704 throw new com.liferay.portal.kernel.exception.SystemException(e);
705 }
706
707 return ((Integer)returnObj).intValue();
708 }
709 catch (com.liferay.portal.kernel.exception.SystemException se) {
710 _log.error(se, se);
711
712 throw se;
713 }
714 }
715
716 public static void setRoleGroups(HttpPrincipal httpPrincipal, long roleId,
717 long[] groupIds)
718 throws com.liferay.portal.kernel.exception.PortalException,
719 com.liferay.portal.kernel.exception.SystemException {
720 try {
721 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
722 "setRoleGroups", _setRoleGroupsParameterTypes18);
723
724 MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
725 groupIds);
726
727 try {
728 TunnelUtil.invoke(httpPrincipal, methodHandler);
729 }
730 catch (Exception e) {
731 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
732 throw (com.liferay.portal.kernel.exception.PortalException)e;
733 }
734
735 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
736 throw (com.liferay.portal.kernel.exception.SystemException)e;
737 }
738
739 throw new com.liferay.portal.kernel.exception.SystemException(e);
740 }
741 }
742 catch (com.liferay.portal.kernel.exception.SystemException se) {
743 _log.error(se, se);
744
745 throw se;
746 }
747 }
748
749 public static void unsetRoleGroups(HttpPrincipal httpPrincipal,
750 long roleId, long[] groupIds)
751 throws com.liferay.portal.kernel.exception.PortalException,
752 com.liferay.portal.kernel.exception.SystemException {
753 try {
754 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
755 "unsetRoleGroups", _unsetRoleGroupsParameterTypes19);
756
757 MethodHandler methodHandler = new MethodHandler(methodKey, roleId,
758 groupIds);
759
760 try {
761 TunnelUtil.invoke(httpPrincipal, methodHandler);
762 }
763 catch (Exception e) {
764 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
765 throw (com.liferay.portal.kernel.exception.PortalException)e;
766 }
767
768 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
769 throw (com.liferay.portal.kernel.exception.SystemException)e;
770 }
771
772 throw new com.liferay.portal.kernel.exception.SystemException(e);
773 }
774 }
775 catch (com.liferay.portal.kernel.exception.SystemException se) {
776 _log.error(se, se);
777
778 throw se;
779 }
780 }
781
782 public static com.liferay.portal.model.Group updateFriendlyURL(
783 HttpPrincipal httpPrincipal, long groupId, java.lang.String friendlyURL)
784 throws com.liferay.portal.kernel.exception.PortalException,
785 com.liferay.portal.kernel.exception.SystemException {
786 try {
787 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
788 "updateFriendlyURL", _updateFriendlyURLParameterTypes20);
789
790 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
791 friendlyURL);
792
793 Object returnObj = null;
794
795 try {
796 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
797 }
798 catch (Exception e) {
799 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
800 throw (com.liferay.portal.kernel.exception.PortalException)e;
801 }
802
803 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
804 throw (com.liferay.portal.kernel.exception.SystemException)e;
805 }
806
807 throw new com.liferay.portal.kernel.exception.SystemException(e);
808 }
809
810 return (com.liferay.portal.model.Group)returnObj;
811 }
812 catch (com.liferay.portal.kernel.exception.SystemException se) {
813 _log.error(se, se);
814
815 throw se;
816 }
817 }
818
819 public static com.liferay.portal.model.Group updateGroup(
820 HttpPrincipal httpPrincipal, long groupId, java.lang.String typeSettings)
821 throws com.liferay.portal.kernel.exception.PortalException,
822 com.liferay.portal.kernel.exception.SystemException {
823 try {
824 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
825 "updateGroup", _updateGroupParameterTypes21);
826
827 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
828 typeSettings);
829
830 Object returnObj = null;
831
832 try {
833 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
834 }
835 catch (Exception e) {
836 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
837 throw (com.liferay.portal.kernel.exception.PortalException)e;
838 }
839
840 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
841 throw (com.liferay.portal.kernel.exception.SystemException)e;
842 }
843
844 throw new com.liferay.portal.kernel.exception.SystemException(e);
845 }
846
847 return (com.liferay.portal.model.Group)returnObj;
848 }
849 catch (com.liferay.portal.kernel.exception.SystemException se) {
850 _log.error(se, se);
851
852 throw se;
853 }
854 }
855
856 public static com.liferay.portal.model.Group updateGroup(
857 HttpPrincipal httpPrincipal, long groupId, java.lang.String name,
858 java.lang.String description, int type, java.lang.String friendlyURL,
859 boolean active, com.liferay.portal.service.ServiceContext serviceContext)
860 throws com.liferay.portal.kernel.exception.PortalException,
861 com.liferay.portal.kernel.exception.SystemException {
862 try {
863 MethodKey methodKey = new MethodKey(GroupServiceUtil.class.getName(),
864 "updateGroup", _updateGroupParameterTypes22);
865
866 MethodHandler methodHandler = new MethodHandler(methodKey, groupId,
867 name, description, type, friendlyURL, active, serviceContext);
868
869 Object returnObj = null;
870
871 try {
872 returnObj = TunnelUtil.invoke(httpPrincipal, methodHandler);
873 }
874 catch (Exception e) {
875 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
876 throw (com.liferay.portal.kernel.exception.PortalException)e;
877 }
878
879 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
880 throw (com.liferay.portal.kernel.exception.SystemException)e;
881 }
882
883 throw new com.liferay.portal.kernel.exception.SystemException(e);
884 }
885
886 return (com.liferay.portal.model.Group)returnObj;
887 }
888 catch (com.liferay.portal.kernel.exception.SystemException se) {
889 _log.error(se, se);
890
891 throw se;
892 }
893 }
894
895 private static Log _log = LogFactoryUtil.getLog(GroupServiceHttp.class);
896 private static final Class<?>[] _addGroupParameterTypes0 = new Class[] {
897 long.class, java.lang.String.class, java.lang.String.class,
898 int.class, java.lang.String.class, boolean.class, boolean.class,
899 com.liferay.portal.service.ServiceContext.class
900 };
901 private static final Class<?>[] _addGroupParameterTypes1 = new Class[] {
902 java.lang.String.class, java.lang.String.class, int.class,
903 java.lang.String.class, boolean.class, boolean.class,
904 com.liferay.portal.service.ServiceContext.class
905 };
906 private static final Class<?>[] _addRoleGroupsParameterTypes2 = new Class[] {
907 long.class, long[].class
908 };
909 private static final Class<?>[] _deleteGroupParameterTypes3 = new Class[] {
910 long.class
911 };
912 private static final Class<?>[] _getGroupParameterTypes4 = new Class[] {
913 long.class
914 };
915 private static final Class<?>[] _getGroupParameterTypes5 = new Class[] {
916 long.class, java.lang.String.class
917 };
918 private static final Class<?>[] _getManageableSitesParameterTypes6 = new Class[] {
919 java.util.Collection.class, int.class
920 };
921 private static final Class<?>[] _getOrganizationsGroupsParameterTypes7 = new Class[] {
922 java.util.List.class
923 };
924 private static final Class<?>[] _getUserGroupParameterTypes8 = new Class[] {
925 long.class, long.class
926 };
927 private static final Class<?>[] _getUserGroupsGroupsParameterTypes9 = new Class[] {
928 java.util.List.class
929 };
930 private static final Class<?>[] _getUserOrganizationsGroupsParameterTypes10 = new Class[] {
931 long.class, int.class, int.class
932 };
933 private static final Class<?>[] _getUserPlacesParameterTypes11 = new Class[] {
934 long.class, java.lang.String[].class, boolean.class, int.class
935 };
936 private static final Class<?>[] _getUserPlacesParameterTypes12 = new Class[] {
937 long.class, java.lang.String[].class, int.class
938 };
939 private static final Class<?>[] _getUserPlacesParameterTypes13 = new Class[] {
940 java.lang.String[].class, int.class
941 };
942 private static final Class<?>[] _getUserSitesParameterTypes14 = new Class[] { };
943 private static final Class<?>[] _hasUserGroupParameterTypes15 = new Class[] {
944 long.class, long.class
945 };
946 private static final Class<?>[] _searchParameterTypes16 = new Class[] {
947 long.class, java.lang.String.class, java.lang.String.class,
948 java.lang.String[].class, int.class, int.class
949 };
950 private static final Class<?>[] _searchCountParameterTypes17 = new Class[] {
951 long.class, java.lang.String.class, java.lang.String.class,
952 java.lang.String[].class
953 };
954 private static final Class<?>[] _setRoleGroupsParameterTypes18 = new Class[] {
955 long.class, long[].class
956 };
957 private static final Class<?>[] _unsetRoleGroupsParameterTypes19 = new Class[] {
958 long.class, long[].class
959 };
960 private static final Class<?>[] _updateFriendlyURLParameterTypes20 = new Class[] {
961 long.class, java.lang.String.class
962 };
963 private static final Class<?>[] _updateGroupParameterTypes21 = new Class[] {
964 long.class, java.lang.String.class
965 };
966 private static final Class<?>[] _updateGroupParameterTypes22 = new Class[] {
967 long.class, java.lang.String.class, java.lang.String.class,
968 int.class, java.lang.String.class, boolean.class,
969 com.liferay.portal.service.ServiceContext.class
970 };
971 }