001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service.http;
016    
017    import com.liferay.portal.kernel.log.Log;
018    import com.liferay.portal.kernel.log.LogFactoryUtil;
019    import com.liferay.portal.kernel.util.LocaleUtil;
020    import com.liferay.portal.service.UserServiceUtil;
021    
022    import java.rmi.RemoteException;
023    
024    /**
025     * Provides the SOAP utility for the
026     * {@link com.liferay.portal.service.UserServiceUtil} service utility. The
027     * static methods of this class calls the same methods of the service utility.
028     * However, the signatures are different because it is difficult for SOAP to
029     * support certain types.
030     *
031     * <p>
032     * ServiceBuilder follows certain rules in translating the methods. For example,
033     * if the method in the service utility returns a {@link java.util.List}, that
034     * is translated to an array of {@link com.liferay.portal.model.UserSoap}.
035     * If the method in the service utility returns a
036     * {@link com.liferay.portal.model.User}, that is translated to a
037     * {@link com.liferay.portal.model.UserSoap}. Methods that SOAP cannot
038     * safely wire are skipped.
039     * </p>
040     *
041     * <p>
042     * The benefits of using the SOAP utility is that it is cross platform
043     * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and
044     * even Perl, to call the generated services. One drawback of SOAP is that it is
045     * slow because it needs to serialize all calls into a text format (XML).
046     * </p>
047     *
048     * <p>
049     * You can see a list of services at http://localhost:8080/api/axis. Set the
050     * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure
051     * security.
052     * </p>
053     *
054     * <p>
055     * The SOAP utility is only generated for remote services.
056     * </p>
057     *
058     * @author Brian Wing Shun Chan
059     * @see UserServiceHttp
060     * @see com.liferay.portal.model.UserSoap
061     * @see com.liferay.portal.service.UserServiceUtil
062     * @generated
063     */
064    public class UserServiceSoap {
065            /**
066            * Adds the users to the group.
067            *
068            * @param groupId the primary key of the group
069            * @param userIds the primary keys of the users
070            * @param serviceContext the service context to be applied (optionally
071            <code>null</code>)
072            * @throws PortalException if a group or user with the primary key could not
073            be found, if the user did not have permission to assign group
074            members, or if the operation was not allowed by the membership
075            policy
076            * @throws SystemException if a system exception occurred
077            */
078            public static void addGroupUsers(long groupId, long[] userIds,
079                    com.liferay.portal.service.ServiceContext serviceContext)
080                    throws RemoteException {
081                    try {
082                            UserServiceUtil.addGroupUsers(groupId, userIds, serviceContext);
083                    }
084                    catch (Exception e) {
085                            _log.error(e, e);
086    
087                            throw new RemoteException(e.getMessage());
088                    }
089            }
090    
091            /**
092            * Adds the users to the organization.
093            *
094            * @param organizationId the primary key of the organization
095            * @param userIds the primary keys of the users
096            * @throws PortalException if an organization or user with the primary key
097            could not be found, if the user did not have permission to assign
098            organization members, if current user did not have an
099            organization in common with a given user, or if the operation was
100            not allowed by the membership policy
101            * @throws SystemException if a system exception occurred
102            */
103            public static void addOrganizationUsers(long organizationId, long[] userIds)
104                    throws RemoteException {
105                    try {
106                            UserServiceUtil.addOrganizationUsers(organizationId, userIds);
107                    }
108                    catch (Exception e) {
109                            _log.error(e, e);
110    
111                            throw new RemoteException(e.getMessage());
112                    }
113            }
114    
115            /**
116            * Assigns the password policy to the users, removing any other currently
117            * assigned password policies.
118            *
119            * @param passwordPolicyId the primary key of the password policy
120            * @param userIds the primary keys of the users
121            * @throws PortalException if the user did not have permission to assign
122            policy members
123            * @throws SystemException if a system exception occurred
124            */
125            public static void addPasswordPolicyUsers(long passwordPolicyId,
126                    long[] userIds) throws RemoteException {
127                    try {
128                            UserServiceUtil.addPasswordPolicyUsers(passwordPolicyId, userIds);
129                    }
130                    catch (Exception e) {
131                            _log.error(e, e);
132    
133                            throw new RemoteException(e.getMessage());
134                    }
135            }
136    
137            /**
138            * Adds the users to the role.
139            *
140            * @param roleId the primary key of the role
141            * @param userIds the primary keys of the users
142            * @throws PortalException if a role or user with the primary key could not
143            be found, if the user did not have permission to assign role
144            members, or if the operation was not allowed by the membership
145            policy
146            * @throws SystemException if a system exception occurred
147            */
148            public static void addRoleUsers(long roleId, long[] userIds)
149                    throws RemoteException {
150                    try {
151                            UserServiceUtil.addRoleUsers(roleId, userIds);
152                    }
153                    catch (Exception e) {
154                            _log.error(e, e);
155    
156                            throw new RemoteException(e.getMessage());
157                    }
158            }
159    
160            /**
161            * Adds the users to the team.
162            *
163            * @param teamId the primary key of the team
164            * @param userIds the primary keys of the users
165            * @throws PortalException if a team or user with the primary key could not
166            be found or if the user did not have permission to assign team
167            members
168            * @throws SystemException if a system exception occurred
169            */
170            public static void addTeamUsers(long teamId, long[] userIds)
171                    throws RemoteException {
172                    try {
173                            UserServiceUtil.addTeamUsers(teamId, userIds);
174                    }
175                    catch (Exception e) {
176                            _log.error(e, e);
177    
178                            throw new RemoteException(e.getMessage());
179                    }
180            }
181    
182            /**
183            * Adds a user.
184            *
185            * <p>
186            * This method handles the creation and bookkeeping of the user including
187            * its resources, metadata, and internal data structures. It is not
188            * necessary to make subsequent calls to any methods to setup default
189            * groups, resources, etc.
190            * </p>
191            *
192            * @param companyId the primary key of the user's company
193            * @param autoPassword whether a password should be automatically generated
194            for the user
195            * @param password1 the user's password
196            * @param password2 the user's password confirmation
197            * @param autoScreenName whether a screen name should be automatically
198            generated for the user
199            * @param screenName the user's screen name
200            * @param emailAddress the user's email address
201            * @param facebookId the user's facebook ID
202            * @param openId the user's OpenID
203            * @param locale the user's locale
204            * @param firstName the user's first name
205            * @param middleName the user's middle name
206            * @param lastName the user's last name
207            * @param prefixId the user's name prefix ID
208            * @param suffixId the user's name suffix ID
209            * @param male whether the user is male
210            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
211            January)
212            * @param birthdayDay the user's birthday day
213            * @param birthdayYear the user's birthday year
214            * @param jobTitle the user's job title
215            * @param groupIds the primary keys of the user's groups
216            * @param organizationIds the primary keys of the user's organizations
217            * @param roleIds the primary keys of the roles this user possesses
218            * @param userGroupIds the primary keys of the user's user groups
219            * @param sendEmail whether to send the user an email notification about
220            their new account
221            * @param serviceContext the service context to be applied (optionally
222            <code>null</code>). Can set the UUID (with the <code>uuid</code>
223            attribute), asset category IDs, asset tag names, and expando
224            bridge attributes for the user.
225            * @return the new user
226            * @throws PortalException if the user's information was invalid, if the
227            operation was not allowed by the membership policy, if the
228            creator did not have permission to add users, or if the email
229            address was reserved
230            * @throws SystemException if a system exception occurred
231            */
232            public static com.liferay.portal.model.UserSoap addUser(long companyId,
233                    boolean autoPassword, java.lang.String password1,
234                    java.lang.String password2, boolean autoScreenName,
235                    java.lang.String screenName, java.lang.String emailAddress,
236                    long facebookId, java.lang.String openId, String locale,
237                    java.lang.String firstName, java.lang.String middleName,
238                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
239                    int birthdayMonth, int birthdayDay, int birthdayYear,
240                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
241                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
242                    com.liferay.portal.service.ServiceContext serviceContext)
243                    throws RemoteException {
244                    try {
245                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
246                                            autoPassword, password1, password2, autoScreenName,
247                                            screenName, emailAddress, facebookId, openId,
248                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
249                                            lastName, prefixId, suffixId, male, birthdayMonth,
250                                            birthdayDay, birthdayYear, jobTitle, groupIds,
251                                            organizationIds, roleIds, userGroupIds, sendEmail,
252                                            serviceContext);
253    
254                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
255                    }
256                    catch (Exception e) {
257                            _log.error(e, e);
258    
259                            throw new RemoteException(e.getMessage());
260                    }
261            }
262    
263            /**
264            * Adds a user with additional parameters.
265            *
266            * <p>
267            * This method handles the creation and bookkeeping of the user including
268            * its resources, metadata, and internal data structures. It is not
269            * necessary to make subsequent calls to any methods to setup default
270            * groups, resources, etc.
271            * </p>
272            *
273            * @param companyId the primary key of the user's company
274            * @param autoPassword whether a password should be automatically generated
275            for the user
276            * @param password1 the user's password
277            * @param password2 the user's password confirmation
278            * @param autoScreenName whether a screen name should be automatically
279            generated for the user
280            * @param screenName the user's screen name
281            * @param emailAddress the user's email address
282            * @param facebookId the user's facebook ID
283            * @param openId the user's OpenID
284            * @param locale the user's locale
285            * @param firstName the user's first name
286            * @param middleName the user's middle name
287            * @param lastName the user's last name
288            * @param prefixId the user's name prefix ID
289            * @param suffixId the user's name suffix ID
290            * @param male whether the user is male
291            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
292            January)
293            * @param birthdayDay the user's birthday day
294            * @param birthdayYear the user's birthday year
295            * @param jobTitle the user's job title
296            * @param groupIds the primary keys of the user's groups
297            * @param organizationIds the primary keys of the user's organizations
298            * @param roleIds the primary keys of the roles this user possesses
299            * @param userGroupIds the primary keys of the user's user groups
300            * @param addresses the user's addresses
301            * @param emailAddresses the user's email addresses
302            * @param phones the user's phone numbers
303            * @param websites the user's websites
304            * @param announcementsDelivers the announcements deliveries
305            * @param sendEmail whether to send the user an email notification about
306            their new account
307            * @param serviceContext the service context to be applied (optionally
308            <code>null</code>). Can set the UUID (with the <code>uuid</code>
309            attribute), asset category IDs, asset tag names, and expando
310            bridge attributes for the user.
311            * @return the new user
312            * @throws PortalException if the user's information was invalid, if the
313            creator did not have permission to add users, if the email
314            address was reserved, if the operation was not allowed by the
315            membership policy, or if some other portal exception occurred
316            * @throws SystemException if a system exception occurred
317            */
318            public static com.liferay.portal.model.UserSoap addUser(long companyId,
319                    boolean autoPassword, java.lang.String password1,
320                    java.lang.String password2, boolean autoScreenName,
321                    java.lang.String screenName, java.lang.String emailAddress,
322                    long facebookId, java.lang.String openId, String locale,
323                    java.lang.String firstName, java.lang.String middleName,
324                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
325                    int birthdayMonth, int birthdayDay, int birthdayYear,
326                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
327                    long[] roleIds, long[] userGroupIds,
328                    com.liferay.portal.model.AddressSoap[] addresses,
329                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
330                    com.liferay.portal.model.PhoneSoap[] phones,
331                    com.liferay.portal.model.WebsiteSoap[] websites,
332                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
333                    boolean sendEmail,
334                    com.liferay.portal.service.ServiceContext serviceContext)
335                    throws RemoteException {
336                    try {
337                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId,
338                                            autoPassword, password1, password2, autoScreenName,
339                                            screenName, emailAddress, facebookId, openId,
340                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
341                                            lastName, prefixId, suffixId, male, birthdayMonth,
342                                            birthdayDay, birthdayYear, jobTitle, groupIds,
343                                            organizationIds, roleIds, userGroupIds,
344                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
345                                                    addresses),
346                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
347                                                    emailAddresses),
348                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
349                                                    phones),
350                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
351                                                    websites),
352                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
353                                                    announcementsDelivers), sendEmail, serviceContext);
354    
355                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
356                    }
357                    catch (Exception e) {
358                            _log.error(e, e);
359    
360                            throw new RemoteException(e.getMessage());
361                    }
362            }
363    
364            /**
365            * Adds the users to the user group.
366            *
367            * @param userGroupId the primary key of the user group
368            * @param userIds the primary keys of the users
369            * @throws PortalException if a user group or user with the primary could
370            could not be found, if the current user did not have permission
371            to assign group members, or if the operation was not allowed by
372            the membership policy
373            * @throws SystemException if a system exception occurred
374            */
375            public static void addUserGroupUsers(long userGroupId, long[] userIds)
376                    throws RemoteException {
377                    try {
378                            UserServiceUtil.addUserGroupUsers(userGroupId, userIds);
379                    }
380                    catch (Exception e) {
381                            _log.error(e, e);
382    
383                            throw new RemoteException(e.getMessage());
384                    }
385            }
386    
387            /**
388            * Adds a user with workflow.
389            *
390            * <p>
391            * This method handles the creation and bookkeeping of the user including
392            * its resources, metadata, and internal data structures. It is not
393            * necessary to make subsequent calls to any methods to setup default
394            * groups, resources, etc.
395            * </p>
396            *
397            * @param companyId the primary key of the user's company
398            * @param autoPassword whether a password should be automatically generated
399            for the user
400            * @param password1 the user's password
401            * @param password2 the user's password confirmation
402            * @param autoScreenName whether a screen name should be automatically
403            generated for the user
404            * @param screenName the user's screen name
405            * @param emailAddress the user's email address
406            * @param facebookId the user's facebook ID
407            * @param openId the user's OpenID
408            * @param locale the user's locale
409            * @param firstName the user's first name
410            * @param middleName the user's middle name
411            * @param lastName the user's last name
412            * @param prefixId the user's name prefix ID
413            * @param suffixId the user's name suffix ID
414            * @param male whether the user is male
415            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
416            January)
417            * @param birthdayDay the user's birthday day
418            * @param birthdayYear the user's birthday year
419            * @param jobTitle the user's job title
420            * @param groupIds the primary keys of the user's groups
421            * @param organizationIds the primary keys of the user's organizations
422            * @param roleIds the primary keys of the roles this user possesses
423            * @param userGroupIds the primary keys of the user's user groups
424            * @param sendEmail whether to send the user an email notification about
425            their new account
426            * @param serviceContext the service context to be applied (optionally
427            <code>null</code>). Can set the UUID (with the <code>uuid</code>
428            attribute), asset category IDs, asset tag names, and expando
429            bridge attributes for the user.
430            * @return the new user
431            * @throws PortalException if the user's information was invalid, if the
432            operation was not allowed by the membership policy, if the
433            creator did not have permission to add users, or if the email
434            address was reserved
435            * @throws SystemException if a system exception occurred
436            */
437            public static com.liferay.portal.model.UserSoap addUserWithWorkflow(
438                    long companyId, boolean autoPassword, java.lang.String password1,
439                    java.lang.String password2, boolean autoScreenName,
440                    java.lang.String screenName, java.lang.String emailAddress,
441                    long facebookId, java.lang.String openId, String locale,
442                    java.lang.String firstName, java.lang.String middleName,
443                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
444                    int birthdayMonth, int birthdayDay, int birthdayYear,
445                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
446                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
447                    com.liferay.portal.service.ServiceContext serviceContext)
448                    throws RemoteException {
449                    try {
450                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId,
451                                            autoPassword, password1, password2, autoScreenName,
452                                            screenName, emailAddress, facebookId, openId,
453                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
454                                            lastName, prefixId, suffixId, male, birthdayMonth,
455                                            birthdayDay, birthdayYear, jobTitle, groupIds,
456                                            organizationIds, roleIds, userGroupIds, sendEmail,
457                                            serviceContext);
458    
459                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
460                    }
461                    catch (Exception e) {
462                            _log.error(e, e);
463    
464                            throw new RemoteException(e.getMessage());
465                    }
466            }
467    
468            /**
469            * Adds a user with workflow and additional parameters.
470            *
471            * <p>
472            * This method handles the creation and bookkeeping of the user including
473            * its resources, metadata, and internal data structures. It is not
474            * necessary to make subsequent calls to any methods to setup default
475            * groups, resources, etc.
476            * </p>
477            *
478            * @param companyId the primary key of the user's company
479            * @param autoPassword whether a password should be automatically generated
480            for the user
481            * @param password1 the user's password
482            * @param password2 the user's password confirmation
483            * @param autoScreenName whether a screen name should be automatically
484            generated for the user
485            * @param screenName the user's screen name
486            * @param emailAddress the user's email address
487            * @param facebookId the user's facebook ID
488            * @param openId the user's OpenID
489            * @param locale the user's locale
490            * @param firstName the user's first name
491            * @param middleName the user's middle name
492            * @param lastName the user's last name
493            * @param prefixId the user's name prefix ID
494            * @param suffixId the user's name suffix ID
495            * @param male whether the user is male
496            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
497            January)
498            * @param birthdayDay the user's birthday day
499            * @param birthdayYear the user's birthday year
500            * @param jobTitle the user's job title
501            * @param groupIds the primary keys of the user's groups
502            * @param organizationIds the primary keys of the user's organizations
503            * @param roleIds the primary keys of the roles this user possesses
504            * @param userGroupIds the primary keys of the user's user groups
505            * @param addresses the user's addresses
506            * @param emailAddresses the user's email addresses
507            * @param phones the user's phone numbers
508            * @param websites the user's websites
509            * @param announcementsDelivers the announcements deliveries
510            * @param sendEmail whether to send the user an email notification about
511            their new account
512            * @param serviceContext the service context to be applied (optionally
513            <code>null</code>). Can set the UUID (with the <code>uuid</code>
514            attribute), asset category IDs, asset tag names, and expando
515            bridge attributes for the user.
516            * @return the new user
517            * @throws PortalException if the user's information was invalid, if the
518            operation was not allowed by the membership policy, if the
519            creator did not have permission to add users, if the email
520            address was reserved, or if some other portal exception occurred
521            * @throws SystemException if a system exception occurred
522            */
523            public static com.liferay.portal.model.UserSoap addUserWithWorkflow(
524                    long companyId, boolean autoPassword, java.lang.String password1,
525                    java.lang.String password2, boolean autoScreenName,
526                    java.lang.String screenName, java.lang.String emailAddress,
527                    long facebookId, java.lang.String openId, String locale,
528                    java.lang.String firstName, java.lang.String middleName,
529                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
530                    int birthdayMonth, int birthdayDay, int birthdayYear,
531                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
532                    long[] roleIds, long[] userGroupIds,
533                    com.liferay.portal.model.AddressSoap[] addresses,
534                    com.liferay.portal.model.EmailAddressSoap[] emailAddresses,
535                    com.liferay.portal.model.PhoneSoap[] phones,
536                    com.liferay.portal.model.WebsiteSoap[] websites,
537                    com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers,
538                    boolean sendEmail,
539                    com.liferay.portal.service.ServiceContext serviceContext)
540                    throws RemoteException {
541                    try {
542                            com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId,
543                                            autoPassword, password1, password2, autoScreenName,
544                                            screenName, emailAddress, facebookId, openId,
545                                            LocaleUtil.fromLanguageId(locale), firstName, middleName,
546                                            lastName, prefixId, suffixId, male, birthdayMonth,
547                                            birthdayDay, birthdayYear, jobTitle, groupIds,
548                                            organizationIds, roleIds, userGroupIds,
549                                            com.liferay.portal.model.impl.AddressModelImpl.toModels(
550                                                    addresses),
551                                            com.liferay.portal.model.impl.EmailAddressModelImpl.toModels(
552                                                    emailAddresses),
553                                            com.liferay.portal.model.impl.PhoneModelImpl.toModels(
554                                                    phones),
555                                            com.liferay.portal.model.impl.WebsiteModelImpl.toModels(
556                                                    websites),
557                                            com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels(
558                                                    announcementsDelivers), sendEmail, serviceContext);
559    
560                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
561                    }
562                    catch (Exception e) {
563                            _log.error(e, e);
564    
565                            throw new RemoteException(e.getMessage());
566                    }
567            }
568    
569            /**
570            * Deletes the user's portrait image.
571            *
572            * @param userId the primary key of the user
573            * @throws PortalException if a user with the primary key could not be
574            found, if the user's portrait could not be found, or if the
575            current user did not have permission to update the user
576            * @throws SystemException if a system exception occurred
577            */
578            public static void deletePortrait(long userId) throws RemoteException {
579                    try {
580                            UserServiceUtil.deletePortrait(userId);
581                    }
582                    catch (Exception e) {
583                            _log.error(e, e);
584    
585                            throw new RemoteException(e.getMessage());
586                    }
587            }
588    
589            /**
590            * Removes the user from the role.
591            *
592            * @param roleId the primary key of the role
593            * @param userId the primary key of the user
594            * @throws PortalException if a role or user with the primary key could not
595            be found, or if the current user did not have permission to
596            assign role members
597            * @throws SystemException if a system exception occurred
598            */
599            public static void deleteRoleUser(long roleId, long userId)
600                    throws RemoteException {
601                    try {
602                            UserServiceUtil.deleteRoleUser(roleId, userId);
603                    }
604                    catch (Exception e) {
605                            _log.error(e, e);
606    
607                            throw new RemoteException(e.getMessage());
608                    }
609            }
610    
611            /**
612            * Deletes the user.
613            *
614            * @param userId the primary key of the user
615            * @throws PortalException if a user with the primary key could not be found
616            or if the current user did not have permission to delete the user
617            * @throws SystemException if a system exception occurred
618            */
619            public static void deleteUser(long userId) throws RemoteException {
620                    try {
621                            UserServiceUtil.deleteUser(userId);
622                    }
623                    catch (Exception e) {
624                            _log.error(e, e);
625    
626                            throw new RemoteException(e.getMessage());
627                    }
628            }
629    
630            public static com.liferay.portal.model.UserSoap[] getCompanyUsers(
631                    long companyId, int start, int end) throws RemoteException {
632                    try {
633                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getCompanyUsers(companyId,
634                                            start, end);
635    
636                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
637                    }
638                    catch (Exception e) {
639                            _log.error(e, e);
640    
641                            throw new RemoteException(e.getMessage());
642                    }
643            }
644    
645            public static int getCompanyUsersCount(long companyId)
646                    throws RemoteException {
647                    try {
648                            int returnValue = UserServiceUtil.getCompanyUsersCount(companyId);
649    
650                            return returnValue;
651                    }
652                    catch (Exception e) {
653                            _log.error(e, e);
654    
655                            throw new RemoteException(e.getMessage());
656                    }
657            }
658    
659            /**
660            * Returns the primary keys of all the users belonging to the group.
661            *
662            * @param groupId the primary key of the group
663            * @return the primary keys of the users belonging to the group
664            * @throws PortalException if the current user did not have permission to
665            view group assignments
666            * @throws SystemException if a system exception occurred
667            */
668            public static long[] getGroupUserIds(long groupId)
669                    throws RemoteException {
670                    try {
671                            long[] returnValue = UserServiceUtil.getGroupUserIds(groupId);
672    
673                            return returnValue;
674                    }
675                    catch (Exception e) {
676                            _log.error(e, e);
677    
678                            throw new RemoteException(e.getMessage());
679                    }
680            }
681    
682            /**
683            * Returns all the users belonging to the group.
684            *
685            * @param groupId the primary key of the group
686            * @return the users belonging to the group
687            * @throws PortalException if the current user did not have permission to
688            view group assignments
689            * @throws SystemException if a system exception occurred
690            */
691            public static com.liferay.portal.model.UserSoap[] getGroupUsers(
692                    long groupId) throws RemoteException {
693                    try {
694                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getGroupUsers(groupId);
695    
696                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
697                    }
698                    catch (Exception e) {
699                            _log.error(e, e);
700    
701                            throw new RemoteException(e.getMessage());
702                    }
703            }
704    
705            /**
706            * Returns the primary keys of all the users belonging to the organization.
707            *
708            * @param organizationId the primary key of the organization
709            * @return the primary keys of the users belonging to the organization
710            * @throws PortalException if the current user did not have permission to
711            view organization assignments
712            * @throws SystemException if a system exception occurred
713            */
714            public static long[] getOrganizationUserIds(long organizationId)
715                    throws RemoteException {
716                    try {
717                            long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId);
718    
719                            return returnValue;
720                    }
721                    catch (Exception e) {
722                            _log.error(e, e);
723    
724                            throw new RemoteException(e.getMessage());
725                    }
726            }
727    
728            /**
729            * Returns all the users belonging to the organization.
730            *
731            * @param organizationId the primary key of the organization
732            * @return users belonging to the organization
733            * @throws PortalException if the current user did not have permission to
734            view organization assignments
735            * @throws SystemException if a system exception occurred
736            */
737            public static com.liferay.portal.model.UserSoap[] getOrganizationUsers(
738                    long organizationId) throws RemoteException {
739                    try {
740                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getOrganizationUsers(organizationId);
741    
742                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
743                    }
744                    catch (Exception e) {
745                            _log.error(e, e);
746    
747                            throw new RemoteException(e.getMessage());
748                    }
749            }
750    
751            /**
752            * Returns the primary keys of all the users belonging to the role.
753            *
754            * @param roleId the primary key of the role
755            * @return the primary keys of the users belonging to the role
756            * @throws PortalException if the current user did not have permission to
757            view role members
758            * @throws SystemException if a system exception occurred
759            */
760            public static long[] getRoleUserIds(long roleId) throws RemoteException {
761                    try {
762                            long[] returnValue = UserServiceUtil.getRoleUserIds(roleId);
763    
764                            return returnValue;
765                    }
766                    catch (Exception e) {
767                            _log.error(e, e);
768    
769                            throw new RemoteException(e.getMessage());
770                    }
771            }
772    
773            /**
774            * Returns the user with the email address.
775            *
776            * @param companyId the primary key of the user's company
777            * @param emailAddress the user's email address
778            * @return the user with the email address
779            * @throws PortalException if a user with the email address could not be
780            found or if the current user did not have permission to view the
781            user
782            * @throws SystemException if a system exception occurred
783            */
784            public static com.liferay.portal.model.UserSoap getUserByEmailAddress(
785                    long companyId, java.lang.String emailAddress)
786                    throws RemoteException {
787                    try {
788                            com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId,
789                                            emailAddress);
790    
791                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
792                    }
793                    catch (Exception e) {
794                            _log.error(e, e);
795    
796                            throw new RemoteException(e.getMessage());
797                    }
798            }
799    
800            /**
801            * Returns the user with the primary key.
802            *
803            * @param userId the primary key of the user
804            * @return the user with the primary key
805            * @throws PortalException if a user with the primary key could not be found
806            or if the current user did not have permission to view the user
807            * @throws SystemException if a system exception occurred
808            */
809            public static com.liferay.portal.model.UserSoap getUserById(long userId)
810                    throws RemoteException {
811                    try {
812                            com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId);
813    
814                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
815                    }
816                    catch (Exception e) {
817                            _log.error(e, e);
818    
819                            throw new RemoteException(e.getMessage());
820                    }
821            }
822    
823            /**
824            * Returns the user with the screen name.
825            *
826            * @param companyId the primary key of the user's company
827            * @param screenName the user's screen name
828            * @return the user with the screen name
829            * @throws PortalException if a user with the screen name could not be found
830            or if the current user did not have permission to view the user
831            * @throws SystemException if a system exception occurred
832            */
833            public static com.liferay.portal.model.UserSoap getUserByScreenName(
834                    long companyId, java.lang.String screenName) throws RemoteException {
835                    try {
836                            com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId,
837                                            screenName);
838    
839                            return com.liferay.portal.model.UserSoap.toSoapModel(returnValue);
840                    }
841                    catch (Exception e) {
842                            _log.error(e, e);
843    
844                            throw new RemoteException(e.getMessage());
845                    }
846            }
847    
848            public static com.liferay.portal.model.UserSoap[] getUserGroupUsers(
849                    long userGroupId) throws RemoteException {
850                    try {
851                            java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getUserGroupUsers(userGroupId);
852    
853                            return com.liferay.portal.model.UserSoap.toSoapModels(returnValue);
854                    }
855                    catch (Exception e) {
856                            _log.error(e, e);
857    
858                            throw new RemoteException(e.getMessage());
859                    }
860            }
861    
862            /**
863            * Returns the primary key of the user with the email address.
864            *
865            * @param companyId the primary key of the user's company
866            * @param emailAddress the user's email address
867            * @return the primary key of the user with the email address
868            * @throws PortalException if a user with the email address could not be
869            found
870            * @throws SystemException if a system exception occurred
871            */
872            public static long getUserIdByEmailAddress(long companyId,
873                    java.lang.String emailAddress) throws RemoteException {
874                    try {
875                            long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId,
876                                            emailAddress);
877    
878                            return returnValue;
879                    }
880                    catch (Exception e) {
881                            _log.error(e, e);
882    
883                            throw new RemoteException(e.getMessage());
884                    }
885            }
886    
887            /**
888            * Returns the primary key of the user with the screen name.
889            *
890            * @param companyId the primary key of the user's company
891            * @param screenName the user's screen name
892            * @return the primary key of the user with the screen name
893            * @throws PortalException if a user with the screen name could not be found
894            * @throws SystemException if a system exception occurred
895            */
896            public static long getUserIdByScreenName(long companyId,
897                    java.lang.String screenName) throws RemoteException {
898                    try {
899                            long returnValue = UserServiceUtil.getUserIdByScreenName(companyId,
900                                            screenName);
901    
902                            return returnValue;
903                    }
904                    catch (Exception e) {
905                            _log.error(e, e);
906    
907                            throw new RemoteException(e.getMessage());
908                    }
909            }
910    
911            /**
912            * Returns <code>true</code> if the user is a member of the group.
913            *
914            * @param groupId the primary key of the group
915            * @param userId the primary key of the user
916            * @return <code>true</code> if the user is a member of the group;
917            <code>false</code> otherwise
918            * @throws PortalException if the current user did not have permission to
919            view the user or group members
920            * @throws SystemException if a system exception occurred
921            */
922            public static boolean hasGroupUser(long groupId, long userId)
923                    throws RemoteException {
924                    try {
925                            boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId);
926    
927                            return returnValue;
928                    }
929                    catch (Exception e) {
930                            _log.error(e, e);
931    
932                            throw new RemoteException(e.getMessage());
933                    }
934            }
935    
936            /**
937            * Returns <code>true</code> if the user is a member of the role.
938            *
939            * @param roleId the primary key of the role
940            * @param userId the primary key of the user
941            * @return <code>true</code> if the user is a member of the role;
942            <code>false</code> otherwise
943            * @throws PortalException if the current user did not have permission to
944            view the user or role members
945            * @throws SystemException if a system exception occurred
946            */
947            public static boolean hasRoleUser(long roleId, long userId)
948                    throws RemoteException {
949                    try {
950                            boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId);
951    
952                            return returnValue;
953                    }
954                    catch (Exception e) {
955                            _log.error(e, e);
956    
957                            throw new RemoteException(e.getMessage());
958                    }
959            }
960    
961            /**
962            * Returns <code>true</code> if the user has the role with the name,
963            * optionally through inheritance.
964            *
965            * @param companyId the primary key of the role's company
966            * @param name the name of the role (must be a regular role, not an
967            organization, site or provider role)
968            * @param userId the primary key of the user
969            * @param inherited whether to include roles inherited from organizations,
970            sites, etc.
971            * @return <code>true</code> if the user has the role; <code>false</code>
972            otherwise
973            * @throws PortalException if a role with the name could not be found
974            * @throws SystemException if a system exception occurred
975            */
976            public static boolean hasRoleUser(long companyId, java.lang.String name,
977                    long userId, boolean inherited) throws RemoteException {
978                    try {
979                            boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name,
980                                            userId, inherited);
981    
982                            return returnValue;
983                    }
984                    catch (Exception e) {
985                            _log.error(e, e);
986    
987                            throw new RemoteException(e.getMessage());
988                    }
989            }
990    
991            /**
992            * Sets the users in the role, removing and adding users to the role as
993            * necessary.
994            *
995            * @param roleId the primary key of the role
996            * @param userIds the primary keys of the users
997            * @throws PortalException if the current user did not have permission to
998            assign role members or if the operation was not allowed by the
999            membership policy
1000            * @throws SystemException if a system exception occurred
1001            */
1002            public static void setRoleUsers(long roleId, long[] userIds)
1003                    throws RemoteException {
1004                    try {
1005                            UserServiceUtil.setRoleUsers(roleId, userIds);
1006                    }
1007                    catch (Exception e) {
1008                            _log.error(e, e);
1009    
1010                            throw new RemoteException(e.getMessage());
1011                    }
1012            }
1013    
1014            /**
1015            * Sets the users in the user group, removing and adding users to the user
1016            * group as necessary.
1017            *
1018            * @param userGroupId the primary key of the user group
1019            * @param userIds the primary keys of the users
1020            * @throws PortalException if the current user did not have permission to
1021            assign group members
1022            * @throws SystemException if a system exception occurred
1023            */
1024            public static void setUserGroupUsers(long userGroupId, long[] userIds)
1025                    throws RemoteException {
1026                    try {
1027                            UserServiceUtil.setUserGroupUsers(userGroupId, userIds);
1028                    }
1029                    catch (Exception e) {
1030                            _log.error(e, e);
1031    
1032                            throw new RemoteException(e.getMessage());
1033                    }
1034            }
1035    
1036            /**
1037            * Removes the users from the teams of a group.
1038            *
1039            * @param groupId the primary key of the group
1040            * @param userIds the primary keys of the users
1041            * @throws PortalException if the current user did not have permission to
1042            modify user group assignments
1043            * @throws SystemException if a system exception occurred
1044            */
1045            public static void unsetGroupTeamsUsers(long groupId, long[] userIds)
1046                    throws RemoteException {
1047                    try {
1048                            UserServiceUtil.unsetGroupTeamsUsers(groupId, userIds);
1049                    }
1050                    catch (Exception e) {
1051                            _log.error(e, e);
1052    
1053                            throw new RemoteException(e.getMessage());
1054                    }
1055            }
1056    
1057            /**
1058            * Removes the users from the group.
1059            *
1060            * @param groupId the primary key of the group
1061            * @param userIds the primary keys of the users
1062            * @param serviceContext the service context to be applied (optionally
1063            <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 to be applied. Must set the
1223            portal URL, main path, primary key of the layout, remote address,
1224            remote host, and 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 service context to be applied (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 to be applied. Must set
1374            whether user 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 service context to be applied (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 service context to be applied (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    }