001    /**
002     * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the user remote service. This utility wraps {@link com.liferay.portal.service.impl.UserServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see UserService
030     * @see com.liferay.portal.service.base.UserServiceBaseImpl
031     * @see com.liferay.portal.service.impl.UserServiceImpl
032     * @generated
033     */
034    public class UserServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Adds the users to the group.
043            *
044            * @param groupId the primary key of the group
045            * @param userIds the primary keys of the users
046            * @throws PortalException if a group or user with the primary key could not
047            be found, or if the user did not have permission to assign group
048            members
049            * @throws SystemException if a system exception occurred
050            */
051            public static void addGroupUsers(long groupId, long[] userIds,
052                    com.liferay.portal.service.ServiceContext serviceContext)
053                    throws com.liferay.portal.kernel.exception.PortalException,
054                            com.liferay.portal.kernel.exception.SystemException {
055                    getService().addGroupUsers(groupId, userIds, serviceContext);
056            }
057    
058            /**
059            * Adds the users to the organization.
060            *
061            * @param organizationId the primary key of the organization
062            * @param userIds the primary keys of the users
063            * @throws PortalException if an organization or user with the primary key
064            could not be found, if the user did not have permission to assign
065            organization members, or if current user did not have an
066            organization in common with a given user
067            * @throws SystemException if a system exception occurred
068            */
069            public static void addOrganizationUsers(long organizationId, long[] userIds)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    getService().addOrganizationUsers(organizationId, userIds);
073            }
074    
075            /**
076            * Assigns the password policy to the users, removing any other currently
077            * assigned password policies.
078            *
079            * @param passwordPolicyId the primary key of the password policy
080            * @param userIds the primary keys of the users
081            * @throws PortalException if the user did not have permission to assign
082            policy members
083            * @throws SystemException if a system exception occurred
084            */
085            public static void addPasswordPolicyUsers(long passwordPolicyId,
086                    long[] userIds)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException {
089                    getService().addPasswordPolicyUsers(passwordPolicyId, userIds);
090            }
091    
092            /**
093            * Adds the users to the role.
094            *
095            * @param roleId the primary key of the role
096            * @param userIds the primary keys of the users
097            * @throws PortalException if a role or user with the primary key could not
098            be found or if the user did not have permission to assign role
099            members
100            * @throws SystemException if a system exception occurred
101            */
102            public static void addRoleUsers(long roleId, long[] userIds)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException {
105                    getService().addRoleUsers(roleId, userIds);
106            }
107    
108            /**
109            * Adds the users to the team.
110            *
111            * @param teamId the primary key of the team
112            * @param userIds the primary keys of the users
113            * @throws PortalException if a team or user with the primary key could not
114            be found or if the user did not have permission to assign team
115            members
116            * @throws SystemException if a system exception occurred
117            */
118            public static void addTeamUsers(long teamId, long[] userIds)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException {
121                    getService().addTeamUsers(teamId, userIds);
122            }
123    
124            /**
125            * Adds a user with additional parameters.
126            *
127            * <p>
128            * This method handles the creation and bookkeeping of the user including
129            * its resources, metadata, and internal data structures. It is not
130            * necessary to make subsequent calls to any methods to setup default
131            * groups, resources, etc.
132            * </p>
133            *
134            * @param companyId the primary key of the user's company
135            * @param autoPassword whether a password should be automatically generated
136            for the user
137            * @param password1 the user's password
138            * @param password2 the user's password confirmation
139            * @param autoScreenName whether a screen name should be automatically
140            generated for the user
141            * @param screenName the user's screen name
142            * @param emailAddress the user's email address
143            * @param facebookId the user's facebook ID
144            * @param openId the user's OpenID
145            * @param locale the user's locale
146            * @param firstName the user's first name
147            * @param middleName the user's middle name
148            * @param lastName the user's last name
149            * @param prefixId the user's name prefix ID
150            * @param suffixId the user's name suffix ID
151            * @param male whether the user is male
152            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
153            January)
154            * @param birthdayDay the user's birthday day
155            * @param birthdayYear the user's birthday year
156            * @param jobTitle the user's job title
157            * @param groupIds the primary keys of the user's groups
158            * @param organizationIds the primary keys of the user's organizations
159            * @param roleIds the primary keys of the roles this user possesses
160            * @param userGroupIds the primary keys of the user's user groups
161            * @param addresses the user's addresses
162            * @param emailAddresses the user's email addresses
163            * @param phones the user's phone numbers
164            * @param websites the user's websites
165            * @param announcementsDelivers the announcements deliveries
166            * @param sendEmail whether to send the user an email notification about
167            their new account
168            * @param serviceContext the user's service context (optionally
169            <code>null</code>). Can set the universally unique identifier
170            (with the <code>uuid</code> attribute), asset category IDs, asset
171            tag names, and expando bridge attributes for the user.
172            * @return the new user
173            * @throws PortalException if the user's information was invalid, if the
174            creator did not have permission to add users, if the email
175            address was reserved, or some other portal exception occurred
176            * @throws SystemException if a system exception occurred
177            */
178            public static com.liferay.portal.model.User addUser(long companyId,
179                    boolean autoPassword, java.lang.String password1,
180                    java.lang.String password2, boolean autoScreenName,
181                    java.lang.String screenName, java.lang.String emailAddress,
182                    long facebookId, java.lang.String openId, java.util.Locale locale,
183                    java.lang.String firstName, java.lang.String middleName,
184                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
185                    int birthdayMonth, int birthdayDay, int birthdayYear,
186                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
187                    long[] roleIds, long[] userGroupIds,
188                    java.util.List<com.liferay.portal.model.Address> addresses,
189                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
190                    java.util.List<com.liferay.portal.model.Phone> phones,
191                    java.util.List<com.liferay.portal.model.Website> websites,
192                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
193                    boolean sendEmail,
194                    com.liferay.portal.service.ServiceContext serviceContext)
195                    throws com.liferay.portal.kernel.exception.PortalException,
196                            com.liferay.portal.kernel.exception.SystemException {
197                    return getService()
198                                       .addUser(companyId, autoPassword, password1, password2,
199                            autoScreenName, screenName, emailAddress, facebookId, openId,
200                            locale, firstName, middleName, lastName, prefixId, suffixId, male,
201                            birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds,
202                            organizationIds, roleIds, userGroupIds, addresses, emailAddresses,
203                            phones, websites, announcementsDelivers, sendEmail, serviceContext);
204            }
205    
206            /**
207            * Adds a user.
208            *
209            * <p>
210            * This method handles the creation and bookkeeping of the user including
211            * its resources, metadata, and internal data structures. It is not
212            * necessary to make subsequent calls to any methods to setup default
213            * groups, resources, etc.
214            * </p>
215            *
216            * @param companyId the primary key of the user's company
217            * @param autoPassword whether a password should be automatically generated
218            for the user
219            * @param password1 the user's password
220            * @param password2 the user's password confirmation
221            * @param autoScreenName whether a screen name should be automatically
222            generated for the user
223            * @param screenName the user's screen name
224            * @param emailAddress the user's email address
225            * @param facebookId the user's facebook ID
226            * @param openId the user's OpenID
227            * @param locale the user's locale
228            * @param firstName the user's first name
229            * @param middleName the user's middle name
230            * @param lastName the user's last name
231            * @param prefixId the user's name prefix ID
232            * @param suffixId the user's name suffix ID
233            * @param male whether the user is male
234            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
235            January)
236            * @param birthdayDay the user's birthday day
237            * @param birthdayYear the user's birthday year
238            * @param jobTitle the user's job title
239            * @param groupIds the primary keys of the user's groups
240            * @param organizationIds the primary keys of the user's organizations
241            * @param roleIds the primary keys of the roles this user possesses
242            * @param userGroupIds the primary keys of the user's user groups
243            * @param sendEmail whether to send the user an email notification about
244            their new account
245            * @param serviceContext the user's service context (optionally
246            <code>null</code>). Can set the universally unique identifier
247            (with the <code>uuid</code> attribute), asset category IDs, asset
248            tag names, and expando bridge attributes for the user.
249            * @return the new user
250            * @throws PortalException if the user's information was invalid, if the
251            creator did not have permission to add users, or if the email
252            address was reserved
253            * @throws SystemException if a system exception occurred
254            */
255            public static com.liferay.portal.model.User addUser(long companyId,
256                    boolean autoPassword, java.lang.String password1,
257                    java.lang.String password2, boolean autoScreenName,
258                    java.lang.String screenName, java.lang.String emailAddress,
259                    long facebookId, java.lang.String openId, java.util.Locale locale,
260                    java.lang.String firstName, java.lang.String middleName,
261                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
262                    int birthdayMonth, int birthdayDay, int birthdayYear,
263                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
264                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
265                    com.liferay.portal.service.ServiceContext serviceContext)
266                    throws com.liferay.portal.kernel.exception.PortalException,
267                            com.liferay.portal.kernel.exception.SystemException {
268                    return getService()
269                                       .addUser(companyId, autoPassword, password1, password2,
270                            autoScreenName, screenName, emailAddress, facebookId, openId,
271                            locale, firstName, middleName, lastName, prefixId, suffixId, male,
272                            birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds,
273                            organizationIds, roleIds, userGroupIds, sendEmail, serviceContext);
274            }
275    
276            /**
277            * Adds the users to the user group.
278            *
279            * @param userGroupId the primary key of the user group
280            * @param userIds the primary keys of the users
281            * @throws PortalException if a user group or user with the primary could
282            could not be found, or if the current user did not have
283            permission to assign group members
284            * @throws SystemException if a system exception occurred
285            */
286            public static void addUserGroupUsers(long userGroupId, long[] userIds)
287                    throws com.liferay.portal.kernel.exception.PortalException,
288                            com.liferay.portal.kernel.exception.SystemException {
289                    getService().addUserGroupUsers(userGroupId, userIds);
290            }
291    
292            /**
293            * Adds a user with workflow and additional parameters.
294            *
295            * <p>
296            * This method handles the creation and bookkeeping of the user including
297            * its resources, metadata, and internal data structures. It is not
298            * necessary to make subsequent calls to any methods to setup default
299            * groups, resources, etc.
300            * </p>
301            *
302            * @param companyId the primary key of the user's company
303            * @param autoPassword whether a password should be automatically generated
304            for the user
305            * @param password1 the user's password
306            * @param password2 the user's password confirmation
307            * @param autoScreenName whether a screen name should be automatically
308            generated for the user
309            * @param screenName the user's screen name
310            * @param emailAddress the user's email address
311            * @param facebookId the user's facebook ID
312            * @param openId the user's OpenID
313            * @param locale the user's locale
314            * @param firstName the user's first name
315            * @param middleName the user's middle name
316            * @param lastName the user's last name
317            * @param prefixId the user's name prefix ID
318            * @param suffixId the user's name suffix ID
319            * @param male whether the user is male
320            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
321            January)
322            * @param birthdayDay the user's birthday day
323            * @param birthdayYear the user's birthday year
324            * @param jobTitle the user's job title
325            * @param groupIds the primary keys of the user's groups
326            * @param organizationIds the primary keys of the user's organizations
327            * @param roleIds the primary keys of the roles this user possesses
328            * @param userGroupIds the primary keys of the user's user groups
329            * @param addresses the user's addresses
330            * @param emailAddresses the user's email addresses
331            * @param phones the user's phone numbers
332            * @param websites the user's websites
333            * @param announcementsDelivers the announcements deliveries
334            * @param sendEmail whether to send the user an email notification about
335            their new account
336            * @param serviceContext the user's service context (optionally
337            <code>null</code>). Can set the universally unique identifier
338            (with the <code>uuid</code> attribute), asset category IDs, asset
339            tag names, and expando bridge attributes for the user.
340            * @return the new user
341            * @throws PortalException if the user's information was invalid, if the
342            creator did not have permission to add users, if the email
343            address was reserved, or some other portal exception occurred
344            * @throws SystemException if a system exception occurred
345            */
346            public static com.liferay.portal.model.User addUserWithWorkflow(
347                    long companyId, boolean autoPassword, java.lang.String password1,
348                    java.lang.String password2, boolean autoScreenName,
349                    java.lang.String screenName, java.lang.String emailAddress,
350                    long facebookId, java.lang.String openId, java.util.Locale locale,
351                    java.lang.String firstName, java.lang.String middleName,
352                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
353                    int birthdayMonth, int birthdayDay, int birthdayYear,
354                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
355                    long[] roleIds, long[] userGroupIds,
356                    java.util.List<com.liferay.portal.model.Address> addresses,
357                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
358                    java.util.List<com.liferay.portal.model.Phone> phones,
359                    java.util.List<com.liferay.portal.model.Website> websites,
360                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
361                    boolean sendEmail,
362                    com.liferay.portal.service.ServiceContext serviceContext)
363                    throws com.liferay.portal.kernel.exception.PortalException,
364                            com.liferay.portal.kernel.exception.SystemException {
365                    return getService()
366                                       .addUserWithWorkflow(companyId, autoPassword, password1,
367                            password2, autoScreenName, screenName, emailAddress, facebookId,
368                            openId, locale, firstName, middleName, lastName, prefixId,
369                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
370                            groupIds, organizationIds, roleIds, userGroupIds, addresses,
371                            emailAddresses, phones, websites, announcementsDelivers, sendEmail,
372                            serviceContext);
373            }
374    
375            /**
376            * Adds a user with workflow.
377            *
378            * <p>
379            * This method handles the creation and bookkeeping of the user including
380            * its resources, metadata, and internal data structures. It is not
381            * necessary to make subsequent calls to any methods to setup default
382            * groups, resources, etc.
383            * </p>
384            *
385            * @param companyId the primary key of the user's company
386            * @param autoPassword whether a password should be automatically generated
387            for the user
388            * @param password1 the user's password
389            * @param password2 the user's password confirmation
390            * @param autoScreenName whether a screen name should be automatically
391            generated for the user
392            * @param screenName the user's screen name
393            * @param emailAddress the user's email address
394            * @param facebookId the user's facebook ID
395            * @param openId the user's OpenID
396            * @param locale the user's locale
397            * @param firstName the user's first name
398            * @param middleName the user's middle name
399            * @param lastName the user's last name
400            * @param prefixId the user's name prefix ID
401            * @param suffixId the user's name suffix ID
402            * @param male whether the user is male
403            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
404            January)
405            * @param birthdayDay the user's birthday day
406            * @param birthdayYear the user's birthday year
407            * @param jobTitle the user's job title
408            * @param groupIds the primary keys of the user's groups
409            * @param organizationIds the primary keys of the user's organizations
410            * @param roleIds the primary keys of the roles this user possesses
411            * @param userGroupIds the primary keys of the user's user groups
412            * @param sendEmail whether to send the user an email notification about
413            their new account
414            * @param serviceContext the user's service context (optionally
415            <code>null</code>). Can set the universally unique identifier
416            (with the <code>uuid</code> attribute), asset category IDs, asset
417            tag names, and expando bridge attributes for the user.
418            * @return the new user
419            * @throws PortalException if the user's information was invalid, if the
420            creator did not have permission to add users, or if the email
421            address was reserved
422            * @throws SystemException if a system exception occurred
423            */
424            public static com.liferay.portal.model.User addUserWithWorkflow(
425                    long companyId, boolean autoPassword, java.lang.String password1,
426                    java.lang.String password2, boolean autoScreenName,
427                    java.lang.String screenName, java.lang.String emailAddress,
428                    long facebookId, java.lang.String openId, java.util.Locale locale,
429                    java.lang.String firstName, java.lang.String middleName,
430                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
431                    int birthdayMonth, int birthdayDay, int birthdayYear,
432                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
433                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
434                    com.liferay.portal.service.ServiceContext serviceContext)
435                    throws com.liferay.portal.kernel.exception.PortalException,
436                            com.liferay.portal.kernel.exception.SystemException {
437                    return getService()
438                                       .addUserWithWorkflow(companyId, autoPassword, password1,
439                            password2, autoScreenName, screenName, emailAddress, facebookId,
440                            openId, locale, firstName, middleName, lastName, prefixId,
441                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
442                            groupIds, organizationIds, roleIds, userGroupIds, sendEmail,
443                            serviceContext);
444            }
445    
446            /**
447            * Deletes the user's portrait image.
448            *
449            * @param userId the primary key of the user
450            * @throws PortalException if a user with the primary key could not be
451            found, if the user's portrait could not be found, or if the
452            current user did not have permission to update the user
453            * @throws SystemException if a system exception occurred
454            */
455            public static void deletePortrait(long userId)
456                    throws com.liferay.portal.kernel.exception.PortalException,
457                            com.liferay.portal.kernel.exception.SystemException {
458                    getService().deletePortrait(userId);
459            }
460    
461            /**
462            * Removes the user from the role.
463            *
464            * @param roleId the primary key of the role
465            * @param userId the primary key of the user
466            * @throws PortalException if a role or user with the primary key could not
467            be found, or if the current user did not have permission to
468            assign role members
469            * @throws SystemException if a system exception occurred
470            */
471            public static void deleteRoleUser(long roleId, long userId)
472                    throws com.liferay.portal.kernel.exception.PortalException,
473                            com.liferay.portal.kernel.exception.SystemException {
474                    getService().deleteRoleUser(roleId, userId);
475            }
476    
477            /**
478            * Deletes the user.
479            *
480            * @param userId the primary key of the user
481            * @throws PortalException if a user with the primary key could not be found
482            or if the current user did not have permission to delete the user
483            * @throws SystemException if a system exception occurred
484            */
485            public static void deleteUser(long userId)
486                    throws com.liferay.portal.kernel.exception.PortalException,
487                            com.liferay.portal.kernel.exception.SystemException {
488                    getService().deleteUser(userId);
489            }
490    
491            /**
492            * Returns the primary key of the default user for the company.
493            *
494            * @param companyId the primary key of the company
495            * @return the primary key of the default user for the company
496            * @throws PortalException if a default user for the company could not be
497            found
498            * @throws SystemException if a system exception occurred
499            */
500            public static long getDefaultUserId(long companyId)
501                    throws com.liferay.portal.kernel.exception.PortalException,
502                            com.liferay.portal.kernel.exception.SystemException {
503                    return getService().getDefaultUserId(companyId);
504            }
505    
506            /**
507            * Returns the primary keys of all the users belonging to the group.
508            *
509            * @param groupId the primary key of the group
510            * @return the primary keys of the users belonging to the group
511            * @throws PortalException if the current user did not have permission to
512            view group assignments
513            * @throws SystemException if a system exception occurred
514            */
515            public static long[] getGroupUserIds(long groupId)
516                    throws com.liferay.portal.kernel.exception.PortalException,
517                            com.liferay.portal.kernel.exception.SystemException {
518                    return getService().getGroupUserIds(groupId);
519            }
520    
521            /**
522            * Returns the primary keys of all the users belonging to the organization.
523            *
524            * @param organizationId the primary key of the organization
525            * @return the primary keys of the users belonging to the organization
526            * @throws PortalException if the current user did not have permission to
527            view organization assignments
528            * @throws SystemException if a system exception occurred
529            */
530            public static long[] getOrganizationUserIds(long organizationId)
531                    throws com.liferay.portal.kernel.exception.PortalException,
532                            com.liferay.portal.kernel.exception.SystemException {
533                    return getService().getOrganizationUserIds(organizationId);
534            }
535    
536            /**
537            * Returns the primary keys of all the users belonging to the role.
538            *
539            * @param roleId the primary key of the role
540            * @return the primary keys of the users belonging to the role
541            * @throws PortalException if the current user did not have permission to
542            view role members
543            * @throws SystemException if a system exception occurred
544            */
545            public static long[] getRoleUserIds(long roleId)
546                    throws com.liferay.portal.kernel.exception.PortalException,
547                            com.liferay.portal.kernel.exception.SystemException {
548                    return getService().getRoleUserIds(roleId);
549            }
550    
551            /**
552            * Returns the user with the email address.
553            *
554            * @param companyId the primary key of the user's company
555            * @param emailAddress the user's email address
556            * @return the user with the email address
557            * @throws PortalException if a user with the email address could not be
558            found or if the current user did not have permission to view the
559            user
560            * @throws SystemException if a system exception occurred
561            */
562            public static com.liferay.portal.model.User getUserByEmailAddress(
563                    long companyId, java.lang.String emailAddress)
564                    throws com.liferay.portal.kernel.exception.PortalException,
565                            com.liferay.portal.kernel.exception.SystemException {
566                    return getService().getUserByEmailAddress(companyId, emailAddress);
567            }
568    
569            /**
570            * Returns the user with the primary key.
571            *
572            * @param userId the primary key of the user
573            * @return the user with the primary key
574            * @throws PortalException if a user with the primary key could not be found
575            or if the current user did not have permission to view the user
576            * @throws SystemException if a system exception occurred
577            */
578            public static com.liferay.portal.model.User getUserById(long userId)
579                    throws com.liferay.portal.kernel.exception.PortalException,
580                            com.liferay.portal.kernel.exception.SystemException {
581                    return getService().getUserById(userId);
582            }
583    
584            /**
585            * Returns the user with the screen name.
586            *
587            * @param companyId the primary key of the user's company
588            * @param screenName the user's screen name
589            * @return the user with the screen name
590            * @throws PortalException if a user with the screen name could not be found
591            or if the current user did not have permission to veiw the user
592            * @throws SystemException if a system exception occurred
593            */
594            public static com.liferay.portal.model.User getUserByScreenName(
595                    long companyId, java.lang.String screenName)
596                    throws com.liferay.portal.kernel.exception.PortalException,
597                            com.liferay.portal.kernel.exception.SystemException {
598                    return getService().getUserByScreenName(companyId, screenName);
599            }
600    
601            /**
602            * Returns the primary key of the user with the email address.
603            *
604            * @param companyId the primary key of the user's company
605            * @param emailAddress the user's email address
606            * @return the primary key of the user with the email address
607            * @throws PortalException if a user with the email address could not be
608            found
609            * @throws SystemException if a system exception occurred
610            */
611            public static long getUserIdByEmailAddress(long companyId,
612                    java.lang.String emailAddress)
613                    throws com.liferay.portal.kernel.exception.PortalException,
614                            com.liferay.portal.kernel.exception.SystemException {
615                    return getService().getUserIdByEmailAddress(companyId, emailAddress);
616            }
617    
618            /**
619            * Returns the primary key of the user with the screen name.
620            *
621            * @param companyId the primary key of the user's company
622            * @param screenName the user's screen name
623            * @return the primary key of the user with the screen name
624            * @throws PortalException if a user with the screen name could not be found
625            * @throws SystemException if a system exception occurred
626            */
627            public static long getUserIdByScreenName(long companyId,
628                    java.lang.String screenName)
629                    throws com.liferay.portal.kernel.exception.PortalException,
630                            com.liferay.portal.kernel.exception.SystemException {
631                    return getService().getUserIdByScreenName(companyId, screenName);
632            }
633    
634            /**
635            * Returns <code>true</code> if the user is a member of the group.
636            *
637            * @param groupId the primary key of the group
638            * @param userId the primary key of the user
639            * @return <code>true</code> if the user is a member of the group;
640            <code>false</code> otherwise
641            * @throws SystemException if a system exception occurred
642            */
643            public static boolean hasGroupUser(long groupId, long userId)
644                    throws com.liferay.portal.kernel.exception.SystemException {
645                    return getService().hasGroupUser(groupId, userId);
646            }
647    
648            /**
649            * Returns <code>true</code> if the user is a member of the role.
650            *
651            * @param roleId the primary key of the role
652            * @param userId the primary key of the user
653            * @return <code>true</code> if the user is a member of the role;
654            <code>false</code> otherwise
655            * @throws SystemException if a system exception occurred
656            */
657            public static boolean hasRoleUser(long roleId, long userId)
658                    throws com.liferay.portal.kernel.exception.SystemException {
659                    return getService().hasRoleUser(roleId, userId);
660            }
661    
662            /**
663            * Returns <code>true</code> if the user has the role with the name,
664            * optionally through inheritance.
665            *
666            * @param companyId the primary key of the role's company
667            * @param name the name of the role (must be a regular role, not an
668            organization, site or provider role)
669            * @param userId the primary key of the user
670            * @param inherited whether to include roles inherited from organizations,
671            sites, etc.
672            * @return <code>true</code> if the user has the role; <code>false</code>
673            otherwise
674            * @throws PortalException if a role with the name could not be found
675            * @throws SystemException if a system exception occurred
676            */
677            public static boolean hasRoleUser(long companyId, java.lang.String name,
678                    long userId, boolean inherited)
679                    throws com.liferay.portal.kernel.exception.PortalException,
680                            com.liferay.portal.kernel.exception.SystemException {
681                    return getService().hasRoleUser(companyId, name, userId, inherited);
682            }
683    
684            /**
685            * Sets the users in the role, removing and adding users to the role as
686            * necessary.
687            *
688            * @param roleId the primary key of the role
689            * @param userIds the primary keys of the users
690            * @throws PortalException if the current user did not have permission to
691            assign role members
692            * @throws SystemException if a system exception occurred
693            */
694            public static void setRoleUsers(long roleId, long[] userIds)
695                    throws com.liferay.portal.kernel.exception.PortalException,
696                            com.liferay.portal.kernel.exception.SystemException {
697                    getService().setRoleUsers(roleId, userIds);
698            }
699    
700            /**
701            * Sets the users in the user group, removing and adding users to the user
702            * group as necessary.
703            *
704            * @param userGroupId the primary key of the user group
705            * @param userIds the primary keys of the users
706            * @throws PortalException if the current user did not have permission to
707            assign group members
708            * @throws SystemException if a system exception occurred
709            */
710            public static void setUserGroupUsers(long userGroupId, long[] userIds)
711                    throws com.liferay.portal.kernel.exception.PortalException,
712                            com.liferay.portal.kernel.exception.SystemException {
713                    getService().setUserGroupUsers(userGroupId, userIds);
714            }
715    
716            /**
717            * Removes the users from the group.
718            *
719            * @param groupId the primary key of the group
720            * @param userIds the primary keys of the users
721            * @throws PortalException if the current user did not have permission to
722            modify group assignments
723            * @throws SystemException if a system exception occurred
724            */
725            public static void unsetGroupUsers(long groupId, long[] userIds,
726                    com.liferay.portal.service.ServiceContext serviceContext)
727                    throws com.liferay.portal.kernel.exception.PortalException,
728                            com.liferay.portal.kernel.exception.SystemException {
729                    getService().unsetGroupUsers(groupId, userIds, serviceContext);
730            }
731    
732            /**
733            * Removes the users from the organization.
734            *
735            * @param organizationId the primary key of the organization
736            * @param userIds the primary keys of the users
737            * @throws PortalException if the current user did not have permission to
738            modify organization assignments
739            * @throws SystemException if a system exception occurred
740            */
741            public static void unsetOrganizationUsers(long organizationId,
742                    long[] userIds)
743                    throws com.liferay.portal.kernel.exception.PortalException,
744                            com.liferay.portal.kernel.exception.SystemException {
745                    getService().unsetOrganizationUsers(organizationId, userIds);
746            }
747    
748            /**
749            * Removes the users from the password policy.
750            *
751            * @param passwordPolicyId the primary key of the password policy
752            * @param userIds the primary keys of the users
753            * @throws PortalException if the current user did not have permission to
754            modify policy assignments
755            * @throws SystemException if a system exception occurred
756            */
757            public static void unsetPasswordPolicyUsers(long passwordPolicyId,
758                    long[] userIds)
759                    throws com.liferay.portal.kernel.exception.PortalException,
760                            com.liferay.portal.kernel.exception.SystemException {
761                    getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds);
762            }
763    
764            /**
765            * Removes the users from the role.
766            *
767            * @param roleId the primary key of the role
768            * @param userIds the primary keys of the users
769            * @throws PortalException if the current user did not have permission to
770            modify role assignments
771            * @throws SystemException if a system exception occurred
772            */
773            public static void unsetRoleUsers(long roleId, long[] userIds)
774                    throws com.liferay.portal.kernel.exception.PortalException,
775                            com.liferay.portal.kernel.exception.SystemException {
776                    getService().unsetRoleUsers(roleId, userIds);
777            }
778    
779            /**
780            * Removes the users from the team.
781            *
782            * @param teamId the primary key of the team
783            * @param userIds the primary keys of the users
784            * @throws PortalException if the current user did not have permission to
785            modify team assignments
786            * @throws SystemException if a system exception occurred
787            */
788            public static void unsetTeamUsers(long teamId, long[] userIds)
789                    throws com.liferay.portal.kernel.exception.PortalException,
790                            com.liferay.portal.kernel.exception.SystemException {
791                    getService().unsetTeamUsers(teamId, userIds);
792            }
793    
794            /**
795            * Removes the users from the user group.
796            *
797            * @param userGroupId the primary key of the user group
798            * @param userIds the primary keys of the users
799            * @throws PortalException if the current user did not have permission to
800            modify user group assignments
801            * @throws SystemException if a system exception occurred
802            */
803            public static void unsetUserGroupUsers(long userGroupId, long[] userIds)
804                    throws com.liferay.portal.kernel.exception.PortalException,
805                            com.liferay.portal.kernel.exception.SystemException {
806                    getService().unsetUserGroupUsers(userGroupId, userIds);
807            }
808    
809            /**
810            * Updates the user's response to the terms of use agreement.
811            *
812            * @param userId the primary key of the user
813            * @param agreedToTermsOfUse whether the user has agree to the terms of use
814            * @return the user
815            * @throws PortalException if the current user did not have permission to
816            update the user's agreement to terms-of-use
817            * @throws SystemException if a system exception occurred
818            */
819            public static com.liferay.portal.model.User updateAgreedToTermsOfUse(
820                    long userId, boolean agreedToTermsOfUse)
821                    throws com.liferay.portal.kernel.exception.PortalException,
822                            com.liferay.portal.kernel.exception.SystemException {
823                    return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse);
824            }
825    
826            /**
827            * Updates the user's email address.
828            *
829            * @param userId the primary key of the user
830            * @param password the user's password
831            * @param emailAddress1 the user's new email address
832            * @param emailAddress2 the user's new email address confirmation
833            * @return the user
834            * @throws PortalException if a user with the primary key could not be found
835            or if the current user did not have permission to update the user
836            * @throws SystemException if a system exception occurred
837            */
838            public static com.liferay.portal.model.User updateEmailAddress(
839                    long userId, java.lang.String password, java.lang.String emailAddress1,
840                    java.lang.String emailAddress2,
841                    com.liferay.portal.service.ServiceContext serviceContext)
842                    throws com.liferay.portal.kernel.exception.PortalException,
843                            com.liferay.portal.kernel.exception.SystemException {
844                    return getService()
845                                       .updateEmailAddress(userId, password, emailAddress1,
846                            emailAddress2, serviceContext);
847            }
848    
849            /**
850            * Updates a user account that was automatically created when a guest user
851            * participated in an action (e.g. posting a comment) and only provided his
852            * name and email address.
853            *
854            * @param companyId the primary key of the user's company
855            * @param autoPassword whether a password should be automatically generated
856            for the user
857            * @param password1 the user's password
858            * @param password2 the user's password confirmation
859            * @param autoScreenName whether a screen name should be automatically
860            generated for the user
861            * @param screenName the user's screen name
862            * @param emailAddress the user's email address
863            * @param facebookId the user's facebook ID
864            * @param openId the user's OpenID
865            * @param locale the user's locale
866            * @param firstName the user's first name
867            * @param middleName the user's middle name
868            * @param lastName the user's last name
869            * @param prefixId the user's name prefix ID
870            * @param suffixId the user's name suffix ID
871            * @param male whether the user is male
872            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
873            January)
874            * @param birthdayDay the user's birthday day
875            * @param birthdayYear the user's birthday year
876            * @param jobTitle the user's job title
877            * @param updateUserInformation whether to update the user's information
878            * @param sendEmail whether to send the user an email notification about
879            their new account
880            * @param serviceContext the user's service context (optionally
881            <code>null</code>). Can set the expando bridge attributes for the
882            user.
883            * @return the user
884            * @throws PortalException if the user's information was invalid or if the
885            email address was reserved
886            * @throws SystemException if a system exception occurred
887            */
888            public static com.liferay.portal.model.User updateIncompleteUser(
889                    long companyId, boolean autoPassword, java.lang.String password1,
890                    java.lang.String password2, boolean autoScreenName,
891                    java.lang.String screenName, java.lang.String emailAddress,
892                    long facebookId, java.lang.String openId, java.util.Locale locale,
893                    java.lang.String firstName, java.lang.String middleName,
894                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
895                    int birthdayMonth, int birthdayDay, int birthdayYear,
896                    java.lang.String jobTitle, boolean updateUserInformation,
897                    boolean sendEmail,
898                    com.liferay.portal.service.ServiceContext serviceContext)
899                    throws com.liferay.portal.kernel.exception.PortalException,
900                            com.liferay.portal.kernel.exception.SystemException {
901                    return getService()
902                                       .updateIncompleteUser(companyId, autoPassword, password1,
903                            password2, autoScreenName, screenName, emailAddress, facebookId,
904                            openId, locale, firstName, middleName, lastName, prefixId,
905                            suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle,
906                            updateUserInformation, sendEmail, serviceContext);
907            }
908    
909            /**
910            * Updates whether the user is locked out from logging in.
911            *
912            * @param userId the primary key of the user
913            * @param lockout whether the user is locked out
914            * @return the user
915            * @throws PortalException if the user did not have permission to lock out
916            the user
917            * @throws SystemException if a system exception occurred
918            */
919            public static com.liferay.portal.model.User updateLockoutById(long userId,
920                    boolean lockout)
921                    throws com.liferay.portal.kernel.exception.PortalException,
922                            com.liferay.portal.kernel.exception.SystemException {
923                    return getService().updateLockoutById(userId, lockout);
924            }
925    
926            /**
927            * Updates the user's OpenID.
928            *
929            * @param userId the primary key of the user
930            * @param openId the new OpenID
931            * @return the user
932            * @throws PortalException if a user with the primary key could not be found
933            or if the current user did not have permission to update the user
934            * @throws SystemException if a system exception occurred
935            */
936            public static com.liferay.portal.model.User updateOpenId(long userId,
937                    java.lang.String openId)
938                    throws com.liferay.portal.kernel.exception.PortalException,
939                            com.liferay.portal.kernel.exception.SystemException {
940                    return getService().updateOpenId(userId, openId);
941            }
942    
943            /**
944            * Sets the organizations that the user is in, removing and adding
945            * organizations as necessary.
946            *
947            * @param userId the primary key of the user
948            * @param organizationIds the primary keys of the organizations
949            * @throws PortalException if a user with the primary key could not be found
950            or if the current user did not have permission to update the user
951            * @throws SystemException if a system exception occurred
952            */
953            public static void updateOrganizations(long userId, long[] organizationIds,
954                    com.liferay.portal.service.ServiceContext serviceContext)
955                    throws com.liferay.portal.kernel.exception.PortalException,
956                            com.liferay.portal.kernel.exception.SystemException {
957                    getService().updateOrganizations(userId, organizationIds, serviceContext);
958            }
959    
960            /**
961            * Updates the user's password without tracking or validation of the change.
962            *
963            * @param userId the primary key of the user
964            * @param password1 the user's new password
965            * @param password2 the user's new password confirmation
966            * @param passwordReset whether the user should be asked to reset their
967            password the next time they log in
968            * @return the user
969            * @throws PortalException if a user with the primary key could not be found
970            or if the current user did not have permission to update the user
971            * @throws SystemException if a system exception occurred
972            */
973            public static com.liferay.portal.model.User updatePassword(long userId,
974                    java.lang.String password1, java.lang.String password2,
975                    boolean passwordReset)
976                    throws com.liferay.portal.kernel.exception.PortalException,
977                            com.liferay.portal.kernel.exception.SystemException {
978                    return getService()
979                                       .updatePassword(userId, password1, password2, passwordReset);
980            }
981    
982            /**
983            * Updates the user's portrait image.
984            *
985            * @param userId the primary key of the user
986            * @param bytes the new portrait image data
987            * @return the user
988            * @throws PortalException if a user with the primary key could not be
989            found, if the new portrait was invalid, or if the current user
990            did not have permission to update the user
991            * @throws SystemException if a system exception occurred
992            */
993            public static com.liferay.portal.model.User updatePortrait(long userId,
994                    byte[] bytes)
995                    throws com.liferay.portal.kernel.exception.PortalException,
996                            com.liferay.portal.kernel.exception.SystemException {
997                    return getService().updatePortrait(userId, bytes);
998            }
999    
1000            /**
1001            * Updates the user's password reset question and answer.
1002            *
1003            * @param userId the primary key of the user
1004            * @param question the user's new password reset question
1005            * @param answer the user's new password reset answer
1006            * @return the user
1007            * @throws PortalException if a user with the primary key could not be
1008            found, if the new question or answer were invalid, or if the
1009            current user did not have permission to update the user
1010            * @throws SystemException if a system exception occurred
1011            */
1012            public static com.liferay.portal.model.User updateReminderQuery(
1013                    long userId, java.lang.String question, java.lang.String answer)
1014                    throws com.liferay.portal.kernel.exception.PortalException,
1015                            com.liferay.portal.kernel.exception.SystemException {
1016                    return getService().updateReminderQuery(userId, question, answer);
1017            }
1018    
1019            /**
1020            * Updates the user's screen name.
1021            *
1022            * @param userId the primary key of the user
1023            * @param screenName the user's new screen name
1024            * @return the user
1025            * @throws PortalException if a user with the primary key could not be
1026            found, if the new screen name was invalid, or if the current user
1027            did not have permission to update the user
1028            * @throws SystemException if a system exception occurred
1029            */
1030            public static com.liferay.portal.model.User updateScreenName(long userId,
1031                    java.lang.String screenName)
1032                    throws com.liferay.portal.kernel.exception.PortalException,
1033                            com.liferay.portal.kernel.exception.SystemException {
1034                    return getService().updateScreenName(userId, screenName);
1035            }
1036    
1037            /**
1038            * Updates the user's workflow status.
1039            *
1040            * @param userId the primary key of the user
1041            * @param status the user's new workflow status
1042            * @return the user
1043            * @throws PortalException if a user with the primary key could not be
1044            found, if the current user was updating her own status to
1045            anything but {@link WorkflowConstants.STATUS_APPROVED}, or if the
1046            current user did not have permission to update the user's
1047            workflow status.
1048            * @throws SystemException if a system exception occurred
1049            */
1050            public static com.liferay.portal.model.User updateStatus(long userId,
1051                    int status)
1052                    throws com.liferay.portal.kernel.exception.PortalException,
1053                            com.liferay.portal.kernel.exception.SystemException {
1054                    return getService().updateStatus(userId, status);
1055            }
1056    
1057            /**
1058            * Updates the user with additional parameters.
1059            *
1060            * @param userId the primary key of the user
1061            * @param oldPassword the user's old password
1062            * @param newPassword1 the user's new password (optionally
1063            <code>null</code>)
1064            * @param newPassword2 the user's new password confirmation (optionally
1065            <code>null</code>)
1066            * @param passwordReset whether the user should be asked to reset their
1067            password the next time they login
1068            * @param reminderQueryQuestion the user's new password reset question
1069            * @param reminderQueryAnswer the user's new password reset answer
1070            * @param screenName the user's new screen name
1071            * @param emailAddress the user's new email address
1072            * @param facebookId the user's new Facebook ID
1073            * @param openId the user's new OpenID
1074            * @param languageId the user's new language ID
1075            * @param timeZoneId the user's new time zone ID
1076            * @param greeting the user's new greeting
1077            * @param comments the user's new comments
1078            * @param firstName the user's new first name
1079            * @param middleName the user's new middle name
1080            * @param lastName the user's new last name
1081            * @param prefixId the user's new name prefix ID
1082            * @param suffixId the user's new name suffix ID
1083            * @param male whether user is male
1084            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
1085            for January)
1086            * @param birthdayDay the user's new birthday day
1087            * @param birthdayYear the user's birthday year
1088            * @param smsSn the user's new SMS screen name
1089            * @param aimSn the user's new AIM screen name
1090            * @param facebookSn the user's new Facebook screen name
1091            * @param icqSn the user's new ICQ screen name
1092            * @param jabberSn the user's new Jabber screen name
1093            * @param msnSn the user's new MSN screen name
1094            * @param mySpaceSn the user's new MySpace screen name
1095            * @param skypeSn the user's new Skype screen name
1096            * @param twitterSn the user's new Twitter screen name
1097            * @param ymSn the user's new Yahoo! Messenger screen name
1098            * @param jobTitle the user's new job title
1099            * @param groupIds the primary keys of the user's groups
1100            * @param organizationIds the primary keys of the user's organizations
1101            * @param roleIds the primary keys of the user's roles
1102            * @param userGroupRoles the user user's group roles
1103            * @param userGroupIds the primary keys of the user's user groups
1104            * @param addresses the user's addresses
1105            * @param emailAddresses the user's email addresses
1106            * @param phones the user's phone numbers
1107            * @param websites the user's websites
1108            * @param announcementsDelivers the announcements deliveries
1109            * @param serviceContext the user's service context (optionally
1110            <code>null</code>). Can set the universally unique identifier
1111            (with the <code>uuid</code> attribute), asset category IDs, asset
1112            tag names, and expando bridge attributes for the user.
1113            * @return the user
1114            * @throws PortalException if a user with the primary key could not be
1115            found, if the new information was invalid, or if the current user
1116            did not have permission to update the user
1117            * @throws SystemException if a system exception occurred
1118            */
1119            public static com.liferay.portal.model.User updateUser(long userId,
1120                    java.lang.String oldPassword, java.lang.String newPassword1,
1121                    java.lang.String newPassword2, boolean passwordReset,
1122                    java.lang.String reminderQueryQuestion,
1123                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1124                    java.lang.String emailAddress, long facebookId,
1125                    java.lang.String openId, java.lang.String languageId,
1126                    java.lang.String timeZoneId, java.lang.String greeting,
1127                    java.lang.String comments, java.lang.String firstName,
1128                    java.lang.String middleName, java.lang.String lastName, int prefixId,
1129                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1130                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1131                    java.lang.String facebookSn, java.lang.String icqSn,
1132                    java.lang.String jabberSn, java.lang.String msnSn,
1133                    java.lang.String mySpaceSn, java.lang.String skypeSn,
1134                    java.lang.String twitterSn, java.lang.String ymSn,
1135                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1136                    long[] roleIds,
1137                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1138                    long[] userGroupIds,
1139                    java.util.List<com.liferay.portal.model.Address> addresses,
1140                    java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
1141                    java.util.List<com.liferay.portal.model.Phone> phones,
1142                    java.util.List<com.liferay.portal.model.Website> websites,
1143                    java.util.List<com.liferay.portlet.announcements.model.AnnouncementsDelivery> announcementsDelivers,
1144                    com.liferay.portal.service.ServiceContext serviceContext)
1145                    throws com.liferay.portal.kernel.exception.PortalException,
1146                            com.liferay.portal.kernel.exception.SystemException {
1147                    return getService()
1148                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
1149                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
1150                            screenName, emailAddress, facebookId, openId, languageId,
1151                            timeZoneId, greeting, comments, firstName, middleName, lastName,
1152                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1153                            smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
1154                            skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds,
1155                            roleIds, userGroupRoles, userGroupIds, addresses, emailAddresses,
1156                            phones, websites, announcementsDelivers, serviceContext);
1157            }
1158    
1159            /**
1160            * Updates the user.
1161            *
1162            * @param userId the primary key of the user
1163            * @param oldPassword the user's old password
1164            * @param newPassword1 the user's new password (optionally
1165            <code>null</code>)
1166            * @param newPassword2 the user's new password confirmation (optionally
1167            <code>null</code>)
1168            * @param passwordReset whether the user should be asked to reset their
1169            password the next time they login
1170            * @param reminderQueryQuestion the user's new password reset question
1171            * @param reminderQueryAnswer the user's new password reset answer
1172            * @param screenName the user's new screen name
1173            * @param emailAddress the user's new email address
1174            * @param facebookId the user's new Facebook ID
1175            * @param openId the user's new OpenID
1176            * @param languageId the user's new language ID
1177            * @param timeZoneId the user's new time zone ID
1178            * @param greeting the user's new greeting
1179            * @param comments the user's new comments
1180            * @param firstName the user's new first name
1181            * @param middleName the user's new middle name
1182            * @param lastName the user's new last name
1183            * @param prefixId the user's new name prefix ID
1184            * @param suffixId the user's new name suffix ID
1185            * @param male whether user is male
1186            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
1187            for January)
1188            * @param birthdayDay the user's new birthday day
1189            * @param birthdayYear the user's birthday year
1190            * @param smsSn the user's new SMS screen name
1191            * @param aimSn the user's new AIM screen name
1192            * @param facebookSn the user's new Facebook screen name
1193            * @param icqSn the user's new ICQ screen name
1194            * @param jabberSn the user's new Jabber screen name
1195            * @param msnSn the user's new MSN screen name
1196            * @param mySpaceSn the user's new MySpace screen name
1197            * @param skypeSn the user's new Skype screen name
1198            * @param twitterSn the user's new Twitter screen name
1199            * @param ymSn the user's new Yahoo! Messenger screen name
1200            * @param jobTitle the user's new job title
1201            * @param groupIds the primary keys of the user's groups
1202            * @param organizationIds the primary keys of the user's organizations
1203            * @param roleIds the primary keys of the user's roles
1204            * @param userGroupRoles the user user's group roles
1205            * @param userGroupIds the primary keys of the user's user groups
1206            * @param serviceContext the user's service context (optionally
1207            <code>null</code>). Can set the universally unique identifier
1208            (with the <code>uuid</code> attribute), asset category IDs, asset
1209            tag names, and expando bridge attributes for the user.
1210            * @return the user
1211            * @throws PortalException if a user with the primary key could not be
1212            found, if the new information was invalid, or if the current user
1213            did not have permission to update the user
1214            * @throws SystemException if a system exception occurred
1215            */
1216            public static com.liferay.portal.model.User updateUser(long userId,
1217                    java.lang.String oldPassword, java.lang.String newPassword1,
1218                    java.lang.String newPassword2, boolean passwordReset,
1219                    java.lang.String reminderQueryQuestion,
1220                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
1221                    java.lang.String emailAddress, long facebookId,
1222                    java.lang.String openId, java.lang.String languageId,
1223                    java.lang.String timeZoneId, java.lang.String greeting,
1224                    java.lang.String comments, java.lang.String firstName,
1225                    java.lang.String middleName, java.lang.String lastName, int prefixId,
1226                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
1227                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
1228                    java.lang.String facebookSn, java.lang.String icqSn,
1229                    java.lang.String jabberSn, java.lang.String msnSn,
1230                    java.lang.String mySpaceSn, java.lang.String skypeSn,
1231                    java.lang.String twitterSn, java.lang.String ymSn,
1232                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
1233                    long[] roleIds,
1234                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
1235                    long[] userGroupIds,
1236                    com.liferay.portal.service.ServiceContext serviceContext)
1237                    throws com.liferay.portal.kernel.exception.PortalException,
1238                            com.liferay.portal.kernel.exception.SystemException {
1239                    return getService()
1240                                       .updateUser(userId, oldPassword, newPassword1, newPassword2,
1241                            passwordReset, reminderQueryQuestion, reminderQueryAnswer,
1242                            screenName, emailAddress, facebookId, openId, languageId,
1243                            timeZoneId, greeting, comments, firstName, middleName, lastName,
1244                            prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear,
1245                            smsSn, aimSn, facebookSn, icqSn, jabberSn, msnSn, mySpaceSn,
1246                            skypeSn, twitterSn, ymSn, jobTitle, groupIds, organizationIds,
1247                            roleIds, userGroupRoles, userGroupIds, serviceContext);
1248            }
1249    
1250            public static UserService getService() {
1251                    if (_service == null) {
1252                            _service = (UserService)PortalBeanLocatorUtil.locate(UserService.class.getName());
1253    
1254                            ReferenceRegistry.registerReference(UserServiceUtil.class,
1255                                    "_service");
1256                            MethodCache.remove(UserService.class);
1257                    }
1258    
1259                    return _service;
1260            }
1261    
1262            public void setService(UserService service) {
1263                    MethodCache.remove(UserService.class);
1264    
1265                    _service = service;
1266    
1267                    ReferenceRegistry.registerReference(UserServiceUtil.class, "_service");
1268                    MethodCache.remove(UserService.class);
1269            }
1270    
1271            private static UserService _service;
1272    }