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