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