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