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