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