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