1   /**
2    * Copyright (c) 2000-2008 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 java.util.List<com.liferay.portal.model.User> getGroupUsers(
497         HttpPrincipal httpPrincipal, long groupId)
498         throws com.liferay.portal.SystemException {
499         try {
500             Object paramObj0 = new LongWrapper(groupId);
501 
502             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
503                     "getGroupUsers", new Object[] { paramObj0 });
504 
505             Object returnObj = null;
506 
507             try {
508                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
509             }
510             catch (Exception e) {
511                 if (e instanceof com.liferay.portal.SystemException) {
512                     throw (com.liferay.portal.SystemException)e;
513                 }
514 
515                 throw new com.liferay.portal.SystemException(e);
516             }
517 
518             return (java.util.List<com.liferay.portal.model.User>)returnObj;
519         }
520         catch (com.liferay.portal.SystemException se) {
521             _log.error(se, se);
522 
523             throw se;
524         }
525     }
526 
527     public static java.util.List<com.liferay.portal.model.User> getRoleUsers(
528         HttpPrincipal httpPrincipal, long roleId)
529         throws com.liferay.portal.SystemException {
530         try {
531             Object paramObj0 = new LongWrapper(roleId);
532 
533             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
534                     "getRoleUsers", new Object[] { paramObj0 });
535 
536             Object returnObj = null;
537 
538             try {
539                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
540             }
541             catch (Exception e) {
542                 if (e instanceof com.liferay.portal.SystemException) {
543                     throw (com.liferay.portal.SystemException)e;
544                 }
545 
546                 throw new com.liferay.portal.SystemException(e);
547             }
548 
549             return (java.util.List<com.liferay.portal.model.User>)returnObj;
550         }
551         catch (com.liferay.portal.SystemException se) {
552             _log.error(se, se);
553 
554             throw se;
555         }
556     }
557 
558     public static com.liferay.portal.model.User getUserByEmailAddress(
559         HttpPrincipal httpPrincipal, long companyId,
560         java.lang.String emailAddress)
561         throws com.liferay.portal.PortalException,
562             com.liferay.portal.SystemException {
563         try {
564             Object paramObj0 = new LongWrapper(companyId);
565 
566             Object paramObj1 = emailAddress;
567 
568             if (emailAddress == null) {
569                 paramObj1 = new NullWrapper("java.lang.String");
570             }
571 
572             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
573                     "getUserByEmailAddress",
574                     new Object[] { paramObj0, paramObj1 });
575 
576             Object returnObj = null;
577 
578             try {
579                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
580             }
581             catch (Exception e) {
582                 if (e instanceof com.liferay.portal.PortalException) {
583                     throw (com.liferay.portal.PortalException)e;
584                 }
585 
586                 if (e instanceof com.liferay.portal.SystemException) {
587                     throw (com.liferay.portal.SystemException)e;
588                 }
589 
590                 throw new com.liferay.portal.SystemException(e);
591             }
592 
593             return (com.liferay.portal.model.User)returnObj;
594         }
595         catch (com.liferay.portal.SystemException se) {
596             _log.error(se, se);
597 
598             throw se;
599         }
600     }
601 
602     public static com.liferay.portal.model.User getUserById(
603         HttpPrincipal httpPrincipal, long userId)
604         throws com.liferay.portal.PortalException,
605             com.liferay.portal.SystemException {
606         try {
607             Object paramObj0 = new LongWrapper(userId);
608 
609             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
610                     "getUserById", new Object[] { paramObj0 });
611 
612             Object returnObj = null;
613 
614             try {
615                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
616             }
617             catch (Exception e) {
618                 if (e instanceof com.liferay.portal.PortalException) {
619                     throw (com.liferay.portal.PortalException)e;
620                 }
621 
622                 if (e instanceof com.liferay.portal.SystemException) {
623                     throw (com.liferay.portal.SystemException)e;
624                 }
625 
626                 throw new com.liferay.portal.SystemException(e);
627             }
628 
629             return (com.liferay.portal.model.User)returnObj;
630         }
631         catch (com.liferay.portal.SystemException se) {
632             _log.error(se, se);
633 
634             throw se;
635         }
636     }
637 
638     public static com.liferay.portal.model.User getUserByScreenName(
639         HttpPrincipal httpPrincipal, long companyId, java.lang.String screenName)
640         throws com.liferay.portal.PortalException,
641             com.liferay.portal.SystemException {
642         try {
643             Object paramObj0 = new LongWrapper(companyId);
644 
645             Object paramObj1 = screenName;
646 
647             if (screenName == null) {
648                 paramObj1 = new NullWrapper("java.lang.String");
649             }
650 
651             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
652                     "getUserByScreenName", new Object[] { paramObj0, paramObj1 });
653 
654             Object returnObj = null;
655 
656             try {
657                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
658             }
659             catch (Exception e) {
660                 if (e instanceof com.liferay.portal.PortalException) {
661                     throw (com.liferay.portal.PortalException)e;
662                 }
663 
664                 if (e instanceof com.liferay.portal.SystemException) {
665                     throw (com.liferay.portal.SystemException)e;
666                 }
667 
668                 throw new com.liferay.portal.SystemException(e);
669             }
670 
671             return (com.liferay.portal.model.User)returnObj;
672         }
673         catch (com.liferay.portal.SystemException se) {
674             _log.error(se, se);
675 
676             throw se;
677         }
678     }
679 
680     public static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal,
681         long companyId, java.lang.String emailAddress)
682         throws com.liferay.portal.PortalException,
683             com.liferay.portal.SystemException {
684         try {
685             Object paramObj0 = new LongWrapper(companyId);
686 
687             Object paramObj1 = emailAddress;
688 
689             if (emailAddress == null) {
690                 paramObj1 = new NullWrapper("java.lang.String");
691             }
692 
693             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
694                     "getUserIdByEmailAddress",
695                     new Object[] { paramObj0, paramObj1 });
696 
697             Object returnObj = null;
698 
699             try {
700                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
701             }
702             catch (Exception e) {
703                 if (e instanceof com.liferay.portal.PortalException) {
704                     throw (com.liferay.portal.PortalException)e;
705                 }
706 
707                 if (e instanceof com.liferay.portal.SystemException) {
708                     throw (com.liferay.portal.SystemException)e;
709                 }
710 
711                 throw new com.liferay.portal.SystemException(e);
712             }
713 
714             return ((Long)returnObj).longValue();
715         }
716         catch (com.liferay.portal.SystemException se) {
717             _log.error(se, se);
718 
719             throw se;
720         }
721     }
722 
723     public static long getUserIdByScreenName(HttpPrincipal httpPrincipal,
724         long companyId, java.lang.String screenName)
725         throws com.liferay.portal.PortalException,
726             com.liferay.portal.SystemException {
727         try {
728             Object paramObj0 = new LongWrapper(companyId);
729 
730             Object paramObj1 = screenName;
731 
732             if (screenName == null) {
733                 paramObj1 = new NullWrapper("java.lang.String");
734             }
735 
736             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
737                     "getUserIdByScreenName",
738                     new Object[] { paramObj0, paramObj1 });
739 
740             Object returnObj = null;
741 
742             try {
743                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
744             }
745             catch (Exception e) {
746                 if (e instanceof com.liferay.portal.PortalException) {
747                     throw (com.liferay.portal.PortalException)e;
748                 }
749 
750                 if (e instanceof com.liferay.portal.SystemException) {
751                     throw (com.liferay.portal.SystemException)e;
752                 }
753 
754                 throw new com.liferay.portal.SystemException(e);
755             }
756 
757             return ((Long)returnObj).longValue();
758         }
759         catch (com.liferay.portal.SystemException se) {
760             _log.error(se, se);
761 
762             throw se;
763         }
764     }
765 
766     public static boolean hasGroupUser(HttpPrincipal httpPrincipal,
767         long groupId, long userId) throws com.liferay.portal.SystemException {
768         try {
769             Object paramObj0 = new LongWrapper(groupId);
770 
771             Object paramObj1 = new LongWrapper(userId);
772 
773             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
774                     "hasGroupUser", new Object[] { paramObj0, paramObj1 });
775 
776             Object returnObj = null;
777 
778             try {
779                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
780             }
781             catch (Exception e) {
782                 if (e instanceof com.liferay.portal.SystemException) {
783                     throw (com.liferay.portal.SystemException)e;
784                 }
785 
786                 throw new com.liferay.portal.SystemException(e);
787             }
788 
789             return ((Boolean)returnObj).booleanValue();
790         }
791         catch (com.liferay.portal.SystemException se) {
792             _log.error(se, se);
793 
794             throw se;
795         }
796     }
797 
798     public static boolean hasRoleUser(HttpPrincipal httpPrincipal, long roleId,
799         long userId) throws com.liferay.portal.SystemException {
800         try {
801             Object paramObj0 = new LongWrapper(roleId);
802 
803             Object paramObj1 = new LongWrapper(userId);
804 
805             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
806                     "hasRoleUser", new Object[] { paramObj0, paramObj1 });
807 
808             Object returnObj = null;
809 
810             try {
811                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
812             }
813             catch (Exception e) {
814                 if (e instanceof com.liferay.portal.SystemException) {
815                     throw (com.liferay.portal.SystemException)e;
816                 }
817 
818                 throw new com.liferay.portal.SystemException(e);
819             }
820 
821             return ((Boolean)returnObj).booleanValue();
822         }
823         catch (com.liferay.portal.SystemException se) {
824             _log.error(se, se);
825 
826             throw se;
827         }
828     }
829 
830     public static void setRoleUsers(HttpPrincipal httpPrincipal, long roleId,
831         long[] userIds)
832         throws com.liferay.portal.PortalException,
833             com.liferay.portal.SystemException {
834         try {
835             Object paramObj0 = new LongWrapper(roleId);
836 
837             Object paramObj1 = userIds;
838 
839             if (userIds == null) {
840                 paramObj1 = new NullWrapper("[J");
841             }
842 
843             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
844                     "setRoleUsers", new Object[] { paramObj0, paramObj1 });
845 
846             try {
847                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
848             }
849             catch (Exception e) {
850                 if (e instanceof com.liferay.portal.PortalException) {
851                     throw (com.liferay.portal.PortalException)e;
852                 }
853 
854                 if (e instanceof com.liferay.portal.SystemException) {
855                     throw (com.liferay.portal.SystemException)e;
856                 }
857 
858                 throw new com.liferay.portal.SystemException(e);
859             }
860         }
861         catch (com.liferay.portal.SystemException se) {
862             _log.error(se, se);
863 
864             throw se;
865         }
866     }
867 
868     public static void setUserGroupUsers(HttpPrincipal httpPrincipal,
869         long userGroupId, long[] userIds)
870         throws com.liferay.portal.PortalException,
871             com.liferay.portal.SystemException {
872         try {
873             Object paramObj0 = new LongWrapper(userGroupId);
874 
875             Object paramObj1 = userIds;
876 
877             if (userIds == null) {
878                 paramObj1 = new NullWrapper("[J");
879             }
880 
881             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
882                     "setUserGroupUsers", new Object[] { paramObj0, paramObj1 });
883 
884             try {
885                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
886             }
887             catch (Exception e) {
888                 if (e instanceof com.liferay.portal.PortalException) {
889                     throw (com.liferay.portal.PortalException)e;
890                 }
891 
892                 if (e instanceof com.liferay.portal.SystemException) {
893                     throw (com.liferay.portal.SystemException)e;
894                 }
895 
896                 throw new com.liferay.portal.SystemException(e);
897             }
898         }
899         catch (com.liferay.portal.SystemException se) {
900             _log.error(se, se);
901 
902             throw se;
903         }
904     }
905 
906     public static void unsetGroupUsers(HttpPrincipal httpPrincipal,
907         long groupId, long[] userIds)
908         throws com.liferay.portal.PortalException,
909             com.liferay.portal.SystemException {
910         try {
911             Object paramObj0 = new LongWrapper(groupId);
912 
913             Object paramObj1 = userIds;
914 
915             if (userIds == null) {
916                 paramObj1 = new NullWrapper("[J");
917             }
918 
919             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
920                     "unsetGroupUsers", new Object[] { paramObj0, paramObj1 });
921 
922             try {
923                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
924             }
925             catch (Exception e) {
926                 if (e instanceof com.liferay.portal.PortalException) {
927                     throw (com.liferay.portal.PortalException)e;
928                 }
929 
930                 if (e instanceof com.liferay.portal.SystemException) {
931                     throw (com.liferay.portal.SystemException)e;
932                 }
933 
934                 throw new com.liferay.portal.SystemException(e);
935             }
936         }
937         catch (com.liferay.portal.SystemException se) {
938             _log.error(se, se);
939 
940             throw se;
941         }
942     }
943 
944     public static void unsetOrganizationUsers(HttpPrincipal httpPrincipal,
945         long organizationId, long[] userIds)
946         throws com.liferay.portal.PortalException,
947             com.liferay.portal.SystemException {
948         try {
949             Object paramObj0 = new LongWrapper(organizationId);
950 
951             Object paramObj1 = userIds;
952 
953             if (userIds == null) {
954                 paramObj1 = new NullWrapper("[J");
955             }
956 
957             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
958                     "unsetOrganizationUsers",
959                     new Object[] { paramObj0, paramObj1 });
960 
961             try {
962                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
963             }
964             catch (Exception e) {
965                 if (e instanceof com.liferay.portal.PortalException) {
966                     throw (com.liferay.portal.PortalException)e;
967                 }
968 
969                 if (e instanceof com.liferay.portal.SystemException) {
970                     throw (com.liferay.portal.SystemException)e;
971                 }
972 
973                 throw new com.liferay.portal.SystemException(e);
974             }
975         }
976         catch (com.liferay.portal.SystemException se) {
977             _log.error(se, se);
978 
979             throw se;
980         }
981     }
982 
983     public static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal,
984         long passwordPolicyId, long[] userIds)
985         throws com.liferay.portal.PortalException,
986             com.liferay.portal.SystemException {
987         try {
988             Object paramObj0 = new LongWrapper(passwordPolicyId);
989 
990             Object paramObj1 = userIds;
991 
992             if (userIds == null) {
993                 paramObj1 = new NullWrapper("[J");
994             }
995 
996             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
997                     "unsetPasswordPolicyUsers",
998                     new Object[] { paramObj0, paramObj1 });
999 
1000            try {
1001                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1002            }
1003            catch (Exception e) {
1004                if (e instanceof com.liferay.portal.PortalException) {
1005                    throw (com.liferay.portal.PortalException)e;
1006                }
1007
1008                if (e instanceof com.liferay.portal.SystemException) {
1009                    throw (com.liferay.portal.SystemException)e;
1010                }
1011
1012                throw new com.liferay.portal.SystemException(e);
1013            }
1014        }
1015        catch (com.liferay.portal.SystemException se) {
1016            _log.error(se, se);
1017
1018            throw se;
1019        }
1020    }
1021
1022    public static void unsetRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1023        long[] userIds)
1024        throws com.liferay.portal.PortalException,
1025            com.liferay.portal.SystemException {
1026        try {
1027            Object paramObj0 = new LongWrapper(roleId);
1028
1029            Object paramObj1 = userIds;
1030
1031            if (userIds == null) {
1032                paramObj1 = new NullWrapper("[J");
1033            }
1034
1035            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1036                    "unsetRoleUsers", new Object[] { paramObj0, paramObj1 });
1037
1038            try {
1039                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1040            }
1041            catch (Exception e) {
1042                if (e instanceof com.liferay.portal.PortalException) {
1043                    throw (com.liferay.portal.PortalException)e;
1044                }
1045
1046                if (e instanceof com.liferay.portal.SystemException) {
1047                    throw (com.liferay.portal.SystemException)e;
1048                }
1049
1050                throw new com.liferay.portal.SystemException(e);
1051            }
1052        }
1053        catch (com.liferay.portal.SystemException se) {
1054            _log.error(se, se);
1055
1056            throw se;
1057        }
1058    }
1059
1060    public static void unsetUserGroupUsers(HttpPrincipal httpPrincipal,
1061        long userGroupId, long[] userIds)
1062        throws com.liferay.portal.PortalException,
1063            com.liferay.portal.SystemException {
1064        try {
1065            Object paramObj0 = new LongWrapper(userGroupId);
1066
1067            Object paramObj1 = userIds;
1068
1069            if (userIds == null) {
1070                paramObj1 = new NullWrapper("[J");
1071            }
1072
1073            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1074                    "unsetUserGroupUsers", new Object[] { paramObj0, paramObj1 });
1075
1076            try {
1077                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1078            }
1079            catch (Exception e) {
1080                if (e instanceof com.liferay.portal.PortalException) {
1081                    throw (com.liferay.portal.PortalException)e;
1082                }
1083
1084                if (e instanceof com.liferay.portal.SystemException) {
1085                    throw (com.liferay.portal.SystemException)e;
1086                }
1087
1088                throw new com.liferay.portal.SystemException(e);
1089            }
1090        }
1091        catch (com.liferay.portal.SystemException se) {
1092            _log.error(se, se);
1093
1094            throw se;
1095        }
1096    }
1097
1098    public static com.liferay.portal.model.User updateActive(
1099        HttpPrincipal httpPrincipal, long userId, boolean active)
1100        throws com.liferay.portal.PortalException,
1101            com.liferay.portal.SystemException {
1102        try {
1103            Object paramObj0 = new LongWrapper(userId);
1104
1105            Object paramObj1 = new BooleanWrapper(active);
1106
1107            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1108                    "updateActive", new Object[] { paramObj0, paramObj1 });
1109
1110            Object returnObj = null;
1111
1112            try {
1113                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1114            }
1115            catch (Exception e) {
1116                if (e instanceof com.liferay.portal.PortalException) {
1117                    throw (com.liferay.portal.PortalException)e;
1118                }
1119
1120                if (e instanceof com.liferay.portal.SystemException) {
1121                    throw (com.liferay.portal.SystemException)e;
1122                }
1123
1124                throw new com.liferay.portal.SystemException(e);
1125            }
1126
1127            return (com.liferay.portal.model.User)returnObj;
1128        }
1129        catch (com.liferay.portal.SystemException se) {
1130            _log.error(se, se);
1131
1132            throw se;
1133        }
1134    }
1135
1136    public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
1137        HttpPrincipal httpPrincipal, long userId, boolean agreedToTermsOfUse)
1138        throws com.liferay.portal.PortalException,
1139            com.liferay.portal.SystemException {
1140        try {
1141            Object paramObj0 = new LongWrapper(userId);
1142
1143            Object paramObj1 = new BooleanWrapper(agreedToTermsOfUse);
1144
1145            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1146                    "updateAgreedToTermsOfUse",
1147                    new Object[] { paramObj0, paramObj1 });
1148
1149            Object returnObj = null;
1150
1151            try {
1152                returnObj = 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            return (com.liferay.portal.model.User)returnObj;
1167        }
1168        catch (com.liferay.portal.SystemException se) {
1169            _log.error(se, se);
1170
1171            throw se;
1172        }
1173    }
1174
1175    public static com.liferay.portal.model.User updateLockout(
1176        HttpPrincipal httpPrincipal, long userId, boolean lockout)
1177        throws com.liferay.portal.PortalException,
1178            com.liferay.portal.SystemException {
1179        try {
1180            Object paramObj0 = new LongWrapper(userId);
1181
1182            Object paramObj1 = new BooleanWrapper(lockout);
1183
1184            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1185                    "updateLockout", new Object[] { paramObj0, paramObj1 });
1186
1187            Object returnObj = null;
1188
1189            try {
1190                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1191            }
1192            catch (Exception e) {
1193                if (e instanceof com.liferay.portal.PortalException) {
1194                    throw (com.liferay.portal.PortalException)e;
1195                }
1196
1197                if (e instanceof com.liferay.portal.SystemException) {
1198                    throw (com.liferay.portal.SystemException)e;
1199                }
1200
1201                throw new com.liferay.portal.SystemException(e);
1202            }
1203
1204            return (com.liferay.portal.model.User)returnObj;
1205        }
1206        catch (com.liferay.portal.SystemException se) {
1207            _log.error(se, se);
1208
1209            throw se;
1210        }
1211    }
1212
1213    public static void updateOrganizations(HttpPrincipal httpPrincipal,
1214        long userId, long[] organizationIds)
1215        throws com.liferay.portal.PortalException,
1216            com.liferay.portal.SystemException {
1217        try {
1218            Object paramObj0 = new LongWrapper(userId);
1219
1220            Object paramObj1 = organizationIds;
1221
1222            if (organizationIds == null) {
1223                paramObj1 = new NullWrapper("[J");
1224            }
1225
1226            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1227                    "updateOrganizations", new Object[] { paramObj0, paramObj1 });
1228
1229            try {
1230                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1231            }
1232            catch (Exception e) {
1233                if (e instanceof com.liferay.portal.PortalException) {
1234                    throw (com.liferay.portal.PortalException)e;
1235                }
1236
1237                if (e instanceof com.liferay.portal.SystemException) {
1238                    throw (com.liferay.portal.SystemException)e;
1239                }
1240
1241                throw new com.liferay.portal.SystemException(e);
1242            }
1243        }
1244        catch (com.liferay.portal.SystemException se) {
1245            _log.error(se, se);
1246
1247            throw se;
1248        }
1249    }
1250
1251    public static com.liferay.portal.model.User updatePassword(
1252        HttpPrincipal httpPrincipal, long userId, java.lang.String password1,
1253        java.lang.String password2, boolean passwordReset)
1254        throws com.liferay.portal.PortalException,
1255            com.liferay.portal.SystemException {
1256        try {
1257            Object paramObj0 = new LongWrapper(userId);
1258
1259            Object paramObj1 = password1;
1260
1261            if (password1 == null) {
1262                paramObj1 = new NullWrapper("java.lang.String");
1263            }
1264
1265            Object paramObj2 = password2;
1266
1267            if (password2 == null) {
1268                paramObj2 = new NullWrapper("java.lang.String");
1269            }
1270
1271            Object paramObj3 = new BooleanWrapper(passwordReset);
1272
1273            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1274                    "updatePassword",
1275                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1276
1277            Object returnObj = null;
1278
1279            try {
1280                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1281            }
1282            catch (Exception e) {
1283                if (e instanceof com.liferay.portal.PortalException) {
1284                    throw (com.liferay.portal.PortalException)e;
1285                }
1286
1287                if (e instanceof com.liferay.portal.SystemException) {
1288                    throw (com.liferay.portal.SystemException)e;
1289                }
1290
1291                throw new com.liferay.portal.SystemException(e);
1292            }
1293
1294            return (com.liferay.portal.model.User)returnObj;
1295        }
1296        catch (com.liferay.portal.SystemException se) {
1297            _log.error(se, se);
1298
1299            throw se;
1300        }
1301    }
1302
1303    public static void updatePortrait(HttpPrincipal httpPrincipal, long userId,
1304        byte[] bytes)
1305        throws com.liferay.portal.PortalException,
1306            com.liferay.portal.SystemException {
1307        try {
1308            Object paramObj0 = new LongWrapper(userId);
1309
1310            Object paramObj1 = bytes;
1311
1312            if (bytes == null) {
1313                paramObj1 = new NullWrapper("[B");
1314            }
1315
1316            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1317                    "updatePortrait", new Object[] { paramObj0, paramObj1 });
1318
1319            try {
1320                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1321            }
1322            catch (Exception e) {
1323                if (e instanceof com.liferay.portal.PortalException) {
1324                    throw (com.liferay.portal.PortalException)e;
1325                }
1326
1327                if (e instanceof com.liferay.portal.SystemException) {
1328                    throw (com.liferay.portal.SystemException)e;
1329                }
1330
1331                throw new com.liferay.portal.SystemException(e);
1332            }
1333        }
1334        catch (com.liferay.portal.SystemException se) {
1335            _log.error(se, se);
1336
1337            throw se;
1338        }
1339    }
1340
1341    public static void updateScreenName(HttpPrincipal httpPrincipal,
1342        long userId, java.lang.String screenName)
1343        throws com.liferay.portal.PortalException,
1344            com.liferay.portal.SystemException {
1345        try {
1346            Object paramObj0 = new LongWrapper(userId);
1347
1348            Object paramObj1 = screenName;
1349
1350            if (screenName == null) {
1351                paramObj1 = new NullWrapper("java.lang.String");
1352            }
1353
1354            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1355                    "updateScreenName", new Object[] { paramObj0, paramObj1 });
1356
1357            try {
1358                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1359            }
1360            catch (Exception e) {
1361                if (e instanceof com.liferay.portal.PortalException) {
1362                    throw (com.liferay.portal.PortalException)e;
1363                }
1364
1365                if (e instanceof com.liferay.portal.SystemException) {
1366                    throw (com.liferay.portal.SystemException)e;
1367                }
1368
1369                throw new com.liferay.portal.SystemException(e);
1370            }
1371        }
1372        catch (com.liferay.portal.SystemException se) {
1373            _log.error(se, se);
1374
1375            throw se;
1376        }
1377    }
1378
1379    public static void updateOpenId(HttpPrincipal httpPrincipal, long userId,
1380        java.lang.String openId)
1381        throws com.liferay.portal.PortalException,
1382            com.liferay.portal.SystemException {
1383        try {
1384            Object paramObj0 = new LongWrapper(userId);
1385
1386            Object paramObj1 = openId;
1387
1388            if (openId == null) {
1389                paramObj1 = new NullWrapper("java.lang.String");
1390            }
1391
1392            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1393                    "updateOpenId", new Object[] { paramObj0, paramObj1 });
1394
1395            try {
1396                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1397            }
1398            catch (Exception e) {
1399                if (e instanceof com.liferay.portal.PortalException) {
1400                    throw (com.liferay.portal.PortalException)e;
1401                }
1402
1403                if (e instanceof com.liferay.portal.SystemException) {
1404                    throw (com.liferay.portal.SystemException)e;
1405                }
1406
1407                throw new com.liferay.portal.SystemException(e);
1408            }
1409        }
1410        catch (com.liferay.portal.SystemException se) {
1411            _log.error(se, se);
1412
1413            throw se;
1414        }
1415    }
1416
1417    public static com.liferay.portal.model.User updateUser(
1418        HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1419        boolean passwordReset, java.lang.String screenName,
1420        java.lang.String emailAddress, java.lang.String languageId,
1421        java.lang.String timeZoneId, java.lang.String greeting,
1422        java.lang.String comments, java.lang.String firstName,
1423        java.lang.String middleName, java.lang.String lastName, int prefixId,
1424        int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1425        int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1426        java.lang.String facebookSn, java.lang.String icqSn,
1427        java.lang.String jabberSn, java.lang.String msnSn,
1428        java.lang.String mySpaceSn, java.lang.String skypeSn,
1429        java.lang.String twitterSn, java.lang.String ymSn,
1430        java.lang.String jobTitle, long[] organizationIds)
1431        throws com.liferay.portal.PortalException,
1432            com.liferay.portal.SystemException {
1433        try {
1434            Object paramObj0 = new LongWrapper(userId);
1435
1436            Object paramObj1 = oldPassword;
1437
1438            if (oldPassword == null) {
1439                paramObj1 = new NullWrapper("java.lang.String");
1440            }
1441
1442            Object paramObj2 = new BooleanWrapper(passwordReset);
1443
1444            Object paramObj3 = screenName;
1445
1446            if (screenName == null) {
1447                paramObj3 = new NullWrapper("java.lang.String");
1448            }
1449
1450            Object paramObj4 = emailAddress;
1451
1452            if (emailAddress == null) {
1453                paramObj4 = new NullWrapper("java.lang.String");
1454            }
1455
1456            Object paramObj5 = languageId;
1457
1458            if (languageId == null) {
1459                paramObj5 = new NullWrapper("java.lang.String");
1460            }
1461
1462            Object paramObj6 = timeZoneId;
1463
1464            if (timeZoneId == null) {
1465                paramObj6 = new NullWrapper("java.lang.String");
1466            }
1467
1468            Object paramObj7 = greeting;
1469
1470            if (greeting == null) {
1471                paramObj7 = new NullWrapper("java.lang.String");
1472            }
1473
1474            Object paramObj8 = comments;
1475
1476            if (comments == null) {
1477                paramObj8 = new NullWrapper("java.lang.String");
1478            }
1479
1480            Object paramObj9 = firstName;
1481
1482            if (firstName == null) {
1483                paramObj9 = new NullWrapper("java.lang.String");
1484            }
1485
1486            Object paramObj10 = middleName;
1487
1488            if (middleName == null) {
1489                paramObj10 = new NullWrapper("java.lang.String");
1490            }
1491
1492            Object paramObj11 = lastName;
1493
1494            if (lastName == null) {
1495                paramObj11 = new NullWrapper("java.lang.String");
1496            }
1497
1498            Object paramObj12 = new IntegerWrapper(prefixId);
1499
1500            Object paramObj13 = new IntegerWrapper(suffixId);
1501
1502            Object paramObj14 = new BooleanWrapper(male);
1503
1504            Object paramObj15 = new IntegerWrapper(birthdayMonth);
1505
1506            Object paramObj16 = new IntegerWrapper(birthdayDay);
1507
1508            Object paramObj17 = new IntegerWrapper(birthdayYear);
1509
1510            Object paramObj18 = smsSn;
1511
1512            if (smsSn == null) {
1513                paramObj18 = new NullWrapper("java.lang.String");
1514            }
1515
1516            Object paramObj19 = aimSn;
1517
1518            if (aimSn == null) {
1519                paramObj19 = new NullWrapper("java.lang.String");
1520            }
1521
1522            Object paramObj20 = facebookSn;
1523
1524            if (facebookSn == null) {
1525                paramObj20 = new NullWrapper("java.lang.String");
1526            }
1527
1528            Object paramObj21 = icqSn;
1529
1530            if (icqSn == null) {
1531                paramObj21 = new NullWrapper("java.lang.String");
1532            }
1533
1534            Object paramObj22 = jabberSn;
1535
1536            if (jabberSn == null) {
1537                paramObj22 = new NullWrapper("java.lang.String");
1538            }
1539
1540            Object paramObj23 = msnSn;
1541
1542            if (msnSn == null) {
1543                paramObj23 = new NullWrapper("java.lang.String");
1544            }
1545
1546            Object paramObj24 = mySpaceSn;
1547
1548            if (mySpaceSn == null) {
1549                paramObj24 = new NullWrapper("java.lang.String");
1550            }
1551
1552            Object paramObj25 = skypeSn;
1553
1554            if (skypeSn == null) {
1555                paramObj25 = new NullWrapper("java.lang.String");
1556            }
1557
1558            Object paramObj26 = twitterSn;
1559
1560            if (twitterSn == null) {
1561                paramObj26 = new NullWrapper("java.lang.String");
1562            }
1563
1564            Object paramObj27 = ymSn;
1565
1566            if (ymSn == null) {
1567                paramObj27 = new NullWrapper("java.lang.String");
1568            }
1569
1570            Object paramObj28 = jobTitle;
1571
1572            if (jobTitle == null) {
1573                paramObj28 = new NullWrapper("java.lang.String");
1574            }
1575
1576            Object paramObj29 = organizationIds;
1577
1578            if (organizationIds == null) {
1579                paramObj29 = new NullWrapper("[J");
1580            }
1581
1582            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1583                    "updateUser",
1584                    new Object[] {
1585                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1586                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1587                        paramObj10, paramObj11, paramObj12, paramObj13,
1588                        paramObj14, paramObj15, paramObj16, paramObj17,
1589                        paramObj18, paramObj19, paramObj20, paramObj21,
1590                        paramObj22, paramObj23, paramObj24, paramObj25,
1591                        paramObj26, paramObj27, paramObj28, paramObj29
1592                    });
1593
1594            Object returnObj = null;
1595
1596            try {
1597                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1598            }
1599            catch (Exception e) {
1600                if (e instanceof com.liferay.portal.PortalException) {
1601                    throw (com.liferay.portal.PortalException)e;
1602                }
1603
1604                if (e instanceof com.liferay.portal.SystemException) {
1605                    throw (com.liferay.portal.SystemException)e;
1606                }
1607
1608                throw new com.liferay.portal.SystemException(e);
1609            }
1610
1611            return (com.liferay.portal.model.User)returnObj;
1612        }
1613        catch (com.liferay.portal.SystemException se) {
1614            _log.error(se, se);
1615
1616            throw se;
1617        }
1618    }
1619
1620    public static com.liferay.portal.model.User updateUser(
1621        HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1622        java.lang.String newPassword1, java.lang.String newPassword2,
1623        boolean passwordReset, java.lang.String screenName,
1624        java.lang.String emailAddress, java.lang.String languageId,
1625        java.lang.String timeZoneId, java.lang.String greeting,
1626        java.lang.String comments, java.lang.String firstName,
1627        java.lang.String middleName, java.lang.String lastName, int prefixId,
1628        int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1629        int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1630        java.lang.String facebookSn, java.lang.String icqSn,
1631        java.lang.String jabberSn, java.lang.String msnSn,
1632        java.lang.String mySpaceSn, java.lang.String skypeSn,
1633        java.lang.String twitterSn, java.lang.String ymSn,
1634        java.lang.String jobTitle, long[] organizationIds)
1635        throws com.liferay.portal.PortalException,
1636            com.liferay.portal.SystemException {
1637        try {
1638            Object paramObj0 = new LongWrapper(userId);
1639
1640            Object paramObj1 = oldPassword;
1641
1642            if (oldPassword == null) {
1643                paramObj1 = new NullWrapper("java.lang.String");
1644            }
1645
1646            Object paramObj2 = newPassword1;
1647
1648            if (newPassword1 == null) {
1649                paramObj2 = new NullWrapper("java.lang.String");
1650            }
1651
1652            Object paramObj3 = newPassword2;
1653
1654            if (newPassword2 == null) {
1655                paramObj3 = new NullWrapper("java.lang.String");
1656            }
1657
1658            Object paramObj4 = new BooleanWrapper(passwordReset);
1659
1660            Object paramObj5 = screenName;
1661
1662            if (screenName == null) {
1663                paramObj5 = new NullWrapper("java.lang.String");
1664            }
1665
1666            Object paramObj6 = emailAddress;
1667
1668            if (emailAddress == null) {
1669                paramObj6 = new NullWrapper("java.lang.String");
1670            }
1671
1672            Object paramObj7 = languageId;
1673
1674            if (languageId == null) {
1675                paramObj7 = new NullWrapper("java.lang.String");
1676            }
1677
1678            Object paramObj8 = timeZoneId;
1679
1680            if (timeZoneId == null) {
1681                paramObj8 = new NullWrapper("java.lang.String");
1682            }
1683
1684            Object paramObj9 = greeting;
1685
1686            if (greeting == null) {
1687                paramObj9 = new NullWrapper("java.lang.String");
1688            }
1689
1690            Object paramObj10 = comments;
1691
1692            if (comments == null) {
1693                paramObj10 = new NullWrapper("java.lang.String");
1694            }
1695
1696            Object paramObj11 = firstName;
1697
1698            if (firstName == null) {
1699                paramObj11 = new NullWrapper("java.lang.String");
1700            }
1701
1702            Object paramObj12 = middleName;
1703
1704            if (middleName == null) {
1705                paramObj12 = new NullWrapper("java.lang.String");
1706            }
1707
1708            Object paramObj13 = lastName;
1709
1710            if (lastName == null) {
1711                paramObj13 = new NullWrapper("java.lang.String");
1712            }
1713
1714            Object paramObj14 = new IntegerWrapper(prefixId);
1715
1716            Object paramObj15 = new IntegerWrapper(suffixId);
1717
1718            Object paramObj16 = new BooleanWrapper(male);
1719
1720            Object paramObj17 = new IntegerWrapper(birthdayMonth);
1721
1722            Object paramObj18 = new IntegerWrapper(birthdayDay);
1723
1724            Object paramObj19 = new IntegerWrapper(birthdayYear);
1725
1726            Object paramObj20 = smsSn;
1727
1728            if (smsSn == null) {
1729                paramObj20 = new NullWrapper("java.lang.String");
1730            }
1731
1732            Object paramObj21 = aimSn;
1733
1734            if (aimSn == null) {
1735                paramObj21 = new NullWrapper("java.lang.String");
1736            }
1737
1738            Object paramObj22 = facebookSn;
1739
1740            if (facebookSn == null) {
1741                paramObj22 = new NullWrapper("java.lang.String");
1742            }
1743
1744            Object paramObj23 = icqSn;
1745
1746            if (icqSn == null) {
1747                paramObj23 = new NullWrapper("java.lang.String");
1748            }
1749
1750            Object paramObj24 = jabberSn;
1751
1752            if (jabberSn == null) {
1753                paramObj24 = new NullWrapper("java.lang.String");
1754            }
1755
1756            Object paramObj25 = msnSn;
1757
1758            if (msnSn == null) {
1759                paramObj25 = new NullWrapper("java.lang.String");
1760            }
1761
1762            Object paramObj26 = mySpaceSn;
1763
1764            if (mySpaceSn == null) {
1765                paramObj26 = new NullWrapper("java.lang.String");
1766            }
1767
1768            Object paramObj27 = skypeSn;
1769
1770            if (skypeSn == null) {
1771                paramObj27 = new NullWrapper("java.lang.String");
1772            }
1773
1774            Object paramObj28 = twitterSn;
1775
1776            if (twitterSn == null) {
1777                paramObj28 = new NullWrapper("java.lang.String");
1778            }
1779
1780            Object paramObj29 = ymSn;
1781
1782            if (ymSn == null) {
1783                paramObj29 = new NullWrapper("java.lang.String");
1784            }
1785
1786            Object paramObj30 = jobTitle;
1787
1788            if (jobTitle == null) {
1789                paramObj30 = new NullWrapper("java.lang.String");
1790            }
1791
1792            Object paramObj31 = organizationIds;
1793
1794            if (organizationIds == null) {
1795                paramObj31 = new NullWrapper("[J");
1796            }
1797
1798            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1799                    "updateUser",
1800                    new Object[] {
1801                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
1802                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
1803                        paramObj10, paramObj11, paramObj12, paramObj13,
1804                        paramObj14, paramObj15, paramObj16, paramObj17,
1805                        paramObj18, paramObj19, paramObj20, paramObj21,
1806                        paramObj22, paramObj23, paramObj24, paramObj25,
1807                        paramObj26, paramObj27, paramObj28, paramObj29,
1808                        paramObj30, paramObj31
1809                    });
1810
1811            Object returnObj = null;
1812
1813            try {
1814                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1815            }
1816            catch (Exception e) {
1817                if (e instanceof com.liferay.portal.PortalException) {
1818                    throw (com.liferay.portal.PortalException)e;
1819                }
1820
1821                if (e instanceof com.liferay.portal.SystemException) {
1822                    throw (com.liferay.portal.SystemException)e;
1823                }
1824
1825                throw new com.liferay.portal.SystemException(e);
1826            }
1827
1828            return (com.liferay.portal.model.User)returnObj;
1829        }
1830        catch (com.liferay.portal.SystemException se) {
1831            _log.error(se, se);
1832
1833            throw se;
1834        }
1835    }
1836
1837    private static Log _log = LogFactoryUtil.getLog(UserServiceHttp.class);
1838}