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