1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.portal.service.http;
16  
17  import com.liferay.portal.kernel.log.Log;
18  import com.liferay.portal.kernel.log.LogFactoryUtil;
19  import com.liferay.portal.kernel.util.BooleanWrapper;
20  import com.liferay.portal.kernel.util.IntegerWrapper;
21  import com.liferay.portal.kernel.util.LongWrapper;
22  import com.liferay.portal.kernel.util.MethodWrapper;
23  import com.liferay.portal.kernel.util.NullWrapper;
24  import com.liferay.portal.security.auth.HttpPrincipal;
25  import com.liferay.portal.service.UserServiceUtil;
26  
27  /**
28   * <a href="UserServiceHttp.java.html"><b><i>View Source</i></b></a>
29   *
30   * <p>
31   * ServiceBuilder generated this class. Modifications in this class will be
32   * overwritten the next time is generated.
33   * </p>
34   *
35   * <p>
36   * This class provides a HTTP utility for the
37   * {@link com.liferay.portal.service.UserServiceUtil} service utility. The
38   * static methods of this class calls the same methods of the service utility.
39   * However, the signatures are different because it requires an additional
40   * {@link com.liferay.portal.security.auth.HttpPrincipal} parameter.
41   * </p>
42   *
43   * <p>
44   * The benefits of using the HTTP utility is that it is fast and allows for
45   * tunneling without the cost of serializing to text. The drawback is that it
46   * only works with Java.
47   * </p>
48   *
49   * <p>
50   * Set the property <b>tunnel.servlet.hosts.allowed</b> in portal.properties to
51   * configure security.
52   * </p>
53   *
54   * <p>
55   * The HTTP utility is only generated for remote services.
56   * </p>
57   *
58   * @author    Brian Wing Shun Chan
59   * @see       UserServiceSoap
60   * @see       com.liferay.portal.security.auth.HttpPrincipal
61   * @see       com.liferay.portal.service.UserServiceUtil
62   * @generated
63   */
64  public class UserServiceHttp {
65      public static void addGroupUsers(HttpPrincipal httpPrincipal, long groupId,
66          long[] userIds)
67          throws com.liferay.portal.kernel.exception.PortalException,
68              com.liferay.portal.kernel.exception.SystemException {
69          try {
70              Object paramObj0 = new LongWrapper(groupId);
71  
72              Object paramObj1 = userIds;
73  
74              if (userIds == null) {
75                  paramObj1 = new NullWrapper("[J");
76              }
77  
78              MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
79                      "addGroupUsers", new Object[] { paramObj0, paramObj1 });
80  
81              try {
82                  TunnelUtil.invoke(httpPrincipal, methodWrapper);
83              }
84              catch (Exception e) {
85                  if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
86                      throw (com.liferay.portal.kernel.exception.PortalException)e;
87                  }
88  
89                  if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
90                      throw (com.liferay.portal.kernel.exception.SystemException)e;
91                  }
92  
93                  throw new com.liferay.portal.kernel.exception.SystemException(e);
94              }
95          }
96          catch (com.liferay.portal.kernel.exception.SystemException se) {
97              _log.error(se, se);
98  
99              throw se;
100         }
101     }
102 
103     public static void addOrganizationUsers(HttpPrincipal httpPrincipal,
104         long organizationId, long[] userIds)
105         throws com.liferay.portal.kernel.exception.PortalException,
106             com.liferay.portal.kernel.exception.SystemException {
107         try {
108             Object paramObj0 = new LongWrapper(organizationId);
109 
110             Object paramObj1 = userIds;
111 
112             if (userIds == null) {
113                 paramObj1 = new NullWrapper("[J");
114             }
115 
116             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
117                     "addOrganizationUsers",
118                     new Object[] { paramObj0, paramObj1 });
119 
120             try {
121                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
122             }
123             catch (Exception e) {
124                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
125                     throw (com.liferay.portal.kernel.exception.PortalException)e;
126                 }
127 
128                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
129                     throw (com.liferay.portal.kernel.exception.SystemException)e;
130                 }
131 
132                 throw new com.liferay.portal.kernel.exception.SystemException(e);
133             }
134         }
135         catch (com.liferay.portal.kernel.exception.SystemException se) {
136             _log.error(se, se);
137 
138             throw se;
139         }
140     }
141 
142     public static void addPasswordPolicyUsers(HttpPrincipal httpPrincipal,
143         long passwordPolicyId, long[] userIds)
144         throws com.liferay.portal.kernel.exception.PortalException,
145             com.liferay.portal.kernel.exception.SystemException {
146         try {
147             Object paramObj0 = new LongWrapper(passwordPolicyId);
148 
149             Object paramObj1 = userIds;
150 
151             if (userIds == null) {
152                 paramObj1 = new NullWrapper("[J");
153             }
154 
155             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
156                     "addPasswordPolicyUsers",
157                     new Object[] { paramObj0, paramObj1 });
158 
159             try {
160                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
161             }
162             catch (Exception e) {
163                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
164                     throw (com.liferay.portal.kernel.exception.PortalException)e;
165                 }
166 
167                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
168                     throw (com.liferay.portal.kernel.exception.SystemException)e;
169                 }
170 
171                 throw new com.liferay.portal.kernel.exception.SystemException(e);
172             }
173         }
174         catch (com.liferay.portal.kernel.exception.SystemException se) {
175             _log.error(se, se);
176 
177             throw se;
178         }
179     }
180 
181     public static void addRoleUsers(HttpPrincipal httpPrincipal, long roleId,
182         long[] userIds)
183         throws com.liferay.portal.kernel.exception.PortalException,
184             com.liferay.portal.kernel.exception.SystemException {
185         try {
186             Object paramObj0 = new LongWrapper(roleId);
187 
188             Object paramObj1 = userIds;
189 
190             if (userIds == null) {
191                 paramObj1 = new NullWrapper("[J");
192             }
193 
194             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
195                     "addRoleUsers", new Object[] { paramObj0, paramObj1 });
196 
197             try {
198                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
199             }
200             catch (Exception e) {
201                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
202                     throw (com.liferay.portal.kernel.exception.PortalException)e;
203                 }
204 
205                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
206                     throw (com.liferay.portal.kernel.exception.SystemException)e;
207                 }
208 
209                 throw new com.liferay.portal.kernel.exception.SystemException(e);
210             }
211         }
212         catch (com.liferay.portal.kernel.exception.SystemException se) {
213             _log.error(se, se);
214 
215             throw se;
216         }
217     }
218 
219     public static void addTeamUsers(HttpPrincipal httpPrincipal, long teamId,
220         long[] userIds)
221         throws com.liferay.portal.kernel.exception.PortalException,
222             com.liferay.portal.kernel.exception.SystemException {
223         try {
224             Object paramObj0 = new LongWrapper(teamId);
225 
226             Object paramObj1 = userIds;
227 
228             if (userIds == null) {
229                 paramObj1 = new NullWrapper("[J");
230             }
231 
232             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
233                     "addTeamUsers", new Object[] { paramObj0, paramObj1 });
234 
235             try {
236                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
237             }
238             catch (Exception e) {
239                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
240                     throw (com.liferay.portal.kernel.exception.PortalException)e;
241                 }
242 
243                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
244                     throw (com.liferay.portal.kernel.exception.SystemException)e;
245                 }
246 
247                 throw new com.liferay.portal.kernel.exception.SystemException(e);
248             }
249         }
250         catch (com.liferay.portal.kernel.exception.SystemException se) {
251             _log.error(se, se);
252 
253             throw se;
254         }
255     }
256 
257     public static void addUserGroupUsers(HttpPrincipal httpPrincipal,
258         long userGroupId, long[] userIds)
259         throws com.liferay.portal.kernel.exception.PortalException,
260             com.liferay.portal.kernel.exception.SystemException {
261         try {
262             Object paramObj0 = new LongWrapper(userGroupId);
263 
264             Object paramObj1 = userIds;
265 
266             if (userIds == null) {
267                 paramObj1 = new NullWrapper("[J");
268             }
269 
270             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
271                     "addUserGroupUsers", new Object[] { paramObj0, paramObj1 });
272 
273             try {
274                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
275             }
276             catch (Exception e) {
277                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
278                     throw (com.liferay.portal.kernel.exception.PortalException)e;
279                 }
280 
281                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
282                     throw (com.liferay.portal.kernel.exception.SystemException)e;
283                 }
284 
285                 throw new com.liferay.portal.kernel.exception.SystemException(e);
286             }
287         }
288         catch (com.liferay.portal.kernel.exception.SystemException se) {
289             _log.error(se, se);
290 
291             throw se;
292         }
293     }
294 
295     public static com.liferay.portal.model.User addUser(
296         HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
297         java.lang.String password1, java.lang.String password2,
298         boolean autoScreenName, java.lang.String screenName,
299         java.lang.String emailAddress, java.lang.String openId,
300         java.util.Locale locale, java.lang.String firstName,
301         java.lang.String middleName, java.lang.String lastName, int prefixId,
302         int suffixId, boolean male, int birthdayMonth, int birthdayDay,
303         int birthdayYear, java.lang.String jobTitle, long[] groupIds,
304         long[] organizationIds, long[] roleIds, long[] userGroupIds,
305         boolean sendEmail,
306         com.liferay.portal.service.ServiceContext serviceContext)
307         throws com.liferay.portal.kernel.exception.PortalException,
308             com.liferay.portal.kernel.exception.SystemException {
309         try {
310             Object paramObj0 = new LongWrapper(companyId);
311 
312             Object paramObj1 = new BooleanWrapper(autoPassword);
313 
314             Object paramObj2 = password1;
315 
316             if (password1 == null) {
317                 paramObj2 = new NullWrapper("java.lang.String");
318             }
319 
320             Object paramObj3 = password2;
321 
322             if (password2 == null) {
323                 paramObj3 = new NullWrapper("java.lang.String");
324             }
325 
326             Object paramObj4 = new BooleanWrapper(autoScreenName);
327 
328             Object paramObj5 = screenName;
329 
330             if (screenName == null) {
331                 paramObj5 = new NullWrapper("java.lang.String");
332             }
333 
334             Object paramObj6 = emailAddress;
335 
336             if (emailAddress == null) {
337                 paramObj6 = new NullWrapper("java.lang.String");
338             }
339 
340             Object paramObj7 = openId;
341 
342             if (openId == null) {
343                 paramObj7 = new NullWrapper("java.lang.String");
344             }
345 
346             Object paramObj8 = locale;
347 
348             if (locale == null) {
349                 paramObj8 = new NullWrapper("java.util.Locale");
350             }
351 
352             Object paramObj9 = firstName;
353 
354             if (firstName == null) {
355                 paramObj9 = new NullWrapper("java.lang.String");
356             }
357 
358             Object paramObj10 = middleName;
359 
360             if (middleName == null) {
361                 paramObj10 = new NullWrapper("java.lang.String");
362             }
363 
364             Object paramObj11 = lastName;
365 
366             if (lastName == null) {
367                 paramObj11 = new NullWrapper("java.lang.String");
368             }
369 
370             Object paramObj12 = new IntegerWrapper(prefixId);
371 
372             Object paramObj13 = new IntegerWrapper(suffixId);
373 
374             Object paramObj14 = new BooleanWrapper(male);
375 
376             Object paramObj15 = new IntegerWrapper(birthdayMonth);
377 
378             Object paramObj16 = new IntegerWrapper(birthdayDay);
379 
380             Object paramObj17 = new IntegerWrapper(birthdayYear);
381 
382             Object paramObj18 = jobTitle;
383 
384             if (jobTitle == null) {
385                 paramObj18 = new NullWrapper("java.lang.String");
386             }
387 
388             Object paramObj19 = groupIds;
389 
390             if (groupIds == null) {
391                 paramObj19 = new NullWrapper("[J");
392             }
393 
394             Object paramObj20 = organizationIds;
395 
396             if (organizationIds == null) {
397                 paramObj20 = new NullWrapper("[J");
398             }
399 
400             Object paramObj21 = roleIds;
401 
402             if (roleIds == null) {
403                 paramObj21 = new NullWrapper("[J");
404             }
405 
406             Object paramObj22 = userGroupIds;
407 
408             if (userGroupIds == null) {
409                 paramObj22 = new NullWrapper("[J");
410             }
411 
412             Object paramObj23 = new BooleanWrapper(sendEmail);
413 
414             Object paramObj24 = serviceContext;
415 
416             if (serviceContext == null) {
417                 paramObj24 = new NullWrapper(
418                         "com.liferay.portal.service.ServiceContext");
419             }
420 
421             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
422                     "addUser",
423                     new Object[] {
424                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
425                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
426                         paramObj10, paramObj11, paramObj12, paramObj13,
427                         paramObj14, paramObj15, paramObj16, paramObj17,
428                         paramObj18, paramObj19, paramObj20, paramObj21,
429                         paramObj22, paramObj23, paramObj24
430                     });
431 
432             Object returnObj = null;
433 
434             try {
435                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
436             }
437             catch (Exception e) {
438                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
439                     throw (com.liferay.portal.kernel.exception.PortalException)e;
440                 }
441 
442                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
443                     throw (com.liferay.portal.kernel.exception.SystemException)e;
444                 }
445 
446                 throw new com.liferay.portal.kernel.exception.SystemException(e);
447             }
448 
449             return (com.liferay.portal.model.User)returnObj;
450         }
451         catch (com.liferay.portal.kernel.exception.SystemException se) {
452             _log.error(se, se);
453 
454             throw se;
455         }
456     }
457 
458     public static com.liferay.portal.model.User addUser(
459         HttpPrincipal httpPrincipal, long companyId, boolean autoPassword,
460         java.lang.String password1, java.lang.String password2,
461         boolean autoScreenName, java.lang.String screenName,
462         java.lang.String emailAddress, java.lang.String openId,
463         java.util.Locale locale, java.lang.String firstName,
464         java.lang.String middleName, java.lang.String lastName, int prefixId,
465         int suffixId, boolean male, int birthdayMonth, int birthdayDay,
466         int birthdayYear, java.lang.String jobTitle, long[] groupIds,
467         long[] organizationIds, long[] roleIds, long[] userGroupIds,
468         boolean sendEmail,
469         java.util.List<com.liferay.portal.model.Address> addresses,
470         java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
471         java.util.List<com.liferay.portal.model.Phone> phones,
472         java.util.List<com.liferay.portal.model.Website> websites,
473         java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
474         com.liferay.portal.service.ServiceContext serviceContext)
475         throws com.liferay.portal.kernel.exception.PortalException,
476             com.liferay.portal.kernel.exception.SystemException {
477         try {
478             Object paramObj0 = new LongWrapper(companyId);
479 
480             Object paramObj1 = new BooleanWrapper(autoPassword);
481 
482             Object paramObj2 = password1;
483 
484             if (password1 == null) {
485                 paramObj2 = new NullWrapper("java.lang.String");
486             }
487 
488             Object paramObj3 = password2;
489 
490             if (password2 == null) {
491                 paramObj3 = new NullWrapper("java.lang.String");
492             }
493 
494             Object paramObj4 = new BooleanWrapper(autoScreenName);
495 
496             Object paramObj5 = screenName;
497 
498             if (screenName == null) {
499                 paramObj5 = new NullWrapper("java.lang.String");
500             }
501 
502             Object paramObj6 = emailAddress;
503 
504             if (emailAddress == null) {
505                 paramObj6 = new NullWrapper("java.lang.String");
506             }
507 
508             Object paramObj7 = openId;
509 
510             if (openId == null) {
511                 paramObj7 = new NullWrapper("java.lang.String");
512             }
513 
514             Object paramObj8 = locale;
515 
516             if (locale == null) {
517                 paramObj8 = new NullWrapper("java.util.Locale");
518             }
519 
520             Object paramObj9 = firstName;
521 
522             if (firstName == null) {
523                 paramObj9 = new NullWrapper("java.lang.String");
524             }
525 
526             Object paramObj10 = middleName;
527 
528             if (middleName == null) {
529                 paramObj10 = new NullWrapper("java.lang.String");
530             }
531 
532             Object paramObj11 = lastName;
533 
534             if (lastName == null) {
535                 paramObj11 = new NullWrapper("java.lang.String");
536             }
537 
538             Object paramObj12 = new IntegerWrapper(prefixId);
539 
540             Object paramObj13 = new IntegerWrapper(suffixId);
541 
542             Object paramObj14 = new BooleanWrapper(male);
543 
544             Object paramObj15 = new IntegerWrapper(birthdayMonth);
545 
546             Object paramObj16 = new IntegerWrapper(birthdayDay);
547 
548             Object paramObj17 = new IntegerWrapper(birthdayYear);
549 
550             Object paramObj18 = jobTitle;
551 
552             if (jobTitle == null) {
553                 paramObj18 = new NullWrapper("java.lang.String");
554             }
555 
556             Object paramObj19 = groupIds;
557 
558             if (groupIds == null) {
559                 paramObj19 = new NullWrapper("[J");
560             }
561 
562             Object paramObj20 = organizationIds;
563 
564             if (organizationIds == null) {
565                 paramObj20 = new NullWrapper("[J");
566             }
567 
568             Object paramObj21 = roleIds;
569 
570             if (roleIds == null) {
571                 paramObj21 = new NullWrapper("[J");
572             }
573 
574             Object paramObj22 = userGroupIds;
575 
576             if (userGroupIds == null) {
577                 paramObj22 = new NullWrapper("[J");
578             }
579 
580             Object paramObj23 = new BooleanWrapper(sendEmail);
581 
582             Object paramObj24 = addresses;
583 
584             if (addresses == null) {
585                 paramObj24 = new NullWrapper("java.util.List");
586             }
587 
588             Object paramObj25 = emailAddresses;
589 
590             if (emailAddresses == null) {
591                 paramObj25 = new NullWrapper("java.util.List");
592             }
593 
594             Object paramObj26 = phones;
595 
596             if (phones == null) {
597                 paramObj26 = new NullWrapper("java.util.List");
598             }
599 
600             Object paramObj27 = websites;
601 
602             if (websites == null) {
603                 paramObj27 = new NullWrapper("java.util.List");
604             }
605 
606             Object paramObj28 = announcementsDelivers;
607 
608             if (announcementsDelivers == null) {
609                 paramObj28 = new NullWrapper("java.util.List");
610             }
611 
612             Object paramObj29 = serviceContext;
613 
614             if (serviceContext == null) {
615                 paramObj29 = new NullWrapper(
616                         "com.liferay.portal.service.ServiceContext");
617             }
618 
619             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
620                     "addUser",
621                     new Object[] {
622                         paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
623                         paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
624                         paramObj10, paramObj11, paramObj12, paramObj13,
625                         paramObj14, paramObj15, paramObj16, paramObj17,
626                         paramObj18, paramObj19, paramObj20, paramObj21,
627                         paramObj22, paramObj23, paramObj24, paramObj25,
628                         paramObj26, paramObj27, paramObj28, paramObj29
629                     });
630 
631             Object returnObj = null;
632 
633             try {
634                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
635             }
636             catch (Exception e) {
637                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
638                     throw (com.liferay.portal.kernel.exception.PortalException)e;
639                 }
640 
641                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
642                     throw (com.liferay.portal.kernel.exception.SystemException)e;
643                 }
644 
645                 throw new com.liferay.portal.kernel.exception.SystemException(e);
646             }
647 
648             return (com.liferay.portal.model.User)returnObj;
649         }
650         catch (com.liferay.portal.kernel.exception.SystemException se) {
651             _log.error(se, se);
652 
653             throw se;
654         }
655     }
656 
657     public static void deletePortrait(HttpPrincipal httpPrincipal, long userId)
658         throws com.liferay.portal.kernel.exception.PortalException,
659             com.liferay.portal.kernel.exception.SystemException {
660         try {
661             Object paramObj0 = new LongWrapper(userId);
662 
663             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
664                     "deletePortrait", new Object[] { paramObj0 });
665 
666             try {
667                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
668             }
669             catch (Exception e) {
670                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
671                     throw (com.liferay.portal.kernel.exception.PortalException)e;
672                 }
673 
674                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
675                     throw (com.liferay.portal.kernel.exception.SystemException)e;
676                 }
677 
678                 throw new com.liferay.portal.kernel.exception.SystemException(e);
679             }
680         }
681         catch (com.liferay.portal.kernel.exception.SystemException se) {
682             _log.error(se, se);
683 
684             throw se;
685         }
686     }
687 
688     public static void deleteRoleUser(HttpPrincipal httpPrincipal, long roleId,
689         long userId)
690         throws com.liferay.portal.kernel.exception.PortalException,
691             com.liferay.portal.kernel.exception.SystemException {
692         try {
693             Object paramObj0 = new LongWrapper(roleId);
694 
695             Object paramObj1 = new LongWrapper(userId);
696 
697             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
698                     "deleteRoleUser", new Object[] { paramObj0, paramObj1 });
699 
700             try {
701                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
702             }
703             catch (Exception e) {
704                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
705                     throw (com.liferay.portal.kernel.exception.PortalException)e;
706                 }
707 
708                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
709                     throw (com.liferay.portal.kernel.exception.SystemException)e;
710                 }
711 
712                 throw new com.liferay.portal.kernel.exception.SystemException(e);
713             }
714         }
715         catch (com.liferay.portal.kernel.exception.SystemException se) {
716             _log.error(se, se);
717 
718             throw se;
719         }
720     }
721 
722     public static void deleteUser(HttpPrincipal httpPrincipal, long userId)
723         throws com.liferay.portal.kernel.exception.PortalException,
724             com.liferay.portal.kernel.exception.SystemException {
725         try {
726             Object paramObj0 = new LongWrapper(userId);
727 
728             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
729                     "deleteUser", new Object[] { paramObj0 });
730 
731             try {
732                 TunnelUtil.invoke(httpPrincipal, methodWrapper);
733             }
734             catch (Exception e) {
735                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
736                     throw (com.liferay.portal.kernel.exception.PortalException)e;
737                 }
738 
739                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
740                     throw (com.liferay.portal.kernel.exception.SystemException)e;
741                 }
742 
743                 throw new com.liferay.portal.kernel.exception.SystemException(e);
744             }
745         }
746         catch (com.liferay.portal.kernel.exception.SystemException se) {
747             _log.error(se, se);
748 
749             throw se;
750         }
751     }
752 
753     public static long getDefaultUserId(HttpPrincipal httpPrincipal,
754         long companyId)
755         throws com.liferay.portal.kernel.exception.PortalException,
756             com.liferay.portal.kernel.exception.SystemException {
757         try {
758             Object paramObj0 = new LongWrapper(companyId);
759 
760             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
761                     "getDefaultUserId", new Object[] { paramObj0 });
762 
763             Object returnObj = null;
764 
765             try {
766                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
767             }
768             catch (Exception e) {
769                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
770                     throw (com.liferay.portal.kernel.exception.PortalException)e;
771                 }
772 
773                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
774                     throw (com.liferay.portal.kernel.exception.SystemException)e;
775                 }
776 
777                 throw new com.liferay.portal.kernel.exception.SystemException(e);
778             }
779 
780             return ((Long)returnObj).longValue();
781         }
782         catch (com.liferay.portal.kernel.exception.SystemException se) {
783             _log.error(se, se);
784 
785             throw se;
786         }
787     }
788 
789     public static long[] getGroupUserIds(HttpPrincipal httpPrincipal,
790         long groupId)
791         throws com.liferay.portal.kernel.exception.SystemException {
792         try {
793             Object paramObj0 = new LongWrapper(groupId);
794 
795             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
796                     "getGroupUserIds", new Object[] { paramObj0 });
797 
798             Object returnObj = null;
799 
800             try {
801                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
802             }
803             catch (Exception e) {
804                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
805                     throw (com.liferay.portal.kernel.exception.SystemException)e;
806                 }
807 
808                 throw new com.liferay.portal.kernel.exception.SystemException(e);
809             }
810 
811             return (long[])returnObj;
812         }
813         catch (com.liferay.portal.kernel.exception.SystemException se) {
814             _log.error(se, se);
815 
816             throw se;
817         }
818     }
819 
820     public static long[] getOrganizationUserIds(HttpPrincipal httpPrincipal,
821         long organizationId)
822         throws com.liferay.portal.kernel.exception.SystemException {
823         try {
824             Object paramObj0 = new LongWrapper(organizationId);
825 
826             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
827                     "getOrganizationUserIds", new Object[] { paramObj0 });
828 
829             Object returnObj = null;
830 
831             try {
832                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
833             }
834             catch (Exception e) {
835                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
836                     throw (com.liferay.portal.kernel.exception.SystemException)e;
837                 }
838 
839                 throw new com.liferay.portal.kernel.exception.SystemException(e);
840             }
841 
842             return (long[])returnObj;
843         }
844         catch (com.liferay.portal.kernel.exception.SystemException se) {
845             _log.error(se, se);
846 
847             throw se;
848         }
849     }
850 
851     public static long[] getRoleUserIds(HttpPrincipal httpPrincipal, long roleId)
852         throws com.liferay.portal.kernel.exception.SystemException {
853         try {
854             Object paramObj0 = new LongWrapper(roleId);
855 
856             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
857                     "getRoleUserIds", new Object[] { paramObj0 });
858 
859             Object returnObj = null;
860 
861             try {
862                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
863             }
864             catch (Exception e) {
865                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
866                     throw (com.liferay.portal.kernel.exception.SystemException)e;
867                 }
868 
869                 throw new com.liferay.portal.kernel.exception.SystemException(e);
870             }
871 
872             return (long[])returnObj;
873         }
874         catch (com.liferay.portal.kernel.exception.SystemException se) {
875             _log.error(se, se);
876 
877             throw se;
878         }
879     }
880 
881     public static com.liferay.portal.model.User getUserByEmailAddress(
882         HttpPrincipal httpPrincipal, long companyId,
883         java.lang.String emailAddress)
884         throws com.liferay.portal.kernel.exception.PortalException,
885             com.liferay.portal.kernel.exception.SystemException {
886         try {
887             Object paramObj0 = new LongWrapper(companyId);
888 
889             Object paramObj1 = emailAddress;
890 
891             if (emailAddress == null) {
892                 paramObj1 = new NullWrapper("java.lang.String");
893             }
894 
895             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
896                     "getUserByEmailAddress",
897                     new Object[] { paramObj0, paramObj1 });
898 
899             Object returnObj = null;
900 
901             try {
902                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
903             }
904             catch (Exception e) {
905                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
906                     throw (com.liferay.portal.kernel.exception.PortalException)e;
907                 }
908 
909                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
910                     throw (com.liferay.portal.kernel.exception.SystemException)e;
911                 }
912 
913                 throw new com.liferay.portal.kernel.exception.SystemException(e);
914             }
915 
916             return (com.liferay.portal.model.User)returnObj;
917         }
918         catch (com.liferay.portal.kernel.exception.SystemException se) {
919             _log.error(se, se);
920 
921             throw se;
922         }
923     }
924 
925     public static com.liferay.portal.model.User getUserById(
926         HttpPrincipal httpPrincipal, long userId)
927         throws com.liferay.portal.kernel.exception.PortalException,
928             com.liferay.portal.kernel.exception.SystemException {
929         try {
930             Object paramObj0 = new LongWrapper(userId);
931 
932             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
933                     "getUserById", new Object[] { paramObj0 });
934 
935             Object returnObj = null;
936 
937             try {
938                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
939             }
940             catch (Exception e) {
941                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
942                     throw (com.liferay.portal.kernel.exception.PortalException)e;
943                 }
944 
945                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
946                     throw (com.liferay.portal.kernel.exception.SystemException)e;
947                 }
948 
949                 throw new com.liferay.portal.kernel.exception.SystemException(e);
950             }
951 
952             return (com.liferay.portal.model.User)returnObj;
953         }
954         catch (com.liferay.portal.kernel.exception.SystemException se) {
955             _log.error(se, se);
956 
957             throw se;
958         }
959     }
960 
961     public static com.liferay.portal.model.User getUserByScreenName(
962         HttpPrincipal httpPrincipal, long companyId, java.lang.String screenName)
963         throws com.liferay.portal.kernel.exception.PortalException,
964             com.liferay.portal.kernel.exception.SystemException {
965         try {
966             Object paramObj0 = new LongWrapper(companyId);
967 
968             Object paramObj1 = screenName;
969 
970             if (screenName == null) {
971                 paramObj1 = new NullWrapper("java.lang.String");
972             }
973 
974             MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
975                     "getUserByScreenName", new Object[] { paramObj0, paramObj1 });
976 
977             Object returnObj = null;
978 
979             try {
980                 returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
981             }
982             catch (Exception e) {
983                 if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
984                     throw (com.liferay.portal.kernel.exception.PortalException)e;
985                 }
986 
987                 if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
988                     throw (com.liferay.portal.kernel.exception.SystemException)e;
989                 }
990 
991                 throw new com.liferay.portal.kernel.exception.SystemException(e);
992             }
993 
994             return (com.liferay.portal.model.User)returnObj;
995         }
996         catch (com.liferay.portal.kernel.exception.SystemException se) {
997             _log.error(se, se);
998 
999             throw se;
1000        }
1001    }
1002
1003    public static long getUserIdByEmailAddress(HttpPrincipal httpPrincipal,
1004        long companyId, java.lang.String emailAddress)
1005        throws com.liferay.portal.kernel.exception.PortalException,
1006            com.liferay.portal.kernel.exception.SystemException {
1007        try {
1008            Object paramObj0 = new LongWrapper(companyId);
1009
1010            Object paramObj1 = emailAddress;
1011
1012            if (emailAddress == null) {
1013                paramObj1 = new NullWrapper("java.lang.String");
1014            }
1015
1016            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1017                    "getUserIdByEmailAddress",
1018                    new Object[] { paramObj0, paramObj1 });
1019
1020            Object returnObj = null;
1021
1022            try {
1023                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1024            }
1025            catch (Exception e) {
1026                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1027                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1028                }
1029
1030                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1031                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1032                }
1033
1034                throw new com.liferay.portal.kernel.exception.SystemException(e);
1035            }
1036
1037            return ((Long)returnObj).longValue();
1038        }
1039        catch (com.liferay.portal.kernel.exception.SystemException se) {
1040            _log.error(se, se);
1041
1042            throw se;
1043        }
1044    }
1045
1046    public static long getUserIdByScreenName(HttpPrincipal httpPrincipal,
1047        long companyId, java.lang.String screenName)
1048        throws com.liferay.portal.kernel.exception.PortalException,
1049            com.liferay.portal.kernel.exception.SystemException {
1050        try {
1051            Object paramObj0 = new LongWrapper(companyId);
1052
1053            Object paramObj1 = screenName;
1054
1055            if (screenName == null) {
1056                paramObj1 = new NullWrapper("java.lang.String");
1057            }
1058
1059            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1060                    "getUserIdByScreenName",
1061                    new Object[] { paramObj0, paramObj1 });
1062
1063            Object returnObj = null;
1064
1065            try {
1066                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1067            }
1068            catch (Exception e) {
1069                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1070                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1071                }
1072
1073                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1074                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1075                }
1076
1077                throw new com.liferay.portal.kernel.exception.SystemException(e);
1078            }
1079
1080            return ((Long)returnObj).longValue();
1081        }
1082        catch (com.liferay.portal.kernel.exception.SystemException se) {
1083            _log.error(se, se);
1084
1085            throw se;
1086        }
1087    }
1088
1089    public static boolean hasGroupUser(HttpPrincipal httpPrincipal,
1090        long groupId, long userId)
1091        throws com.liferay.portal.kernel.exception.SystemException {
1092        try {
1093            Object paramObj0 = new LongWrapper(groupId);
1094
1095            Object paramObj1 = new LongWrapper(userId);
1096
1097            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1098                    "hasGroupUser", new Object[] { paramObj0, paramObj1 });
1099
1100            Object returnObj = null;
1101
1102            try {
1103                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1104            }
1105            catch (Exception e) {
1106                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1107                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1108                }
1109
1110                throw new com.liferay.portal.kernel.exception.SystemException(e);
1111            }
1112
1113            return ((Boolean)returnObj).booleanValue();
1114        }
1115        catch (com.liferay.portal.kernel.exception.SystemException se) {
1116            _log.error(se, se);
1117
1118            throw se;
1119        }
1120    }
1121
1122    public static boolean hasRoleUser(HttpPrincipal httpPrincipal, long roleId,
1123        long userId) throws com.liferay.portal.kernel.exception.SystemException {
1124        try {
1125            Object paramObj0 = new LongWrapper(roleId);
1126
1127            Object paramObj1 = new LongWrapper(userId);
1128
1129            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1130                    "hasRoleUser", new Object[] { paramObj0, paramObj1 });
1131
1132            Object returnObj = null;
1133
1134            try {
1135                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1136            }
1137            catch (Exception e) {
1138                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1139                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1140                }
1141
1142                throw new com.liferay.portal.kernel.exception.SystemException(e);
1143            }
1144
1145            return ((Boolean)returnObj).booleanValue();
1146        }
1147        catch (com.liferay.portal.kernel.exception.SystemException se) {
1148            _log.error(se, se);
1149
1150            throw se;
1151        }
1152    }
1153
1154    public static boolean hasRoleUser(HttpPrincipal httpPrincipal,
1155        long companyId, java.lang.String name, long userId, boolean inherited)
1156        throws com.liferay.portal.kernel.exception.PortalException,
1157            com.liferay.portal.kernel.exception.SystemException {
1158        try {
1159            Object paramObj0 = new LongWrapper(companyId);
1160
1161            Object paramObj1 = name;
1162
1163            if (name == null) {
1164                paramObj1 = new NullWrapper("java.lang.String");
1165            }
1166
1167            Object paramObj2 = new LongWrapper(userId);
1168
1169            Object paramObj3 = new BooleanWrapper(inherited);
1170
1171            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1172                    "hasRoleUser",
1173                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1174
1175            Object returnObj = null;
1176
1177            try {
1178                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1179            }
1180            catch (Exception e) {
1181                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1182                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1183                }
1184
1185                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1186                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1187                }
1188
1189                throw new com.liferay.portal.kernel.exception.SystemException(e);
1190            }
1191
1192            return ((Boolean)returnObj).booleanValue();
1193        }
1194        catch (com.liferay.portal.kernel.exception.SystemException se) {
1195            _log.error(se, se);
1196
1197            throw se;
1198        }
1199    }
1200
1201    public static void setRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1202        long[] userIds)
1203        throws com.liferay.portal.kernel.exception.PortalException,
1204            com.liferay.portal.kernel.exception.SystemException {
1205        try {
1206            Object paramObj0 = new LongWrapper(roleId);
1207
1208            Object paramObj1 = userIds;
1209
1210            if (userIds == null) {
1211                paramObj1 = new NullWrapper("[J");
1212            }
1213
1214            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1215                    "setRoleUsers", new Object[] { paramObj0, paramObj1 });
1216
1217            try {
1218                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1219            }
1220            catch (Exception e) {
1221                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1222                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1223                }
1224
1225                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1226                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1227                }
1228
1229                throw new com.liferay.portal.kernel.exception.SystemException(e);
1230            }
1231        }
1232        catch (com.liferay.portal.kernel.exception.SystemException se) {
1233            _log.error(se, se);
1234
1235            throw se;
1236        }
1237    }
1238
1239    public static void setUserGroupUsers(HttpPrincipal httpPrincipal,
1240        long userGroupId, long[] userIds)
1241        throws com.liferay.portal.kernel.exception.PortalException,
1242            com.liferay.portal.kernel.exception.SystemException {
1243        try {
1244            Object paramObj0 = new LongWrapper(userGroupId);
1245
1246            Object paramObj1 = userIds;
1247
1248            if (userIds == null) {
1249                paramObj1 = new NullWrapper("[J");
1250            }
1251
1252            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1253                    "setUserGroupUsers", new Object[] { paramObj0, paramObj1 });
1254
1255            try {
1256                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1257            }
1258            catch (Exception e) {
1259                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1260                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1261                }
1262
1263                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1264                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1265                }
1266
1267                throw new com.liferay.portal.kernel.exception.SystemException(e);
1268            }
1269        }
1270        catch (com.liferay.portal.kernel.exception.SystemException se) {
1271            _log.error(se, se);
1272
1273            throw se;
1274        }
1275    }
1276
1277    public static void unsetGroupUsers(HttpPrincipal httpPrincipal,
1278        long groupId, long[] userIds)
1279        throws com.liferay.portal.kernel.exception.PortalException,
1280            com.liferay.portal.kernel.exception.SystemException {
1281        try {
1282            Object paramObj0 = new LongWrapper(groupId);
1283
1284            Object paramObj1 = userIds;
1285
1286            if (userIds == null) {
1287                paramObj1 = new NullWrapper("[J");
1288            }
1289
1290            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1291                    "unsetGroupUsers", new Object[] { paramObj0, paramObj1 });
1292
1293            try {
1294                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1295            }
1296            catch (Exception e) {
1297                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1298                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1299                }
1300
1301                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1302                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1303                }
1304
1305                throw new com.liferay.portal.kernel.exception.SystemException(e);
1306            }
1307        }
1308        catch (com.liferay.portal.kernel.exception.SystemException se) {
1309            _log.error(se, se);
1310
1311            throw se;
1312        }
1313    }
1314
1315    public static void unsetOrganizationUsers(HttpPrincipal httpPrincipal,
1316        long organizationId, long[] userIds)
1317        throws com.liferay.portal.kernel.exception.PortalException,
1318            com.liferay.portal.kernel.exception.SystemException {
1319        try {
1320            Object paramObj0 = new LongWrapper(organizationId);
1321
1322            Object paramObj1 = userIds;
1323
1324            if (userIds == null) {
1325                paramObj1 = new NullWrapper("[J");
1326            }
1327
1328            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1329                    "unsetOrganizationUsers",
1330                    new Object[] { paramObj0, paramObj1 });
1331
1332            try {
1333                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1334            }
1335            catch (Exception e) {
1336                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1337                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1338                }
1339
1340                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1341                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1342                }
1343
1344                throw new com.liferay.portal.kernel.exception.SystemException(e);
1345            }
1346        }
1347        catch (com.liferay.portal.kernel.exception.SystemException se) {
1348            _log.error(se, se);
1349
1350            throw se;
1351        }
1352    }
1353
1354    public static void unsetPasswordPolicyUsers(HttpPrincipal httpPrincipal,
1355        long passwordPolicyId, long[] userIds)
1356        throws com.liferay.portal.kernel.exception.PortalException,
1357            com.liferay.portal.kernel.exception.SystemException {
1358        try {
1359            Object paramObj0 = new LongWrapper(passwordPolicyId);
1360
1361            Object paramObj1 = userIds;
1362
1363            if (userIds == null) {
1364                paramObj1 = new NullWrapper("[J");
1365            }
1366
1367            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1368                    "unsetPasswordPolicyUsers",
1369                    new Object[] { paramObj0, paramObj1 });
1370
1371            try {
1372                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1373            }
1374            catch (Exception e) {
1375                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1376                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1377                }
1378
1379                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1380                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1381                }
1382
1383                throw new com.liferay.portal.kernel.exception.SystemException(e);
1384            }
1385        }
1386        catch (com.liferay.portal.kernel.exception.SystemException se) {
1387            _log.error(se, se);
1388
1389            throw se;
1390        }
1391    }
1392
1393    public static void unsetRoleUsers(HttpPrincipal httpPrincipal, long roleId,
1394        long[] userIds)
1395        throws com.liferay.portal.kernel.exception.PortalException,
1396            com.liferay.portal.kernel.exception.SystemException {
1397        try {
1398            Object paramObj0 = new LongWrapper(roleId);
1399
1400            Object paramObj1 = userIds;
1401
1402            if (userIds == null) {
1403                paramObj1 = new NullWrapper("[J");
1404            }
1405
1406            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1407                    "unsetRoleUsers", new Object[] { paramObj0, paramObj1 });
1408
1409            try {
1410                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1411            }
1412            catch (Exception e) {
1413                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1414                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1415                }
1416
1417                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1418                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1419                }
1420
1421                throw new com.liferay.portal.kernel.exception.SystemException(e);
1422            }
1423        }
1424        catch (com.liferay.portal.kernel.exception.SystemException se) {
1425            _log.error(se, se);
1426
1427            throw se;
1428        }
1429    }
1430
1431    public static void unsetTeamUsers(HttpPrincipal httpPrincipal, long teamId,
1432        long[] userIds)
1433        throws com.liferay.portal.kernel.exception.PortalException,
1434            com.liferay.portal.kernel.exception.SystemException {
1435        try {
1436            Object paramObj0 = new LongWrapper(teamId);
1437
1438            Object paramObj1 = userIds;
1439
1440            if (userIds == null) {
1441                paramObj1 = new NullWrapper("[J");
1442            }
1443
1444            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1445                    "unsetTeamUsers", new Object[] { paramObj0, paramObj1 });
1446
1447            try {
1448                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1449            }
1450            catch (Exception e) {
1451                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1452                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1453                }
1454
1455                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1456                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1457                }
1458
1459                throw new com.liferay.portal.kernel.exception.SystemException(e);
1460            }
1461        }
1462        catch (com.liferay.portal.kernel.exception.SystemException se) {
1463            _log.error(se, se);
1464
1465            throw se;
1466        }
1467    }
1468
1469    public static void unsetUserGroupUsers(HttpPrincipal httpPrincipal,
1470        long userGroupId, long[] userIds)
1471        throws com.liferay.portal.kernel.exception.PortalException,
1472            com.liferay.portal.kernel.exception.SystemException {
1473        try {
1474            Object paramObj0 = new LongWrapper(userGroupId);
1475
1476            Object paramObj1 = userIds;
1477
1478            if (userIds == null) {
1479                paramObj1 = new NullWrapper("[J");
1480            }
1481
1482            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1483                    "unsetUserGroupUsers", new Object[] { paramObj0, paramObj1 });
1484
1485            try {
1486                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1487            }
1488            catch (Exception e) {
1489                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1490                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1491                }
1492
1493                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1494                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1495                }
1496
1497                throw new com.liferay.portal.kernel.exception.SystemException(e);
1498            }
1499        }
1500        catch (com.liferay.portal.kernel.exception.SystemException se) {
1501            _log.error(se, se);
1502
1503            throw se;
1504        }
1505    }
1506
1507    public static com.liferay.portal.model.User updateActive(
1508        HttpPrincipal httpPrincipal, long userId, boolean active)
1509        throws com.liferay.portal.kernel.exception.PortalException,
1510            com.liferay.portal.kernel.exception.SystemException {
1511        try {
1512            Object paramObj0 = new LongWrapper(userId);
1513
1514            Object paramObj1 = new BooleanWrapper(active);
1515
1516            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1517                    "updateActive", new Object[] { paramObj0, paramObj1 });
1518
1519            Object returnObj = null;
1520
1521            try {
1522                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1523            }
1524            catch (Exception e) {
1525                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1526                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1527                }
1528
1529                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1530                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1531                }
1532
1533                throw new com.liferay.portal.kernel.exception.SystemException(e);
1534            }
1535
1536            return (com.liferay.portal.model.User)returnObj;
1537        }
1538        catch (com.liferay.portal.kernel.exception.SystemException se) {
1539            _log.error(se, se);
1540
1541            throw se;
1542        }
1543    }
1544
1545    public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
1546        HttpPrincipal httpPrincipal, long userId, boolean agreedToTermsOfUse)
1547        throws com.liferay.portal.kernel.exception.PortalException,
1548            com.liferay.portal.kernel.exception.SystemException {
1549        try {
1550            Object paramObj0 = new LongWrapper(userId);
1551
1552            Object paramObj1 = new BooleanWrapper(agreedToTermsOfUse);
1553
1554            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1555                    "updateAgreedToTermsOfUse",
1556                    new Object[] { paramObj0, paramObj1 });
1557
1558            Object returnObj = null;
1559
1560            try {
1561                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1562            }
1563            catch (Exception e) {
1564                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1565                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1566                }
1567
1568                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1569                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1570                }
1571
1572                throw new com.liferay.portal.kernel.exception.SystemException(e);
1573            }
1574
1575            return (com.liferay.portal.model.User)returnObj;
1576        }
1577        catch (com.liferay.portal.kernel.exception.SystemException se) {
1578            _log.error(se, se);
1579
1580            throw se;
1581        }
1582    }
1583
1584    public static void updateEmailAddress(HttpPrincipal httpPrincipal,
1585        long userId, java.lang.String password, java.lang.String emailAddress1,
1586        java.lang.String emailAddress2)
1587        throws com.liferay.portal.kernel.exception.PortalException,
1588            com.liferay.portal.kernel.exception.SystemException {
1589        try {
1590            Object paramObj0 = new LongWrapper(userId);
1591
1592            Object paramObj1 = password;
1593
1594            if (password == null) {
1595                paramObj1 = new NullWrapper("java.lang.String");
1596            }
1597
1598            Object paramObj2 = emailAddress1;
1599
1600            if (emailAddress1 == null) {
1601                paramObj2 = new NullWrapper("java.lang.String");
1602            }
1603
1604            Object paramObj3 = emailAddress2;
1605
1606            if (emailAddress2 == null) {
1607                paramObj3 = new NullWrapper("java.lang.String");
1608            }
1609
1610            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1611                    "updateEmailAddress",
1612                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1613
1614            try {
1615                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1616            }
1617            catch (Exception e) {
1618                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1619                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1620                }
1621
1622                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1623                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1624                }
1625
1626                throw new com.liferay.portal.kernel.exception.SystemException(e);
1627            }
1628        }
1629        catch (com.liferay.portal.kernel.exception.SystemException se) {
1630            _log.error(se, se);
1631
1632            throw se;
1633        }
1634    }
1635
1636    public static com.liferay.portal.model.User updateLockout(
1637        HttpPrincipal httpPrincipal, long userId, boolean lockout)
1638        throws com.liferay.portal.kernel.exception.PortalException,
1639            com.liferay.portal.kernel.exception.SystemException {
1640        try {
1641            Object paramObj0 = new LongWrapper(userId);
1642
1643            Object paramObj1 = new BooleanWrapper(lockout);
1644
1645            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1646                    "updateLockout", new Object[] { paramObj0, paramObj1 });
1647
1648            Object returnObj = null;
1649
1650            try {
1651                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1652            }
1653            catch (Exception e) {
1654                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1655                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1656                }
1657
1658                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1659                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1660                }
1661
1662                throw new com.liferay.portal.kernel.exception.SystemException(e);
1663            }
1664
1665            return (com.liferay.portal.model.User)returnObj;
1666        }
1667        catch (com.liferay.portal.kernel.exception.SystemException se) {
1668            _log.error(se, se);
1669
1670            throw se;
1671        }
1672    }
1673
1674    public static void updateOpenId(HttpPrincipal httpPrincipal, long userId,
1675        java.lang.String openId)
1676        throws com.liferay.portal.kernel.exception.PortalException,
1677            com.liferay.portal.kernel.exception.SystemException {
1678        try {
1679            Object paramObj0 = new LongWrapper(userId);
1680
1681            Object paramObj1 = openId;
1682
1683            if (openId == null) {
1684                paramObj1 = new NullWrapper("java.lang.String");
1685            }
1686
1687            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1688                    "updateOpenId", new Object[] { paramObj0, paramObj1 });
1689
1690            try {
1691                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1692            }
1693            catch (Exception e) {
1694                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1695                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1696                }
1697
1698                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1699                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1700                }
1701
1702                throw new com.liferay.portal.kernel.exception.SystemException(e);
1703            }
1704        }
1705        catch (com.liferay.portal.kernel.exception.SystemException se) {
1706            _log.error(se, se);
1707
1708            throw se;
1709        }
1710    }
1711
1712    public static void updateOrganizations(HttpPrincipal httpPrincipal,
1713        long userId, long[] organizationIds)
1714        throws com.liferay.portal.kernel.exception.PortalException,
1715            com.liferay.portal.kernel.exception.SystemException {
1716        try {
1717            Object paramObj0 = new LongWrapper(userId);
1718
1719            Object paramObj1 = organizationIds;
1720
1721            if (organizationIds == null) {
1722                paramObj1 = new NullWrapper("[J");
1723            }
1724
1725            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1726                    "updateOrganizations", new Object[] { paramObj0, paramObj1 });
1727
1728            try {
1729                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1730            }
1731            catch (Exception e) {
1732                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1733                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1734                }
1735
1736                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1737                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1738                }
1739
1740                throw new com.liferay.portal.kernel.exception.SystemException(e);
1741            }
1742        }
1743        catch (com.liferay.portal.kernel.exception.SystemException se) {
1744            _log.error(se, se);
1745
1746            throw se;
1747        }
1748    }
1749
1750    public static com.liferay.portal.model.User updatePassword(
1751        HttpPrincipal httpPrincipal, long userId, java.lang.String password1,
1752        java.lang.String password2, boolean passwordReset)
1753        throws com.liferay.portal.kernel.exception.PortalException,
1754            com.liferay.portal.kernel.exception.SystemException {
1755        try {
1756            Object paramObj0 = new LongWrapper(userId);
1757
1758            Object paramObj1 = password1;
1759
1760            if (password1 == null) {
1761                paramObj1 = new NullWrapper("java.lang.String");
1762            }
1763
1764            Object paramObj2 = password2;
1765
1766            if (password2 == null) {
1767                paramObj2 = new NullWrapper("java.lang.String");
1768            }
1769
1770            Object paramObj3 = new BooleanWrapper(passwordReset);
1771
1772            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1773                    "updatePassword",
1774                    new Object[] { paramObj0, paramObj1, paramObj2, paramObj3 });
1775
1776            Object returnObj = null;
1777
1778            try {
1779                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
1780            }
1781            catch (Exception e) {
1782                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1783                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1784                }
1785
1786                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1787                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1788                }
1789
1790                throw new com.liferay.portal.kernel.exception.SystemException(e);
1791            }
1792
1793            return (com.liferay.portal.model.User)returnObj;
1794        }
1795        catch (com.liferay.portal.kernel.exception.SystemException se) {
1796            _log.error(se, se);
1797
1798            throw se;
1799        }
1800    }
1801
1802    public static void updatePortrait(HttpPrincipal httpPrincipal, long userId,
1803        byte[] bytes)
1804        throws com.liferay.portal.kernel.exception.PortalException,
1805            com.liferay.portal.kernel.exception.SystemException {
1806        try {
1807            Object paramObj0 = new LongWrapper(userId);
1808
1809            Object paramObj1 = bytes;
1810
1811            if (bytes == null) {
1812                paramObj1 = new NullWrapper("[B");
1813            }
1814
1815            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1816                    "updatePortrait", new Object[] { paramObj0, paramObj1 });
1817
1818            try {
1819                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1820            }
1821            catch (Exception e) {
1822                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1823                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1824                }
1825
1826                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1827                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1828                }
1829
1830                throw new com.liferay.portal.kernel.exception.SystemException(e);
1831            }
1832        }
1833        catch (com.liferay.portal.kernel.exception.SystemException se) {
1834            _log.error(se, se);
1835
1836            throw se;
1837        }
1838    }
1839
1840    public static void updateReminderQuery(HttpPrincipal httpPrincipal,
1841        long userId, java.lang.String question, java.lang.String answer)
1842        throws com.liferay.portal.kernel.exception.PortalException,
1843            com.liferay.portal.kernel.exception.SystemException {
1844        try {
1845            Object paramObj0 = new LongWrapper(userId);
1846
1847            Object paramObj1 = question;
1848
1849            if (question == null) {
1850                paramObj1 = new NullWrapper("java.lang.String");
1851            }
1852
1853            Object paramObj2 = answer;
1854
1855            if (answer == null) {
1856                paramObj2 = new NullWrapper("java.lang.String");
1857            }
1858
1859            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1860                    "updateReminderQuery",
1861                    new Object[] { paramObj0, paramObj1, paramObj2 });
1862
1863            try {
1864                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1865            }
1866            catch (Exception e) {
1867                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1868                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1869                }
1870
1871                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1872                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1873                }
1874
1875                throw new com.liferay.portal.kernel.exception.SystemException(e);
1876            }
1877        }
1878        catch (com.liferay.portal.kernel.exception.SystemException se) {
1879            _log.error(se, se);
1880
1881            throw se;
1882        }
1883    }
1884
1885    public static void updateScreenName(HttpPrincipal httpPrincipal,
1886        long userId, java.lang.String screenName)
1887        throws com.liferay.portal.kernel.exception.PortalException,
1888            com.liferay.portal.kernel.exception.SystemException {
1889        try {
1890            Object paramObj0 = new LongWrapper(userId);
1891
1892            Object paramObj1 = screenName;
1893
1894            if (screenName == null) {
1895                paramObj1 = new NullWrapper("java.lang.String");
1896            }
1897
1898            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
1899                    "updateScreenName", new Object[] { paramObj0, paramObj1 });
1900
1901            try {
1902                TunnelUtil.invoke(httpPrincipal, methodWrapper);
1903            }
1904            catch (Exception e) {
1905                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
1906                    throw (com.liferay.portal.kernel.exception.PortalException)e;
1907                }
1908
1909                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
1910                    throw (com.liferay.portal.kernel.exception.SystemException)e;
1911                }
1912
1913                throw new com.liferay.portal.kernel.exception.SystemException(e);
1914            }
1915        }
1916        catch (com.liferay.portal.kernel.exception.SystemException se) {
1917            _log.error(se, se);
1918
1919            throw se;
1920        }
1921    }
1922
1923    public static com.liferay.portal.model.User updateUser(
1924        HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
1925        java.lang.String newPassword1, java.lang.String newPassword2,
1926        boolean passwordReset, java.lang.String reminderQueryQuestion,
1927        java.lang.String reminderQueryAnswer, java.lang.String screenName,
1928        java.lang.String emailAddress, java.lang.String openId,
1929        java.lang.String languageId, java.lang.String timeZoneId,
1930        java.lang.String greeting, java.lang.String comments,
1931        java.lang.String firstName, java.lang.String middleName,
1932        java.lang.String lastName, int prefixId, int suffixId, boolean male,
1933        int birthdayMonth, int birthdayDay, int birthdayYear,
1934        java.lang.String smsSn, java.lang.String aimSn,
1935        java.lang.String facebookSn, java.lang.String icqSn,
1936        java.lang.String jabberSn, java.lang.String msnSn,
1937        java.lang.String mySpaceSn, java.lang.String skypeSn,
1938        java.lang.String twitterSn, java.lang.String ymSn,
1939        java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1940        long[] roleIds,
1941        java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1942        long[] userGroupIds,
1943        com.liferay.portal.service.ServiceContext serviceContext)
1944        throws com.liferay.portal.kernel.exception.PortalException,
1945            com.liferay.portal.kernel.exception.SystemException {
1946        try {
1947            Object paramObj0 = new LongWrapper(userId);
1948
1949            Object paramObj1 = oldPassword;
1950
1951            if (oldPassword == null) {
1952                paramObj1 = new NullWrapper("java.lang.String");
1953            }
1954
1955            Object paramObj2 = newPassword1;
1956
1957            if (newPassword1 == null) {
1958                paramObj2 = new NullWrapper("java.lang.String");
1959            }
1960
1961            Object paramObj3 = newPassword2;
1962
1963            if (newPassword2 == null) {
1964                paramObj3 = new NullWrapper("java.lang.String");
1965            }
1966
1967            Object paramObj4 = new BooleanWrapper(passwordReset);
1968
1969            Object paramObj5 = reminderQueryQuestion;
1970
1971            if (reminderQueryQuestion == null) {
1972                paramObj5 = new NullWrapper("java.lang.String");
1973            }
1974
1975            Object paramObj6 = reminderQueryAnswer;
1976
1977            if (reminderQueryAnswer == null) {
1978                paramObj6 = new NullWrapper("java.lang.String");
1979            }
1980
1981            Object paramObj7 = screenName;
1982
1983            if (screenName == null) {
1984                paramObj7 = new NullWrapper("java.lang.String");
1985            }
1986
1987            Object paramObj8 = emailAddress;
1988
1989            if (emailAddress == null) {
1990                paramObj8 = new NullWrapper("java.lang.String");
1991            }
1992
1993            Object paramObj9 = openId;
1994
1995            if (openId == null) {
1996                paramObj9 = new NullWrapper("java.lang.String");
1997            }
1998
1999            Object paramObj10 = languageId;
2000
2001            if (languageId == null) {
2002                paramObj10 = new NullWrapper("java.lang.String");
2003            }
2004
2005            Object paramObj11 = timeZoneId;
2006
2007            if (timeZoneId == null) {
2008                paramObj11 = new NullWrapper("java.lang.String");
2009            }
2010
2011            Object paramObj12 = greeting;
2012
2013            if (greeting == null) {
2014                paramObj12 = new NullWrapper("java.lang.String");
2015            }
2016
2017            Object paramObj13 = comments;
2018
2019            if (comments == null) {
2020                paramObj13 = new NullWrapper("java.lang.String");
2021            }
2022
2023            Object paramObj14 = firstName;
2024
2025            if (firstName == null) {
2026                paramObj14 = new NullWrapper("java.lang.String");
2027            }
2028
2029            Object paramObj15 = middleName;
2030
2031            if (middleName == null) {
2032                paramObj15 = new NullWrapper("java.lang.String");
2033            }
2034
2035            Object paramObj16 = lastName;
2036
2037            if (lastName == null) {
2038                paramObj16 = new NullWrapper("java.lang.String");
2039            }
2040
2041            Object paramObj17 = new IntegerWrapper(prefixId);
2042
2043            Object paramObj18 = new IntegerWrapper(suffixId);
2044
2045            Object paramObj19 = new BooleanWrapper(male);
2046
2047            Object paramObj20 = new IntegerWrapper(birthdayMonth);
2048
2049            Object paramObj21 = new IntegerWrapper(birthdayDay);
2050
2051            Object paramObj22 = new IntegerWrapper(birthdayYear);
2052
2053            Object paramObj23 = smsSn;
2054
2055            if (smsSn == null) {
2056                paramObj23 = new NullWrapper("java.lang.String");
2057            }
2058
2059            Object paramObj24 = aimSn;
2060
2061            if (aimSn == null) {
2062                paramObj24 = new NullWrapper("java.lang.String");
2063            }
2064
2065            Object paramObj25 = facebookSn;
2066
2067            if (facebookSn == null) {
2068                paramObj25 = new NullWrapper("java.lang.String");
2069            }
2070
2071            Object paramObj26 = icqSn;
2072
2073            if (icqSn == null) {
2074                paramObj26 = new NullWrapper("java.lang.String");
2075            }
2076
2077            Object paramObj27 = jabberSn;
2078
2079            if (jabberSn == null) {
2080                paramObj27 = new NullWrapper("java.lang.String");
2081            }
2082
2083            Object paramObj28 = msnSn;
2084
2085            if (msnSn == null) {
2086                paramObj28 = new NullWrapper("java.lang.String");
2087            }
2088
2089            Object paramObj29 = mySpaceSn;
2090
2091            if (mySpaceSn == null) {
2092                paramObj29 = new NullWrapper("java.lang.String");
2093            }
2094
2095            Object paramObj30 = skypeSn;
2096
2097            if (skypeSn == null) {
2098                paramObj30 = new NullWrapper("java.lang.String");
2099            }
2100
2101            Object paramObj31 = twitterSn;
2102
2103            if (twitterSn == null) {
2104                paramObj31 = new NullWrapper("java.lang.String");
2105            }
2106
2107            Object paramObj32 = ymSn;
2108
2109            if (ymSn == null) {
2110                paramObj32 = new NullWrapper("java.lang.String");
2111            }
2112
2113            Object paramObj33 = jobTitle;
2114
2115            if (jobTitle == null) {
2116                paramObj33 = new NullWrapper("java.lang.String");
2117            }
2118
2119            Object paramObj34 = groupIds;
2120
2121            if (groupIds == null) {
2122                paramObj34 = new NullWrapper("[J");
2123            }
2124
2125            Object paramObj35 = organizationIds;
2126
2127            if (organizationIds == null) {
2128                paramObj35 = new NullWrapper("[J");
2129            }
2130
2131            Object paramObj36 = roleIds;
2132
2133            if (roleIds == null) {
2134                paramObj36 = new NullWrapper("[J");
2135            }
2136
2137            Object paramObj37 = userGroupRoles;
2138
2139            if (userGroupRoles == null) {
2140                paramObj37 = new NullWrapper("java.util.List");
2141            }
2142
2143            Object paramObj38 = userGroupIds;
2144
2145            if (userGroupIds == null) {
2146                paramObj38 = new NullWrapper("[J");
2147            }
2148
2149            Object paramObj39 = serviceContext;
2150
2151            if (serviceContext == null) {
2152                paramObj39 = new NullWrapper(
2153                        "com.liferay.portal.service.ServiceContext");
2154            }
2155
2156            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
2157                    "updateUser",
2158                    new Object[] {
2159                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
2160                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
2161                        paramObj10, paramObj11, paramObj12, paramObj13,
2162                        paramObj14, paramObj15, paramObj16, paramObj17,
2163                        paramObj18, paramObj19, paramObj20, paramObj21,
2164                        paramObj22, paramObj23, paramObj24, paramObj25,
2165                        paramObj26, paramObj27, paramObj28, paramObj29,
2166                        paramObj30, paramObj31, paramObj32, paramObj33,
2167                        paramObj34, paramObj35, paramObj36, paramObj37,
2168                        paramObj38, paramObj39
2169                    });
2170
2171            Object returnObj = null;
2172
2173            try {
2174                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
2175            }
2176            catch (Exception e) {
2177                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
2178                    throw (com.liferay.portal.kernel.exception.PortalException)e;
2179                }
2180
2181                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
2182                    throw (com.liferay.portal.kernel.exception.SystemException)e;
2183                }
2184
2185                throw new com.liferay.portal.kernel.exception.SystemException(e);
2186            }
2187
2188            return (com.liferay.portal.model.User)returnObj;
2189        }
2190        catch (com.liferay.portal.kernel.exception.SystemException se) {
2191            _log.error(se, se);
2192
2193            throw se;
2194        }
2195    }
2196
2197    public static com.liferay.portal.model.User updateUser(
2198        HttpPrincipal httpPrincipal, long userId, java.lang.String oldPassword,
2199        java.lang.String newPassword1, java.lang.String newPassword2,
2200        boolean passwordReset, java.lang.String reminderQueryQuestion,
2201        java.lang.String reminderQueryAnswer, java.lang.String screenName,
2202        java.lang.String emailAddress, java.lang.String openId,
2203        java.lang.String languageId, java.lang.String timeZoneId,
2204        java.lang.String greeting, java.lang.String comments,
2205        java.lang.String firstName, java.lang.String middleName,
2206        java.lang.String lastName, int prefixId, int suffixId, boolean male,
2207        int birthdayMonth, int birthdayDay, int birthdayYear,
2208        java.lang.String smsSn, java.lang.String aimSn,
2209        java.lang.String facebookSn, java.lang.String icqSn,
2210        java.lang.String jabberSn, java.lang.String msnSn,
2211        java.lang.String mySpaceSn, java.lang.String skypeSn,
2212        java.lang.String twitterSn, java.lang.String ymSn,
2213        java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
2214        long[] roleIds,
2215        java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
2216        long[] userGroupIds,
2217        java.util.List<com.liferay.portal.model.Address> addresses,
2218        java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
2219        java.util.List<com.liferay.portal.model.Phone> phones,
2220        java.util.List<com.liferay.portal.model.Website> websites,
2221        java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
2222        com.liferay.portal.service.ServiceContext serviceContext)
2223        throws com.liferay.portal.kernel.exception.PortalException,
2224            com.liferay.portal.kernel.exception.SystemException {
2225        try {
2226            Object paramObj0 = new LongWrapper(userId);
2227
2228            Object paramObj1 = oldPassword;
2229
2230            if (oldPassword == null) {
2231                paramObj1 = new NullWrapper("java.lang.String");
2232            }
2233
2234            Object paramObj2 = newPassword1;
2235
2236            if (newPassword1 == null) {
2237                paramObj2 = new NullWrapper("java.lang.String");
2238            }
2239
2240            Object paramObj3 = newPassword2;
2241
2242            if (newPassword2 == null) {
2243                paramObj3 = new NullWrapper("java.lang.String");
2244            }
2245
2246            Object paramObj4 = new BooleanWrapper(passwordReset);
2247
2248            Object paramObj5 = reminderQueryQuestion;
2249
2250            if (reminderQueryQuestion == null) {
2251                paramObj5 = new NullWrapper("java.lang.String");
2252            }
2253
2254            Object paramObj6 = reminderQueryAnswer;
2255
2256            if (reminderQueryAnswer == null) {
2257                paramObj6 = new NullWrapper("java.lang.String");
2258            }
2259
2260            Object paramObj7 = screenName;
2261
2262            if (screenName == null) {
2263                paramObj7 = new NullWrapper("java.lang.String");
2264            }
2265
2266            Object paramObj8 = emailAddress;
2267
2268            if (emailAddress == null) {
2269                paramObj8 = new NullWrapper("java.lang.String");
2270            }
2271
2272            Object paramObj9 = openId;
2273
2274            if (openId == null) {
2275                paramObj9 = new NullWrapper("java.lang.String");
2276            }
2277
2278            Object paramObj10 = languageId;
2279
2280            if (languageId == null) {
2281                paramObj10 = new NullWrapper("java.lang.String");
2282            }
2283
2284            Object paramObj11 = timeZoneId;
2285
2286            if (timeZoneId == null) {
2287                paramObj11 = new NullWrapper("java.lang.String");
2288            }
2289
2290            Object paramObj12 = greeting;
2291
2292            if (greeting == null) {
2293                paramObj12 = new NullWrapper("java.lang.String");
2294            }
2295
2296            Object paramObj13 = comments;
2297
2298            if (comments == null) {
2299                paramObj13 = new NullWrapper("java.lang.String");
2300            }
2301
2302            Object paramObj14 = firstName;
2303
2304            if (firstName == null) {
2305                paramObj14 = new NullWrapper("java.lang.String");
2306            }
2307
2308            Object paramObj15 = middleName;
2309
2310            if (middleName == null) {
2311                paramObj15 = new NullWrapper("java.lang.String");
2312            }
2313
2314            Object paramObj16 = lastName;
2315
2316            if (lastName == null) {
2317                paramObj16 = new NullWrapper("java.lang.String");
2318            }
2319
2320            Object paramObj17 = new IntegerWrapper(prefixId);
2321
2322            Object paramObj18 = new IntegerWrapper(suffixId);
2323
2324            Object paramObj19 = new BooleanWrapper(male);
2325
2326            Object paramObj20 = new IntegerWrapper(birthdayMonth);
2327
2328            Object paramObj21 = new IntegerWrapper(birthdayDay);
2329
2330            Object paramObj22 = new IntegerWrapper(birthdayYear);
2331
2332            Object paramObj23 = smsSn;
2333
2334            if (smsSn == null) {
2335                paramObj23 = new NullWrapper("java.lang.String");
2336            }
2337
2338            Object paramObj24 = aimSn;
2339
2340            if (aimSn == null) {
2341                paramObj24 = new NullWrapper("java.lang.String");
2342            }
2343
2344            Object paramObj25 = facebookSn;
2345
2346            if (facebookSn == null) {
2347                paramObj25 = new NullWrapper("java.lang.String");
2348            }
2349
2350            Object paramObj26 = icqSn;
2351
2352            if (icqSn == null) {
2353                paramObj26 = new NullWrapper("java.lang.String");
2354            }
2355
2356            Object paramObj27 = jabberSn;
2357
2358            if (jabberSn == null) {
2359                paramObj27 = new NullWrapper("java.lang.String");
2360            }
2361
2362            Object paramObj28 = msnSn;
2363
2364            if (msnSn == null) {
2365                paramObj28 = new NullWrapper("java.lang.String");
2366            }
2367
2368            Object paramObj29 = mySpaceSn;
2369
2370            if (mySpaceSn == null) {
2371                paramObj29 = new NullWrapper("java.lang.String");
2372            }
2373
2374            Object paramObj30 = skypeSn;
2375
2376            if (skypeSn == null) {
2377                paramObj30 = new NullWrapper("java.lang.String");
2378            }
2379
2380            Object paramObj31 = twitterSn;
2381
2382            if (twitterSn == null) {
2383                paramObj31 = new NullWrapper("java.lang.String");
2384            }
2385
2386            Object paramObj32 = ymSn;
2387
2388            if (ymSn == null) {
2389                paramObj32 = new NullWrapper("java.lang.String");
2390            }
2391
2392            Object paramObj33 = jobTitle;
2393
2394            if (jobTitle == null) {
2395                paramObj33 = new NullWrapper("java.lang.String");
2396            }
2397
2398            Object paramObj34 = groupIds;
2399
2400            if (groupIds == null) {
2401                paramObj34 = new NullWrapper("[J");
2402            }
2403
2404            Object paramObj35 = organizationIds;
2405
2406            if (organizationIds == null) {
2407                paramObj35 = new NullWrapper("[J");
2408            }
2409
2410            Object paramObj36 = roleIds;
2411
2412            if (roleIds == null) {
2413                paramObj36 = new NullWrapper("[J");
2414            }
2415
2416            Object paramObj37 = userGroupRoles;
2417
2418            if (userGroupRoles == null) {
2419                paramObj37 = new NullWrapper("java.util.List");
2420            }
2421
2422            Object paramObj38 = userGroupIds;
2423
2424            if (userGroupIds == null) {
2425                paramObj38 = new NullWrapper("[J");
2426            }
2427
2428            Object paramObj39 = addresses;
2429
2430            if (addresses == null) {
2431                paramObj39 = new NullWrapper("java.util.List");
2432            }
2433
2434            Object paramObj40 = emailAddresses;
2435
2436            if (emailAddresses == null) {
2437                paramObj40 = new NullWrapper("java.util.List");
2438            }
2439
2440            Object paramObj41 = phones;
2441
2442            if (phones == null) {
2443                paramObj41 = new NullWrapper("java.util.List");
2444            }
2445
2446            Object paramObj42 = websites;
2447
2448            if (websites == null) {
2449                paramObj42 = new NullWrapper("java.util.List");
2450            }
2451
2452            Object paramObj43 = announcementsDelivers;
2453
2454            if (announcementsDelivers == null) {
2455                paramObj43 = new NullWrapper("java.util.List");
2456            }
2457
2458            Object paramObj44 = serviceContext;
2459
2460            if (serviceContext == null) {
2461                paramObj44 = new NullWrapper(
2462                        "com.liferay.portal.service.ServiceContext");
2463            }
2464
2465            MethodWrapper methodWrapper = new MethodWrapper(UserServiceUtil.class.getName(),
2466                    "updateUser",
2467                    new Object[] {
2468                        paramObj0, paramObj1, paramObj2, paramObj3, paramObj4,
2469                        paramObj5, paramObj6, paramObj7, paramObj8, paramObj9,
2470                        paramObj10, paramObj11, paramObj12, paramObj13,
2471                        paramObj14, paramObj15, paramObj16, paramObj17,
2472                        paramObj18, paramObj19, paramObj20, paramObj21,
2473                        paramObj22, paramObj23, paramObj24, paramObj25,
2474                        paramObj26, paramObj27, paramObj28, paramObj29,
2475                        paramObj30, paramObj31, paramObj32, paramObj33,
2476                        paramObj34, paramObj35, paramObj36, paramObj37,
2477                        paramObj38, paramObj39, paramObj40, paramObj41,
2478                        paramObj42, paramObj43, paramObj44
2479                    });
2480
2481            Object returnObj = null;
2482
2483            try {
2484                returnObj = TunnelUtil.invoke(httpPrincipal, methodWrapper);
2485            }
2486            catch (Exception e) {
2487                if (e instanceof com.liferay.portal.kernel.exception.PortalException) {
2488                    throw (com.liferay.portal.kernel.exception.PortalException)e;
2489                }
2490
2491                if (e instanceof com.liferay.portal.kernel.exception.SystemException) {
2492                    throw (com.liferay.portal.kernel.exception.SystemException)e;
2493                }
2494
2495                throw new com.liferay.portal.kernel.exception.SystemException(e);
2496            }
2497
2498            return (com.liferay.portal.model.User)returnObj;
2499        }
2500        catch (com.liferay.portal.kernel.exception.SystemException se) {
2501            _log.error(se, se);
2502
2503            throw se;
2504        }
2505    }
2506
2507    private static Log _log = LogFactoryUtil.getLog(UserServiceHttp.class);
2508}