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