001    /**
002     * Copyright (c) 2000-present 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 aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.log.Log;
020    import com.liferay.portal.kernel.log.LogFactoryUtil;
021    import com.liferay.portal.kernel.util.LocaleUtil;
022    import com.liferay.portal.service.UserServiceUtil;
023    
024    import java.rmi.RemoteException;
025    
026    /**
027     * Provides the SOAP utility for the
028     * {@link UserServiceUtil} service utility. The
029     * static methods of this class calls the same methods of the service utility.
030     * However, the signatures are different because it is difficult for SOAP to
031     * support certain types.
032     *
033     * <p>
034     * ServiceBuilder follows certain rules in translating the methods. For example,
035     * if the method in the service utility returns a {@link java.util.List}, that
036     * is translated to an array of {@link com.liferay.portal.model.UserSoap}.
037     * If the method in the service utility returns a
038     * {@link com.liferay.portal.model.User}, that is translated to a
039     * {@link com.liferay.portal.model.UserSoap}. Methods that SOAP cannot
040     * safely wire are skipped.
041     * </p>
042     *
043     * <p>
044     * The benefits of using the SOAP utility is that it is cross platform
045     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
046     * even Perl, to call the generated services. One drawback of SOAP is that it is
047     * slow because it needs to serialize all calls into a text format (XML).
048     * </p>
049     *
050     * <p>
051     * You can see a list of services at http://localhost:8080/api/axis. Set the
052     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
053     * security.
054     * </p>
055     *
056     * <p>
057     * The SOAP utility is only generated for remote services.
058     * </p>
059     *
060     * @author Brian Wing Shun Chan
061     * @see UserServiceHttp
062     * @see com.liferay.portal.model.UserSoap
063     * @see UserServiceUtil
064     * @generated
065     */
066    @ProviderType
067    public class UserServiceSoap {
068            /**
069            * Adds the users to the group.
070            *
071            * @param groupId the primary key of the group
072            * @param userIds the primary keys of the users
073            * @param serviceContext the service context to be applied (optionally
074            <code>null</code>)
075            */
076            public static void addGroupUsers(long groupId, long[] userIds,
077                    com.liferay.portal.service.ServiceContext serviceContext)
078                    throws RemoteException {
079                    try {
080                            UserServiceUtil.addGroupUsers(groupId, userIds, serviceContext);
081                    }
082                    catch (Exception e) {
083                            _log.error(e, e);
084    
085                            throw new RemoteException(e.getMessage());
086                    }
087            }
088    
089            /**
090            * Adds the users to the organization.
091            *
092            * @param organizationId the primary key of the organization
093            * @param userIds the primary keys of the users
094            */
095            public static void addOrganizationUsers(long organizationId, long[] userIds)
096                    throws RemoteException {
097                    try {
098                            UserServiceUtil.addOrganizationUsers(organizationId, userIds);
099                    }
100                    catch (Exception e) {
101                            _log.error(e, e);
102    
103                            throw new RemoteException(e.getMessage());
104                    }
105            }
106    
107            /**
108            * Assigns the password policy to the users, removing any other currently
109            * assigned password policies.
110            *
111            * @param passwordPolicyId the primary key of the password policy
112            * @param userIds the primary keys of the users
113            */
114            public static void addPasswordPolicyUsers(long passwordPolicyId,
115                    long[] userIds) throws RemoteException {
116                    try {
117                            UserServiceUtil.addPasswordPolicyUsers(passwordPolicyId, userIds);
118                    }
119                    catch (Exception e) {
120                            _log.error(e, e);
121    
122                            throw new RemoteException(e.getMessage());
123                    }
124            }
125    
126            /**
127            * Adds the users to the role.
128            *
129            * @param roleId the primary key of the role
130            * @param userIds the primary keys of the users
131            */
132            public static void addRoleUsers(long roleId, long[] userIds)
133                    throws RemoteException {
134                    try {
135                            UserServiceUtil.addRoleUsers(roleId, userIds);
136                    }
137                    catch (Exception e) {
138                            _log.error(e, e);
139    
140                            throw new RemoteException(e.getMessage());
141                    }
142            }
143    
144            /**
145            * Adds the users to the team.
146            *
147            * @param teamId the primary key of the team
148            * @param userIds the primary keys of the users
149            */
150            public static void addTeamUsers(long teamId, long[] userIds)
151                    throws RemoteException {
152                    try {
153                            UserServiceUtil.addTeamUsers(teamId, userIds);
154                    }
155                    catch (Exception e) {
156                            _log.error(e, e);
157    
158                            throw new RemoteException(e.getMessage());
159                    }
160            }
161    
162            /**
163            * Adds a user.
164            *
165            * <p>
166            * This method handles the creation and bookkeeping of the user including
167            * its resources, metadata, and internal data structures. It is not
168            * necessary to make subsequent calls to any methods to setup default
169            * groups, resources, etc.
170            * </p>
171            *
172            * @param companyId the primary key of the user's company
173            * @param autoPassword whether a password should be automatically generated
174            for the user
175            * @param password1 the user's password
176            * @param password2 the user's password confirmation
177            * @param autoScreenName whether a screen name should be automatically
178            generated for the user
179            * @param screenName the user's screen name
180            * @param emailAddress the user's email address
181            * @param facebookId the user's facebook ID
182            * @param openId the user's OpenID
183            * @param locale the user's locale
184            * @param firstName the user's first name
185            * @param middleName the user's middle name
186            * @param lastName the user's last name
187            * @param prefixId the user's name prefix ID
188            * @param suffixId the user's name suffix ID
189            * @param male whether the user is male
190            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
191            January)
192            * @param birthdayDay the user's birthday day
193            * @param birthdayYear the user's birthday year
194            * @param jobTitle the user's job title
195            * @param groupIds the primary keys of the user's groups
196            * @param organizationIds the primary keys of the user's organizations
197            * @param roleIds the primary keys of the roles this user possesses
198            * @param userGroupIds the primary keys of the user's user groups
199            * @param sendEmail whether to send the user an email notification about
200            their new account
201            * @param serviceContext the service context to be applied (optionally
202            <code>null</code>). Can set the UUID (with the <code>uuid</code>
203            attribute), asset category IDs, asset tag names, and expando
204            bridge attributes for the user.
205            * @return the new user
206            */
207            public static com.liferay.portal.model.UserSoap addUser(long companyId,
208                    boolean autoPassword, java.lang.String password1,
209                    java.lang.String password2, boolean autoScreenName,
210                    java.lang.String screenName, java.lang.String emailAddress,
211                    long facebookId, java.lang.String openId, String locale,
212                    java.lang.String firstName, java.lang.String middleName,
213                    java.lang.String lastName, long prefixId, long suffixId, boolean male,
214                    int birthdayMonth, int birthdayDay, int birthdayYear,
215                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
216                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
217                    com.liferay.portal.service.ServiceContext serviceContext)
218                    throws RemoteException {
219                    try {
220                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
221                                            autoPassword, password1, password2, autoScreenName,
222                                            screenName, emailAddress, facebookId, openId,
223                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
224                                            lastName, prefixId, suffixId, male, birthdayMonth,
225                                            birthdayDay, birthdayYear, jobTitle, groupIds,
226                                            organizationIds, roleIds, userGroupIds, sendEmail,
227                                            serviceContext);
228    
229                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
230                    }
231                    catch (Exception e) {
232                            _log.error(e, e);
233    
234                            throw new RemoteException(e.getMessage());
235                    }
236            }
237    
238            /**
239            * Adds a user with additional parameters.
240            *
241            * <p>
242            * This method handles the creation and bookkeeping of the user including
243            * its resources, metadata, and internal data structures. It is not
244            * necessary to make subsequent calls to any methods to setup default
245            * groups, resources, etc.
246            * </p>
247            *
248            * @param companyId the primary key of the user's company
249            * @param autoPassword whether a password should be automatically generated
250            for the user
251            * @param password1 the user's password
252            * @param password2 the user's password confirmation
253            * @param autoScreenName whether a screen name should be automatically
254            generated for the user
255            * @param screenName the user's screen name
256            * @param emailAddress the user's email address
257            * @param facebookId the user's facebook ID
258            * @param openId the user's OpenID
259            * @param locale the user's locale
260            * @param firstName the user's first name
261            * @param middleName the user's middle name
262            * @param lastName the user's last name
263            * @param prefixId the user's name prefix ID
264            * @param suffixId the user's name suffix ID
265            * @param male whether the user is male
266            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
267            January)
268            * @param birthdayDay the user's birthday day
269            * @param birthdayYear the user's birthday year
270            * @param jobTitle the user's job title
271            * @param groupIds the primary keys of the user's groups
272            * @param organizationIds the primary keys of the user's organizations
273            * @param roleIds the primary keys of the roles this user possesses
274            * @param userGroupIds the primary keys of the user's user groups
275            * @param addresses the user's addresses
276            * @param emailAddresses the user's email addresses
277            * @param phones the user's phone numbers
278            * @param websites the user's websites
279            * @param announcementsDelivers the announcements deliveries
280            * @param sendEmail whether to send the user an email notification about
281            their new account
282            * @param serviceContext the service context to be applied (optionally
283            <code>null</code>). Can set the UUID (with the <code>uuid</code>
284            attribute), asset category IDs, asset tag names, and expando
285            bridge attributes for the user.
286            * @return the new user
287            */
288            public static com.liferay.portal.model.UserSoap addUser(long companyId,
289                    boolean autoPassword, java.lang.String password1,
290                    java.lang.String password2, boolean autoScreenName,
291                    java.lang.String screenName, java.lang.String emailAddress,
292                    long facebookId, java.lang.String openId, String locale,
293                    java.lang.String firstName, java.lang.String middleName,
294                    java.lang.String lastName, long prefixId, long suffixId, boolean male,
295                    int birthdayMonth, int birthdayDay, int birthdayYear,
296                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
297                    long[] roleIds, long[] userGroupIds,
298                    com.liferay.portal.model.AddressSoap[] addresses,
299                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
300                    com.liferay.portal.model.PhoneSoap[] phones,
301                    com.liferay.portal.model.WebsiteSoap[] websites,
302                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
303                    boolean sendEmail,
304                    com.liferay.portal.service.ServiceContext serviceContext)
305                    throws RemoteException {
306                    try {
307                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
308                                            autoPassword, password1, password2, autoScreenName,
309                                            screenName, emailAddress, facebookId, openId,
310                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
311                                            lastName, prefixId, suffixId, male, birthdayMonth,
312                                            birthdayDay, birthdayYear, jobTitle, groupIds,
313                                            organizationIds, roleIds, userGroupIds,
314                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
315                                                    addresses),
316                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
317                                                    emailAddresses),
318                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
319                                                    phones),
320                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
321                                                    websites),
322                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
323                                                    announcementsDelivers), sendEmail, serviceContext);
324    
325                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
326                    }
327                    catch (Exception e) {
328                            _log.error(e, e);
329    
330                            throw new RemoteException(e.getMessage());
331                    }
332            }
333    
334            /**
335            * Adds the users to the user group.
336            *
337            * @param userGroupId the primary key of the user group
338            * @param userIds the primary keys of the users
339            */
340            public static void addUserGroupUsers(long userGroupId, long[] userIds)
341                    throws RemoteException {
342                    try {
343                            UserServiceUtil.addUserGroupUsers(userGroupId, userIds);
344                    }
345                    catch (Exception e) {
346                            _log.error(e, e);
347    
348                            throw new RemoteException(e.getMessage());
349                    }
350            }
351    
352            /**
353            * Adds a user with workflow.
354            *
355            * <p>
356            * This method handles the creation and bookkeeping of the user including
357            * its resources, metadata, and internal data structures. It is not
358            * necessary to make subsequent calls to any methods to setup default
359            * groups, resources, etc.
360            * </p>
361            *
362            * @param companyId the primary key of the user's company
363            * @param autoPassword whether a password should be automatically generated
364            for the user
365            * @param password1 the user's password
366            * @param password2 the user's password confirmation
367            * @param autoScreenName whether a screen name should be automatically
368            generated for the user
369            * @param screenName the user's screen name
370            * @param emailAddress the user's email address
371            * @param facebookId the user's facebook ID
372            * @param openId the user's OpenID
373            * @param locale the user's locale
374            * @param firstName the user's first name
375            * @param middleName the user's middle name
376            * @param lastName the user's last name
377            * @param prefixId the user's name prefix ID
378            * @param suffixId the user's name suffix ID
379            * @param male whether the user is male
380            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
381            January)
382            * @param birthdayDay the user's birthday day
383            * @param birthdayYear the user's birthday year
384            * @param jobTitle the user's job title
385            * @param groupIds the primary keys of the user's groups
386            * @param organizationIds the primary keys of the user's organizations
387            * @param roleIds the primary keys of the roles this user possesses
388            * @param userGroupIds the primary keys of the user's user groups
389            * @param sendEmail whether to send the user an email notification about
390            their new account
391            * @param serviceContext the service context to be applied (optionally
392            <code>null</code>). Can set the UUID (with the <code>uuid</code>
393            attribute), asset category IDs, asset tag names, and expando
394            bridge attributes for the user.
395            * @return the new user
396            */
397            public static com.liferay.portal.model.UserSoap addUserWithWorkflow(
398                    long companyId, boolean autoPassword, java.lang.String password1,
399                    java.lang.String password2, boolean autoScreenName,
400                    java.lang.String screenName, java.lang.String emailAddress,
401                    long facebookId, java.lang.String openId, String locale,
402                    java.lang.String firstName, java.lang.String middleName,
403                    java.lang.String lastName, long prefixId, long suffixId, boolean male,
404                    int birthdayMonth, int birthdayDay, int birthdayYear,
405                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
406                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
407                    com.liferay.portal.service.ServiceContext serviceContext)
408                    throws RemoteException {
409                    try {
410                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId,
411                                            autoPassword, password1, password2, autoScreenName,
412                                            screenName, emailAddress, facebookId, openId,
413                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
414                                            lastName, prefixId, suffixId, male, birthdayMonth,
415                                            birthdayDay, birthdayYear, jobTitle, groupIds,
416                                            organizationIds, roleIds, userGroupIds, sendEmail,
417                                            serviceContext);
418    
419                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
420                    }
421                    catch (Exception e) {
422                            _log.error(e, e);
423    
424                            throw new RemoteException(e.getMessage());
425                    }
426            }
427    
428            /**
429            * Adds a user with workflow and additional parameters.
430            *
431            * <p>
432            * This method handles the creation and bookkeeping of the user including
433            * its resources, metadata, and internal data structures. It is not
434            * necessary to make subsequent calls to any methods to setup default
435            * groups, resources, etc.
436            * </p>
437            *
438            * @param companyId the primary key of the user's company
439            * @param autoPassword whether a password should be automatically generated
440            for the user
441            * @param password1 the user's password
442            * @param password2 the user's password confirmation
443            * @param autoScreenName whether a screen name should be automatically
444            generated for the user
445            * @param screenName the user's screen name
446            * @param emailAddress the user's email address
447            * @param facebookId the user's facebook ID
448            * @param openId the user's OpenID
449            * @param locale the user's locale
450            * @param firstName the user's first name
451            * @param middleName the user's middle name
452            * @param lastName the user's last name
453            * @param prefixId the user's name prefix ID
454            * @param suffixId the user's name suffix ID
455            * @param male whether the user is male
456            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
457            January)
458            * @param birthdayDay the user's birthday day
459            * @param birthdayYear the user's birthday year
460            * @param jobTitle the user's job title
461            * @param groupIds the primary keys of the user's groups
462            * @param organizationIds the primary keys of the user's organizations
463            * @param roleIds the primary keys of the roles this user possesses
464            * @param userGroupIds the primary keys of the user's user groups
465            * @param addresses the user's addresses
466            * @param emailAddresses the user's email addresses
467            * @param phones the user's phone numbers
468            * @param websites the user's websites
469            * @param announcementsDelivers the announcements deliveries
470            * @param sendEmail whether to send the user an email notification about
471            their new account
472            * @param serviceContext the service context to be applied (optionally
473            <code>null</code>). Can set the UUID (with the <code>uuid</code>
474            attribute), asset category IDs, asset tag names, and expando
475            bridge attributes for the user.
476            * @return the new user
477            */
478            public static com.liferay.portal.model.UserSoap addUserWithWorkflow(
479                    long companyId, boolean autoPassword, java.lang.String password1,
480                    java.lang.String password2, boolean autoScreenName,
481                    java.lang.String screenName, java.lang.String emailAddress,
482                    long facebookId, java.lang.String openId, String locale,
483                    java.lang.String firstName, java.lang.String middleName,
484                    java.lang.String lastName, long prefixId, long suffixId, boolean male,
485                    int birthdayMonth, int birthdayDay, int birthdayYear,
486                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
487                    long[] roleIds, long[] userGroupIds,
488                    com.liferay.portal.model.AddressSoap[] addresses,
489                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
490                    com.liferay.portal.model.PhoneSoap[] phones,
491                    com.liferay.portal.model.WebsiteSoap[] websites,
492                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
493                    boolean sendEmail,
494                    com.liferay.portal.service.ServiceContext serviceContext)
495                    throws RemoteException {
496                    try {
497                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId,
498                                            autoPassword, password1, password2, autoScreenName,
499                                            screenName, emailAddress, facebookId, openId,
500                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
501                                            lastName, prefixId, suffixId, male, birthdayMonth,
502                                            birthdayDay, birthdayYear, jobTitle, groupIds,
503                                            organizationIds, roleIds, userGroupIds,
504                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
505                                                    addresses),
506                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
507                                                    emailAddresses),
508                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
509                                                    phones),
510                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
511                                                    websites),
512                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
513                                                    announcementsDelivers), sendEmail, serviceContext);
514    
515                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
516                    }
517                    catch (Exception e) {
518                            _log.error(e, e);
519    
520                            throw new RemoteException(e.getMessage());
521                    }
522            }
523    
524            /**
525            * Deletes the user's portrait image.
526            *
527            * @param userId the primary key of the user
528            */
529            public static void deletePortrait(long userId) throws RemoteException {
530                    try {
531                            UserServiceUtil.deletePortrait(userId);
532                    }
533                    catch (Exception e) {
534                            _log.error(e, e);
535    
536                            throw new RemoteException(e.getMessage());
537                    }
538            }
539    
540            /**
541            * Removes the user from the role.
542            *
543            * @param roleId the primary key of the role
544            * @param userId the primary key of the user
545            */
546            public static void deleteRoleUser(long roleId, long userId)
547                    throws RemoteException {
548                    try {
549                            UserServiceUtil.deleteRoleUser(roleId, userId);
550                    }
551                    catch (Exception e) {
552                            _log.error(e, e);
553    
554                            throw new RemoteException(e.getMessage());
555                    }
556            }
557    
558            /**
559            * Deletes the user.
560            *
561            * @param userId the primary key of the user
562            */
563            public static void deleteUser(long userId) throws RemoteException {
564                    try {
565                            UserServiceUtil.deleteUser(userId);
566                    }
567                    catch (Exception e) {
568                            _log.error(e, e);
569    
570                            throw new RemoteException(e.getMessage());
571                    }
572            }
573    
574            public static com.liferay.portal.model.UserSoap[] getCompanyUsers(
575                    long companyId, int start, int end) throws RemoteException {
576                    try {
577                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getCompanyUsers(companyId,
578                                            start, end);
579    
580                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
581                    }
582                    catch (Exception e) {
583                            _log.error(e, e);
584    
585                            throw new RemoteException(e.getMessage());
586                    }
587            }
588    
589            public static int getCompanyUsersCount(long companyId)
590                    throws RemoteException {
591                    try {
592                            int returnValue = UserServiceUtil.getCompanyUsersCount(companyId);
593    
594                            return returnValue;
595                    }
596                    catch (Exception e) {
597                            _log.error(e, e);
598    
599                            throw new RemoteException(e.getMessage());
600                    }
601            }
602    
603            public static com.liferay.portal.model.UserSoap getCurrentUser()
604                    throws RemoteException {
605                    try {
606                            com.liferay.portal.model.User returnValue = UserServiceUtil.getCurrentUser();
607    
608                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
609                    }
610                    catch (Exception e) {
611                            _log.error(e, e);
612    
613                            throw new RemoteException(e.getMessage());
614                    }
615            }
616    
617            /**
618            * Returns the primary keys of all the users belonging to the group.
619            *
620            * @param groupId the primary key of the group
621            * @return the primary keys of the users belonging to the group
622            */
623            public static long[] getGroupUserIds(long groupId)
624                    throws RemoteException {
625                    try {
626                            long[] returnValue = UserServiceUtil.getGroupUserIds(groupId);
627    
628                            return returnValue;
629                    }
630                    catch (Exception e) {
631                            _log.error(e, e);
632    
633                            throw new RemoteException(e.getMessage());
634                    }
635            }
636    
637            /**
638            * Returns all the users belonging to the group.
639            *
640            * @param groupId the primary key of the group
641            * @return the users belonging to the group
642            */
643            public static com.liferay.portal.model.UserSoap[] getGroupUsers(
644                    long groupId) throws RemoteException {
645                    try {
646                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getGroupUsers(groupId);
647    
648                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
649                    }
650                    catch (Exception e) {
651                            _log.error(e, e);
652    
653                            throw new RemoteException(e.getMessage());
654                    }
655            }
656    
657            /**
658            * Returns the primary keys of all the users belonging to the organization.
659            *
660            * @param organizationId the primary key of the organization
661            * @return the primary keys of the users belonging to the organization
662            */
663            public static long[] getOrganizationUserIds(long organizationId)
664                    throws RemoteException {
665                    try {
666                            long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId);
667    
668                            return returnValue;
669                    }
670                    catch (Exception e) {
671                            _log.error(e, e);
672    
673                            throw new RemoteException(e.getMessage());
674                    }
675            }
676    
677            /**
678            * Returns all the users belonging to the organization.
679            *
680            * @param organizationId the primary key of the organization
681            * @return users belonging to the organization
682            */
683            public static com.liferay.portal.model.UserSoap[] getOrganizationUsers(
684                    long organizationId) throws RemoteException {
685                    try {
686                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getOrganizationUsers(organizationId);
687    
688                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
689                    }
690                    catch (Exception e) {
691                            _log.error(e, e);
692    
693                            throw new RemoteException(e.getMessage());
694                    }
695            }
696    
697            /**
698            * Returns the primary keys of all the users belonging to the role.
699            *
700            * @param roleId the primary key of the role
701            * @return the primary keys of the users belonging to the role
702            */
703            public static long[] getRoleUserIds(long roleId) throws RemoteException {
704                    try {
705                            long[] returnValue = UserServiceUtil.getRoleUserIds(roleId);
706    
707                            return returnValue;
708                    }
709                    catch (Exception e) {
710                            _log.error(e, e);
711    
712                            throw new RemoteException(e.getMessage());
713                    }
714            }
715    
716            /**
717            * Returns the user with the email address.
718            *
719            * @param companyId the primary key of the user's company
720            * @param emailAddress the user's email address
721            * @return the user with the email address
722            */
723            public static com.liferay.portal.model.UserSoap getUserByEmailAddress(
724                    long companyId, java.lang.String emailAddress)
725                    throws RemoteException {
726                    try {
727                            com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId,
728                                            emailAddress);
729    
730                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
731                    }
732                    catch (Exception e) {
733                            _log.error(e, e);
734    
735                            throw new RemoteException(e.getMessage());
736                    }
737            }
738    
739            /**
740            * Returns the user with the primary key.
741            *
742            * @param userId the primary key of the user
743            * @return the user with the primary key
744            */
745            public static com.liferay.portal.model.UserSoap getUserById(long userId)
746                    throws RemoteException {
747                    try {
748                            com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId);
749    
750                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
751                    }
752                    catch (Exception e) {
753                            _log.error(e, e);
754    
755                            throw new RemoteException(e.getMessage());
756                    }
757            }
758    
759            /**
760            * Returns the user with the screen name.
761            *
762            * @param companyId the primary key of the user's company
763            * @param screenName the user's screen name
764            * @return the user with the screen name
765            */
766            public static com.liferay.portal.model.UserSoap getUserByScreenName(
767                    long companyId, java.lang.String screenName) throws RemoteException {
768                    try {
769                            com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId,
770                                            screenName);
771    
772                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
773                    }
774                    catch (Exception e) {
775                            _log.error(e, e);
776    
777                            throw new RemoteException(e.getMessage());
778                    }
779            }
780    
781            public static com.liferay.portal.model.UserSoap[] getUserGroupUsers(
782                    long userGroupId) throws RemoteException {
783                    try {
784                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getUserGroupUsers(userGroupId);
785    
786                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
787                    }
788                    catch (Exception e) {
789                            _log.error(e, e);
790    
791                            throw new RemoteException(e.getMessage());
792                    }
793            }
794    
795            /**
796            * Returns the primary key of the user with the email address.
797            *
798            * @param companyId the primary key of the user's company
799            * @param emailAddress the user's email address
800            * @return the primary key of the user with the email address
801            */
802            public static long getUserIdByEmailAddress(long companyId,
803                    java.lang.String emailAddress) throws RemoteException {
804                    try {
805                            long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId,
806                                            emailAddress);
807    
808                            return returnValue;
809                    }
810                    catch (Exception e) {
811                            _log.error(e, e);
812    
813                            throw new RemoteException(e.getMessage());
814                    }
815            }
816    
817            /**
818            * Returns the primary key of the user with the screen name.
819            *
820            * @param companyId the primary key of the user's company
821            * @param screenName the user's screen name
822            * @return the primary key of the user with the screen name
823            */
824            public static long getUserIdByScreenName(long companyId,
825                    java.lang.String screenName) throws RemoteException {
826                    try {
827                            long returnValue = UserServiceUtil.getUserIdByScreenName(companyId,
828                                            screenName);
829    
830                            return returnValue;
831                    }
832                    catch (Exception e) {
833                            _log.error(e, e);
834    
835                            throw new RemoteException(e.getMessage());
836                    }
837            }
838    
839            /**
840            * Returns <code>true</code> if the user is a member of the group.
841            *
842            * @param groupId the primary key of the group
843            * @param userId the primary key of the user
844            * @return <code>true</code> if the user is a member of the group;
845            <code>false</code> otherwise
846            */
847            public static boolean hasGroupUser(long groupId, long userId)
848                    throws RemoteException {
849                    try {
850                            boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId);
851    
852                            return returnValue;
853                    }
854                    catch (Exception e) {
855                            _log.error(e, e);
856    
857                            throw new RemoteException(e.getMessage());
858                    }
859            }
860    
861            /**
862            * Returns <code>true</code> if the user is a member of the role.
863            *
864            * @param roleId the primary key of the role
865            * @param userId the primary key of the user
866            * @return <code>true</code> if the user is a member of the role;
867            <code>false</code> otherwise
868            */
869            public static boolean hasRoleUser(long roleId, long userId)
870                    throws RemoteException {
871                    try {
872                            boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId);
873    
874                            return returnValue;
875                    }
876                    catch (Exception e) {
877                            _log.error(e, e);
878    
879                            throw new RemoteException(e.getMessage());
880                    }
881            }
882    
883            /**
884            * Returns <code>true</code> if the user has the role with the name,
885            * optionally through inheritance.
886            *
887            * @param companyId the primary key of the role's company
888            * @param name the name of the role (must be a regular role, not an
889            organization, site or provider role)
890            * @param userId the primary key of the user
891            * @param inherited whether to include roles inherited from organizations,
892            sites, etc.
893            * @return <code>true</code> if the user has the role; <code>false</code>
894            otherwise
895            */
896            public static boolean hasRoleUser(long companyId, java.lang.String name,
897                    long userId, boolean inherited) throws RemoteException {
898                    try {
899                            boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name,
900                                            userId, inherited);
901    
902                            return returnValue;
903                    }
904                    catch (Exception e) {
905                            _log.error(e, e);
906    
907                            throw new RemoteException(e.getMessage());
908                    }
909            }
910    
911            /**
912            * Sends a password notification email to the user matching the email
913            * address. The portal's settings determine whether a password is sent
914            * explicitly or whether a link for resetting the user's password is sent.
915            * The method sends the email asynchronously and returns before the email is
916            * sent.
917            *
918            * <p>
919            * The content of the notification email is specified with the
920            * <code>admin.email.password</code> portal property keys. They can be
921            * overridden via a <code>portal-ext.properties</code> file or modified
922            * through the Portal Settings UI.
923            * </p>
924            *
925            * @param companyId the primary key of the user's company
926            * @param emailAddress the user's email address
927            * @return <code>true</code> if the notification email includes a new
928            password; <code>false</code> if the notification email only
929            contains a reset link
930            */
931            public static boolean sendPasswordByEmailAddress(long companyId,
932                    java.lang.String emailAddress) throws RemoteException {
933                    try {
934                            boolean returnValue = UserServiceUtil.sendPasswordByEmailAddress(companyId,
935                                            emailAddress);
936    
937                            return returnValue;
938                    }
939                    catch (Exception e) {
940                            _log.error(e, e);
941    
942                            throw new RemoteException(e.getMessage());
943                    }
944            }
945    
946            /**
947            * Sends a password notification email to the user matching the screen name.
948            * The portal's settings determine whether a password is sent explicitly or
949            * whether a link for resetting the user's password is sent. The method
950            * sends the email asynchronously and returns before the email is sent.
951            *
952            * <p>
953            * The content of the notification email is specified with the
954            * <code>admin.email.password</code> portal property keys. They can be
955            * overridden via a <code>portal-ext.properties</code> file or modified
956            * through the Portal Settings UI.
957            * </p>
958            *
959            * @param companyId the primary key of the user's company
960            * @param screenName the user's screen name
961            * @return <code>true</code> if the notification email includes a new
962            password; <code>false</code> if the notification email only
963            contains a reset link
964            */
965            public static boolean sendPasswordByScreenName(long companyId,
966                    java.lang.String screenName) throws RemoteException {
967                    try {
968                            boolean returnValue = UserServiceUtil.sendPasswordByScreenName(companyId,
969                                            screenName);
970    
971                            return returnValue;
972                    }
973                    catch (Exception e) {
974                            _log.error(e, e);
975    
976                            throw new RemoteException(e.getMessage());
977                    }
978            }
979    
980            /**
981            * Sends a password notification email to the user matching the ID. The
982            * portal's settings determine whether a password is sent explicitly or
983            * whether a link for resetting the user's password is sent. The method
984            * sends the email asynchronously and returns before the email is sent.
985            *
986            * <p>
987            * The content of the notification email is specified with the
988            * <code>admin.email.password</code> portal property keys. They can be
989            * overridden via a <code>portal-ext.properties</code> file or modified
990            * through the Portal Settings UI.
991            * </p>
992            *
993            * @param userId the user's primary key
994            * @return <code>true</code> if the notification email includes a new
995            password; <code>false</code> if the notification email only
996            contains a reset link
997            */
998            public static boolean sendPasswordByUserId(long userId)
999                    throws RemoteException {
1000                    try {
1001                            boolean returnValue = UserServiceUtil.sendPasswordByUserId(userId);
1002    
1003                            return returnValue;
1004                    }
1005                    catch (Exception e) {
1006                            _log.error(e, e);
1007    
1008                            throw new RemoteException(e.getMessage());
1009                    }
1010            }
1011    
1012            /**
1013            * Sets the users in the role, removing and adding users to the role as
1014            * necessary.
1015            *
1016            * @param roleId the primary key of the role
1017            * @param userIds the primary keys of the users
1018            */
1019            public static void setRoleUsers(long roleId, long[] userIds)
1020                    throws RemoteException {
1021                    try {
1022                            UserServiceUtil.setRoleUsers(roleId, userIds);
1023                    }
1024                    catch (Exception e) {
1025                            _log.error(e, e);
1026    
1027                            throw new RemoteException(e.getMessage());
1028                    }
1029            }
1030    
1031            /**
1032            * Sets the users in the user group, removing and adding users to the user
1033            * group as necessary.
1034            *
1035            * @param userGroupId the primary key of the user group
1036            * @param userIds the primary keys of the users
1037            */
1038            public static void setUserGroupUsers(long userGroupId, long[] userIds)
1039                    throws RemoteException {
1040                    try {
1041                            UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
1042                    }
1043                    catch (Exception e) {
1044                            _log.error(e, e);
1045    
1046                            throw new RemoteException(e.getMessage());
1047                    }
1048            }
1049    
1050            /**
1051            * Removes the users from the teams of a group.
1052            *
1053            * @param groupId the primary key of the group
1054            * @param userIds the primary keys of the users
1055            */
1056            public static void unsetGroupTeamsUsers(long groupId, long[] userIds)
1057                    throws RemoteException {
1058                    try {
1059                            UserServiceUtil.unsetGroupTeamsUsers(groupId, userIds);
1060                    }
1061                    catch (Exception e) {
1062                            _log.error(e, e);
1063    
1064                            throw new RemoteException(e.getMessage());
1065                    }
1066            }
1067    
1068            /**
1069            * Removes the users from the group.
1070            *
1071            * @param groupId the primary key of the group
1072            * @param userIds the primary keys of the users
1073            * @param serviceContext the service context to be applied (optionally
1074            <code>null</code>)
1075            */
1076            public static void unsetGroupUsers(long groupId, long[] userIds,
1077                    com.liferay.portal.service.ServiceContext serviceContext)
1078                    throws RemoteException {
1079                    try {
1080                            UserServiceUtil.unsetGroupUsers(groupId, userIds, serviceContext);
1081                    }
1082                    catch (Exception e) {
1083                            _log.error(e, e);
1084    
1085                            throw new RemoteException(e.getMessage());
1086                    }
1087            }
1088    
1089            /**
1090            * Removes the users from the organization.
1091            *
1092            * @param organizationId the primary key of the organization
1093            * @param userIds the primary keys of the users
1094            */
1095            public static void unsetOrganizationUsers(long organizationId,
1096                    long[] userIds) throws RemoteException {
1097                    try {
1098                            UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
1099                    }
1100                    catch (Exception e) {
1101                            _log.error(e, e);
1102    
1103                            throw new RemoteException(e.getMessage());
1104                    }
1105            }
1106    
1107            /**
1108            * Removes the users from the password policy.
1109            *
1110            * @param passwordPolicyId the primary key of the password policy
1111            * @param userIds the primary keys of the users
1112            */
1113            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
1114                    long[] userIds) throws RemoteException {
1115                    try {
1116                            UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
1117                    }
1118                    catch (Exception e) {
1119                            _log.error(e, e);
1120    
1121                            throw new RemoteException(e.getMessage());
1122                    }
1123            }
1124    
1125            /**
1126            * Removes the users from the role.
1127            *
1128            * @param roleId the primary key of the role
1129            * @param userIds the primary keys of the users
1130            */
1131            public static void unsetRoleUsers(long roleId, long[] userIds)
1132                    throws RemoteException {
1133                    try {
1134                            UserServiceUtil.unsetRoleUsers(roleId, userIds);
1135                    }
1136                    catch (Exception e) {
1137                            _log.error(e, e);
1138    
1139                            throw new RemoteException(e.getMessage());
1140                    }
1141            }
1142    
1143            /**
1144            * Removes the users from the team.
1145            *
1146            * @param teamId the primary key of the team
1147            * @param userIds the primary keys of the users
1148            */
1149            public static void unsetTeamUsers(long teamId, long[] userIds)
1150                    throws RemoteException {
1151                    try {
1152                            UserServiceUtil.unsetTeamUsers(teamId, userIds);
1153                    }
1154                    catch (Exception e) {
1155                            _log.error(e, e);
1156    
1157                            throw new RemoteException(e.getMessage());
1158                    }
1159            }
1160    
1161            /**
1162            * Removes the users from the user group.
1163            *
1164            * @param userGroupId the primary key of the user group
1165            * @param userIds the primary keys of the users
1166            */
1167            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
1168                    throws RemoteException {
1169                    try {
1170                            UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
1171                    }
1172                    catch (Exception e) {
1173                            _log.error(e, e);
1174    
1175                            throw new RemoteException(e.getMessage());
1176                    }
1177            }
1178    
1179            /**
1180            * Updates the user's response to the terms of use agreement.
1181            *
1182            * @param userId the primary key of the user
1183            * @param agreedToTermsOfUse whether the user has agree to the terms of use
1184            * @return the user
1185            */
1186            public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse(
1187                    long userId, boolean agreedToTermsOfUse) throws RemoteException {
1188                    try {
1189                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
1190                                            agreedToTermsOfUse);
1191    
1192                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1193                    }
1194                    catch (Exception e) {
1195                            _log.error(e, e);
1196    
1197                            throw new RemoteException(e.getMessage());
1198                    }
1199            }
1200    
1201            /**
1202            * Updates the user's email address.
1203            *
1204            * @param userId the primary key of the user
1205            * @param password the user's password
1206            * @param emailAddress1 the user's new email address
1207            * @param emailAddress2 the user's new email address confirmation
1208            * @param serviceContext the service context to be applied. Must set the
1209            portal URL, main path, primary key of the layout, remote address,
1210            remote host, and agent for the user.
1211            * @return the user
1212            */
1213            public static com.liferay.portal.model.UserSoap updateEmailAddress(
1214                    long userId, java.lang.String password, java.lang.String emailAddress1,
1215                    java.lang.String emailAddress2,
1216                    com.liferay.portal.service.ServiceContext serviceContext)
1217                    throws RemoteException {
1218                    try {
1219                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateEmailAddress(userId,
1220                                            password, emailAddress1, emailAddress2, serviceContext);
1221    
1222                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1223                    }
1224                    catch (Exception e) {
1225                            _log.error(e, e);
1226    
1227                            throw new RemoteException(e.getMessage());
1228                    }
1229            }
1230    
1231            /**
1232            * Updates a user account that was automatically created when a guest user
1233            * participated in an action (e.g. posting a comment) and only provided his
1234            * name and email address.
1235            *
1236            * @param companyId the primary key of the user's company
1237            * @param autoPassword whether a password should be automatically generated
1238            for the user
1239            * @param password1 the user's password
1240            * @param password2 the user's password confirmation
1241            * @param autoScreenName whether a screen name should be automatically
1242            generated for the user
1243            * @param screenName the user's screen name
1244            * @param emailAddress the user's email address
1245            * @param facebookId the user's facebook ID
1246            * @param openId the user's OpenID
1247            * @param locale the user's locale
1248            * @param firstName the user's first name
1249            * @param middleName the user's middle name
1250            * @param lastName the user's last name
1251            * @param prefixId the user's name prefix ID
1252            * @param suffixId the user's name suffix ID
1253            * @param male whether the user is male
1254            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
1255            January)
1256            * @param birthdayDay the user's birthday day
1257            * @param birthdayYear the user's birthday year
1258            * @param jobTitle the user's job title
1259            * @param updateUserInformation whether to update the user's information
1260            * @param sendEmail whether to send the user an email notification about
1261            their new account
1262            * @param serviceContext the service context to be applied (optionally
1263            <code>null</code>). Can set the expando bridge attributes for the
1264            user.
1265            * @return the user
1266            */
1267            public static com.liferay.portal.model.UserSoap updateIncompleteUser(
1268                    long companyId, boolean autoPassword, java.lang.String password1,
1269                    java.lang.String password2, boolean autoScreenName,
1270                    java.lang.String screenName, java.lang.String emailAddress,
1271                    long facebookId, java.lang.String openId, String locale,
1272                    java.lang.String firstName, java.lang.String middleName,
1273                    java.lang.String lastName, long prefixId, long suffixId, boolean male,
1274                    int birthdayMonth, int birthdayDay, int birthdayYear,
1275                    java.lang.String jobTitle, boolean updateUserInformation,
1276                    boolean sendEmail,
1277                    com.liferay.portal.service.ServiceContext serviceContext)
1278                    throws RemoteException {
1279                    try {
1280                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateIncompleteUser(companyId,
1281                                            autoPassword, password1, password2, autoScreenName,
1282                                            screenName, emailAddress, facebookId, openId,
1283                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
1284                                            lastName, prefixId, suffixId, male, birthdayMonth,
1285                                            birthdayDay, birthdayYear, jobTitle, updateUserInformation,
1286                                            sendEmail, serviceContext);
1287    
1288                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1289                    }
1290                    catch (Exception e) {
1291                            _log.error(e, e);
1292    
1293                            throw new RemoteException(e.getMessage());
1294                    }
1295            }
1296    
1297            /**
1298            * Updates whether the user is locked out from logging in.
1299            *
1300            * @param userId the primary key of the user
1301            * @param lockout whether the user is locked out
1302            * @return the user
1303            */
1304            public static com.liferay.portal.model.UserSoap updateLockoutById(
1305                    long userId, boolean lockout) throws RemoteException {
1306                    try {
1307                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockoutById(userId,
1308                                            lockout);
1309    
1310                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1311                    }
1312                    catch (Exception e) {
1313                            _log.error(e, e);
1314    
1315                            throw new RemoteException(e.getMessage());
1316                    }
1317            }
1318    
1319            /**
1320            * Updates the user's OpenID.
1321            *
1322            * @param userId the primary key of the user
1323            * @param openId the new OpenID
1324            * @return the user
1325            */
1326            public static com.liferay.portal.model.UserSoap updateOpenId(long userId,
1327                    java.lang.String openId) throws RemoteException {
1328                    try {
1329                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateOpenId(userId,
1330                                            openId);
1331    
1332                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1333                    }
1334                    catch (Exception e) {
1335                            _log.error(e, e);
1336    
1337                            throw new RemoteException(e.getMessage());
1338                    }
1339            }
1340    
1341            /**
1342            * Sets the organizations that the user is in, removing and adding
1343            * organizations as necessary.
1344            *
1345            * @param userId the primary key of the user
1346            * @param organizationIds the primary keys of the organizations
1347            * @param serviceContext the service context to be applied. Must set whether
1348            user indexing is enabled.
1349            */
1350            public static void updateOrganizations(long userId, long[] organizationIds,
1351                    com.liferay.portal.service.ServiceContext serviceContext)
1352                    throws RemoteException {
1353                    try {
1354                            UserServiceUtil.updateOrganizations(userId, organizationIds,
1355                                    serviceContext);
1356                    }
1357                    catch (Exception e) {
1358                            _log.error(e, e);
1359    
1360                            throw new RemoteException(e.getMessage());
1361                    }
1362            }
1363    
1364            /**
1365            * Updates the user's password without tracking or validation of the change.
1366            *
1367            * @param userId the primary key of the user
1368            * @param password1 the user's new password
1369            * @param password2 the user's new password confirmation
1370            * @param passwordReset whether the user should be asked to reset their
1371            password the next time they log in
1372            * @return the user
1373            */
1374            public static com.liferay.portal.model.UserSoap updatePassword(
1375                    long userId, java.lang.String password1, java.lang.String password2,
1376                    boolean passwordReset) throws RemoteException {
1377                    try {
1378                            com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId,
1379                                            password1, password2, passwordReset);
1380    
1381                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1382                    }
1383                    catch (Exception e) {
1384                            _log.error(e, e);
1385    
1386                            throw new RemoteException(e.getMessage());
1387                    }
1388            }
1389    
1390            /**
1391            * Updates the user's portrait image.
1392            *
1393            * @param userId the primary key of the user
1394            * @param bytes the new portrait image data
1395            * @return the user
1396            */
1397            public static com.liferay.portal.model.UserSoap updatePortrait(
1398                    long userId, byte[] bytes) throws RemoteException {
1399                    try {
1400                            com.liferay.portal.model.User returnValue = UserServiceUtil.updatePortrait(userId,
1401                                            bytes);
1402    
1403                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1404                    }
1405                    catch (Exception e) {
1406                            _log.error(e, e);
1407    
1408                            throw new RemoteException(e.getMessage());
1409                    }
1410            }
1411    
1412            /**
1413            * Updates the user's password reset question and answer.
1414            *
1415            * @param userId the primary key of the user
1416            * @param question the user's new password reset question
1417            * @param answer the user's new password reset answer
1418            * @return the user
1419            */
1420            public static com.liferay.portal.model.UserSoap updateReminderQuery(
1421                    long userId, java.lang.String question, java.lang.String answer)
1422                    throws RemoteException {
1423                    try {
1424                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateReminderQuery(userId,
1425                                            question, answer);
1426    
1427                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1428                    }
1429                    catch (Exception e) {
1430                            _log.error(e, e);
1431    
1432                            throw new RemoteException(e.getMessage());
1433                    }
1434            }
1435    
1436            /**
1437            * Updates the user's screen name.
1438            *
1439            * @param userId the primary key of the user
1440            * @param screenName the user's new screen name
1441            * @return the user
1442            */
1443            public static com.liferay.portal.model.UserSoap updateScreenName(
1444                    long userId, java.lang.String screenName) throws RemoteException {
1445                    try {
1446                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateScreenName(userId,
1447                                            screenName);
1448    
1449                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1450                    }
1451                    catch (Exception e) {
1452                            _log.error(e, e);
1453    
1454                            throw new RemoteException(e.getMessage());
1455                    }
1456            }
1457    
1458            /**
1459            * Updates the user's workflow status.
1460            *
1461            * @param userId the primary key of the user
1462            * @param status the user's new workflow status
1463            * @return the user
1464            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int,
1465            ServiceContext)}
1466            */
1467            @Deprecated
1468            public static com.liferay.portal.model.UserSoap updateStatus(long userId,
1469                    int status) throws RemoteException {
1470                    try {
1471                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateStatus(userId,
1472                                            status);
1473    
1474                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1475                    }
1476                    catch (Exception e) {
1477                            _log.error(e, e);
1478    
1479                            throw new RemoteException(e.getMessage());
1480                    }
1481            }
1482    
1483            /**
1484            * Updates the user's workflow status.
1485            *
1486            * @param userId the primary key of the user
1487            * @param status the user's new workflow status
1488            * @param serviceContext the service context to be applied. You can specify
1489            an unencrypted custom password (used by an LDAP listener) for the
1490            user via attribute <code>passwordUnencrypted</code>.
1491            * @return the user
1492            */
1493            public static com.liferay.portal.model.UserSoap updateStatus(long userId,
1494                    int status, com.liferay.portal.service.ServiceContext serviceContext)
1495                    throws RemoteException {
1496                    try {
1497                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateStatus(userId,
1498                                            status, serviceContext);
1499    
1500                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1501                    }
1502                    catch (Exception e) {
1503                            _log.error(e, e);
1504    
1505                            throw new RemoteException(e.getMessage());
1506                    }
1507            }
1508    
1509            /**
1510            * Updates the user with additional parameters.
1511            *
1512            * @param userId the primary key of the user
1513            * @param oldPassword the user's old password
1514            * @param newPassword1 the user's new password (optionally
1515            <code>null</code>)
1516            * @param newPassword2 the user's new password confirmation (optionally
1517            <code>null</code>)
1518            * @param passwordReset whether the user should be asked to reset their
1519            password the next time they login
1520            * @param reminderQueryQuestion the user's new password reset question
1521            * @param reminderQueryAnswer the user's new password reset answer
1522            * @param screenName the user's new screen name
1523            * @param emailAddress the user's new email address
1524            * @param facebookId the user's new Facebook ID
1525            * @param openId the user's new OpenID
1526            * @param portrait whether to update the user's portrait image
1527            * @param portraitBytes the new portrait image data
1528            * @param languageId the user's new language ID
1529            * @param timeZoneId the user's new time zone ID
1530            * @param greeting the user's new greeting
1531            * @param comments the user's new comments
1532            * @param firstName the user's new first name
1533            * @param middleName the user's new middle name
1534            * @param lastName the user's new last name
1535            * @param prefixId the user's new name prefix ID
1536            * @param suffixId the user's new name suffix ID
1537            * @param male whether user is male
1538            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
1539            for January)
1540            * @param birthdayDay the user's new birthday day
1541            * @param birthdayYear the user's birthday year
1542            * @param smsSn the user's new SMS screen name
1543            * @param facebookSn the user's new Facebook screen name
1544            * @param jabberSn the user's new Jabber screen name
1545            * @param skypeSn the user's new Skype screen name
1546            * @param twitterSn the user's new Twitter screen name
1547            * @param jobTitle the user's new job title
1548            * @param groupIds the primary keys of the user's groups
1549            * @param organizationIds the primary keys of the user's organizations
1550            * @param roleIds the primary keys of the user's roles
1551            * @param userGroupRoles the user user's group roles
1552            * @param userGroupIds the primary keys of the user's user groups
1553            * @param addresses the user's addresses
1554            * @param emailAddresses the user's email addresses
1555            * @param phones the user's phone numbers
1556            * @param websites the user's websites
1557            * @param announcementsDelivers the announcements deliveries
1558            * @param serviceContext the service context to be applied (optionally
1559            <code>null</code>). Can set the UUID (with the <code>uuid</code>
1560            attribute), asset category IDs, asset tag names, and expando
1561            bridge attributes for the user.
1562            * @return the user
1563            */
1564            public static com.liferay.portal.model.UserSoap updateUser(long userId,
1565                    java.lang.String oldPassword, java.lang.String newPassword1,
1566                    java.lang.String newPassword2, boolean passwordReset,
1567                    java.lang.String reminderQueryQuestion,
1568                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1569                    java.lang.String emailAddress, long facebookId,
1570                    java.lang.String openId, boolean portrait, byte[] portraitBytes,
1571                    java.lang.String languageId, java.lang.String timeZoneId,
1572                    java.lang.String greeting, java.lang.String comments,
1573                    java.lang.String firstName, java.lang.String middleName,
1574                    java.lang.String lastName, long prefixId, long suffixId, boolean male,
1575                    int birthdayMonth, int birthdayDay, int birthdayYear,
1576                    java.lang.String smsSn, java.lang.String facebookSn,
1577                    java.lang.String jabberSn, java.lang.String skypeSn,
1578                    java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds,
1579                    long[] organizationIds, long[] roleIds,
1580                    com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
1581                    long[] userGroupIds, com.liferay.portal.model.AddressSoap[] addresses,
1582                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
1583                    com.liferay.portal.model.PhoneSoap[] phones,
1584                    com.liferay.portal.model.WebsiteSoap[] websites,
1585                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
1586                    com.liferay.portal.service.ServiceContext serviceContext)
1587                    throws RemoteException {
1588                    try {
1589                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
1590                                            oldPassword, newPassword1, newPassword2, passwordReset,
1591                                            reminderQueryQuestion, reminderQueryAnswer, screenName,
1592                                            emailAddress, facebookId, openId, portrait, portraitBytes,
1593                                            languageId, timeZoneId, greeting, comments, firstName,
1594                                            middleName, lastName, prefixId, suffixId, male,
1595                                            birthdayMonth, birthdayDay, birthdayYear, smsSn,
1596                                            facebookSn, jabberSn, skypeSn, twitterSn, jobTitle,
1597                                            groupIds, organizationIds, roleIds,
1598                                            com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
1599                                                    userGroupRoles), userGroupIds,
1600                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
1601                                                    addresses),
1602                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
1603                                                    emailAddresses),
1604                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
1605                                                    phones),
1606                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
1607                                                    websites),
1608                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
1609                                                    announcementsDelivers), serviceContext);
1610    
1611                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1612                    }
1613                    catch (Exception e) {
1614                            _log.error(e, e);
1615    
1616                            throw new RemoteException(e.getMessage());
1617                    }
1618            }
1619    
1620            /**
1621            * Updates the user with additional parameters.
1622            *
1623            * @param userId the primary key of the user
1624            * @param oldPassword the user's old password
1625            * @param newPassword1 the user's new password (optionally
1626            <code>null</code>)
1627            * @param newPassword2 the user's new password confirmation (optionally
1628            <code>null</code>)
1629            * @param passwordReset whether the user should be asked to reset their
1630            password the next time they login
1631            * @param reminderQueryQuestion the user's new password reset question
1632            * @param reminderQueryAnswer the user's new password reset answer
1633            * @param screenName the user's new screen name
1634            * @param emailAddress the user's new email address
1635            * @param facebookId the user's new Facebook ID
1636            * @param openId the user's new OpenID
1637            * @param languageId the user's new language ID
1638            * @param timeZoneId the user's new time zone ID
1639            * @param greeting the user's new greeting
1640            * @param comments the user's new comments
1641            * @param firstName the user's new first name
1642            * @param middleName the user's new middle name
1643            * @param lastName the user's new last name
1644            * @param prefixId the user's new name prefix ID
1645            * @param suffixId the user's new name suffix ID
1646            * @param male whether user is male
1647            * @param birthdayMonth the user's new birthday month (0-based, meaning
1648            0 for January)
1649            * @param birthdayDay the user's new birthday day
1650            * @param birthdayYear the user's birthday year
1651            * @param smsSn the user's new SMS screen name
1652            * @param facebookSn the user's new Facebook screen name
1653            * @param jabberSn the user's new Jabber screen name
1654            * @param skypeSn the user's new Skype screen name
1655            * @param twitterSn the user's new Twitter screen name
1656            * @param jobTitle the user's new job title
1657            * @param groupIds the primary keys of the user's groups
1658            * @param organizationIds the primary keys of the user's organizations
1659            * @param roleIds the primary keys of the user's roles
1660            * @param userGroupRoles the user user's group roles
1661            * @param userGroupIds the primary keys of the user's user groups
1662            * @param addresses the user's addresses
1663            * @param emailAddresses the user's email addresses
1664            * @param phones the user's phone numbers
1665            * @param websites the user's websites
1666            * @param announcementsDelivers the announcements deliveries
1667            * @param serviceContext the service context to be applied (optionally
1668            <code>null</code>). Can set the UUID (with the
1669            <code>uuid</code> attribute), asset category IDs, asset tag
1670            names, and expando bridge attributes for the user.
1671            * @return the user
1672            * @deprecated As of 7.0.0, replaced by {@link #updateUser(long, String,
1673            String, String, boolean, String, String, String, String,
1674            long, String, boolean, byte[], String, String, String,
1675            String, String, String, String, int, int, boolean, int, int,
1676            int, String, String, String, String, String, String, String,
1677            String, String, String, String, long[], long[], long[], List,
1678            long[], List, List, List, List, List, ServiceContext)}
1679            */
1680            @Deprecated
1681            public static com.liferay.portal.model.UserSoap updateUser(long userId,
1682                    java.lang.String oldPassword, java.lang.String newPassword1,
1683                    java.lang.String newPassword2, boolean passwordReset,
1684                    java.lang.String reminderQueryQuestion,
1685                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1686                    java.lang.String emailAddress, long facebookId,
1687                    java.lang.String openId, java.lang.String languageId,
1688                    java.lang.String timeZoneId, java.lang.String greeting,
1689                    java.lang.String comments, java.lang.String firstName,
1690                    java.lang.String middleName, java.lang.String lastName, long prefixId,
1691                    long suffixId, boolean male, int birthdayMonth, int birthdayDay,
1692                    int birthdayYear, java.lang.String smsSn, java.lang.String facebookSn,
1693                    java.lang.String jabberSn, java.lang.String skypeSn,
1694                    java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds,
1695                    long[] organizationIds, long[] roleIds,
1696                    com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
1697                    long[] userGroupIds, com.liferay.portal.model.AddressSoap[] addresses,
1698                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
1699                    com.liferay.portal.model.PhoneSoap[] phones,
1700                    com.liferay.portal.model.WebsiteSoap[] websites,
1701                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
1702                    com.liferay.portal.service.ServiceContext serviceContext)
1703                    throws RemoteException {
1704                    try {
1705                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
1706                                            oldPassword, newPassword1, newPassword2, passwordReset,
1707                                            reminderQueryQuestion, reminderQueryAnswer, screenName,
1708                                            emailAddress, facebookId, openId, languageId, timeZoneId,
1709                                            greeting, comments, firstName, middleName, lastName,
1710                                            prefixId, suffixId, male, birthdayMonth, birthdayDay,
1711                                            birthdayYear, smsSn, facebookSn, jabberSn, skypeSn,
1712                                            twitterSn, jobTitle, groupIds, organizationIds, roleIds,
1713                                            com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
1714                                                    userGroupRoles), userGroupIds,
1715                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
1716                                                    addresses),
1717                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
1718                                                    emailAddresses),
1719                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
1720                                                    phones),
1721                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
1722                                                    websites),
1723                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
1724                                                    announcementsDelivers), serviceContext);
1725    
1726                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1727                    }
1728                    catch (Exception e) {
1729                            _log.error(e, e);
1730    
1731                            throw new RemoteException(e.getMessage());
1732                    }
1733            }
1734    
1735            /**
1736            * Updates the user.
1737            *
1738            * @param userId the primary key of the user
1739            * @param oldPassword the user's old password
1740            * @param newPassword1 the user's new password (optionally
1741            <code>null</code>)
1742            * @param newPassword2 the user's new password confirmation (optionally
1743            <code>null</code>)
1744            * @param passwordReset whether the user should be asked to reset their
1745            password the next time they login
1746            * @param reminderQueryQuestion the user's new password reset question
1747            * @param reminderQueryAnswer the user's new password reset answer
1748            * @param screenName the user's new screen name
1749            * @param emailAddress the user's new email address
1750            * @param facebookId the user's new Facebook ID
1751            * @param openId the user's new OpenID
1752            * @param languageId the user's new language ID
1753            * @param timeZoneId the user's new time zone ID
1754            * @param greeting the user's new greeting
1755            * @param comments the user's new comments
1756            * @param firstName the user's new first name
1757            * @param middleName the user's new middle name
1758            * @param lastName the user's new last name
1759            * @param prefixId the user's new name prefix ID
1760            * @param suffixId the user's new name suffix ID
1761            * @param male whether user is male
1762            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
1763            for January)
1764            * @param birthdayDay the user's new birthday day
1765            * @param birthdayYear the user's birthday year
1766            * @param smsSn the user's new SMS screen name
1767            * @param facebookSn the user's new Facebook screen name
1768            * @param jabberSn the user's new Jabber screen name
1769            * @param skypeSn the user's new Skype screen name
1770            * @param twitterSn the user's new Twitter screen name
1771            * @param jobTitle the user's new job title
1772            * @param groupIds the primary keys of the user's groups
1773            * @param organizationIds the primary keys of the user's organizations
1774            * @param roleIds the primary keys of the user's roles
1775            * @param userGroupRoles the user user's group roles
1776            * @param userGroupIds the primary keys of the user's user groups
1777            * @param serviceContext the service context to be applied (optionally
1778            <code>null</code>). Can set the UUID (with the <code>uuid</code>
1779            attribute), asset category IDs, asset tag names, and expando
1780            bridge attributes for the user.
1781            * @return the user
1782            */
1783            public static com.liferay.portal.model.UserSoap updateUser(long userId,
1784                    java.lang.String oldPassword, java.lang.String newPassword1,
1785                    java.lang.String newPassword2, boolean passwordReset,
1786                    java.lang.String reminderQueryQuestion,
1787                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1788                    java.lang.String emailAddress, long facebookId,
1789                    java.lang.String openId, java.lang.String languageId,
1790                    java.lang.String timeZoneId, java.lang.String greeting,
1791                    java.lang.String comments, java.lang.String firstName,
1792                    java.lang.String middleName, java.lang.String lastName, long prefixId,
1793                    long suffixId, boolean male, int birthdayMonth, int birthdayDay,
1794                    int birthdayYear, java.lang.String smsSn, java.lang.String facebookSn,
1795                    java.lang.String jabberSn, java.lang.String skypeSn,
1796                    java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds,
1797                    long[] organizationIds, long[] roleIds,
1798                    com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles,
1799                    long[] userGroupIds,
1800                    com.liferay.portal.service.ServiceContext serviceContext)
1801                    throws RemoteException {
1802                    try {
1803                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId,
1804                                            oldPassword, newPassword1, newPassword2, passwordReset,
1805                                            reminderQueryQuestion, reminderQueryAnswer, screenName,
1806                                            emailAddress, facebookId, openId, languageId, timeZoneId,
1807                                            greeting, comments, firstName, middleName, lastName,
1808                                            prefixId, suffixId, male, birthdayMonth, birthdayDay,
1809                                            birthdayYear, smsSn, facebookSn, jabberSn, skypeSn,
1810                                            twitterSn, jobTitle, groupIds, organizationIds, roleIds,
1811                                            com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels(
1812                                                    userGroupRoles), userGroupIds, serviceContext);
1813    
1814                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1815                    }
1816                    catch (Exception e) {
1817                            _log.error(e, e);
1818    
1819                            throw new RemoteException(e.getMessage());
1820                    }
1821            }
1822    
1823            private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class);
1824    }