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