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