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