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