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