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