001    /**
002     * Copyright (c) 2000-2011 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 a user with workflow and additional parameters.
362            *
363            * <p>
364            * This method handles the creation and bookkeeping of the user including
365            * its resources, metadata, and internal data structures. It is not
366            * necessary to make subsequent calls to any methods to setup default
367            * groups, resources, etc.
368            * </p>
369            *
370            * @param companyId the primary key of the user's company
371            * @param autoPassword whether a password should be automatically generated
372            for the user
373            * @param password1 the user's password
374            * @param password2 the user's password confirmation
375            * @param autoScreenName whether a screen name should be automatically
376            generated for the user
377            * @param screenName the user's screen name
378            * @param emailAddress the user's email address
379            * @param facebookId the user's facebook ID
380            * @param openId the user's OpenID
381            * @param locale the user's locale
382            * @param firstName the user's first name
383            * @param middleName the user's middle name
384            * @param lastName the user's last name
385            * @param prefixId the user's name prefix ID
386            * @param suffixId the user's name suffix ID
387            * @param male whether the user is male
388            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
389            January)
390            * @param birthdayDay the user's birthday day
391            * @param birthdayYear the user's birthday year
392            * @param jobTitle the user's job title
393            * @param groupIds the primary keys of the user's groups
394            * @param organizationIds the primary keys of the user's organizations
395            * @param roleIds the primary keys of the roles this user possesses
396            * @param userGroupIds the primary keys of the user's user groups
397            * @param addresses the user's addresses
398            * @param emailAddresses the user's email addresses
399            * @param phones the user's phone numbers
400            * @param websites the user's websites
401            * @param announcementsDelivers the announcements deliveries
402            * @param sendEmail whether to send the user an email notification about
403            their new account
404            * @param serviceContext the user's service context (optionally
405            <code>null</code>). Can set the universally unique identifier
406            (with the <code>uuid</code> attribute), asset category IDs, asset
407            tag names, and expando bridge attributes for the user.
408            * @return the new user
409            * @throws PortalException if the user's information was invalid, if the
410            creator did not have permission to add users, if the email
411            address was reserved, or some other portal exception occurred
412            * @throws SystemException if a system exception occurred
413            */
414            public static com.liferay.portal.model.UserSoap addUserWithWorkflow(
415                    long companyId, boolean autoPassword, java.lang.String password1,
416                    java.lang.String password2, boolean autoScreenName,
417                    java.lang.String screenName, java.lang.String emailAddress,
418                    long facebookId, java.lang.String openId, String locale,
419                    java.lang.String firstName, java.lang.String middleName,
420                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
421                    int birthdayMonth, int birthdayDay, int birthdayYear,
422                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
423                    long[] roleIds, long[] userGroupIds,
424                    com.liferay.portal.model.AddressSoap[] addresses,
425                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
426                    com.liferay.portal.model.PhoneSoap[] phones,
427                    com.liferay.portal.model.WebsiteSoap[] websites,
428                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
429                    boolean sendEmail,
430                    com.liferay.portal.service.ServiceContext serviceContext)
431                    throws RemoteException {
432                    try {
433                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId,
434                                            autoPassword, password1, password2, autoScreenName,
435                                            screenName, emailAddress, facebookId, openId,
436                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
437                                            lastName, prefixId, suffixId, male, birthdayMonth,
438                                            birthdayDay, birthdayYear, jobTitle, groupIds,
439                                            organizationIds, roleIds, userGroupIds,
440                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
441                                                    addresses),
442                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
443                                                    emailAddresses),
444                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
445                                                    phones),
446                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
447                                                    websites),
448                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
449                                                    announcementsDelivers), sendEmail, serviceContext);
450    
451                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
452                    }
453                    catch (Exception e) {
454                            _log.error(e, e);
455    
456                            throw new RemoteException(e.getMessage());
457                    }
458            }
459    
460            /**
461            * Adds a user with workflow.
462            *
463            * <p>
464            * This method handles the creation and bookkeeping of the user including
465            * its resources, metadata, and internal data structures. It is not
466            * necessary to make subsequent calls to any methods to setup default
467            * groups, resources, etc.
468            * </p>
469            *
470            * @param companyId the primary key of the user's company
471            * @param autoPassword whether a password should be automatically generated
472            for the user
473            * @param password1 the user's password
474            * @param password2 the user's password confirmation
475            * @param autoScreenName whether a screen name should be automatically
476            generated for the user
477            * @param screenName the user's screen name
478            * @param emailAddress the user's email address
479            * @param facebookId the user's facebook ID
480            * @param openId the user's OpenID
481            * @param locale the user's locale
482            * @param firstName the user's first name
483            * @param middleName the user's middle name
484            * @param lastName the user's last name
485            * @param prefixId the user's name prefix ID
486            * @param suffixId the user's name suffix ID
487            * @param male whether the user is male
488            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
489            January)
490            * @param birthdayDay the user's birthday day
491            * @param birthdayYear the user's birthday year
492            * @param jobTitle the user's job title
493            * @param groupIds the primary keys of the user's groups
494            * @param organizationIds the primary keys of the user's organizations
495            * @param roleIds the primary keys of the roles this user possesses
496            * @param userGroupIds the primary keys of the user's user groups
497            * @param sendEmail whether to send the user an email notification about
498            their new account
499            * @param serviceContext the user's service context (optionally
500            <code>null</code>). Can set the universally unique identifier
501            (with the <code>uuid</code> attribute), asset category IDs, asset
502            tag names, and expando bridge attributes for the user.
503            * @return the new user
504            * @throws PortalException if the user's information was invalid, if the
505            creator did not have permission to add users, or if the email
506            address was reserved
507            * @throws SystemException if a system exception occurred
508            */
509            public static com.liferay.portal.model.UserSoap addUserWithWorkflow(
510                    long companyId, boolean autoPassword, java.lang.String password1,
511                    java.lang.String password2, boolean autoScreenName,
512                    java.lang.String screenName, java.lang.String emailAddress,
513                    long facebookId, java.lang.String openId, String locale,
514                    java.lang.String firstName, java.lang.String middleName,
515                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
516                    int birthdayMonth, int birthdayDay, int birthdayYear,
517                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
518                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
519                    com.liferay.portal.service.ServiceContext serviceContext)
520                    throws RemoteException {
521                    try {
522                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId,
523                                            autoPassword, password1, password2, autoScreenName,
524                                            screenName, emailAddress, facebookId, openId,
525                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
526                                            lastName, prefixId, suffixId, male, birthdayMonth,
527                                            birthdayDay, birthdayYear, jobTitle, groupIds,
528                                            organizationIds, roleIds, userGroupIds, sendEmail,
529                                            serviceContext);
530    
531                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
532                    }
533                    catch (Exception e) {
534                            _log.error(e, e);
535    
536                            throw new RemoteException(e.getMessage());
537                    }
538            }
539    
540            /**
541            * Adds the users to the user group.
542            *
543            * @param userGroupId the primary key of the user group
544            * @param userIds the primary keys of the users
545            * @throws PortalException if a user group or user with the primary could
546            could not be found, or if the current user did not have
547            permission to assign group members
548            * @throws SystemException if a system exception occurred
549            */
550            public static void addUserGroupUsers(long userGroupId, long[] userIds)
551                    throws RemoteException {
552                    try {
553                            UserServiceUtil.addUserGroupUsers(userGroupId, userIds);
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            * Updates a user account that was automatically created when a guest user
916            * participated in an action (e.g. posting a comment) and only provided his
917            * name and email address.
918            *
919            * @param companyId the primary key of the user's company
920            * @param autoPassword whether a password should be automatically generated
921            for the user
922            * @param password1 the user's password
923            * @param password2 the user's password confirmation
924            * @param autoScreenName whether a screen name should be automatically
925            generated for the user
926            * @param screenName the user's screen name
927            * @param emailAddress the user's email address
928            * @param facebookId the user's facebook ID
929            * @param openId the user's OpenID
930            * @param locale the user's locale
931            * @param firstName the user's first name
932            * @param middleName the user's middle name
933            * @param lastName the user's last name
934            * @param prefixId the user's name prefix ID
935            * @param suffixId the user's name suffix ID
936            * @param male whether the user is male
937            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
938            January)
939            * @param birthdayDay the user's birthday day
940            * @param birthdayYear the user's birthday year
941            * @param jobTitle the user's job title
942            * @param updateUserInformation whether to update the user's information
943            * @param sendEmail whether to send the user an email notification about
944            their new account
945            * @param serviceContext the user's service context (optionally
946            <code>null</code>). Can set the expando bridge attributes for the
947            user.
948            * @return the user
949            * @throws PortalException if the user's information was invalid or if the
950            email address was reserved
951            * @throws SystemException if a system exception occurred
952            */
953            public static com.liferay.portal.model.UserSoap updateIncompleteUser(
954                    long companyId, boolean autoPassword, java.lang.String password1,
955                    java.lang.String password2, boolean autoScreenName,
956                    java.lang.String screenName, java.lang.String emailAddress,
957                    long facebookId, java.lang.String openId, String locale,
958                    java.lang.String firstName, java.lang.String middleName,
959                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
960                    int birthdayMonth, int birthdayDay, int birthdayYear,
961                    java.lang.String jobTitle, boolean updateUserInformation,
962                    boolean sendEmail,
963                    com.liferay.portal.service.ServiceContext serviceContext)
964                    throws RemoteException {
965                    try {
966                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateIncompleteUser(companyId,
967                                            autoPassword, password1, password2, autoScreenName,
968                                            screenName, emailAddress, facebookId, openId,
969                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
970                                            lastName, prefixId, suffixId, male, birthdayMonth,
971                                            birthdayDay, birthdayYear, jobTitle, updateUserInformation,
972                                            sendEmail, serviceContext);
973    
974                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
975                    }
976                    catch (Exception e) {
977                            _log.error(e, e);
978    
979                            throw new RemoteException(e.getMessage());
980                    }
981            }
982    
983            /**
984            * Sets the users in the role, removing and adding users to the role as
985            * necessary.
986            *
987            * @param roleId the primary key of the role
988            * @param userIds the primary keys of the users
989            * @throws PortalException if the current user did not have permission to
990            assign role members
991            * @throws SystemException if a system exception occurred
992            */
993            public static void setRoleUsers(long roleId, long[] userIds)
994                    throws RemoteException {
995                    try {
996                            UserServiceUtil.setRoleUsers(roleId, userIds);
997                    }
998                    catch (Exception e) {
999                            _log.error(e, e);
1000    
1001                            throw new RemoteException(e.getMessage());
1002                    }
1003            }
1004    
1005            /**
1006            * Sets the users in the user group, removing and adding users to the user
1007            * group as necessary.
1008            *
1009            * @param userGroupId the primary key of the user group
1010            * @param userIds the primary keys of the users
1011            * @throws PortalException if the current user did not have permission to
1012            assign group members
1013            * @throws SystemException if a system exception occurred
1014            */
1015            public static void setUserGroupUsers(long userGroupId, long[] userIds)
1016                    throws RemoteException {
1017                    try {
1018                            UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
1019                    }
1020                    catch (Exception e) {
1021                            _log.error(e, e);
1022    
1023                            throw new RemoteException(e.getMessage());
1024                    }
1025            }
1026    
1027            /**
1028            * Removes the users from the group.
1029            *
1030            * @param groupId the primary key of the group
1031            * @param userIds the primary keys of the users
1032            * @throws PortalException if the current user did not have permission to
1033            modify group assignments
1034            * @throws SystemException if a system exception occurred
1035            */
1036            public static void unsetGroupUsers(long groupId, long[] userIds,
1037                    com.liferay.portal.service.ServiceContext serviceContext)
1038                    throws RemoteException {
1039                    try {
1040                            UserServiceUtil.unsetGroupUsers(groupId, userIds, serviceContext);
1041                    }
1042                    catch (Exception e) {
1043                            _log.error(e, e);
1044    
1045                            throw new RemoteException(e.getMessage());
1046                    }
1047            }
1048    
1049            /**
1050            * Removes the users from the organization.
1051            *
1052            * @param organizationId the primary key of the organization
1053            * @param userIds the primary keys of the users
1054            * @throws PortalException if the current user did not have permission to
1055            modify organization assignments
1056            * @throws SystemException if a system exception occurred
1057            */
1058            public static void unsetOrganizationUsers(long organizationId,
1059                    long[] userIds) throws RemoteException {
1060                    try {
1061                            UserServiceUtil.unsetOrganizationUsers(organizationId, userIds);
1062                    }
1063                    catch (Exception e) {
1064                            _log.error(e, e);
1065    
1066                            throw new RemoteException(e.getMessage());
1067                    }
1068            }
1069    
1070            /**
1071            * Removes the users from the password policy.
1072            *
1073            * @param passwordPolicyId the primary key of the password policy
1074            * @param userIds the primary keys of the users
1075            * @throws PortalException if the current user did not have permission to
1076            modify policy assignments
1077            * @throws SystemException if a system exception occurred
1078            */
1079            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
1080                    long[] userIds) throws RemoteException {
1081                    try {
1082                            UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds);
1083                    }
1084                    catch (Exception e) {
1085                            _log.error(e, e);
1086    
1087                            throw new RemoteException(e.getMessage());
1088                    }
1089            }
1090    
1091            /**
1092            * Removes the users from the role.
1093            *
1094            * @param roleId the primary key of the role
1095            * @param userIds the primary keys of the users
1096            * @throws PortalException if the current user did not have permission to
1097            modify role assignments
1098            * @throws SystemException if a system exception occurred
1099            */
1100            public static void unsetRoleUsers(long roleId, long[] userIds)
1101                    throws RemoteException {
1102                    try {
1103                            UserServiceUtil.unsetRoleUsers(roleId, userIds);
1104                    }
1105                    catch (Exception e) {
1106                            _log.error(e, e);
1107    
1108                            throw new RemoteException(e.getMessage());
1109                    }
1110            }
1111    
1112            /**
1113            * Removes the users from the team.
1114            *
1115            * @param teamId the primary key of the team
1116            * @param userIds the primary keys of the users
1117            * @throws PortalException if the current user did not have permission to
1118            modify team assignments
1119            * @throws SystemException if a system exception occurred
1120            */
1121            public static void unsetTeamUsers(long teamId, long[] userIds)
1122                    throws RemoteException {
1123                    try {
1124                            UserServiceUtil.unsetTeamUsers(teamId, userIds);
1125                    }
1126                    catch (Exception e) {
1127                            _log.error(e, e);
1128    
1129                            throw new RemoteException(e.getMessage());
1130                    }
1131            }
1132    
1133            /**
1134            * Removes the users from the user group.
1135            *
1136            * @param userGroupId the primary key of the user group
1137            * @param userIds the primary keys of the users
1138            * @throws PortalException if the current user did not have permission to
1139            modify user group assignments
1140            * @throws SystemException if a system exception occurred
1141            */
1142            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
1143                    throws RemoteException {
1144                    try {
1145                            UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds);
1146                    }
1147                    catch (Exception e) {
1148                            _log.error(e, e);
1149    
1150                            throw new RemoteException(e.getMessage());
1151                    }
1152            }
1153    
1154            /**
1155            * Updates the user's response to the terms of use agreement.
1156            *
1157            * @param userId the primary key of the user
1158            * @param agreedToTermsOfUse whether the user has agree to the terms of use
1159            * @return the user
1160            * @throws PortalException if the current user did not have permission to
1161            update the user's agreement to terms-of-use
1162            * @throws SystemException if a system exception occurred
1163            */
1164            public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse(
1165                    long userId, boolean agreedToTermsOfUse) throws RemoteException {
1166                    try {
1167                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId,
1168                                            agreedToTermsOfUse);
1169    
1170                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
1171                    }
1172                    catch (Exception e) {
1173                            _log.error(e, e);
1174    
1175                            throw new RemoteException(e.getMessage());
1176                    }
1177            }
1178    
1179            /**
1180            * Updates the user's email address.
1181            *
1182            * @param userId the primary key of the user
1183            * @param password the user's password
1184            * @param emailAddress1 the user's new email address
1185            * @param emailAddress2 the user's new email address confirmation
1186            * @return the user
1187            * @throws PortalException if a user with the primary key could not be found
1188            or if the current user did not have permission to update the user
1189            * @throws SystemException if a system exception occurred
1190            */
1191            public static com.liferay.portal.model.UserSoap updateEmailAddress(
1192                    long userId, java.lang.String password, java.lang.String emailAddress1,
1193                    java.lang.String emailAddress2,
1194                    com.liferay.portal.service.ServiceContext serviceContext)
1195                    throws RemoteException {
1196                    try {
1197                            com.liferay.portal.model.User returnValue = UserServiceUtil.updateEmailAddress(userId,
1198                                            password, emailAddress1, emailAddress2, 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    }