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