1
19
20 package com.liferay.portal.service.http;
21
22 import com.liferay.portal.kernel.log.Log;
23 import com.liferay.portal.kernel.log.LogFactoryUtil;
24 import com.liferay.portal.kernel.util.BooleanWrapper;
25 import com.liferay.portal.kernel.util.IntegerWrapper;
26 import com.liferay.portal.kernel.util.LongWrapper;
27 import com.liferay.portal.kernel.util.MethodWrapper;
28 import com.liferay.portal.kernel.util.NullWrapper;
29 import com.liferay.portal.security.auth.HttpPrincipal;
30 import com.liferay.portal.service.UserServiceUtil;
31
32
71 public class UserServiceHttp {
72 public static void addGroupUsers(HttpPrincipal httpPrincipal, long groupId,
73 long[] userIds)
74 throws com.liferay.portal.PortalException,
75 com.liferay.portal.SystemException {
76 try {
77 Object paramObj0 = new LongWrapper(groupId);
78
79 Object paramObj1 = userIds;
80
81 if (userIds == null) {
82 paramObj1 = new NullWrapper("[J");
83 }
84
85 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
86 "addGroupUsers", new Object[] { paramObj0, paramObj1 });
87
88 try {
89 TunnelUtil.invoke(httpPrincipal, methodWrapper);
90 }
91 catch (Exception e) {
92 if (e instanceof com.liferay.portal.PortalException) {
93 throw (com.liferay.portal.PortalException)e;
94 }
95
96 if (e instanceof com.liferay.portal.SystemException) {
97 throw (com.liferay.portal.SystemException)e;
98 }
99
100 throw new com.liferay.portal.SystemException(e);
101 }
102 }
103 catch (com.liferay.portal.SystemException se) {
104 _log.error(se, se);
105
106 throw se;
107 }
108 }
109
110 public static void addOrganizationUsers(HttpPrincipal httpPrincipal,
111 long organizationId, long[] userIds)
112 throws com.liferay.portal.PortalException,
113 com.liferay.portal.SystemException {
114 try {
115 Object paramObj0 = new LongWrapper(organizationId);
116
117 Object paramObj1 = userIds;
118
119 if (userIds == null) {
120 paramObj1 = new NullWrapper("[J");
121 }
122
123 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
124 "addOrganizationUsers",
125 new Object[] { paramObj0, paramObj1 });
126
127 try {
128 TunnelUtil.invoke(httpPrincipal, methodWrapper);
129 }
130 catch (Exception e) {
131 if (e instanceof com.liferay.portal.PortalException) {
132 throw (com.liferay.portal.PortalException)e;
133 }
134
135 if (e instanceof com.liferay.portal.SystemException) {
136 throw (com.liferay.portal.SystemException)e;
137 }
138
139 throw new com.liferay.portal.SystemException(e);
140 }
141 }
142 catch (com.liferay.portal.SystemException se) {
143 _log.error(se, se);
144
145 throw se;
146 }
147 }
148
149 public static void addPasswordPolicyUsers(HttpPrincipal httpPrincipal,
150 long passwordPolicyId, long[] userIds)
151 throws com.liferay.portal.PortalException,
152 com.liferay.portal.SystemException {
153 try {
154 Object paramObj0 = new LongWrapper(passwordPolicyId);
155
156 Object paramObj1 = userIds;
157
158 if (userIds == null) {
159 paramObj1 = new NullWrapper("[J");
160 }
161
162 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
163 "addPasswordPolicyUsers",
164 new Object[] { paramObj0, paramObj1 });
165
166 try {
167 TunnelUtil.invoke(httpPrincipal, methodWrapper);
168 }
169 catch (Exception e) {
170 if (e instanceof com.liferay.portal.PortalException) {
171 throw (com.liferay.portal.PortalException)e;
172 }
173
174 if (e instanceof com.liferay.portal.SystemException) {
175 throw (com.liferay.portal.SystemException)e;
176 }
177
178 throw new com.liferay.portal.SystemException(e);
179 }
180 }
181 catch (com.liferay.portal.SystemException se) {
182 _log.error(se, se);
183
184 throw se;
185 }
186 }
187
188 public static void addRoleUsers(HttpPrincipal httpPrincipal, long roleId,
189 long[] userIds)
190 throws com.liferay.portal.PortalException,
191 com.liferay.portal.SystemException {
192 try {
193 Object paramObj0 = new LongWrapper(roleId);
194
195 Object paramObj1 = userIds;
196
197 if (userIds == null) {
198 paramObj1 = new NullWrapper("[J");
199 }
200
201 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
202 "addRoleUsers", new Object[] { paramObj0, paramObj1 });
203
204 try {
205 TunnelUtil.invoke(httpPrincipal, methodWrapper);
206 }
207 catch (Exception e) {
208 if (e instanceof com.liferay.portal.PortalException) {
209 throw (com.liferay.portal.PortalException)e;
210 }
211
212 if (e instanceof com.liferay.portal.SystemException) {
213 throw (com.liferay.portal.SystemException)e;
214 }
215
216 throw new com.liferay.portal.SystemException(e);
217 }
218 }
219 catch (com.liferay.portal.SystemException se) {
220 _log.error(se, se);
221
222 throw se;
223 }
224 }
225
226 public static void addUserGroupUsers(HttpPrincipal httpPrincipal,
227 long userGroupId, long[] userIds)
228 throws com.liferay.portal.PortalException,
229 com.liferay.portal.SystemException {
230 try {
231 Object paramObj0 = new LongWrapper(userGroupId);
232
233 Object paramObj1 = userIds;
234
235 if (userIds == null) {
236 paramObj1 = new NullWrapper("[J");
237 }
238
239 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
240 "addUserGroupUsers", new Object[] { paramObj0, paramObj1 });
241
242 try {
243 TunnelUtil.invoke(httpPrincipal, methodWrapper);
244 }
245 catch (Exception e) {
246 if (e instanceof com.liferay.portal.PortalException) {
247 throw (com.liferay.portal.PortalException)e;
248 }
249
250 if (e instanceof com.liferay.portal.SystemException) {
251 throw (com.liferay.portal.SystemException)e;
252 }
253
254 throw new com.liferay.portal.SystemException(e);
255 }
256 }
257 catch (com.liferay.portal.SystemException se) {
258 _log.error(se, se);
259
260 throw se;
261 }
262 }
263
264 public static com.liferay.portal.model.User addUser(
265 HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
266 java.lang.String password1, java.lang.String password2,
267 boolean autoScreenName, java.lang.String screenName,
268 java.lang.String emailAddress, java.util.Locale locale,
269 java.lang.String firstName, java.lang.String middleName,
270 java.lang.String lastName, int prefixId, int suffixId, boolean male,
271 int birthdayMonth, int birthdayDay, int birthdayYear,
272 java.lang.String jobTitle, long[] organizationIds, boolean sendEmail)
273 throws com.liferay.portal.PortalException,
274 com.liferay.portal.SystemException {
275 try {
276 Object paramObj0 = new LongWrapper(companyId);
277
278 Object paramObj1 = new BooleanWrapper(autoPassword);
279
280 Object paramObj2 = password1;
281
282 if (password1 == null) {
283 paramObj2 = new NullWrapper("java.lang.String");
284 }
285
286 Object paramObj3 = password2;
287
288 if (password2 == null) {
289 paramObj3 = new NullWrapper("java.lang.String");
290 }
291
292 Object paramObj4 = new BooleanWrapper(autoScreenName);
293
294 Object paramObj5 = screenName;
295
296 if (screenName == null) {
297 paramObj5 = new NullWrapper("java.lang.String");
298 }
299
300 Object paramObj6 = emailAddress;
301
302 if (emailAddress == null) {
303 paramObj6 = new NullWrapper("java.lang.String");
304 }
305
306 Object paramObj7 = locale;
307
308 if (locale == null) {
309 paramObj7 = new NullWrapper("java.util.Locale");
310 }
311
312 Object paramObj8 = firstName;
313
314 if (firstName == null) {
315 paramObj8 = new NullWrapper("java.lang.String");
316 }
317
318 Object paramObj9 = middleName;
319
320 if (middleName == null) {
321 paramObj9 = new NullWrapper("java.lang.String");
322 }
323
324 Object paramObj10 = lastName;
325
326 if (lastName == null) {
327 paramObj10 = new NullWrapper("java.lang.String");
328 }
329
330 Object paramObj11 = new IntegerWrapper(prefixId);
331
332 Object paramObj12 = new IntegerWrapper(suffixId);
333
334 Object paramObj13 = new BooleanWrapper(male);
335
336 Object paramObj14 = new IntegerWrapper(birthdayMonth);
337
338 Object paramObj15 = new IntegerWrapper(birthdayDay);
339
340 Object paramObj16 = new IntegerWrapper(birthdayYear);
341
342 Object paramObj17 = jobTitle;
343
344 if (jobTitle == null) {
345 paramObj17 = new NullWrapper("java.lang.String");
346 }
347
348 Object paramObj18 = organizationIds;
349
350 if (organizationIds == null) {
351 paramObj18 = new NullWrapper("[J");
352 }
353
354 Object paramObj19 = new BooleanWrapper(sendEmail);
355
356 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
357 "addUser",
358 new Object[] {
359 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
360 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
361 paramObj10, paramObj11, paramObj12, paramObj13,
362 paramObj14, paramObj15, paramObj16, paramObj17,
363 paramObj18, paramObj19
364 });
365
366 Object returnObj = null;
367
368 try {
369 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
370 }
371 catch (Exception e) {
372 if (e instanceof com.liferay.portal.PortalException) {
373 throw (com.liferay.portal.PortalException)e;
374 }
375
376 if (e instanceof com.liferay.portal.SystemException) {
377 throw (com.liferay.portal.SystemException)e;
378 }
379
380 throw new com.liferay.portal.SystemException(e);
381 }
382
383 return (com.liferay.portal.model.User)returnObj;
384 }
385 catch (com.liferay.portal.SystemException se) {
386 _log.error(se, se);
387
388 throw se;
389 }
390 }
391
392 public static void deleteRoleUser(HttpPrincipal httpPrincipal, long roleId,
393 long userId)
394 throws com.liferay.portal.PortalException,
395 com.liferay.portal.SystemException {
396 try {
397 Object paramObj0 = new LongWrapper(roleId);
398
399 Object paramObj1 = new LongWrapper(userId);
400
401 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
402 "deleteRoleUser", new Object[] { paramObj0, paramObj1 });
403
404 try {
405 TunnelUtil.invoke(httpPrincipal, methodWrapper);
406 }
407 catch (Exception e) {
408 if (e instanceof com.liferay.portal.PortalException) {
409 throw (com.liferay.portal.PortalException)e;
410 }
411
412 if (e instanceof com.liferay.portal.SystemException) {
413 throw (com.liferay.portal.SystemException)e;
414 }
415
416 throw new com.liferay.portal.SystemException(e);
417 }
418 }
419 catch (com.liferay.portal.SystemException se) {
420 _log.error(se, se);
421
422 throw se;
423 }
424 }
425
426 public static void deleteUser(HttpPrincipal httpPrincipal, long userId)
427 throws com.liferay.portal.PortalException,
428 com.liferay.portal.SystemException {
429 try {
430 Object paramObj0 = new LongWrapper(userId);
431
432 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
433 "deleteUser", new Object[] { paramObj0 });
434
435 try {
436 TunnelUtil.invoke(httpPrincipal, methodWrapper);
437 }
438 catch (Exception e) {
439 if (e instanceof com.liferay.portal.PortalException) {
440 throw (com.liferay.portal.PortalException)e;
441 }
442
443 if (e instanceof com.liferay.portal.SystemException) {
444 throw (com.liferay.portal.SystemException)e;
445 }
446
447 throw new com.liferay.portal.SystemException(e);
448 }
449 }
450 catch (com.liferay.portal.SystemException se) {
451 _log.error(se, se);
452
453 throw se;
454 }
455 }
456
457 public static long getDefaultUserId(HttpPrincipal httpPrincipal,
458 long companyId)
459 throws com.liferay.portal.PortalException,
460 com.liferay.portal.SystemException {
461 try {
462 Object paramObj0 = new LongWrapper(companyId);
463
464 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
465 "getDefaultUserId", new Object[] { paramObj0 });
466
467 Object returnObj = null;
468
469 try {
470 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
471 }
472 catch (Exception e) {
473 if (e instanceof com.liferay.portal.PortalException) {
474 throw (com.liferay.portal.PortalException)e;
475 }
476
477 if (e instanceof com.liferay.portal.SystemException) {
478 throw (com.liferay.portal.SystemException)e;
479 }
480
481 throw new com.liferay.portal.SystemException(e);
482 }
483
484 return ((Long)returnObj).longValue();
485 }
486 catch (com.liferay.portal.SystemException se) {
487 _log.error(se, se);
488
489 throw se;
490 }
491 }
492
493 public static long[] getGroupUserIds(HttpPrincipal httpPrincipal,
494 long groupId) throws com.liferay.portal.SystemException {
495 try {
496 Object paramObj0 = new LongWrapper(groupId);
497
498 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
499 "getGroupUserIds", new Object[] { paramObj0 });
500
501 Object returnObj = null;
502
503 try {
504 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
505 }
506 catch (Exception e) {
507 if (e instanceof com.liferay.portal.SystemException) {
508 throw (com.liferay.portal.SystemException)e;
509 }
510
511 throw new com.liferay.portal.SystemException(e);
512 }
513
514 return (long[])returnObj;
515 }
516 catch (com.liferay.portal.SystemException se) {
517 _log.error(se, se);
518
519 throw se;
520 }
521 }
522
523 public static long[] getOrganizationUserIds(HttpPrincipal httpPrincipal,
524 long organizationId) throws com.liferay.portal.SystemException {
525 try {
526 Object paramObj0 = new LongWrapper(organizationId);
527
528 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
529 "getOrganizationUserIds", new Object[] { paramObj0 });
530
531 Object returnObj = null;
532
533 try {
534 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
535 }
536 catch (Exception e) {
537 if (e instanceof com.liferay.portal.SystemException) {
538 throw (com.liferay.portal.SystemException)e;
539 }
540
541 throw new com.liferay.portal.SystemException(e);
542 }
543
544 return (long[])returnObj;
545 }
546 catch (com.liferay.portal.SystemException se) {
547 _log.error(se, se);
548
549 throw se;
550 }
551 }
552
553 public static long[] getRoleUserIds(HttpPrincipal httpPrincipal, long roleId)
554 throws com.liferay.portal.SystemException {
555 try {
556 Object paramObj0 = new LongWrapper(roleId);
557
558 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
559 "getRoleUserIds", new Object[] { paramObj0 });
560
561 Object returnObj = null;
562
563 try {
564 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
565 }
566 catch (Exception e) {
567 if (e instanceof com.liferay.portal.SystemException) {
568 throw (com.liferay.portal.SystemException)e;
569 }
570
571 throw new com.liferay.portal.SystemException(e);
572 }
573
574 return (long[])returnObj;
575 }
576 catch (com.liferay.portal.SystemException se) {
577 _log.error(se, se);
578
579 throw se;
580 }
581 }
582
583 public static com.liferay.portal.model.User getUserByEmailAddress(
584 HttpPrincipal httpPrincipal, long companyId,
585 java.lang.String emailAddress)
586 throws com.liferay.portal.PortalException,
587 com.liferay.portal.SystemException {
588 try {
589 Object paramObj0 = new LongWrapper(companyId);
590
591 Object paramObj1 = emailAddress;
592
593 if (emailAddress == null) {
594 paramObj1 = new NullWrapper("java.lang.String");
595 }
596
597 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
598 "getUserByEmailAddress",
599 new Object[] { paramObj0, paramObj1 });
600
601 Object returnObj = null;
602
603 try {
604 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
605 }
606 catch (Exception e) {
607 if (e instanceof com.liferay.portal.PortalException) {
608 throw (com.liferay.portal.PortalException)e;
609 }
610
611 if (e instanceof com.liferay.portal.SystemException) {
612 throw (com.liferay.portal.SystemException)e;
613 }
614
615 throw new com.liferay.portal.SystemException(e);
616 }
617
618 return (com.liferay.portal.model.User)returnObj;
619 }
620 catch (com.liferay.portal.SystemException se) {
621 _log.error(se, se);
622
623 throw se;
624 }
625 }
626
627 public static com.liferay.portal.model.User getUserById(
628 HttpPrincipal httpPrincipal, long userId)
629 throws com.liferay.portal.PortalException,
630 com.liferay.portal.SystemException {
631 try {
632 Object paramObj0 = new LongWrapper(userId);
633
634 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
635 "getUserById", new Object[] { paramObj0 });
636
637 Object returnObj = null;
638
639 try {
640 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
641 }
642 catch (Exception e) {
643 if (e instanceof com.liferay.portal.PortalException) {
644 throw (com.liferay.portal.PortalException)e;
645 }
646
647 if (e instanceof com.liferay.portal.SystemException) {
648 throw (com.liferay.portal.SystemException)e;
649 }
650
651 throw new com.liferay.portal.SystemException(e);
652 }
653
654 return (com.liferay.portal.model.User)returnObj;
655 }
656 catch (com.liferay.portal.SystemException se) {
657 _log.error(se, se);
658
659 throw se;
660 }
661 }
662
663 public static com.liferay.portal.model.User getUserByScreenName(
664 HttpPrincipal httpPrincipal, long companyId, java.lang.String screenName)
665 throws com.liferay.portal.PortalException,
666 com.liferay.portal.SystemException {
667 try {
668 Object paramObj0 = new LongWrapper(companyId);
669
670 Object paramObj1 = screenName;
671
672 if (screenName == null) {
673 paramObj1 = new NullWrapper("java.lang.String");
674 }
675
676 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
677 "getUserByScreenName", new Object[] { paramObj0, paramObj1 });
678
679 Object returnObj = null;
680
681 try {
682 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
683 }
684 catch (Exception e) {
685 if (e instanceof com.liferay.portal.PortalException) {
686 throw (com.liferay.portal.PortalException)e;
687 }
688
689 if (e instanceof com.liferay.portal.SystemException) {
690 throw (com.liferay.portal.SystemException)e;
691 }
692
693 throw new com.liferay.portal.SystemException(e);
694 }
695
696 return (com.liferay.portal.model.User)returnObj;
697 }
698 catch (com.liferay.portal.SystemException se) {
699 _log.error(se, se);
700
701 throw se;
702 }
703 }
704
705 public static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal,
706 long companyId, java.lang.String emailAddress)
707 throws com.liferay.portal.PortalException,
708 com.liferay.portal.SystemException {
709 try {
710 Object paramObj0 = new LongWrapper(companyId);
711
712 Object paramObj1 = emailAddress;
713
714 if (emailAddress == null) {
715 paramObj1 = new NullWrapper("java.lang.String");
716 }
717
718 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
719 "getUserIdByEmailAddress",
720 new Object[] { paramObj0, paramObj1 });
721
722 Object returnObj = null;
723
724 try {
725 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
726 }
727 catch (Exception e) {
728 if (e instanceof com.liferay.portal.PortalException) {
729 throw (com.liferay.portal.PortalException)e;
730 }
731
732 if (e instanceof com.liferay.portal.SystemException) {
733 throw (com.liferay.portal.SystemException)e;
734 }
735
736 throw new com.liferay.portal.SystemException(e);
737 }
738
739 return ((Long)returnObj).longValue();
740 }
741 catch (com.liferay.portal.SystemException se) {
742 _log.error(se, se);
743
744 throw se;
745 }
746 }
747
748 public static long getUserIdByScreenName(HttpPrincipal httpPrincipal,
749 long companyId, java.lang.String screenName)
750 throws com.liferay.portal.PortalException,
751 com.liferay.portal.SystemException {
752 try {
753 Object paramObj0 = new LongWrapper(companyId);
754
755 Object paramObj1 = screenName;
756
757 if (screenName == null) {
758 paramObj1 = new NullWrapper("java.lang.String");
759 }
760
761 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
762 "getUserIdByScreenName",
763 new Object[] { paramObj0, paramObj1 });
764
765 Object returnObj = null;
766
767 try {
768 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
769 }
770 catch (Exception e) {
771 if (e instanceof com.liferay.portal.PortalException) {
772 throw (com.liferay.portal.PortalException)e;
773 }
774
775 if (e instanceof com.liferay.portal.SystemException) {
776 throw (com.liferay.portal.SystemException)e;
777 }
778
779 throw new com.liferay.portal.SystemException(e);
780 }
781
782 return ((Long)returnObj).longValue();
783 }
784 catch (com.liferay.portal.SystemException se) {
785 _log.error(se, se);
786
787 throw se;
788 }
789 }
790
791 public static boolean hasGroupUser(HttpPrincipal httpPrincipal,
792 long groupId, long userId) throws com.liferay.portal.SystemException {
793 try {
794 Object paramObj0 = new LongWrapper(groupId);
795
796 Object paramObj1 = new LongWrapper(userId);
797
798 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
799 "hasGroupUser", new Object[] { paramObj0, paramObj1 });
800
801 Object returnObj = null;
802
803 try {
804 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
805 }
806 catch (Exception e) {
807 if (e instanceof com.liferay.portal.SystemException) {
808 throw (com.liferay.portal.SystemException)e;
809 }
810
811 throw new com.liferay.portal.SystemException(e);
812 }
813
814 return ((Boolean)returnObj).booleanValue();
815 }
816 catch (com.liferay.portal.SystemException se) {
817 _log.error(se, se);
818
819 throw se;
820 }
821 }
822
823 public static boolean hasRoleUser(HttpPrincipal httpPrincipal, long roleId,
824 long userId) throws com.liferay.portal.SystemException {
825 try {
826 Object paramObj0 = new LongWrapper(roleId);
827
828 Object paramObj1 = new LongWrapper(userId);
829
830 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
831 "hasRoleUser", new Object[] { paramObj0, paramObj1 });
832
833 Object returnObj = null;
834
835 try {
836 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
837 }
838 catch (Exception e) {
839 if (e instanceof com.liferay.portal.SystemException) {
840 throw (com.liferay.portal.SystemException)e;
841 }
842
843 throw new com.liferay.portal.SystemException(e);
844 }
845
846 return ((Boolean)returnObj).booleanValue();
847 }
848 catch (com.liferay.portal.SystemException se) {
849 _log.error(se, se);
850
851 throw se;
852 }
853 }
854
855 public static boolean hasRoleUser(HttpPrincipal httpPrincipal,
856 long companyId, java.lang.String name, long userId, boolean inherited)
857 throws com.liferay.portal.PortalException,
858 com.liferay.portal.SystemException {
859 try {
860 Object paramObj0 = new LongWrapper(companyId);
861
862 Object paramObj1 = name;
863
864 if (name == null) {
865 paramObj1 = new NullWrapper("java.lang.String");
866 }
867
868 Object paramObj2 = new LongWrapper(userId);
869
870 Object paramObj3 = new BooleanWrapper(inherited);
871
872 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
873 "hasRoleUser",
874 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
875
876 Object returnObj = null;
877
878 try {
879 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
880 }
881 catch (Exception e) {
882 if (e instanceof com.liferay.portal.PortalException) {
883 throw (com.liferay.portal.PortalException)e;
884 }
885
886 if (e instanceof com.liferay.portal.SystemException) {
887 throw (com.liferay.portal.SystemException)e;
888 }
889
890 throw new com.liferay.portal.SystemException(e);
891 }
892
893 return ((Boolean)returnObj).booleanValue();
894 }
895 catch (com.liferay.portal.SystemException se) {
896 _log.error(se, se);
897
898 throw se;
899 }
900 }
901
902 public static void setRoleUsers(HttpPrincipal httpPrincipal, long roleId,
903 long[] userIds)
904 throws com.liferay.portal.PortalException,
905 com.liferay.portal.SystemException {
906 try {
907 Object paramObj0 = new LongWrapper(roleId);
908
909 Object paramObj1 = userIds;
910
911 if (userIds == null) {
912 paramObj1 = new NullWrapper("[J");
913 }
914
915 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
916 "setRoleUsers", new Object[] { paramObj0, paramObj1 });
917
918 try {
919 TunnelUtil.invoke(httpPrincipal, methodWrapper);
920 }
921 catch (Exception e) {
922 if (e instanceof com.liferay.portal.PortalException) {
923 throw (com.liferay.portal.PortalException)e;
924 }
925
926 if (e instanceof com.liferay.portal.SystemException) {
927 throw (com.liferay.portal.SystemException)e;
928 }
929
930 throw new com.liferay.portal.SystemException(e);
931 }
932 }
933 catch (com.liferay.portal.SystemException se) {
934 _log.error(se, se);
935
936 throw se;
937 }
938 }
939
940 public static void setUserGroupUsers(HttpPrincipal httpPrincipal,
941 long userGroupId, long[] userIds)
942 throws com.liferay.portal.PortalException,
943 com.liferay.portal.SystemException {
944 try {
945 Object paramObj0 = new LongWrapper(userGroupId);
946
947 Object paramObj1 = userIds;
948
949 if (userIds == null) {
950 paramObj1 = new NullWrapper("[J");
951 }
952
953 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
954 "setUserGroupUsers", new Object[] { paramObj0, paramObj1 });
955
956 try {
957 TunnelUtil.invoke(httpPrincipal, methodWrapper);
958 }
959 catch (Exception e) {
960 if (e instanceof com.liferay.portal.PortalException) {
961 throw (com.liferay.portal.PortalException)e;
962 }
963
964 if (e instanceof com.liferay.portal.SystemException) {
965 throw (com.liferay.portal.SystemException)e;
966 }
967
968 throw new com.liferay.portal.SystemException(e);
969 }
970 }
971 catch (com.liferay.portal.SystemException se) {
972 _log.error(se, se);
973
974 throw se;
975 }
976 }
977
978 public static void unsetGroupUsers(HttpPrincipal httpPrincipal,
979 long groupId, long[] userIds)
980 throws com.liferay.portal.PortalException,
981 com.liferay.portal.SystemException {
982 try {
983 Object paramObj0 = new LongWrapper(groupId);
984
985 Object paramObj1 = userIds;
986
987 if (userIds == null) {
988 paramObj1 = new NullWrapper("[J");
989 }
990
991 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
992 "unsetGroupUsers", new Object[] { paramObj0, paramObj1 });
993
994 try {
995 TunnelUtil.invoke(httpPrincipal, methodWrapper);
996 }
997 catch (Exception e) {
998 if (e instanceof com.liferay.portal.PortalException) {
999 throw (com.liferay.portal.PortalException)e;
1000 }
1001
1002 if (e instanceof com.liferay.portal.SystemException) {
1003 throw (com.liferay.portal.SystemException)e;
1004 }
1005
1006 throw new com.liferay.portal.SystemException(e);
1007 }
1008 }
1009 catch (com.liferay.portal.SystemException se) {
1010 _log.error(se, se);
1011
1012 throw se;
1013 }
1014 }
1015
1016 public static void unsetOrganizationUsers(HttpPrincipal httpPrincipal,
1017 long organizationId, long[] userIds)
1018 throws com.liferay.portal.PortalException,
1019 com.liferay.portal.SystemException {
1020 try {
1021 Object paramObj0 = new LongWrapper(organizationId);
1022
1023 Object paramObj1 = userIds;
1024
1025 if (userIds == null) {
1026 paramObj1 = new NullWrapper("[J");
1027 }
1028
1029 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1030 "unsetOrganizationUsers",
1031 new Object[] { paramObj0, paramObj1 });
1032
1033 try {
1034 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1035 }
1036 catch (Exception e) {
1037 if (e instanceof com.liferay.portal.PortalException) {
1038 throw (com.liferay.portal.PortalException)e;
1039 }
1040
1041 if (e instanceof com.liferay.portal.SystemException) {
1042 throw (com.liferay.portal.SystemException)e;
1043 }
1044
1045 throw new com.liferay.portal.SystemException(e);
1046 }
1047 }
1048 catch (com.liferay.portal.SystemException se) {
1049 _log.error(se, se);
1050
1051 throw se;
1052 }
1053 }
1054
1055 public static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal,
1056 long passwordPolicyId, long[] userIds)
1057 throws com.liferay.portal.PortalException,
1058 com.liferay.portal.SystemException {
1059 try {
1060 Object paramObj0 = new LongWrapper(passwordPolicyId);
1061
1062 Object paramObj1 = userIds;
1063
1064 if (userIds == null) {
1065 paramObj1 = new NullWrapper("[J");
1066 }
1067
1068 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1069 "unsetPasswordPolicyUsers",
1070 new Object[] { paramObj0, paramObj1 });
1071
1072 try {
1073 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1074 }
1075 catch (Exception e) {
1076 if (e instanceof com.liferay.portal.PortalException) {
1077 throw (com.liferay.portal.PortalException)e;
1078 }
1079
1080 if (e instanceof com.liferay.portal.SystemException) {
1081 throw (com.liferay.portal.SystemException)e;
1082 }
1083
1084 throw new com.liferay.portal.SystemException(e);
1085 }
1086 }
1087 catch (com.liferay.portal.SystemException se) {
1088 _log.error(se, se);
1089
1090 throw se;
1091 }
1092 }
1093
1094 public static void unsetRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1095 long[] userIds)
1096 throws com.liferay.portal.PortalException,
1097 com.liferay.portal.SystemException {
1098 try {
1099 Object paramObj0 = new LongWrapper(roleId);
1100
1101 Object paramObj1 = userIds;
1102
1103 if (userIds == null) {
1104 paramObj1 = new NullWrapper("[J");
1105 }
1106
1107 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1108 "unsetRoleUsers", new Object[] { paramObj0, paramObj1 });
1109
1110 try {
1111 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1112 }
1113 catch (Exception e) {
1114 if (e instanceof com.liferay.portal.PortalException) {
1115 throw (com.liferay.portal.PortalException)e;
1116 }
1117
1118 if (e instanceof com.liferay.portal.SystemException) {
1119 throw (com.liferay.portal.SystemException)e;
1120 }
1121
1122 throw new com.liferay.portal.SystemException(e);
1123 }
1124 }
1125 catch (com.liferay.portal.SystemException se) {
1126 _log.error(se, se);
1127
1128 throw se;
1129 }
1130 }
1131
1132 public static void unsetUserGroupUsers(HttpPrincipal httpPrincipal,
1133 long userGroupId, long[] userIds)
1134 throws com.liferay.portal.PortalException,
1135 com.liferay.portal.SystemException {
1136 try {
1137 Object paramObj0 = new LongWrapper(userGroupId);
1138
1139 Object paramObj1 = userIds;
1140
1141 if (userIds == null) {
1142 paramObj1 = new NullWrapper("[J");
1143 }
1144
1145 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1146 "unsetUserGroupUsers", new Object[] { paramObj0, paramObj1 });
1147
1148 try {
1149 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1150 }
1151 catch (Exception e) {
1152 if (e instanceof com.liferay.portal.PortalException) {
1153 throw (com.liferay.portal.PortalException)e;
1154 }
1155
1156 if (e instanceof com.liferay.portal.SystemException) {
1157 throw (com.liferay.portal.SystemException)e;
1158 }
1159
1160 throw new com.liferay.portal.SystemException(e);
1161 }
1162 }
1163 catch (com.liferay.portal.SystemException se) {
1164 _log.error(se, se);
1165
1166 throw se;
1167 }
1168 }
1169
1170 public static com.liferay.portal.model.User updateActive(
1171 HttpPrincipal httpPrincipal, long userId, boolean active)
1172 throws com.liferay.portal.PortalException,
1173 com.liferay.portal.SystemException {
1174 try {
1175 Object paramObj0 = new LongWrapper(userId);
1176
1177 Object paramObj1 = new BooleanWrapper(active);
1178
1179 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1180 "updateActive", new Object[] { paramObj0, paramObj1 });
1181
1182 Object returnObj = null;
1183
1184 try {
1185 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1186 }
1187 catch (Exception e) {
1188 if (e instanceof com.liferay.portal.PortalException) {
1189 throw (com.liferay.portal.PortalException)e;
1190 }
1191
1192 if (e instanceof com.liferay.portal.SystemException) {
1193 throw (com.liferay.portal.SystemException)e;
1194 }
1195
1196 throw new com.liferay.portal.SystemException(e);
1197 }
1198
1199 return (com.liferay.portal.model.User)returnObj;
1200 }
1201 catch (com.liferay.portal.SystemException se) {
1202 _log.error(se, se);
1203
1204 throw se;
1205 }
1206 }
1207
1208 public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
1209 HttpPrincipal httpPrincipal, long userId, boolean agreedToTermsOfUse)
1210 throws com.liferay.portal.PortalException,
1211 com.liferay.portal.SystemException {
1212 try {
1213 Object paramObj0 = new LongWrapper(userId);
1214
1215 Object paramObj1 = new BooleanWrapper(agreedToTermsOfUse);
1216
1217 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1218 "updateAgreedToTermsOfUse",
1219 new Object[] { paramObj0, paramObj1 });
1220
1221 Object returnObj = null;
1222
1223 try {
1224 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1225 }
1226 catch (Exception e) {
1227 if (e instanceof com.liferay.portal.PortalException) {
1228 throw (com.liferay.portal.PortalException)e;
1229 }
1230
1231 if (e instanceof com.liferay.portal.SystemException) {
1232 throw (com.liferay.portal.SystemException)e;
1233 }
1234
1235 throw new com.liferay.portal.SystemException(e);
1236 }
1237
1238 return (com.liferay.portal.model.User)returnObj;
1239 }
1240 catch (com.liferay.portal.SystemException se) {
1241 _log.error(se, se);
1242
1243 throw se;
1244 }
1245 }
1246
1247 public static com.liferay.portal.model.User updateLockout(
1248 HttpPrincipal httpPrincipal, long userId, boolean lockout)
1249 throws com.liferay.portal.PortalException,
1250 com.liferay.portal.SystemException {
1251 try {
1252 Object paramObj0 = new LongWrapper(userId);
1253
1254 Object paramObj1 = new BooleanWrapper(lockout);
1255
1256 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1257 "updateLockout", new Object[] { paramObj0, paramObj1 });
1258
1259 Object returnObj = null;
1260
1261 try {
1262 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1263 }
1264 catch (Exception e) {
1265 if (e instanceof com.liferay.portal.PortalException) {
1266 throw (com.liferay.portal.PortalException)e;
1267 }
1268
1269 if (e instanceof com.liferay.portal.SystemException) {
1270 throw (com.liferay.portal.SystemException)e;
1271 }
1272
1273 throw new com.liferay.portal.SystemException(e);
1274 }
1275
1276 return (com.liferay.portal.model.User)returnObj;
1277 }
1278 catch (com.liferay.portal.SystemException se) {
1279 _log.error(se, se);
1280
1281 throw se;
1282 }
1283 }
1284
1285 public static void updateOpenId(HttpPrincipal httpPrincipal, long userId,
1286 java.lang.String openId)
1287 throws com.liferay.portal.PortalException,
1288 com.liferay.portal.SystemException {
1289 try {
1290 Object paramObj0 = new LongWrapper(userId);
1291
1292 Object paramObj1 = openId;
1293
1294 if (openId == null) {
1295 paramObj1 = new NullWrapper("java.lang.String");
1296 }
1297
1298 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1299 "updateOpenId", new Object[] { paramObj0, paramObj1 });
1300
1301 try {
1302 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1303 }
1304 catch (Exception e) {
1305 if (e instanceof com.liferay.portal.PortalException) {
1306 throw (com.liferay.portal.PortalException)e;
1307 }
1308
1309 if (e instanceof com.liferay.portal.SystemException) {
1310 throw (com.liferay.portal.SystemException)e;
1311 }
1312
1313 throw new com.liferay.portal.SystemException(e);
1314 }
1315 }
1316 catch (com.liferay.portal.SystemException se) {
1317 _log.error(se, se);
1318
1319 throw se;
1320 }
1321 }
1322
1323 public static void updateOrganizations(HttpPrincipal httpPrincipal,
1324 long userId, long[] organizationIds)
1325 throws com.liferay.portal.PortalException,
1326 com.liferay.portal.SystemException {
1327 try {
1328 Object paramObj0 = new LongWrapper(userId);
1329
1330 Object paramObj1 = organizationIds;
1331
1332 if (organizationIds == null) {
1333 paramObj1 = new NullWrapper("[J");
1334 }
1335
1336 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1337 "updateOrganizations", new Object[] { paramObj0, paramObj1 });
1338
1339 try {
1340 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1341 }
1342 catch (Exception e) {
1343 if (e instanceof com.liferay.portal.PortalException) {
1344 throw (com.liferay.portal.PortalException)e;
1345 }
1346
1347 if (e instanceof com.liferay.portal.SystemException) {
1348 throw (com.liferay.portal.SystemException)e;
1349 }
1350
1351 throw new com.liferay.portal.SystemException(e);
1352 }
1353 }
1354 catch (com.liferay.portal.SystemException se) {
1355 _log.error(se, se);
1356
1357 throw se;
1358 }
1359 }
1360
1361 public static com.liferay.portal.model.User updatePassword(
1362 HttpPrincipal httpPrincipal, long userId, java.lang.String password1,
1363 java.lang.String password2, boolean passwordReset)
1364 throws com.liferay.portal.PortalException,
1365 com.liferay.portal.SystemException {
1366 try {
1367 Object paramObj0 = new LongWrapper(userId);
1368
1369 Object paramObj1 = password1;
1370
1371 if (password1 == null) {
1372 paramObj1 = new NullWrapper("java.lang.String");
1373 }
1374
1375 Object paramObj2 = password2;
1376
1377 if (password2 == null) {
1378 paramObj2 = new NullWrapper("java.lang.String");
1379 }
1380
1381 Object paramObj3 = new BooleanWrapper(passwordReset);
1382
1383 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1384 "updatePassword",
1385 new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1386
1387 Object returnObj = null;
1388
1389 try {
1390 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1391 }
1392 catch (Exception e) {
1393 if (e instanceof com.liferay.portal.PortalException) {
1394 throw (com.liferay.portal.PortalException)e;
1395 }
1396
1397 if (e instanceof com.liferay.portal.SystemException) {
1398 throw (com.liferay.portal.SystemException)e;
1399 }
1400
1401 throw new com.liferay.portal.SystemException(e);
1402 }
1403
1404 return (com.liferay.portal.model.User)returnObj;
1405 }
1406 catch (com.liferay.portal.SystemException se) {
1407 _log.error(se, se);
1408
1409 throw se;
1410 }
1411 }
1412
1413 public static void updatePortrait(HttpPrincipal httpPrincipal, long userId,
1414 byte[] bytes)
1415 throws com.liferay.portal.PortalException,
1416 com.liferay.portal.SystemException {
1417 try {
1418 Object paramObj0 = new LongWrapper(userId);
1419
1420 Object paramObj1 = bytes;
1421
1422 if (bytes == null) {
1423 paramObj1 = new NullWrapper("[B");
1424 }
1425
1426 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1427 "updatePortrait", new Object[] { paramObj0, paramObj1 });
1428
1429 try {
1430 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1431 }
1432 catch (Exception e) {
1433 if (e instanceof com.liferay.portal.PortalException) {
1434 throw (com.liferay.portal.PortalException)e;
1435 }
1436
1437 if (e instanceof com.liferay.portal.SystemException) {
1438 throw (com.liferay.portal.SystemException)e;
1439 }
1440
1441 throw new com.liferay.portal.SystemException(e);
1442 }
1443 }
1444 catch (com.liferay.portal.SystemException se) {
1445 _log.error(se, se);
1446
1447 throw se;
1448 }
1449 }
1450
1451 public static void updateScreenName(HttpPrincipal httpPrincipal,
1452 long userId, java.lang.String screenName)
1453 throws com.liferay.portal.PortalException,
1454 com.liferay.portal.SystemException {
1455 try {
1456 Object paramObj0 = new LongWrapper(userId);
1457
1458 Object paramObj1 = screenName;
1459
1460 if (screenName == null) {
1461 paramObj1 = new NullWrapper("java.lang.String");
1462 }
1463
1464 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1465 "updateScreenName", new Object[] { paramObj0, paramObj1 });
1466
1467 try {
1468 TunnelUtil.invoke(httpPrincipal, methodWrapper);
1469 }
1470 catch (Exception e) {
1471 if (e instanceof com.liferay.portal.PortalException) {
1472 throw (com.liferay.portal.PortalException)e;
1473 }
1474
1475 if (e instanceof com.liferay.portal.SystemException) {
1476 throw (com.liferay.portal.SystemException)e;
1477 }
1478
1479 throw new com.liferay.portal.SystemException(e);
1480 }
1481 }
1482 catch (com.liferay.portal.SystemException se) {
1483 _log.error(se, se);
1484
1485 throw se;
1486 }
1487 }
1488
1489 public static com.liferay.portal.model.User updateUser(
1490 HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1491 boolean passwordReset, java.lang.String screenName,
1492 java.lang.String emailAddress, java.lang.String languageId,
1493 java.lang.String timeZoneId, java.lang.String greeting,
1494 java.lang.String comments, java.lang.String firstName,
1495 java.lang.String middleName, java.lang.String lastName, int prefixId,
1496 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1497 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1498 java.lang.String facebookSn, java.lang.String icqSn,
1499 java.lang.String jabberSn, java.lang.String msnSn,
1500 java.lang.String mySpaceSn, java.lang.String skypeSn,
1501 java.lang.String twitterSn, java.lang.String ymSn,
1502 java.lang.String jobTitle, long[] organizationIds)
1503 throws com.liferay.portal.PortalException,
1504 com.liferay.portal.SystemException {
1505 try {
1506 Object paramObj0 = new LongWrapper(userId);
1507
1508 Object paramObj1 = oldPassword;
1509
1510 if (oldPassword == null) {
1511 paramObj1 = new NullWrapper("java.lang.String");
1512 }
1513
1514 Object paramObj2 = new BooleanWrapper(passwordReset);
1515
1516 Object paramObj3 = screenName;
1517
1518 if (screenName == null) {
1519 paramObj3 = new NullWrapper("java.lang.String");
1520 }
1521
1522 Object paramObj4 = emailAddress;
1523
1524 if (emailAddress == null) {
1525 paramObj4 = new NullWrapper("java.lang.String");
1526 }
1527
1528 Object paramObj5 = languageId;
1529
1530 if (languageId == null) {
1531 paramObj5 = new NullWrapper("java.lang.String");
1532 }
1533
1534 Object paramObj6 = timeZoneId;
1535
1536 if (timeZoneId == null) {
1537 paramObj6 = new NullWrapper("java.lang.String");
1538 }
1539
1540 Object paramObj7 = greeting;
1541
1542 if (greeting == null) {
1543 paramObj7 = new NullWrapper("java.lang.String");
1544 }
1545
1546 Object paramObj8 = comments;
1547
1548 if (comments == null) {
1549 paramObj8 = new NullWrapper("java.lang.String");
1550 }
1551
1552 Object paramObj9 = firstName;
1553
1554 if (firstName == null) {
1555 paramObj9 = new NullWrapper("java.lang.String");
1556 }
1557
1558 Object paramObj10 = middleName;
1559
1560 if (middleName == null) {
1561 paramObj10 = new NullWrapper("java.lang.String");
1562 }
1563
1564 Object paramObj11 = lastName;
1565
1566 if (lastName == null) {
1567 paramObj11 = new NullWrapper("java.lang.String");
1568 }
1569
1570 Object paramObj12 = new IntegerWrapper(prefixId);
1571
1572 Object paramObj13 = new IntegerWrapper(suffixId);
1573
1574 Object paramObj14 = new BooleanWrapper(male);
1575
1576 Object paramObj15 = new IntegerWrapper(birthdayMonth);
1577
1578 Object paramObj16 = new IntegerWrapper(birthdayDay);
1579
1580 Object paramObj17 = new IntegerWrapper(birthdayYear);
1581
1582 Object paramObj18 = smsSn;
1583
1584 if (smsSn == null) {
1585 paramObj18 = new NullWrapper("java.lang.String");
1586 }
1587
1588 Object paramObj19 = aimSn;
1589
1590 if (aimSn == null) {
1591 paramObj19 = new NullWrapper("java.lang.String");
1592 }
1593
1594 Object paramObj20 = facebookSn;
1595
1596 if (facebookSn == null) {
1597 paramObj20 = new NullWrapper("java.lang.String");
1598 }
1599
1600 Object paramObj21 = icqSn;
1601
1602 if (icqSn == null) {
1603 paramObj21 = new NullWrapper("java.lang.String");
1604 }
1605
1606 Object paramObj22 = jabberSn;
1607
1608 if (jabberSn == null) {
1609 paramObj22 = new NullWrapper("java.lang.String");
1610 }
1611
1612 Object paramObj23 = msnSn;
1613
1614 if (msnSn == null) {
1615 paramObj23 = new NullWrapper("java.lang.String");
1616 }
1617
1618 Object paramObj24 = mySpaceSn;
1619
1620 if (mySpaceSn == null) {
1621 paramObj24 = new NullWrapper("java.lang.String");
1622 }
1623
1624 Object paramObj25 = skypeSn;
1625
1626 if (skypeSn == null) {
1627 paramObj25 = new NullWrapper("java.lang.String");
1628 }
1629
1630 Object paramObj26 = twitterSn;
1631
1632 if (twitterSn == null) {
1633 paramObj26 = new NullWrapper("java.lang.String");
1634 }
1635
1636 Object paramObj27 = ymSn;
1637
1638 if (ymSn == null) {
1639 paramObj27 = new NullWrapper("java.lang.String");
1640 }
1641
1642 Object paramObj28 = jobTitle;
1643
1644 if (jobTitle == null) {
1645 paramObj28 = new NullWrapper("java.lang.String");
1646 }
1647
1648 Object paramObj29 = organizationIds;
1649
1650 if (organizationIds == null) {
1651 paramObj29 = new NullWrapper("[J");
1652 }
1653
1654 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1655 "updateUser",
1656 new Object[] {
1657 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1658 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1659 paramObj10, paramObj11, paramObj12, paramObj13,
1660 paramObj14, paramObj15, paramObj16, paramObj17,
1661 paramObj18, paramObj19, paramObj20, paramObj21,
1662 paramObj22, paramObj23, paramObj24, paramObj25,
1663 paramObj26, paramObj27, paramObj28, paramObj29
1664 });
1665
1666 Object returnObj = null;
1667
1668 try {
1669 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1670 }
1671 catch (Exception e) {
1672 if (e instanceof com.liferay.portal.PortalException) {
1673 throw (com.liferay.portal.PortalException)e;
1674 }
1675
1676 if (e instanceof com.liferay.portal.SystemException) {
1677 throw (com.liferay.portal.SystemException)e;
1678 }
1679
1680 throw new com.liferay.portal.SystemException(e);
1681 }
1682
1683 return (com.liferay.portal.model.User)returnObj;
1684 }
1685 catch (com.liferay.portal.SystemException se) {
1686 _log.error(se, se);
1687
1688 throw se;
1689 }
1690 }
1691
1692 public static com.liferay.portal.model.User updateUser(
1693 HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1694 java.lang.String newPassword1, java.lang.String newPassword2,
1695 boolean passwordReset, java.lang.String screenName,
1696 java.lang.String emailAddress, java.lang.String languageId,
1697 java.lang.String timeZoneId, java.lang.String greeting,
1698 java.lang.String comments, java.lang.String firstName,
1699 java.lang.String middleName, java.lang.String lastName, int prefixId,
1700 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1701 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1702 java.lang.String facebookSn, java.lang.String icqSn,
1703 java.lang.String jabberSn, java.lang.String msnSn,
1704 java.lang.String mySpaceSn, java.lang.String skypeSn,
1705 java.lang.String twitterSn, java.lang.String ymSn,
1706 java.lang.String jobTitle, long[] organizationIds)
1707 throws com.liferay.portal.PortalException,
1708 com.liferay.portal.SystemException {
1709 try {
1710 Object paramObj0 = new LongWrapper(userId);
1711
1712 Object paramObj1 = oldPassword;
1713
1714 if (oldPassword == null) {
1715 paramObj1 = new NullWrapper("java.lang.String");
1716 }
1717
1718 Object paramObj2 = newPassword1;
1719
1720 if (newPassword1 == null) {
1721 paramObj2 = new NullWrapper("java.lang.String");
1722 }
1723
1724 Object paramObj3 = newPassword2;
1725
1726 if (newPassword2 == null) {
1727 paramObj3 = new NullWrapper("java.lang.String");
1728 }
1729
1730 Object paramObj4 = new BooleanWrapper(passwordReset);
1731
1732 Object paramObj5 = screenName;
1733
1734 if (screenName == null) {
1735 paramObj5 = new NullWrapper("java.lang.String");
1736 }
1737
1738 Object paramObj6 = emailAddress;
1739
1740 if (emailAddress == null) {
1741 paramObj6 = new NullWrapper("java.lang.String");
1742 }
1743
1744 Object paramObj7 = languageId;
1745
1746 if (languageId == null) {
1747 paramObj7 = new NullWrapper("java.lang.String");
1748 }
1749
1750 Object paramObj8 = timeZoneId;
1751
1752 if (timeZoneId == null) {
1753 paramObj8 = new NullWrapper("java.lang.String");
1754 }
1755
1756 Object paramObj9 = greeting;
1757
1758 if (greeting == null) {
1759 paramObj9 = new NullWrapper("java.lang.String");
1760 }
1761
1762 Object paramObj10 = comments;
1763
1764 if (comments == null) {
1765 paramObj10 = new NullWrapper("java.lang.String");
1766 }
1767
1768 Object paramObj11 = firstName;
1769
1770 if (firstName == null) {
1771 paramObj11 = new NullWrapper("java.lang.String");
1772 }
1773
1774 Object paramObj12 = middleName;
1775
1776 if (middleName == null) {
1777 paramObj12 = new NullWrapper("java.lang.String");
1778 }
1779
1780 Object paramObj13 = lastName;
1781
1782 if (lastName == null) {
1783 paramObj13 = new NullWrapper("java.lang.String");
1784 }
1785
1786 Object paramObj14 = new IntegerWrapper(prefixId);
1787
1788 Object paramObj15 = new IntegerWrapper(suffixId);
1789
1790 Object paramObj16 = new BooleanWrapper(male);
1791
1792 Object paramObj17 = new IntegerWrapper(birthdayMonth);
1793
1794 Object paramObj18 = new IntegerWrapper(birthdayDay);
1795
1796 Object paramObj19 = new IntegerWrapper(birthdayYear);
1797
1798 Object paramObj20 = smsSn;
1799
1800 if (smsSn == null) {
1801 paramObj20 = new NullWrapper("java.lang.String");
1802 }
1803
1804 Object paramObj21 = aimSn;
1805
1806 if (aimSn == null) {
1807 paramObj21 = new NullWrapper("java.lang.String");
1808 }
1809
1810 Object paramObj22 = facebookSn;
1811
1812 if (facebookSn == null) {
1813 paramObj22 = new NullWrapper("java.lang.String");
1814 }
1815
1816 Object paramObj23 = icqSn;
1817
1818 if (icqSn == null) {
1819 paramObj23 = new NullWrapper("java.lang.String");
1820 }
1821
1822 Object paramObj24 = jabberSn;
1823
1824 if (jabberSn == null) {
1825 paramObj24 = new NullWrapper("java.lang.String");
1826 }
1827
1828 Object paramObj25 = msnSn;
1829
1830 if (msnSn == null) {
1831 paramObj25 = new NullWrapper("java.lang.String");
1832 }
1833
1834 Object paramObj26 = mySpaceSn;
1835
1836 if (mySpaceSn == null) {
1837 paramObj26 = new NullWrapper("java.lang.String");
1838 }
1839
1840 Object paramObj27 = skypeSn;
1841
1842 if (skypeSn == null) {
1843 paramObj27 = new NullWrapper("java.lang.String");
1844 }
1845
1846 Object paramObj28 = twitterSn;
1847
1848 if (twitterSn == null) {
1849 paramObj28 = new NullWrapper("java.lang.String");
1850 }
1851
1852 Object paramObj29 = ymSn;
1853
1854 if (ymSn == null) {
1855 paramObj29 = new NullWrapper("java.lang.String");
1856 }
1857
1858 Object paramObj30 = jobTitle;
1859
1860 if (jobTitle == null) {
1861 paramObj30 = new NullWrapper("java.lang.String");
1862 }
1863
1864 Object paramObj31 = organizationIds;
1865
1866 if (organizationIds == null) {
1867 paramObj31 = new NullWrapper("[J");
1868 }
1869
1870 MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1871 "updateUser",
1872 new Object[] {
1873 paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1874 paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1875 paramObj10, paramObj11, paramObj12, paramObj13,
1876 paramObj14, paramObj15, paramObj16, paramObj17,
1877 paramObj18, paramObj19, paramObj20, paramObj21,
1878 paramObj22, paramObj23, paramObj24, paramObj25,
1879 paramObj26, paramObj27, paramObj28, paramObj29,
1880 paramObj30, paramObj31
1881 });
1882
1883 Object returnObj = null;
1884
1885 try {
1886 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1887 }
1888 catch (Exception e) {
1889 if (e instanceof com.liferay.portal.PortalException) {
1890 throw (com.liferay.portal.PortalException)e;
1891 }
1892
1893 if (e instanceof com.liferay.portal.SystemException) {
1894 throw (com.liferay.portal.SystemException)e;
1895 }
1896
1897 throw new com.liferay.portal.SystemException(e);
1898 }
1899
1900 return (com.liferay.portal.model.User)returnObj;
1901 }
1902 catch (com.liferay.portal.SystemException se) {
1903 _log.error(se, se);
1904
1905 throw se;
1906 }
1907 }
1908
1909 private static Log _log = LogFactoryUtil.getLog(UserServiceHttp.class);
1910}