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.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for User. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see UserLocalServiceUtil
034     * @see com.liferay.portal.service.base.UserLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.UserLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface UserLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link UserLocalServiceUtil} to access the user local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Adds a default admin user for the company.
051            *
052            * @param companyId the primary key of the user's company
053            * @param screenName the user's screen name
054            * @param emailAddress the user's email address
055            * @param locale the user's locale
056            * @param firstName the user's first name
057            * @param middleName the user's middle name
058            * @param lastName the user's last name
059            * @return the new default admin user
060            * @throws PortalException n if a portal exception occurred
061            */
062            public com.liferay.portal.model.User addDefaultAdminUser(long companyId,
063                    java.lang.String screenName, java.lang.String emailAddress,
064                    java.util.Locale locale, java.lang.String firstName,
065                    java.lang.String middleName, java.lang.String lastName)
066                    throws com.liferay.portal.kernel.exception.PortalException;
067    
068            /**
069            * Adds the user to the default groups, unless the user is already in these
070            * groups. The default groups can be specified in
071            * <code>portal.properties</code> with the key
072            * <code>admin.default.group.names</code>.
073            *
074            * @param userId the primary key of the user
075            * @throws PortalException if a user with the primary key could not be found
076            */
077            public void addDefaultGroups(long userId)
078                    throws com.liferay.portal.kernel.exception.PortalException;
079    
080            /**
081            * Adds the user to the default roles, unless the user already has these
082            * roles. The default roles can be specified in
083            * <code>portal.properties</code> with the key
084            * <code>admin.default.role.names</code>.
085            *
086            * @param userId the primary key of the user
087            * @throws PortalException if a user with the primary key could not be found
088            */
089            public void addDefaultRoles(long userId)
090                    throws com.liferay.portal.kernel.exception.PortalException;
091    
092            /**
093            * Adds the user to the default user groups, unless the user is already in
094            * these user groups. The default user groups can be specified in
095            * <code>portal.properties</code> with the property
096            * <code>admin.default.user.group.names</code>.
097            *
098            * @param userId the primary key of the user
099            * @throws PortalException if a user with the primary key could not be found
100            */
101            public void addDefaultUserGroups(long userId)
102                    throws com.liferay.portal.kernel.exception.PortalException;
103    
104            public void addGroupUser(long groupId, com.liferay.portal.model.User user);
105    
106            public void addGroupUser(long groupId, long userId);
107    
108            /**
109            * @throws PortalException
110            */
111            public void addGroupUsers(long groupId,
112                    java.util.List<com.liferay.portal.model.User> Users)
113                    throws com.liferay.portal.kernel.exception.PortalException;
114    
115            /**
116            * @throws PortalException
117            */
118            public void addGroupUsers(long groupId, long[] userIds)
119                    throws com.liferay.portal.kernel.exception.PortalException;
120    
121            public void addOrganizationUser(long organizationId,
122                    com.liferay.portal.model.User user);
123    
124            public void addOrganizationUser(long organizationId, long userId);
125    
126            /**
127            * @throws PortalException
128            */
129            public void addOrganizationUsers(long organizationId,
130                    java.util.List<com.liferay.portal.model.User> Users)
131                    throws com.liferay.portal.kernel.exception.PortalException;
132    
133            /**
134            * @throws PortalException
135            */
136            public void addOrganizationUsers(long organizationId, long[] userIds)
137                    throws com.liferay.portal.kernel.exception.PortalException;
138    
139            /**
140            * Assigns the password policy to the users, removing any other currently
141            * assigned password policies.
142            *
143            * @param passwordPolicyId the primary key of the password policy
144            * @param userIds the primary keys of the users
145            */
146            public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds);
147    
148            public void addRoleUser(long roleId, com.liferay.portal.model.User user);
149    
150            public void addRoleUser(long roleId, long userId);
151    
152            /**
153            * @throws PortalException
154            */
155            public void addRoleUsers(long roleId,
156                    java.util.List<com.liferay.portal.model.User> Users)
157                    throws com.liferay.portal.kernel.exception.PortalException;
158    
159            /**
160            * @throws PortalException
161            */
162            public void addRoleUsers(long roleId, long[] userIds)
163                    throws com.liferay.portal.kernel.exception.PortalException;
164    
165            public void addTeamUser(long teamId, com.liferay.portal.model.User user);
166    
167            public void addTeamUser(long teamId, long userId);
168    
169            /**
170            * @throws PortalException
171            */
172            public void addTeamUsers(long teamId,
173                    java.util.List<com.liferay.portal.model.User> Users)
174                    throws com.liferay.portal.kernel.exception.PortalException;
175    
176            /**
177            * @throws PortalException
178            */
179            public void addTeamUsers(long teamId, long[] userIds)
180                    throws com.liferay.portal.kernel.exception.PortalException;
181    
182            /**
183            * Adds a user.
184            *
185            * <p>
186            * This method handles the creation and bookkeeping of the user including
187            * its resources, metadata, and internal data structures. It is not
188            * necessary to make subsequent calls to any methods to setup default
189            * groups, resources, etc.
190            * </p>
191            *
192            * @param creatorUserId the primary key of the creator
193            * @param companyId the primary key of the user's company
194            * @param autoPassword whether a password should be automatically generated
195            for the user
196            * @param password1 the user's password
197            * @param password2 the user's password confirmation
198            * @param autoScreenName whether a screen name should be automatically
199            generated for the user
200            * @param screenName the user's screen name
201            * @param emailAddress the user's email address
202            * @param facebookId the user's facebook ID
203            * @param openId the user's OpenID
204            * @param locale the user's locale
205            * @param firstName the user's first name
206            * @param middleName the user's middle name
207            * @param lastName the user's last name
208            * @param prefixId the user's name prefix ID
209            * @param suffixId the user's name suffix ID
210            * @param male whether the user is male
211            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
212            January)
213            * @param birthdayDay the user's birthday day
214            * @param birthdayYear the user's birthday year
215            * @param jobTitle the user's job title
216            * @param groupIds the primary keys of the user's groups
217            * @param organizationIds the primary keys of the user's organizations
218            * @param roleIds the primary keys of the roles this user possesses
219            * @param userGroupIds the primary keys of the user's user groups
220            * @param sendEmail whether to send the user an email notification about
221            their new account
222            * @param serviceContext the service context to be applied (optionally
223            <code>null</code>). Can set the UUID (with the <code>uuid</code>
224            attribute), asset category IDs, asset tag names, and expando
225            bridge attributes for the user.
226            * @return the new user
227            * @throws PortalException if the user's information was invalid
228            */
229            public com.liferay.portal.model.User addUser(long creatorUserId,
230                    long companyId, boolean autoPassword, java.lang.String password1,
231                    java.lang.String password2, boolean autoScreenName,
232                    java.lang.String screenName, java.lang.String emailAddress,
233                    long facebookId, java.lang.String openId, java.util.Locale locale,
234                    java.lang.String firstName, java.lang.String middleName,
235                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
236                    int birthdayMonth, int birthdayDay, int birthdayYear,
237                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
238                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
239                    com.liferay.portal.service.ServiceContext serviceContext)
240                    throws com.liferay.portal.kernel.exception.PortalException;
241    
242            /**
243            * Adds the user to the database. Also notifies the appropriate model listeners.
244            *
245            * @param user the user
246            * @return the user that was added
247            */
248            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
249            public com.liferay.portal.model.User addUser(
250                    com.liferay.portal.model.User user);
251    
252            public void addUserGroupUser(long userGroupId,
253                    com.liferay.portal.model.User user);
254    
255            public void addUserGroupUser(long userGroupId, long userId);
256    
257            /**
258            * @throws PortalException
259            */
260            public void addUserGroupUsers(long userGroupId,
261                    java.util.List<com.liferay.portal.model.User> Users)
262                    throws com.liferay.portal.kernel.exception.PortalException;
263    
264            /**
265            * @throws PortalException
266            */
267            public void addUserGroupUsers(long userGroupId, long[] userIds)
268                    throws com.liferay.portal.kernel.exception.PortalException;
269    
270            /**
271            * Adds a user with workflow.
272            *
273            * <p>
274            * This method handles the creation and bookkeeping of the user including
275            * its resources, metadata, and internal data structures. It is not
276            * necessary to make subsequent calls to any methods to setup default
277            * groups, resources, etc.
278            * </p>
279            *
280            * @param creatorUserId the primary key of the creator
281            * @param companyId the primary key of the user's company
282            * @param autoPassword whether a password should be automatically generated
283            for the user
284            * @param password1 the user's password
285            * @param password2 the user's password confirmation
286            * @param autoScreenName whether a screen name should be automatically
287            generated for the user
288            * @param screenName the user's screen name
289            * @param emailAddress the user's email address
290            * @param facebookId the user's facebook ID
291            * @param openId the user's OpenID
292            * @param locale the user's locale
293            * @param firstName the user's first name
294            * @param middleName the user's middle name
295            * @param lastName the user's last name
296            * @param prefixId the user's name prefix ID
297            * @param suffixId the user's name suffix ID
298            * @param male whether the user is male
299            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
300            January)
301            * @param birthdayDay the user's birthday day
302            * @param birthdayYear the user's birthday year
303            * @param jobTitle the user's job title
304            * @param groupIds the primary keys of the user's groups
305            * @param organizationIds the primary keys of the user's organizations
306            * @param roleIds the primary keys of the roles this user possesses
307            * @param userGroupIds the primary keys of the user's user groups
308            * @param sendEmail whether to send the user an email notification about
309            their new account
310            * @param serviceContext the service context to be applied (optionally
311            <code>null</code>). Can set the UUID (with the <code>uuid</code>
312            attribute), asset category IDs, asset tag names, and expando
313            bridge attributes for the user.
314            * @return the new user
315            * @throws PortalException if the user's information was invalid
316            */
317            public com.liferay.portal.model.User addUserWithWorkflow(
318                    long creatorUserId, long companyId, boolean autoPassword,
319                    java.lang.String password1, java.lang.String password2,
320                    boolean autoScreenName, java.lang.String screenName,
321                    java.lang.String emailAddress, long facebookId,
322                    java.lang.String openId, java.util.Locale locale,
323                    java.lang.String firstName, java.lang.String middleName,
324                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
325                    int birthdayMonth, int birthdayDay, int birthdayYear,
326                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
327                    long[] roleIds, long[] userGroupIds, boolean sendEmail,
328                    com.liferay.portal.service.ServiceContext serviceContext)
329                    throws com.liferay.portal.kernel.exception.PortalException;
330    
331            /**
332            * Attempts to authenticate the user by their email address and password,
333            * while using the AuthPipeline.
334            *
335            * @param companyId the primary key of the user's company
336            * @param emailAddress the user's email address
337            * @param password the user's password
338            * @param headerMap the header map from the authentication request
339            * @param parameterMap the parameter map from the authentication request
340            * @param resultsMap the map of authentication results (may be nil). After
341            a successful authentication the user's primary key will be placed
342            under the key <code>userId</code>.
343            * @return the authentication status. This can be {@link
344            com.liferay.portal.security.auth.Authenticator#FAILURE}
345            indicating that the user's credentials are invalid, {@link
346            com.liferay.portal.security.auth.Authenticator#SUCCESS}
347            indicating a successful login, or {@link
348            com.liferay.portal.security.auth.Authenticator#DNE} indicating
349            that a user with that login does not exist.
350            * @throws PortalException if <code>emailAddress</code> or
351            <code>password</code> was <code>null</code>
352            * @see com.liferay.portal.security.auth.AuthPipeline
353            */
354            public int authenticateByEmailAddress(long companyId,
355                    java.lang.String emailAddress, java.lang.String password,
356                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
357                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
358                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
359                    throws com.liferay.portal.kernel.exception.PortalException;
360    
361            /**
362            * Attempts to authenticate the user by their screen name and password,
363            * while using the AuthPipeline.
364            *
365            * @param companyId the primary key of the user's company
366            * @param screenName the user's screen name
367            * @param password the user's password
368            * @param headerMap the header map from the authentication request
369            * @param parameterMap the parameter map from the authentication request
370            * @param resultsMap the map of authentication results (may be nil). After
371            a successful authentication the user's primary key will be placed
372            under the key <code>userId</code>.
373            * @return the authentication status. This can be {@link
374            com.liferay.portal.security.auth.Authenticator#FAILURE}
375            indicating that the user's credentials are invalid, {@link
376            com.liferay.portal.security.auth.Authenticator#SUCCESS}
377            indicating a successful login, or {@link
378            com.liferay.portal.security.auth.Authenticator#DNE} indicating
379            that a user with that login does not exist.
380            * @throws PortalException if <code>screenName</code> or
381            <code>password</code> was <code>null</code>
382            * @see com.liferay.portal.security.auth.AuthPipeline
383            */
384            public int authenticateByScreenName(long companyId,
385                    java.lang.String screenName, java.lang.String password,
386                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
387                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
388                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
389                    throws com.liferay.portal.kernel.exception.PortalException;
390    
391            /**
392            * Attempts to authenticate the user by their primary key and password,
393            * while using the AuthPipeline.
394            *
395            * @param companyId the primary key of the user's company
396            * @param userId the user's primary key
397            * @param password the user's password
398            * @param headerMap the header map from the authentication request
399            * @param parameterMap the parameter map from the authentication request
400            * @param resultsMap the map of authentication results (may be nil). After
401            a successful authentication the user's primary key will be placed
402            under the key <code>userId</code>.
403            * @return the authentication status. This can be {@link
404            com.liferay.portal.security.auth.Authenticator#FAILURE}
405            indicating that the user's credentials are invalid, {@link
406            com.liferay.portal.security.auth.Authenticator#SUCCESS}
407            indicating a successful login, or {@link
408            com.liferay.portal.security.auth.Authenticator#DNE} indicating
409            that a user with that login does not exist.
410            * @throws PortalException if <code>userId</code> or <code>password</code>
411            was <code>null</code>
412            * @see com.liferay.portal.security.auth.AuthPipeline
413            */
414            public int authenticateByUserId(long companyId, long userId,
415                    java.lang.String password,
416                    java.util.Map<java.lang.String, java.lang.String[]> headerMap,
417                    java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
418                    java.util.Map<java.lang.String, java.lang.Object> resultsMap)
419                    throws com.liferay.portal.kernel.exception.PortalException;
420    
421            /**
422            * Attempts to authenticate the user using HTTP basic access authentication,
423            * without using the AuthPipeline. Primarily used for authenticating users
424            * of <code>tunnel-web</code>.
425            *
426            * <p>
427            * Authentication type specifies what <code>login</code> contains.The valid
428            * values are:
429            * </p>
430            *
431            * <ul>
432            * <li>
433            * <code>CompanyConstants.AUTH_TYPE_EA</code> - <code>login</code> is the
434            * user's email address
435            * </li>
436            * <li>
437            * <code>CompanyConstants.AUTH_TYPE_SN</code> - <code>login</code> is the
438            * user's screen name
439            * </li>
440            * <li>
441            * <code>CompanyConstants.AUTH_TYPE_ID</code> - <code>login</code> is the
442            * user's primary key
443            * </li>
444            * </ul>
445            *
446            * @param companyId the primary key of the user's company
447            * @param authType the type of authentication to perform
448            * @param login either the user's email address, screen name, or primary
449            key depending on the value of <code>authType</code>
450            * @param password the user's password
451            * @return the user's primary key if authentication is successful;
452            <code>0</code> otherwise
453            * @throws PortalException if a portal exception occurred
454            */
455            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
456            public long authenticateForBasic(long companyId, java.lang.String authType,
457                    java.lang.String login, java.lang.String password)
458                    throws com.liferay.portal.kernel.exception.PortalException;
459    
460            /**
461            * Attempts to authenticate the user using HTTP digest access
462            * authentication, without using the AuthPipeline. Primarily used for
463            * authenticating users of <code>tunnel-web</code>.
464            *
465            * @param companyId the primary key of the user's company
466            * @param username either the user's email address, screen name, or primary
467            key
468            * @param realm unused
469            * @param nonce the number used once
470            * @param method the request method
471            * @param uri the request URI
472            * @param response the authentication response hash
473            * @return the user's primary key if authentication is successful;
474            <code>0</code> otherwise
475            * @throws PortalException if a portal exception occurred
476            */
477            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
478            public long authenticateForDigest(long companyId,
479                    java.lang.String username, java.lang.String realm,
480                    java.lang.String nonce, java.lang.String method, java.lang.String uri,
481                    java.lang.String response)
482                    throws com.liferay.portal.kernel.exception.PortalException;
483    
484            /**
485            * Attempts to authenticate the user using JAAS credentials, without using
486            * the AuthPipeline.
487            *
488            * @param userId the primary key of the user
489            * @param encPassword the encrypted password
490            * @return <code>true</code> if authentication is successful;
491            <code>false</code> otherwise
492            */
493            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
494            public boolean authenticateForJAAS(long userId, java.lang.String encPassword);
495    
496            /**
497            * Checks if the user is currently locked out based on the password policy,
498            * and performs maintenance on the user's lockout and failed login data.
499            *
500            * @param user the user
501            * @throws PortalException if the user was determined to still be locked out
502            */
503            public void checkLockout(com.liferay.portal.model.User user)
504                    throws com.liferay.portal.kernel.exception.PortalException;
505    
506            /**
507            * Adds a failed login attempt to the user and updates the user's last
508            * failed login date.
509            *
510            * @param user the user
511            */
512            public void checkLoginFailure(com.liferay.portal.model.User user);
513    
514            /**
515            * Adds a failed login attempt to the user with the email address and
516            * updates the user's last failed login date.
517            *
518            * @param companyId the primary key of the user's company
519            * @param emailAddress the user's email address
520            * @throws PortalException if a user with the email address could not be
521            found
522            */
523            public void checkLoginFailureByEmailAddress(long companyId,
524                    java.lang.String emailAddress)
525                    throws com.liferay.portal.kernel.exception.PortalException;
526    
527            /**
528            * Adds a failed login attempt to the user and updates the user's last
529            * failed login date.
530            *
531            * @param userId the primary key of the user
532            * @throws PortalException if a user with the primary key could not be found
533            */
534            public void checkLoginFailureById(long userId)
535                    throws com.liferay.portal.kernel.exception.PortalException;
536    
537            /**
538            * Adds a failed login attempt to the user with the screen name and updates
539            * the user's last failed login date.
540            *
541            * @param companyId the primary key of the user's company
542            * @param screenName the user's screen name
543            * @throws PortalException if a user with the screen name could not be found
544            */
545            public void checkLoginFailureByScreenName(long companyId,
546                    java.lang.String screenName)
547                    throws com.liferay.portal.kernel.exception.PortalException;
548    
549            /**
550            * Checks if the user's password is expired based on the password policy,
551            * and performs maintenance on the user's grace login and password reset
552            * data.
553            *
554            * @param user the user
555            * @throws PortalException if the user's password has expired and the grace
556            login limit has been exceeded
557            */
558            public void checkPasswordExpired(com.liferay.portal.model.User user)
559                    throws com.liferay.portal.kernel.exception.PortalException;
560    
561            public void clearGroupUsers(long groupId);
562    
563            public void clearOrganizationUsers(long organizationId);
564    
565            public void clearRoleUsers(long roleId);
566    
567            public void clearTeamUsers(long teamId);
568    
569            public void clearUserGroupUsers(long userGroupId);
570    
571            /**
572            * Completes the user's registration by generating a password and sending
573            * the confirmation email.
574            *
575            * @param user the user
576            * @param serviceContext the service context to be applied. You can specify
577            an unencrypted custom password for the user via attribute
578            <code>passwordUnencrypted</code>. You automatically generate a
579            password for the user by setting attribute
580            <code>autoPassword</code> to <code>true</code>. You can send a
581            confirmation email to the user by setting attribute
582            <code>sendEmail</code> to <code>true</code>.
583            * @throws PortalException if a portal exception occurred
584            */
585            public void completeUserRegistration(com.liferay.portal.model.User user,
586                    com.liferay.portal.service.ServiceContext serviceContext)
587                    throws com.liferay.portal.kernel.exception.PortalException;
588    
589            /**
590            * Creates a new user with the primary key. Does not add the user to the database.
591            *
592            * @param userId the primary key for the new user
593            * @return the new user
594            */
595            public com.liferay.portal.model.User createUser(long userId);
596    
597            /**
598            * Decrypts the user's primary key and password from their encrypted forms.
599            * Used for decrypting a user's credentials from the values stored in an
600            * automatic login cookie.
601            *
602            * @param companyId the primary key of the user's company
603            * @param name the encrypted primary key of the user
604            * @param password the encrypted password of the user
605            * @return the user's primary key and password
606            * @throws PortalException if a user with the primary key could not be found
607            or if the user's password was incorrect
608            */
609            public com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
610                    long companyId, java.lang.String name, java.lang.String password)
611                    throws com.liferay.portal.kernel.exception.PortalException;
612    
613            public void deleteGroupUser(long groupId, com.liferay.portal.model.User user);
614    
615            public void deleteGroupUser(long groupId, long userId);
616    
617            public void deleteGroupUsers(long groupId,
618                    java.util.List<com.liferay.portal.model.User> Users);
619    
620            public void deleteGroupUsers(long groupId, long[] userIds);
621    
622            public void deleteOrganizationUser(long organizationId,
623                    com.liferay.portal.model.User user);
624    
625            public void deleteOrganizationUser(long organizationId, long userId);
626    
627            public void deleteOrganizationUsers(long organizationId,
628                    java.util.List<com.liferay.portal.model.User> Users);
629    
630            public void deleteOrganizationUsers(long organizationId, long[] userIds);
631    
632            /**
633            * @throws PortalException
634            */
635            @Override
636            public com.liferay.portal.model.PersistedModel deletePersistedModel(
637                    com.liferay.portal.model.PersistedModel persistedModel)
638                    throws com.liferay.portal.kernel.exception.PortalException;
639    
640            /**
641            * Deletes the user's portrait image.
642            *
643            * @param userId the primary key of the user
644            * @throws PortalException if a user with the primary key could not be found
645            or if the user's portrait could not be found
646            */
647            public void deletePortrait(long userId)
648                    throws com.liferay.portal.kernel.exception.PortalException;
649    
650            /**
651            * @throws PortalException
652            */
653            public void deleteRoleUser(long roleId, com.liferay.portal.model.User user)
654                    throws com.liferay.portal.kernel.exception.PortalException;
655    
656            /**
657            * @throws PortalException
658            */
659            public void deleteRoleUser(long roleId, long userId)
660                    throws com.liferay.portal.kernel.exception.PortalException;
661    
662            public void deleteRoleUsers(long roleId,
663                    java.util.List<com.liferay.portal.model.User> Users);
664    
665            public void deleteRoleUsers(long roleId, long[] userIds);
666    
667            public void deleteTeamUser(long teamId, com.liferay.portal.model.User user);
668    
669            public void deleteTeamUser(long teamId, long userId);
670    
671            public void deleteTeamUsers(long teamId,
672                    java.util.List<com.liferay.portal.model.User> Users);
673    
674            public void deleteTeamUsers(long teamId, long[] userIds);
675    
676            /**
677            * Deletes the user from the database. Also notifies the appropriate model listeners.
678            *
679            * @param user the user
680            * @return the user that was removed
681            * @throws PortalException
682            */
683            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
684            public com.liferay.portal.model.User deleteUser(
685                    com.liferay.portal.model.User user)
686                    throws com.liferay.portal.kernel.exception.PortalException;
687    
688            /**
689            * Deletes the user with the primary key from the database. Also notifies the appropriate model listeners.
690            *
691            * @param userId the primary key of the user
692            * @return the user that was removed
693            * @throws PortalException if a user with the primary key could not be found
694            */
695            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
696            public com.liferay.portal.model.User deleteUser(long userId)
697                    throws com.liferay.portal.kernel.exception.PortalException;
698    
699            /**
700            * @throws PortalException
701            */
702            public void deleteUserGroupUser(long userGroupId,
703                    com.liferay.portal.model.User user)
704                    throws com.liferay.portal.kernel.exception.PortalException;
705    
706            /**
707            * @throws PortalException
708            */
709            public void deleteUserGroupUser(long userGroupId, long userId)
710                    throws com.liferay.portal.kernel.exception.PortalException;
711    
712            public void deleteUserGroupUsers(long userGroupId,
713                    java.util.List<com.liferay.portal.model.User> Users);
714    
715            public void deleteUserGroupUsers(long userGroupId, long[] userIds);
716    
717            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
718    
719            /**
720            * Performs a dynamic query on the database and returns the matching rows.
721            *
722            * @param dynamicQuery the dynamic query
723            * @return the matching rows
724            */
725            public <T> java.util.List<T> dynamicQuery(
726                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
727    
728            /**
729            * Performs a dynamic query on the database and returns a range of the matching rows.
730            *
731            * <p>
732            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
733            * </p>
734            *
735            * @param dynamicQuery the dynamic query
736            * @param start the lower bound of the range of model instances
737            * @param end the upper bound of the range of model instances (not inclusive)
738            * @return the range of matching rows
739            */
740            public <T> java.util.List<T> dynamicQuery(
741                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
742                    int end);
743    
744            /**
745            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
746            *
747            * <p>
748            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
749            * </p>
750            *
751            * @param dynamicQuery the dynamic query
752            * @param start the lower bound of the range of model instances
753            * @param end the upper bound of the range of model instances (not inclusive)
754            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
755            * @return the ordered range of matching rows
756            */
757            public <T> java.util.List<T> dynamicQuery(
758                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
759                    int end,
760                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
761    
762            /**
763            * Returns the number of rows matching the dynamic query.
764            *
765            * @param dynamicQuery the dynamic query
766            * @return the number of rows matching the dynamic query
767            */
768            public long dynamicQueryCount(
769                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
770    
771            /**
772            * Returns the number of rows matching the dynamic query.
773            *
774            * @param dynamicQuery the dynamic query
775            * @param projection the projection to apply to the query
776            * @return the number of rows matching the dynamic query
777            */
778            public long dynamicQueryCount(
779                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
780                    com.liferay.portal.kernel.dao.orm.Projection projection);
781    
782            /**
783            * Encrypts the primary key of the user. Used when encrypting the user's
784            * credentials for storage in an automatic login cookie.
785            *
786            * @param name the primary key of the user
787            * @return the user's encrypted primary key
788            * @throws PortalException if a user with the primary key could not be found
789            */
790            @com.liferay.portal.kernel.transaction.Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
791            public java.lang.String encryptUserId(java.lang.String name)
792                    throws com.liferay.portal.kernel.exception.PortalException;
793    
794            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
795            public com.liferay.portal.model.User fetchUser(long userId);
796    
797            /**
798            * Returns the user with the contact ID.
799            *
800            * @param contactId the user's contact ID
801            * @return the user with the contact ID, or <code>null</code> if a user with
802            the contact ID could not be found
803            */
804            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
805            public com.liferay.portal.model.User fetchUserByContactId(long contactId);
806    
807            /**
808            * Returns the user with the email address.
809            *
810            * @param companyId the primary key of the user's company
811            * @param emailAddress the user's email address
812            * @return the user with the email address, or <code>null</code> if a user
813            with the email address could not be found
814            */
815            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
816            public com.liferay.portal.model.User fetchUserByEmailAddress(
817                    long companyId, java.lang.String emailAddress);
818    
819            /**
820            * Returns the user with the Facebook ID.
821            *
822            * @param companyId the primary key of the user's company
823            * @param facebookId the user's Facebook ID
824            * @return the user with the Facebook ID, or <code>null</code> if a user
825            with the Facebook ID could not be found
826            */
827            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
828            public com.liferay.portal.model.User fetchUserByFacebookId(long companyId,
829                    long facebookId);
830    
831            /**
832            * Returns the user with the primary key.
833            *
834            * @param userId the primary key of the user
835            * @return the user with the primary key, or <code>null</code> if a user
836            with the primary key could not be found
837            */
838            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
839            public com.liferay.portal.model.User fetchUserById(long userId);
840    
841            /**
842            * Returns the user with the OpenID.
843            *
844            * @param companyId the primary key of the user's company
845            * @param openId the user's OpenID
846            * @return the user with the OpenID, or <code>null</code> if a user with the
847            OpenID could not be found
848            */
849            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
850            public com.liferay.portal.model.User fetchUserByOpenId(long companyId,
851                    java.lang.String openId);
852    
853            /**
854            * Returns the user with the portrait ID.
855            *
856            * @param portraitId the user's portrait ID
857            * @return the user with the portrait ID, or <code>null</code> if a user
858            with the portrait ID could not be found
859            */
860            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
861            public com.liferay.portal.model.User fetchUserByPortraitId(long portraitId);
862    
863            /**
864            * Returns the user with the screen name.
865            *
866            * @param companyId the primary key of the user's company
867            * @param screenName the user's screen name
868            * @return the user with the screen name, or <code>null</code> if a user
869            with the screen name could not be found
870            */
871            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
872            public com.liferay.portal.model.User fetchUserByScreenName(long companyId,
873                    java.lang.String screenName);
874    
875            /**
876            * Returns the user with the matching UUID and company.
877            *
878            * @param uuid the user's UUID
879            * @param companyId the primary key of the company
880            * @return the matching user, or <code>null</code> if a matching user could not be found
881            */
882            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
883            public com.liferay.portal.model.User fetchUserByUuidAndCompanyId(
884                    java.lang.String uuid, long companyId);
885    
886            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
887            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
888    
889            /**
890            * Returns the Spring bean ID for this bean.
891            *
892            * @return the Spring bean ID for this bean
893            */
894            public java.lang.String getBeanIdentifier();
895    
896            /**
897            * Returns a range of all the users belonging to the company.
898            *
899            * <p>
900            * Useful when paginating results. Returns a maximum of <code>end -
901            * start</code> instances. <code>start</code> and <code>end</code> are not
902            * primary keys, they are indexes in the result set. Thus, <code>0</code>
903            * refers to the first result in the set. Setting both <code>start</code>
904            * and <code>end</code> to {@link
905            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
906            * result set.
907            * </p>
908            *
909            * @param companyId the primary key of the company
910            * @param start the lower bound of the range of users
911            * @param end the upper bound of the range of users (not inclusive)
912            * @return the range of users belonging to the company
913            */
914            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
915            public java.util.List<com.liferay.portal.model.User> getCompanyUsers(
916                    long companyId, int start, int end);
917    
918            /**
919            * Returns the number of users belonging to the company.
920            *
921            * @param companyId the primary key of the company
922            * @return the number of users belonging to the company
923            */
924            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
925            public int getCompanyUsersCount(long companyId);
926    
927            /**
928            * Returns the default user for the company.
929            *
930            * @param companyId the primary key of the company
931            * @return the default user for the company
932            * @throws PortalException if a default user for the company could not be
933            found
934            */
935            @com.liferay.portal.kernel.spring.aop.Skip
936            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
937            public com.liferay.portal.model.User getDefaultUser(long companyId)
938                    throws com.liferay.portal.kernel.exception.PortalException;
939    
940            /**
941            * Returns the primary key of the default user for the company.
942            *
943            * @param companyId the primary key of the company
944            * @return the primary key of the default user for the company
945            * @throws PortalException if a default user for the company could not be
946            found
947            */
948            @com.liferay.portal.kernel.spring.aop.Skip
949            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
950            public long getDefaultUserId(long companyId)
951                    throws com.liferay.portal.kernel.exception.PortalException;
952    
953            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
954            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
955                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
956    
957            /**
958            * Returns the groupIds of the groups associated with the user.
959            *
960            * @param userId the userId of the user
961            * @return long[] the groupIds of groups associated with the user
962            */
963            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
964            public long[] getGroupPrimaryKeys(long userId);
965    
966            /**
967            * Returns the primary keys of all the users belonging to the group.
968            *
969            * @param groupId the primary key of the group
970            * @return the primary keys of the users belonging to the group
971            */
972            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
973            public long[] getGroupUserIds(long groupId);
974    
975            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
976            public java.util.List<com.liferay.portal.model.User> getGroupUsers(
977                    long groupId);
978    
979            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
980            public java.util.List<com.liferay.portal.model.User> getGroupUsers(
981                    long groupId, int start, int end);
982    
983            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
984            public java.util.List<com.liferay.portal.model.User> getGroupUsers(
985                    long groupId, int start, int end,
986                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
987    
988            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
989            public int getGroupUsersCount(long groupId);
990    
991            /**
992            * Returns the number of users with the status belonging to the group.
993            *
994            * @param groupId the primary key of the group
995            * @param status the workflow status
996            * @return the number of users with the status belonging to the group
997            * @throws PortalException if a group with the primary key could not be
998            found
999            */
1000            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1001            public int getGroupUsersCount(long groupId, int status)
1002                    throws com.liferay.portal.kernel.exception.PortalException;
1003    
1004            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1005            public java.util.List<com.liferay.portal.model.User> getInheritedRoleUsers(
1006                    long roleId, int start, int end,
1007                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc)
1008                    throws com.liferay.portal.kernel.exception.PortalException;
1009    
1010            /**
1011            * Returns all the users who have not had any announcements of the type
1012            * delivered, excluding the default user.
1013            *
1014            * @param type the type of announcement
1015            * @return the users who have not had any annoucements of the type delivered
1016            */
1017            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1018            public java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
1019                    java.lang.String type);
1020    
1021            /**
1022            * Returns all the users who do not have any contacts.
1023            *
1024            * @return the users who do not have any contacts
1025            */
1026            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1027            public java.util.List<com.liferay.portal.model.User> getNoContacts();
1028    
1029            /**
1030            * Returns all the users who do not belong to any groups, excluding the
1031            * default user.
1032            *
1033            * @return the users who do not belong to any groups
1034            */
1035            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1036            public java.util.List<com.liferay.portal.model.User> getNoGroups();
1037    
1038            /**
1039            * Returns the organizationIds of the organizations associated with the user.
1040            *
1041            * @param userId the userId of the user
1042            * @return long[] the organizationIds of organizations associated with the user
1043            */
1044            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1045            public long[] getOrganizationPrimaryKeys(long userId);
1046    
1047            /**
1048            * Returns the primary keys of all the users belonging to the organization.
1049            *
1050            * @param organizationId the primary key of the organization
1051            * @return the primary keys of the users belonging to the organization
1052            */
1053            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1054            public long[] getOrganizationUserIds(long organizationId);
1055    
1056            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1057            public java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
1058                    long organizationId);
1059    
1060            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1061            public java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
1062                    long organizationId, int start, int end);
1063    
1064            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1065            public java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
1066                    long organizationId, int start, int end,
1067                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
1068    
1069            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1070            public int getOrganizationUsersCount(long organizationId);
1071    
1072            /**
1073            * Returns the number of users with the status belonging to the
1074            * organization.
1075            *
1076            * @param organizationId the primary key of the organization
1077            * @param status the workflow status
1078            * @return the number of users with the status belonging to the organization
1079            * @throws PortalException if an organization with the primary key could not
1080            be found
1081            */
1082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1083            public int getOrganizationUsersCount(long organizationId, int status)
1084                    throws com.liferay.portal.kernel.exception.PortalException;
1085    
1086            @Override
1087            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1088            public com.liferay.portal.model.PersistedModel getPersistedModel(
1089                    java.io.Serializable primaryKeyObj)
1090                    throws com.liferay.portal.kernel.exception.PortalException;
1091    
1092            /**
1093            * Returns the roleIds of the roles associated with the user.
1094            *
1095            * @param userId the userId of the user
1096            * @return long[] the roleIds of roles associated with the user
1097            */
1098            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1099            public long[] getRolePrimaryKeys(long userId);
1100    
1101            /**
1102            * Returns the primary keys of all the users belonging to the role.
1103            *
1104            * @param roleId the primary key of the role
1105            * @return the primary keys of the users belonging to the role
1106            */
1107            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1108            public long[] getRoleUserIds(long roleId);
1109    
1110            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1111            public java.util.List<com.liferay.portal.model.User> getRoleUsers(
1112                    long roleId);
1113    
1114            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1115            public java.util.List<com.liferay.portal.model.User> getRoleUsers(
1116                    long roleId, int start, int end);
1117    
1118            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1119            public java.util.List<com.liferay.portal.model.User> getRoleUsers(
1120                    long roleId, int start, int end,
1121                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
1122    
1123            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1124            public int getRoleUsersCount(long roleId);
1125    
1126            /**
1127            * Returns the number of users with the status belonging to the role.
1128            *
1129            * @param roleId the primary key of the role
1130            * @param status the workflow status
1131            * @return the number of users with the status belonging to the role
1132            * @throws PortalException if an role with the primary key could not be
1133            found
1134            */
1135            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1136            public int getRoleUsersCount(long roleId, int status)
1137                    throws com.liferay.portal.kernel.exception.PortalException;
1138    
1139            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1140            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1141                    long userId, int socialRelationType,
1142                    java.lang.String socialRelationTypeComparator, int start, int end,
1143                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc)
1144                    throws com.liferay.portal.kernel.exception.PortalException;
1145    
1146            /**
1147            * Returns an ordered range of all the users with a social relation of the
1148            * type with the user.
1149            *
1150            * <p>
1151            * Useful when paginating results. Returns a maximum of <code>end -
1152            * start</code> instances. <code>start</code> and <code>end</code> are not
1153            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1154            * refers to the first result in the set. Setting both <code>start</code>
1155            * and <code>end</code> to {@link
1156            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1157            * result set.
1158            * </p>
1159            *
1160            * @param userId the primary key of the user
1161            * @param socialRelationType the type of social relation. The possible
1162            types can be found in {@link
1163            com.liferay.portlet.social.model.SocialRelationConstants}.
1164            * @param start the lower bound of the range of users
1165            * @param end the upper bound of the range of users (not inclusive)
1166            * @param obc the comparator to order the users by (optionally
1167            <code>null</code>)
1168            * @return the ordered range of users with a social relation of the type
1169            with the user
1170            * @throws PortalException if a user with the primary key could not be
1171            found
1172            * @deprecated As of 7.0.0, replaced by {@link #getSocialUsers(long, int,
1173            String, int, int, OrderByComparator)}
1174            */
1175            @java.lang.Deprecated
1176            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1177            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1178                    long userId, int socialRelationType, int start, int end,
1179                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc)
1180                    throws com.liferay.portal.kernel.exception.PortalException;
1181    
1182            /**
1183            * Returns an ordered range of all the users with a social relation with the
1184            * user.
1185            *
1186            * <p>
1187            * Useful when paginating results. Returns a maximum of <code>end -
1188            * start</code> instances. <code>start</code> and <code>end</code> are not
1189            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1190            * refers to the first result in the set. Setting both <code>start</code>
1191            * and <code>end</code> to {@link
1192            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1193            * result set.
1194            * </p>
1195            *
1196            * @param userId the primary key of the user
1197            * @param start the lower bound of the range of users
1198            * @param end the upper bound of the range of users (not inclusive)
1199            * @param obc the comparator to order the users by (optionally
1200            <code>null</code>)
1201            * @return the ordered range of users with a social relation with the
1202            user
1203            * @throws PortalException if a user with the primary key could not be
1204            found
1205            * @deprecated As of 7.0.0, replaced by {@link #getSocialUsers(long, int,
1206            boolean, int, int, OrderByComparator)}
1207            */
1208            @java.lang.Deprecated
1209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1210            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1211                    long userId, int start, int end,
1212                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc)
1213                    throws com.liferay.portal.kernel.exception.PortalException;
1214    
1215            /**
1216            * Returns an ordered range of all the users with a mutual social relation
1217            * of the type with both of the given users.
1218            *
1219            * <p>
1220            * Useful when paginating results. Returns a maximum of <code>end -
1221            * start</code> instances. <code>start</code> and <code>end</code> are not
1222            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1223            * refers to the first result in the set. Setting both <code>start</code>
1224            * and <code>end</code> to {@link
1225            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1226            * result set.
1227            * </p>
1228            *
1229            * @param userId1 the primary key of the first user
1230            * @param userId2 the primary key of the second user
1231            * @param socialRelationType the type of social relation. The possible
1232            types can be found in {@link
1233            com.liferay.portlet.social.model.SocialRelationConstants}.
1234            * @param start the lower bound of the range of users
1235            * @param end the upper bound of the range of users (not inclusive)
1236            * @param obc the comparator to order the users by (optionally
1237            <code>null</code>)
1238            * @return the ordered range of users with a mutual social relation of the
1239            type with the user
1240            * @throws PortalException if a user with the primary key could not be found
1241            */
1242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1243            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1244                    long userId1, long userId2, int socialRelationType, int start, int end,
1245                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc)
1246                    throws com.liferay.portal.kernel.exception.PortalException;
1247    
1248            /**
1249            * Returns an ordered range of all the users with a mutual social relation
1250            * with both of the given users.
1251            *
1252            * <p>
1253            * Useful when paginating results. Returns a maximum of <code>end -
1254            * start</code> instances. <code>start</code> and <code>end</code> are not
1255            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1256            * refers to the first result in the set. Setting both <code>start</code>
1257            * and <code>end</code> to {@link
1258            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1259            * result set.
1260            * </p>
1261            *
1262            * @param userId1 the primary key of the first user
1263            * @param userId2 the primary key of the second user
1264            * @param start the lower bound of the range of users
1265            * @param end the upper bound of the range of users (not inclusive)
1266            * @param obc the comparator to order the users by (optionally
1267            <code>null</code>)
1268            * @return the ordered range of users with a mutual social relation with the
1269            user
1270            * @throws PortalException if a user with the primary key could not be found
1271            */
1272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1273            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1274                    long userId1, long userId2, int start, int end,
1275                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc)
1276                    throws com.liferay.portal.kernel.exception.PortalException;
1277    
1278            /**
1279            * Returns the number of users with a social relation with the user.
1280            *
1281            * @param userId the primary key of the user
1282            * @return the number of users with a social relation with the user
1283            * @throws PortalException if a user with the primary key could not be
1284            found
1285            * @deprecated As of 7.0.0, replaced by {@link #getSocialUsersCount(long,
1286            int, String)}
1287            */
1288            @java.lang.Deprecated
1289            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1290            public int getSocialUsersCount(long userId)
1291                    throws com.liferay.portal.kernel.exception.PortalException;
1292    
1293            /**
1294            * Returns the number of users with a social relation of the type with the
1295            * user.
1296            *
1297            * @param userId the primary key of the user
1298            * @param socialRelationType the type of social relation. The possible
1299            types can be found in {@link
1300            com.liferay.portlet.social.model.SocialRelationConstants}.
1301            * @return the number of users with a social relation of the type with
1302            the user
1303            * @throws PortalException if a user with the primary key could not be
1304            found
1305            * @deprecated As of 7.0.0, replaced by {@link #getSocialUsersCount(long,
1306            int, String)}
1307            */
1308            @java.lang.Deprecated
1309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1310            public int getSocialUsersCount(long userId, int socialRelationType)
1311                    throws com.liferay.portal.kernel.exception.PortalException;
1312    
1313            /**
1314            * Returns the number of users with a social relation with the user.
1315            *
1316            * @param userId the primary key of the user
1317            * @param socialRelationType the type of social relation. The possible
1318            types can be found in {@link
1319            com.liferay.portlet.social.model.SocialRelationConstants}.
1320            * @return the number of users with a social relation with the user
1321            * @throws PortalException if a user with the primary key could not be found
1322            */
1323            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1324            public int getSocialUsersCount(long userId, int socialRelationType,
1325                    java.lang.String socialRelationTypeComparator)
1326                    throws com.liferay.portal.kernel.exception.PortalException;
1327    
1328            /**
1329            * Returns the number of users with a mutual social relation with both of
1330            * the given users.
1331            *
1332            * @param userId1 the primary key of the first user
1333            * @param userId2 the primary key of the second user
1334            * @return the number of users with a mutual social relation with the user
1335            * @throws PortalException if a user with the primary key could not be found
1336            */
1337            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1338            public int getSocialUsersCount(long userId1, long userId2)
1339                    throws com.liferay.portal.kernel.exception.PortalException;
1340    
1341            /**
1342            * Returns the number of users with a mutual social relation of the type
1343            * with both of the given users.
1344            *
1345            * @param userId1 the primary key of the first user
1346            * @param userId2 the primary key of the second user
1347            * @param socialRelationType the type of social relation. The possible
1348            types can be found in {@link
1349            com.liferay.portlet.social.model.SocialRelationConstants}.
1350            * @return the number of users with a mutual social relation of the type
1351            with the user
1352            * @throws PortalException if a user with the primary key could not be found
1353            */
1354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1355            public int getSocialUsersCount(long userId1, long userId2,
1356                    int socialRelationType)
1357                    throws com.liferay.portal.kernel.exception.PortalException;
1358    
1359            /**
1360            * Returns the teamIds of the teams associated with the user.
1361            *
1362            * @param userId the userId of the user
1363            * @return long[] the teamIds of teams associated with the user
1364            */
1365            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1366            public long[] getTeamPrimaryKeys(long userId);
1367    
1368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1369            public java.util.List<com.liferay.portal.model.User> getTeamUsers(
1370                    long teamId);
1371    
1372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1373            public java.util.List<com.liferay.portal.model.User> getTeamUsers(
1374                    long teamId, int start, int end);
1375    
1376            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1377            public java.util.List<com.liferay.portal.model.User> getTeamUsers(
1378                    long teamId, int start, int end,
1379                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
1380    
1381            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1382            public int getTeamUsersCount(long teamId);
1383    
1384            /**
1385            * Returns the user with the primary key.
1386            *
1387            * @param userId the primary key of the user
1388            * @return the user
1389            * @throws PortalException if a user with the primary key could not be found
1390            */
1391            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1392            public com.liferay.portal.model.User getUser(long userId)
1393                    throws com.liferay.portal.kernel.exception.PortalException;
1394    
1395            /**
1396            * Returns the user with the contact ID.
1397            *
1398            * @param contactId the user's contact ID
1399            * @return the user with the contact ID
1400            * @throws PortalException if a user with the contact ID could not be found
1401            */
1402            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1403            public com.liferay.portal.model.User getUserByContactId(long contactId)
1404                    throws com.liferay.portal.kernel.exception.PortalException;
1405    
1406            /**
1407            * Returns the user with the email address.
1408            *
1409            * @param companyId the primary key of the user's company
1410            * @param emailAddress the user's email address
1411            * @return the user with the email address
1412            * @throws PortalException if a user with the email address could not be
1413            found
1414            */
1415            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1416            public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
1417                    java.lang.String emailAddress)
1418                    throws com.liferay.portal.kernel.exception.PortalException;
1419    
1420            /**
1421            * Returns the user with the Facebook ID.
1422            *
1423            * @param companyId the primary key of the user's company
1424            * @param facebookId the user's Facebook ID
1425            * @return the user with the Facebook ID
1426            * @throws PortalException if a user with the Facebook ID could not be found
1427            */
1428            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1429            public com.liferay.portal.model.User getUserByFacebookId(long companyId,
1430                    long facebookId)
1431                    throws com.liferay.portal.kernel.exception.PortalException;
1432    
1433            /**
1434            * Returns the user with the primary key from the company.
1435            *
1436            * @param companyId the primary key of the user's company
1437            * @param userId the primary key of the user
1438            * @return the user with the primary key
1439            * @throws PortalException if a user with the primary key from the company
1440            could not be found
1441            */
1442            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1443            public com.liferay.portal.model.User getUserById(long companyId, long userId)
1444                    throws com.liferay.portal.kernel.exception.PortalException;
1445    
1446            /**
1447            * Returns the user with the primary key.
1448            *
1449            * @param userId the primary key of the user
1450            * @return the user with the primary key
1451            * @throws PortalException if a user with the primary key could not be found
1452            */
1453            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1454            public com.liferay.portal.model.User getUserById(long userId)
1455                    throws com.liferay.portal.kernel.exception.PortalException;
1456    
1457            /**
1458            * Returns the user with the OpenID.
1459            *
1460            * @param companyId the primary key of the user's company
1461            * @param openId the user's OpenID
1462            * @return the user with the OpenID
1463            * @throws PortalException if a user with the OpenID could not be found
1464            */
1465            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1466            public com.liferay.portal.model.User getUserByOpenId(long companyId,
1467                    java.lang.String openId)
1468                    throws com.liferay.portal.kernel.exception.PortalException;
1469    
1470            /**
1471            * Returns the user with the portrait ID.
1472            *
1473            * @param portraitId the user's portrait ID
1474            * @return the user with the portrait ID
1475            * @throws PortalException if a user with the portrait ID could not be found
1476            */
1477            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1478            public com.liferay.portal.model.User getUserByPortraitId(long portraitId)
1479                    throws com.liferay.portal.kernel.exception.PortalException;
1480    
1481            /**
1482            * Returns the user with the screen name.
1483            *
1484            * @param companyId the primary key of the user's company
1485            * @param screenName the user's screen name
1486            * @return the user with the screen name
1487            * @throws PortalException if a user with the screen name could not be found
1488            */
1489            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1490            public com.liferay.portal.model.User getUserByScreenName(long companyId,
1491                    java.lang.String screenName)
1492                    throws com.liferay.portal.kernel.exception.PortalException;
1493    
1494            /**
1495            * Returns the user with the UUID.
1496            *
1497            * @param uuid the user's UUID
1498            * @return the user with the UUID
1499            * @throws PortalException if a user with the UUID could not be found
1500            * @deprecated As of 6.2.0, replaced by {@link
1501            #getUserByUuidAndCompanyId(String, long)}
1502            */
1503            @java.lang.Deprecated
1504            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1505            public com.liferay.portal.model.User getUserByUuid(java.lang.String uuid)
1506                    throws com.liferay.portal.kernel.exception.PortalException;
1507    
1508            /**
1509            * Returns the user with the matching UUID and company.
1510            *
1511            * @param uuid the user's UUID
1512            * @param companyId the primary key of the company
1513            * @return the matching user
1514            * @throws PortalException if a matching user could not be found
1515            */
1516            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1517            public com.liferay.portal.model.User getUserByUuidAndCompanyId(
1518                    java.lang.String uuid, long companyId)
1519                    throws com.liferay.portal.kernel.exception.PortalException;
1520    
1521            /**
1522            * Returns the userGroupIds of the user groups associated with the user.
1523            *
1524            * @param userId the userId of the user
1525            * @return long[] the userGroupIds of user groups associated with the user
1526            */
1527            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1528            public long[] getUserGroupPrimaryKeys(long userId);
1529    
1530            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1531            public java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
1532                    long userGroupId);
1533    
1534            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1535            public java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
1536                    long userGroupId, int start, int end);
1537    
1538            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1539            public java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
1540                    long userGroupId, int start, int end,
1541                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> orderByComparator);
1542    
1543            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1544            public int getUserGroupUsersCount(long userGroupId);
1545    
1546            /**
1547            * Returns the number of users with the status belonging to the user group.
1548            *
1549            * @param userGroupId the primary key of the user group
1550            * @param status the workflow status
1551            * @return the number of users with the status belonging to the user group
1552            * @throws PortalException if a user group with the primary key could not be
1553            found
1554            */
1555            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1556            public int getUserGroupUsersCount(long userGroupId, int status)
1557                    throws com.liferay.portal.kernel.exception.PortalException;
1558    
1559            /**
1560            * Returns the primary key of the user with the email address.
1561            *
1562            * @param companyId the primary key of the user's company
1563            * @param emailAddress the user's email address
1564            * @return the primary key of the user with the email address
1565            * @throws PortalException if a user with the email address could not be
1566            found
1567            */
1568            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1569            public long getUserIdByEmailAddress(long companyId,
1570                    java.lang.String emailAddress)
1571                    throws com.liferay.portal.kernel.exception.PortalException;
1572    
1573            /**
1574            * Returns the primary key of the user with the screen name.
1575            *
1576            * @param companyId the primary key of the user's company
1577            * @param screenName the user's screen name
1578            * @return the primary key of the user with the screen name
1579            * @throws PortalException if a user with the screen name could not be found
1580            */
1581            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1582            public long getUserIdByScreenName(long companyId,
1583                    java.lang.String screenName)
1584                    throws com.liferay.portal.kernel.exception.PortalException;
1585    
1586            /**
1587            * Returns a range of all the users.
1588            *
1589            * <p>
1590            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.UserModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
1591            * </p>
1592            *
1593            * @param start the lower bound of the range of users
1594            * @param end the upper bound of the range of users (not inclusive)
1595            * @return the range of users
1596            */
1597            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1598            public java.util.List<com.liferay.portal.model.User> getUsers(int start,
1599                    int end);
1600    
1601            /**
1602            * Returns the number of users.
1603            *
1604            * @return the number of users
1605            */
1606            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1607            public int getUsersCount();
1608    
1609            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1610            public boolean hasGroupUser(long groupId, long userId);
1611    
1612            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1613            public boolean hasGroupUsers(long groupId);
1614    
1615            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1616            public boolean hasOrganizationUser(long organizationId, long userId);
1617    
1618            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1619            public boolean hasOrganizationUsers(long organizationId);
1620    
1621            /**
1622            * Returns <code>true</code> if the password policy has been assigned to the
1623            * user.
1624            *
1625            * @param passwordPolicyId the primary key of the password policy
1626            * @param userId the primary key of the user
1627            * @return <code>true</code> if the password policy is assigned to the user;
1628            <code>false</code> otherwise
1629            */
1630            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1631            public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId);
1632    
1633            /**
1634            * Returns <code>true</code> if the user has the role with the name,
1635            * optionally through inheritance.
1636            *
1637            * @param companyId the primary key of the role's company
1638            * @param name the name of the role (must be a regular role, not an
1639            organization, site or provider role)
1640            * @param userId the primary key of the user
1641            * @param inherited whether to include roles inherited from organizations,
1642            sites, etc.
1643            * @return <code>true</code> if the user has the role; <code>false</code>
1644            otherwise
1645            * @throws PortalException if a role with the name could not be found
1646            */
1647            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1648            public boolean hasRoleUser(long companyId, java.lang.String name,
1649                    long userId, boolean inherited)
1650                    throws com.liferay.portal.kernel.exception.PortalException;
1651    
1652            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1653            public boolean hasRoleUser(long roleId, long userId);
1654    
1655            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1656            public boolean hasRoleUsers(long roleId);
1657    
1658            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1659            public boolean hasTeamUser(long teamId, long userId);
1660    
1661            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1662            public boolean hasTeamUsers(long teamId);
1663    
1664            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1665            public boolean hasUserGroupUser(long userGroupId, long userId);
1666    
1667            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1668            public boolean hasUserGroupUsers(long userGroupId);
1669    
1670            /**
1671            * Returns <code>true</code> if the user's password is expired.
1672            *
1673            * @param user the user
1674            * @return <code>true</code> if the user's password is expired;
1675            <code>false</code> otherwise
1676            * @throws PortalException if the password policy for the user could not be
1677            found
1678            */
1679            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1680            public boolean isPasswordExpired(com.liferay.portal.model.User user)
1681                    throws com.liferay.portal.kernel.exception.PortalException;
1682    
1683            /**
1684            * Returns <code>true</code> if the password policy is configured to warn
1685            * the user that his password is expiring and the remaining time until
1686            * expiration is equal or less than the configured warning time.
1687            *
1688            * @param user the user
1689            * @return <code>true</code> if the user's password is expiring soon;
1690            <code>false</code> otherwise
1691            * @throws PortalException if the password policy for the user could not be
1692            found
1693            */
1694            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1695            public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user)
1696                    throws com.liferay.portal.kernel.exception.PortalException;
1697    
1698            /**
1699            * Returns the default user for the company.
1700            *
1701            * @param companyId the primary key of the company
1702            * @return the default user for the company
1703            * @throws PortalException if the user could not be found
1704            */
1705            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1706            public com.liferay.portal.model.User loadGetDefaultUser(long companyId)
1707                    throws com.liferay.portal.kernel.exception.PortalException;
1708    
1709            /**
1710            * Returns an ordered range of all the users with the status, and whose
1711            * first name, middle name, last name, screen name, and email address match
1712            * the keywords specified for them, without using the indexer. It is
1713            * preferable to use the indexed version {@link #search(long, String,
1714            * String, String, String, String, int, LinkedHashMap, boolean, int, int,
1715            * Sort)} instead of this method wherever possible for performance reasons.
1716            *
1717            * <p>
1718            * Useful when paginating results. Returns a maximum of <code>end -
1719            * start</code> instances. <code>start</code> and <code>end</code> are not
1720            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1721            * refers to the first result in the set. Setting both <code>start</code>
1722            * and <code>end</code> to {@link
1723            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1724            * result set.
1725            * </p>
1726            *
1727            * @param companyId the primary key of the user's company
1728            * @param firstName the first name keywords (space separated)
1729            * @param middleName the middle name keywords
1730            * @param lastName the last name keywords
1731            * @param screenName the screen name keywords
1732            * @param emailAddress the email address keywords
1733            * @param status the workflow status
1734            * @param params the finder parameters (optionally <code>null</code>). For
1735            more information see {@link
1736            com.liferay.portal.service.persistence.UserFinder}.
1737            * @param andSearch whether every field must match its keywords, or just
1738            one field. For example, &quot;users with the first name 'bob' and
1739            last name 'smith'&quot; vs &quot;users with the first name 'bob'
1740            or the last name 'smith'&quot;.
1741            * @param start the lower bound of the range of users
1742            * @param end the upper bound of the range of users (not inclusive)
1743            * @param obc the comparator to order the users by (optionally
1744            <code>null</code>)
1745            * @return the matching users
1746            * @see com.liferay.portal.service.persistence.UserFinder
1747            */
1748            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1749            public java.util.List<com.liferay.portal.model.User> search(
1750                    long companyId, java.lang.String firstName,
1751                    java.lang.String middleName, java.lang.String lastName,
1752                    java.lang.String screenName, java.lang.String emailAddress, int status,
1753                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1754                    boolean andSearch, int start, int end,
1755                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc);
1756    
1757            /**
1758            * Returns an ordered range of all the users with the status, and whose
1759            * first name, middle name, last name, screen name, and email address match
1760            * the keywords specified for them, using the indexer. It is preferable to
1761            * use this method instead of the non-indexed version whenever possible for
1762            * performance reasons.
1763            *
1764            * <p>
1765            * Useful when paginating results. Returns a maximum of <code>end -
1766            * start</code> instances. <code>start</code> and <code>end</code> are not
1767            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1768            * refers to the first result in the set. Setting both <code>start</code>
1769            * and <code>end</code> to {@link
1770            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1771            * result set.
1772            * </p>
1773            *
1774            * @param companyId the primary key of the user's company
1775            * @param firstName the first name keywords (space separated)
1776            * @param middleName the middle name keywords
1777            * @param lastName the last name keywords
1778            * @param screenName the screen name keywords
1779            * @param emailAddress the email address keywords
1780            * @param status the workflow status
1781            * @param params the indexer parameters (optionally <code>null</code>). For
1782            more information see {@link
1783            com.liferay.portlet.usersadmin.util.UserIndexer}.
1784            * @param andSearch whether every field must match its keywords, or just
1785            one field. For example, &quot;users with the first name 'bob' and
1786            last name 'smith'&quot; vs &quot;users with the first name 'bob'
1787            or the last name 'smith'&quot;.
1788            * @param start the lower bound of the range of users
1789            * @param end the upper bound of the range of users (not inclusive)
1790            * @param sort the field and direction to sort by (optionally
1791            <code>null</code>)
1792            * @return the matching users
1793            * @see com.liferay.portlet.usersadmin.util.UserIndexer
1794            */
1795            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1796            public com.liferay.portal.kernel.search.Hits search(long companyId,
1797                    java.lang.String firstName, java.lang.String middleName,
1798                    java.lang.String lastName, java.lang.String screenName,
1799                    java.lang.String emailAddress, int status,
1800                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1801                    boolean andSearch, int start, int end,
1802                    com.liferay.portal.kernel.search.Sort sort);
1803    
1804            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1805            public com.liferay.portal.kernel.search.Hits search(long companyId,
1806                    java.lang.String firstName, java.lang.String middleName,
1807                    java.lang.String lastName, java.lang.String screenName,
1808                    java.lang.String emailAddress, int status,
1809                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1810                    boolean andSearch, int start, int end,
1811                    com.liferay.portal.kernel.search.Sort[] sorts);
1812    
1813            /**
1814            * Returns an ordered range of all the users who match the keywords and
1815            * status, without using the indexer. It is preferable to use the indexed
1816            * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)}
1817            * instead of this method wherever possible for performance reasons.
1818            *
1819            * <p>
1820            * Useful when paginating results. Returns a maximum of <code>end -
1821            * start</code> instances. <code>start</code> and <code>end</code> are not
1822            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1823            * refers to the first result in the set. Setting both <code>start</code>
1824            * and <code>end</code> to {@link
1825            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1826            * result set.
1827            * </p>
1828            *
1829            * @param companyId the primary key of the user's company
1830            * @param keywords the keywords (space separated), which may occur in the
1831            user's first name, middle name, last name, screen name, or email
1832            address
1833            * @param status the workflow status
1834            * @param params the finder parameters (optionally <code>null</code>). For
1835            more information see {@link
1836            com.liferay.portal.service.persistence.UserFinder}.
1837            * @param start the lower bound of the range of users
1838            * @param end the upper bound of the range of users (not inclusive)
1839            * @param obc the comparator to order the users by (optionally
1840            <code>null</code>)
1841            * @return the matching users
1842            * @see com.liferay.portal.service.persistence.UserFinder
1843            */
1844            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1845            public java.util.List<com.liferay.portal.model.User> search(
1846                    long companyId, java.lang.String keywords, int status,
1847                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1848                    int start, int end,
1849                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.User> obc);
1850    
1851            /**
1852            * Returns an ordered range of all the users who match the keywords and
1853            * status, using the indexer. It is preferable to use this method instead of
1854            * the non-indexed version whenever possible for performance reasons.
1855            *
1856            * <p>
1857            * Useful when paginating results. Returns a maximum of <code>end -
1858            * start</code> instances. <code>start</code> and <code>end</code> are not
1859            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1860            * refers to the first result in the set. Setting both <code>start</code>
1861            * and <code>end</code> to {@link
1862            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1863            * result set.
1864            * </p>
1865            *
1866            * @param companyId the primary key of the user's company
1867            * @param keywords the keywords (space separated), which may occur in the
1868            user's first name, middle name, last name, screen name, or email
1869            address
1870            * @param status the workflow status
1871            * @param params the indexer parameters (optionally <code>null</code>). For
1872            more information see {@link
1873            com.liferay.portlet.usersadmin.util.UserIndexer}.
1874            * @param start the lower bound of the range of users
1875            * @param end the upper bound of the range of users (not inclusive)
1876            * @param sort the field and direction to sort by (optionally
1877            <code>null</code>)
1878            * @return the matching users
1879            * @see com.liferay.portlet.usersadmin.util.UserIndexer
1880            */
1881            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1882            public com.liferay.portal.kernel.search.Hits search(long companyId,
1883                    java.lang.String keywords, int status,
1884                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1885                    int start, int end, com.liferay.portal.kernel.search.Sort sort);
1886    
1887            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1888            public com.liferay.portal.kernel.search.Hits search(long companyId,
1889                    java.lang.String keywords, int status,
1890                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1891                    int start, int end, com.liferay.portal.kernel.search.Sort[] sorts);
1892    
1893            /**
1894            * Returns the number of users with the status, and whose first name, middle
1895            * name, last name, screen name, and email address match the keywords
1896            * specified for them.
1897            *
1898            * @param companyId the primary key of the user's company
1899            * @param firstName the first name keywords (space separated)
1900            * @param middleName the middle name keywords
1901            * @param lastName the last name keywords
1902            * @param screenName the screen name keywords
1903            * @param emailAddress the email address keywords
1904            * @param status the workflow status
1905            * @param params the finder parameters (optionally <code>null</code>). For
1906            more information see {@link
1907            com.liferay.portal.service.persistence.UserFinder}.
1908            * @param andSearch whether every field must match its keywords, or just
1909            one field. For example, &quot;users with the first name 'bob' and
1910            last name 'smith'&quot; vs &quot;users with the first name 'bob'
1911            or the last name 'smith'&quot;.
1912            * @return the number of matching users
1913            */
1914            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1915            public int searchCount(long companyId, java.lang.String firstName,
1916                    java.lang.String middleName, java.lang.String lastName,
1917                    java.lang.String screenName, java.lang.String emailAddress, int status,
1918                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1919                    boolean andSearch);
1920    
1921            /**
1922            * Returns the number of users who match the keywords and status.
1923            *
1924            * @param companyId the primary key of the user's company
1925            * @param keywords the keywords (space separated), which may occur in the
1926            user's first name, middle name, last name, screen name, or email
1927            address
1928            * @param status the workflow status
1929            * @param params the finder parameters (optionally <code>null</code>). For
1930            more information see {@link
1931            com.liferay.portal.service.persistence.UserFinder}.
1932            * @return the number matching users
1933            */
1934            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1935            public int searchCount(long companyId, java.lang.String keywords,
1936                    int status,
1937                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params);
1938    
1939            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1940            public java.util.List<com.liferay.portal.model.User> searchSocial(
1941                    long companyId, long[] groupIds, java.lang.String keywords, int start,
1942                    int end);
1943    
1944            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1945            public java.util.List<com.liferay.portal.model.User> searchSocial(
1946                    long[] groupIds, long userId, int[] socialRelationTypes,
1947                    java.lang.String keywords, int start, int end)
1948                    throws com.liferay.portal.kernel.exception.PortalException;
1949    
1950            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1951            public java.util.List<com.liferay.portal.model.User> searchSocial(
1952                    long userId, int[] socialRelationTypes, java.lang.String keywords,
1953                    int start, int end)
1954                    throws com.liferay.portal.kernel.exception.PortalException;
1955    
1956            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1957            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
1958                    long companyId, java.lang.String firstName,
1959                    java.lang.String middleName, java.lang.String lastName,
1960                    java.lang.String screenName, java.lang.String emailAddress, int status,
1961                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1962                    boolean andSearch, int start, int end,
1963                    com.liferay.portal.kernel.search.Sort sort)
1964                    throws com.liferay.portal.kernel.exception.PortalException;
1965    
1966            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1967            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
1968                    long companyId, java.lang.String firstName,
1969                    java.lang.String middleName, java.lang.String lastName,
1970                    java.lang.String screenName, java.lang.String emailAddress, int status,
1971                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1972                    boolean andSearch, int start, int end,
1973                    com.liferay.portal.kernel.search.Sort[] sorts)
1974                    throws com.liferay.portal.kernel.exception.PortalException;
1975    
1976            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1977            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
1978                    long companyId, java.lang.String keywords, int status,
1979                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1980                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
1981                    throws com.liferay.portal.kernel.exception.PortalException;
1982    
1983            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1984            public com.liferay.portal.kernel.search.BaseModelSearchResult<com.liferay.portal.model.User> searchUsers(
1985                    long companyId, java.lang.String keywords, int status,
1986                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
1987                    int start, int end, com.liferay.portal.kernel.search.Sort[] sorts)
1988                    throws com.liferay.portal.kernel.exception.PortalException;
1989    
1990            /**
1991            * Sends an email address verification to the user.
1992            *
1993            * @param user the verification email recipient
1994            * @param emailAddress the recipient's email address
1995            * @param serviceContext the service context to be applied. Must set the
1996            portal URL, main path, primary key of the layout, remote address,
1997            remote host, and agent for the user.
1998            * @throws PortalException if a portal exception occurred
1999            */
2000            public void sendEmailAddressVerification(
2001                    com.liferay.portal.model.User user, java.lang.String emailAddress,
2002                    com.liferay.portal.service.ServiceContext serviceContext)
2003                    throws com.liferay.portal.kernel.exception.PortalException;
2004    
2005            /**
2006            * Sends the password email to the user with the email address. The content
2007            * of this email can be specified in <code>portal.properties</code> with the
2008            * <code>admin.email.password</code> keys.
2009            *
2010            * @param companyId the primary key of the user's company
2011            * @param emailAddress the user's email address
2012            * @param fromName the name of the individual that the email should be from
2013            * @param fromAddress the address of the individual that the email should
2014            be from
2015            * @param subject the email subject. If <code>null</code>, the subject
2016            specified in <code>portal.properties</code> will be used.
2017            * @param body the email body. If <code>null</code>, the body specified in
2018            <code>portal.properties</code> will be used.
2019            * @param serviceContext the service context to be applied
2020            * @throws PortalException if a user with the email address could not be
2021            found
2022            */
2023            public boolean sendPassword(long companyId, java.lang.String emailAddress,
2024                    java.lang.String fromName, java.lang.String fromAddress,
2025                    java.lang.String subject, java.lang.String body,
2026                    com.liferay.portal.service.ServiceContext serviceContext)
2027                    throws com.liferay.portal.kernel.exception.PortalException;
2028    
2029            public boolean sendPasswordByEmailAddress(long companyId,
2030                    java.lang.String emailAddress)
2031                    throws com.liferay.portal.kernel.exception.PortalException;
2032    
2033            public boolean sendPasswordByScreenName(long companyId,
2034                    java.lang.String screenName)
2035                    throws com.liferay.portal.kernel.exception.PortalException;
2036    
2037            public boolean sendPasswordByUserId(long userId)
2038                    throws com.liferay.portal.kernel.exception.PortalException;
2039    
2040            /**
2041            * Sets the Spring bean ID for this bean.
2042            *
2043            * @param beanIdentifier the Spring bean ID for this bean
2044            */
2045            public void setBeanIdentifier(java.lang.String beanIdentifier);
2046    
2047            public void setGroupUsers(long groupId, long[] userIds);
2048    
2049            public void setOrganizationUsers(long organizationId, long[] userIds);
2050    
2051            /**
2052            * @throws PortalException
2053            */
2054            public void setRoleUsers(long roleId, long[] userIds)
2055                    throws com.liferay.portal.kernel.exception.PortalException;
2056    
2057            public void setTeamUsers(long teamId, long[] userIds);
2058    
2059            /**
2060            * @throws PortalException
2061            */
2062            public void setUserGroupUsers(long userGroupId, long[] userIds)
2063                    throws com.liferay.portal.kernel.exception.PortalException;
2064    
2065            /**
2066            * Removes the users from the teams of a group.
2067            *
2068            * @param groupId the primary key of the group
2069            * @param userIds the primary keys of the users
2070            * @throws PortalException if a portal exception occurred
2071            */
2072            public void unsetGroupTeamsUsers(long groupId, long[] userIds)
2073                    throws com.liferay.portal.kernel.exception.PortalException;
2074    
2075            /**
2076            * Removes the users from the group.
2077            *
2078            * @param groupId the primary key of the group
2079            * @param userIds the primary keys of the users
2080            * @param serviceContext the service context to be applied (optionally
2081            <code>null</code>)
2082            * @throws PortalException if a portal exception occurred
2083            */
2084            public void unsetGroupUsers(long groupId, long[] userIds,
2085                    com.liferay.portal.service.ServiceContext serviceContext)
2086                    throws com.liferay.portal.kernel.exception.PortalException;
2087    
2088            /**
2089            * Removes the users from the organization.
2090            *
2091            * @param organizationId the primary key of the organization
2092            * @param userIds the primary keys of the users
2093            * @throws PortalException if a portal exception occurred
2094            */
2095            public void unsetOrganizationUsers(long organizationId, long[] userIds)
2096                    throws com.liferay.portal.kernel.exception.PortalException;
2097    
2098            /**
2099            * Removes the users from the password policy.
2100            *
2101            * @param passwordPolicyId the primary key of the password policy
2102            * @param userIds the primary keys of the users
2103            */
2104            public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds);
2105    
2106            /**
2107            * Removes the users from the role.
2108            *
2109            * @param roleId the primary key of the role
2110            * @param userIds the primary keys of the users
2111            * @throws PortalException if a portal exception occurred
2112            */
2113            public void unsetRoleUsers(long roleId, long[] userIds)
2114                    throws com.liferay.portal.kernel.exception.PortalException;
2115    
2116            /**
2117            * Removes the users from the role.
2118            *
2119            * @param roleId the primary key of the role
2120            * @param users the users
2121            * @throws PortalException if a portal exception occurred
2122            */
2123            public void unsetRoleUsers(long roleId,
2124                    java.util.List<com.liferay.portal.model.User> users)
2125                    throws com.liferay.portal.kernel.exception.PortalException;
2126    
2127            /**
2128            * Removes the users from the team.
2129            *
2130            * @param teamId the primary key of the team
2131            * @param userIds the primary keys of the users
2132            * @throws PortalException if a portal exception occurred
2133            */
2134            public void unsetTeamUsers(long teamId, long[] userIds)
2135                    throws com.liferay.portal.kernel.exception.PortalException;
2136    
2137            /**
2138            * Removes the users from the user group.
2139            *
2140            * @param userGroupId the primary key of the user group
2141            * @param userIds the primary keys of the users
2142            * @throws PortalException if a portal exception occurred
2143            */
2144            public void unsetUserGroupUsers(long userGroupId, long[] userIds)
2145                    throws com.liferay.portal.kernel.exception.PortalException;
2146    
2147            /**
2148            * Updates whether the user has agreed to the terms of use.
2149            *
2150            * @param userId the primary key of the user
2151            * @param agreedToTermsOfUse whether the user has agreet to the terms of
2152            use
2153            * @return the user
2154            * @throws PortalException if a user with the primary key could not be found
2155            */
2156            public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
2157                    boolean agreedToTermsOfUse)
2158                    throws com.liferay.portal.kernel.exception.PortalException;
2159    
2160            /**
2161            * Updates the user's asset with the new asset categories and tag names,
2162            * removing and adding asset categories and tag names as necessary.
2163            *
2164            * @param userId the primary key of the user
2165            * @param user ID the primary key of the user
2166            * @param assetCategoryIds the primary key's of the new asset categories
2167            * @param assetTagNames the new asset tag names
2168            * @throws PortalException if a user with the primary key could not be found
2169            */
2170            public void updateAsset(long userId, com.liferay.portal.model.User user,
2171                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
2172                    throws com.liferay.portal.kernel.exception.PortalException;
2173    
2174            /**
2175            * Updates the user's creation date.
2176            *
2177            * @param userId the primary key of the user
2178            * @param createDate the new creation date
2179            * @return the user
2180            * @throws PortalException if a user with the primary key could not be found
2181            */
2182            public com.liferay.portal.model.User updateCreateDate(long userId,
2183                    java.util.Date createDate)
2184                    throws com.liferay.portal.kernel.exception.PortalException;
2185    
2186            /**
2187            * Updates the user's email address.
2188            *
2189            * @param userId the primary key of the user
2190            * @param password the user's password
2191            * @param emailAddress1 the user's new email address
2192            * @param emailAddress2 the user's new email address confirmation
2193            * @return the user
2194            * @throws PortalException if a user with the primary key could not be found
2195            */
2196            public com.liferay.portal.model.User updateEmailAddress(long userId,
2197                    java.lang.String password, java.lang.String emailAddress1,
2198                    java.lang.String emailAddress2)
2199                    throws com.liferay.portal.kernel.exception.PortalException;
2200    
2201            /**
2202            * Updates the user's email address or sends verification email.
2203            *
2204            * @param userId the primary key of the user
2205            * @param password the user's password
2206            * @param emailAddress1 the user's new email address
2207            * @param emailAddress2 the user's new email address confirmation
2208            * @param serviceContext the service context to be applied. Must set the
2209            portal URL, main path, primary key of the layout, remote address,
2210            remote host, and agent for the user.
2211            * @return the user
2212            * @throws PortalException if a user with the primary key could not be found
2213            */
2214            public com.liferay.portal.model.User updateEmailAddress(long userId,
2215                    java.lang.String password, java.lang.String emailAddress1,
2216                    java.lang.String emailAddress2,
2217                    com.liferay.portal.service.ServiceContext serviceContext)
2218                    throws com.liferay.portal.kernel.exception.PortalException;
2219    
2220            /**
2221            * Updates whether the user has verified email address.
2222            *
2223            * @param userId the primary key of the user
2224            * @param emailAddressVerified whether the user has verified email address
2225            * @return the user
2226            * @throws PortalException if a user with the primary key could not be found
2227            */
2228            public com.liferay.portal.model.User updateEmailAddressVerified(
2229                    long userId, boolean emailAddressVerified)
2230                    throws com.liferay.portal.kernel.exception.PortalException;
2231    
2232            /**
2233            * Updates the user's Facebook ID.
2234            *
2235            * @param userId the primary key of the user
2236            * @param facebookId the user's new Facebook ID
2237            * @return the user
2238            * @throws PortalException if a user with the primary key could not be found
2239            */
2240            public com.liferay.portal.model.User updateFacebookId(long userId,
2241                    long facebookId)
2242                    throws com.liferay.portal.kernel.exception.PortalException;
2243    
2244            /**
2245            * Sets the groups the user is in, removing and adding groups as necessary.
2246            *
2247            * @param userId the primary key of the user
2248            * @param newGroupIds the primary keys of the groups
2249            * @param serviceContext the service context to be applied (optionally
2250            <code>null</code>)
2251            * @throws PortalException if a portal exception occurred
2252            */
2253            public void updateGroups(long userId, long[] newGroupIds,
2254                    com.liferay.portal.service.ServiceContext serviceContext)
2255                    throws com.liferay.portal.kernel.exception.PortalException;
2256    
2257            /**
2258            * Updates a user account that was automatically created when a guest user
2259            * participated in an action (e.g. posting a comment) and only provided his
2260            * name and email address.
2261            *
2262            * @param creatorUserId the primary key of the creator
2263            * @param companyId the primary key of the user's company
2264            * @param autoPassword whether a password should be automatically generated
2265            for the user
2266            * @param password1 the user's password
2267            * @param password2 the user's password confirmation
2268            * @param autoScreenName whether a screen name should be automatically
2269            generated for the user
2270            * @param screenName the user's screen name
2271            * @param emailAddress the user's email address
2272            * @param facebookId the user's facebook ID
2273            * @param openId the user's OpenID
2274            * @param locale the user's locale
2275            * @param firstName the user's first name
2276            * @param middleName the user's middle name
2277            * @param lastName the user's last name
2278            * @param prefixId the user's name prefix ID
2279            * @param suffixId the user's name suffix ID
2280            * @param male whether the user is male
2281            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
2282            January)
2283            * @param birthdayDay the user's birthday day
2284            * @param birthdayYear the user's birthday year
2285            * @param jobTitle the user's job title
2286            * @param updateUserInformation whether to update the user's information
2287            * @param sendEmail whether to send the user an email notification about
2288            their new account
2289            * @param serviceContext the service context to be applied (optionally
2290            <code>null</code>). Can set expando bridge attributes for the
2291            user.
2292            * @return the user
2293            * @throws PortalException if the user's information was invalid
2294            */
2295            public com.liferay.portal.model.User updateIncompleteUser(
2296                    long creatorUserId, long companyId, boolean autoPassword,
2297                    java.lang.String password1, java.lang.String password2,
2298                    boolean autoScreenName, java.lang.String screenName,
2299                    java.lang.String emailAddress, long facebookId,
2300                    java.lang.String openId, java.util.Locale locale,
2301                    java.lang.String firstName, java.lang.String middleName,
2302                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
2303                    int birthdayMonth, int birthdayDay, int birthdayYear,
2304                    java.lang.String jobTitle, boolean updateUserInformation,
2305                    boolean sendEmail,
2306                    com.liferay.portal.service.ServiceContext serviceContext)
2307                    throws com.liferay.portal.kernel.exception.PortalException;
2308    
2309            /**
2310            * Updates the user's job title.
2311            *
2312            * @param userId the primary key of the user
2313            * @param jobTitle the user's job title
2314            * @return the user
2315            * @throws PortalException if a user with the primary key could not be found
2316            or if a contact could not be found matching the user's contact ID
2317            */
2318            public com.liferay.portal.model.User updateJobTitle(long userId,
2319                    java.lang.String jobTitle)
2320                    throws com.liferay.portal.kernel.exception.PortalException;
2321    
2322            /**
2323            * Updates the user's last login with the current time and the IP address.
2324            *
2325            * @param userId the primary key of the user
2326            * @param loginIP the IP address the user logged in from
2327            * @return the user
2328            * @throws PortalException if a user with the primary key could not be found
2329            */
2330            public com.liferay.portal.model.User updateLastLogin(long userId,
2331                    java.lang.String loginIP)
2332                    throws com.liferay.portal.kernel.exception.PortalException;
2333    
2334            /**
2335            * Updates whether the user is locked out from logging in.
2336            *
2337            * @param user the user
2338            * @param lockout whether the user is locked out
2339            * @return the user
2340            * @throws PortalException if a portal exception occurred
2341            */
2342            public com.liferay.portal.model.User updateLockout(
2343                    com.liferay.portal.model.User user, boolean lockout)
2344                    throws com.liferay.portal.kernel.exception.PortalException;
2345    
2346            /**
2347            * Updates whether the user is locked out from logging in.
2348            *
2349            * @param companyId the primary key of the user's company
2350            * @param emailAddress the user's email address
2351            * @param lockout whether the user is locked out
2352            * @return the user
2353            * @throws PortalException if a user with the email address could not be
2354            found
2355            */
2356            public com.liferay.portal.model.User updateLockoutByEmailAddress(
2357                    long companyId, java.lang.String emailAddress, boolean lockout)
2358                    throws com.liferay.portal.kernel.exception.PortalException;
2359    
2360            /**
2361            * Updates whether the user is locked out from logging in.
2362            *
2363            * @param userId the primary key of the user
2364            * @param lockout whether the user is locked out
2365            * @return the user
2366            * @throws PortalException if a user with the primary key could not be found
2367            */
2368            public com.liferay.portal.model.User updateLockoutById(long userId,
2369                    boolean lockout)
2370                    throws com.liferay.portal.kernel.exception.PortalException;
2371    
2372            /**
2373            * Updates whether the user is locked out from logging in.
2374            *
2375            * @param companyId the primary key of the user's company
2376            * @param screenName the user's screen name
2377            * @param lockout whether the user is locked out
2378            * @return the user
2379            * @throws PortalException if a user with the screen name could not be found
2380            */
2381            public com.liferay.portal.model.User updateLockoutByScreenName(
2382                    long companyId, java.lang.String screenName, boolean lockout)
2383                    throws com.liferay.portal.kernel.exception.PortalException;
2384    
2385            /**
2386            * Updates the user's modified date.
2387            *
2388            * @param userId the primary key of the user
2389            * @param modifiedDate the new modified date
2390            * @return the user
2391            * @throws PortalException if a user with the primary key could not be found
2392            */
2393            public com.liferay.portal.model.User updateModifiedDate(long userId,
2394                    java.util.Date modifiedDate)
2395                    throws com.liferay.portal.kernel.exception.PortalException;
2396    
2397            /**
2398            * Updates the user's OpenID.
2399            *
2400            * @param userId the primary key of the user
2401            * @param openId the new OpenID
2402            * @return the user
2403            * @throws PortalException if a user with the primary key could not be found
2404            */
2405            public com.liferay.portal.model.User updateOpenId(long userId,
2406                    java.lang.String openId)
2407                    throws com.liferay.portal.kernel.exception.PortalException;
2408    
2409            /**
2410            * Sets the organizations that the user is in, removing and adding
2411            * organizations as necessary.
2412            *
2413            * @param userId the primary key of the user
2414            * @param newOrganizationIds the primary keys of the organizations
2415            * @param serviceContext the service context to be applied. Must set
2416            whether user indexing is enabled.
2417            * @throws PortalException if a user with the primary key could not be found
2418            */
2419            public void updateOrganizations(long userId, long[] newOrganizationIds,
2420                    com.liferay.portal.service.ServiceContext serviceContext)
2421                    throws com.liferay.portal.kernel.exception.PortalException;
2422    
2423            /**
2424            * Updates the user's password without tracking or validation of the change.
2425            *
2426            * @param userId the primary key of the user
2427            * @param password1 the user's new password
2428            * @param password2 the user's new password confirmation
2429            * @param passwordReset whether the user should be asked to reset their
2430            password the next time they log in
2431            * @return the user
2432            * @throws PortalException if a user with the primary key could not be found
2433            */
2434            public com.liferay.portal.model.User updatePassword(long userId,
2435                    java.lang.String password1, java.lang.String password2,
2436                    boolean passwordReset)
2437                    throws com.liferay.portal.kernel.exception.PortalException;
2438    
2439            /**
2440            * Updates the user's password, optionally with tracking and validation of
2441            * the change.
2442            *
2443            * @param userId the primary key of the user
2444            * @param password1 the user's new password
2445            * @param password2 the user's new password confirmation
2446            * @param passwordReset whether the user should be asked to reset their
2447            password the next time they login
2448            * @param silentUpdate whether the password should be updated without being
2449            tracked, or validated. Primarily used for password imports.
2450            * @return the user
2451            * @throws PortalException if a user with the primary key could not be found
2452            */
2453            public com.liferay.portal.model.User updatePassword(long userId,
2454                    java.lang.String password1, java.lang.String password2,
2455                    boolean passwordReset, boolean silentUpdate)
2456                    throws com.liferay.portal.kernel.exception.PortalException;
2457    
2458            /**
2459            * Updates the user's password with manually input information. This method
2460            * should only be used when performing maintenance.
2461            *
2462            * @param userId the primary key of the user
2463            * @param password the user's new password
2464            * @param passwordEncrypted the user's new encrypted password
2465            * @param passwordReset whether the user should be asked to reset their
2466            password the next time they login
2467            * @param passwordModifiedDate the new password modified date
2468            * @return the user
2469            * @throws PortalException if a user with the primary key could not be found
2470            */
2471            public com.liferay.portal.model.User updatePasswordManually(long userId,
2472                    java.lang.String password, boolean passwordEncrypted,
2473                    boolean passwordReset, java.util.Date passwordModifiedDate)
2474                    throws com.liferay.portal.kernel.exception.PortalException;
2475    
2476            /**
2477            * Updates whether the user should be asked to reset their password the next
2478            * time they login.
2479            *
2480            * @param userId the primary key of the user
2481            * @param passwordReset whether the user should be asked to reset their
2482            password the next time they login
2483            * @return the user
2484            * @throws PortalException if a user with the primary key could not be found
2485            */
2486            public com.liferay.portal.model.User updatePasswordReset(long userId,
2487                    boolean passwordReset)
2488                    throws com.liferay.portal.kernel.exception.PortalException;
2489    
2490            /**
2491            * Updates the user's portrait image.
2492            *
2493            * @param userId the primary key of the user
2494            * @param bytes the new portrait image data
2495            * @return the user
2496            * @throws PortalException if a user with the primary key could not be found
2497            or if the new portrait was invalid
2498            */
2499            public com.liferay.portal.model.User updatePortrait(long userId,
2500                    byte[] bytes)
2501                    throws com.liferay.portal.kernel.exception.PortalException;
2502    
2503            /**
2504            * Updates the user's password reset question and answer.
2505            *
2506            * @param userId the primary key of the user
2507            * @param question the user's new password reset question
2508            * @param answer the user's new password reset answer
2509            * @return the user
2510            * @throws PortalException if a user with the primary key could not be found
2511            or if the new question or answer were invalid
2512            */
2513            public com.liferay.portal.model.User updateReminderQuery(long userId,
2514                    java.lang.String question, java.lang.String answer)
2515                    throws com.liferay.portal.kernel.exception.PortalException;
2516    
2517            /**
2518            * Updates the user's screen name.
2519            *
2520            * @param userId the primary key of the user
2521            * @param screenName the user's new screen name
2522            * @return the user
2523            * @throws PortalException if a user with the primary key could not be found
2524            or if the new screen name was invalid
2525            */
2526            public com.liferay.portal.model.User updateScreenName(long userId,
2527                    java.lang.String screenName)
2528                    throws com.liferay.portal.kernel.exception.PortalException;
2529    
2530            /**
2531            * Updates the user's workflow status.
2532            *
2533            * @param userId the primary key of the user
2534            * @param status the user's new workflow status
2535            * @return the user
2536            * @throws PortalException if a user with the primary key could not be
2537            found
2538            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int,
2539            ServiceContext)}
2540            */
2541            @java.lang.Deprecated
2542            public com.liferay.portal.model.User updateStatus(long userId, int status)
2543                    throws com.liferay.portal.kernel.exception.PortalException;
2544    
2545            /**
2546            * Updates the user's workflow status.
2547            *
2548            * @param userId the primary key of the user
2549            * @param status the user's new workflow status
2550            * @param serviceContext the service context to be applied. You can specify
2551            an unencrypted custom password (used by an LDAP listener) for the
2552            user via attribute <code>passwordUnencrypted</code>.
2553            * @return the user
2554            * @throws PortalException if a user with the primary key could not be found
2555            */
2556            public com.liferay.portal.model.User updateStatus(long userId, int status,
2557                    com.liferay.portal.service.ServiceContext serviceContext)
2558                    throws com.liferay.portal.kernel.exception.PortalException;
2559    
2560            /**
2561            * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
2562            *
2563            * @param user the user
2564            * @return the user that was updated
2565            */
2566            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
2567            public com.liferay.portal.model.User updateUser(
2568                    com.liferay.portal.model.User user);
2569    
2570            /**
2571            * Updates the user.
2572            *
2573            * @param userId the primary key of the user
2574            * @param oldPassword the user's old password
2575            * @param newPassword1 the user's new password (optionally
2576            <code>null</code>)
2577            * @param newPassword2 the user's new password confirmation (optionally
2578            <code>null</code>)
2579            * @param passwordReset whether the user should be asked to reset their
2580            password the next time they login
2581            * @param reminderQueryQuestion the user's new password reset question
2582            * @param reminderQueryAnswer the user's new password reset answer
2583            * @param screenName the user's new screen name
2584            * @param emailAddress the user's new email address
2585            * @param facebookId the user's new Facebook ID
2586            * @param openId the user's new OpenID
2587            * @param languageId the user's new language ID
2588            * @param timeZoneId the user's new time zone ID
2589            * @param greeting the user's new greeting
2590            * @param comments the user's new comments
2591            * @param firstName the user's new first name
2592            * @param middleName the user's new middle name
2593            * @param lastName the user's new last name
2594            * @param prefixId the user's new name prefix ID
2595            * @param suffixId the user's new name suffix ID
2596            * @param male whether user is male
2597            * @param birthdayMonth the user's new birthday month (0-based, meaning
2598            0 for January)
2599            * @param birthdayDay the user's new birthday day
2600            * @param birthdayYear the user's birthday year
2601            * @param smsSn the user's new SMS screen name
2602            * @param aimSn the user's new AIM screen name
2603            * @param facebookSn the user's new Facebook screen name
2604            * @param icqSn the user's new ICQ screen name
2605            * @param jabberSn the user's new Jabber screen name
2606            * @param msnSn the user's new MSN screen name
2607            * @param mySpaceSn the user's new MySpace screen name
2608            * @param skypeSn the user's new Skype screen name
2609            * @param twitterSn the user's new Twitter screen name
2610            * @param ymSn the user's new Yahoo! Messenger screen name
2611            * @param jobTitle the user's new job title
2612            * @param groupIds the primary keys of the user's groups
2613            * @param organizationIds the primary keys of the user's organizations
2614            * @param roleIds the primary keys of the user's roles
2615            * @param userGroupRoles the user user's group roles
2616            * @param userGroupIds the primary keys of the user's user groups
2617            * @param serviceContext the service context to be applied (optionally
2618            <code>null</code>). Can set the UUID (with the
2619            <code>uuid</code> attribute), asset category IDs, asset tag
2620            names, and expando bridge attributes for the user.
2621            * @return the user
2622            * @throws PortalException if a user with the primary key could not be
2623            found or if the new information was invalid
2624            * @deprecated As of 7.0.0, replaced by {@link #updateUser(long, String,
2625            String, String, boolean, String, String, String, String,
2626            long, String, String, String, String, String, String, String,
2627            String, int, int, boolean, int, int, int, String, String,
2628            String, String, String, String, String, String, String,
2629            String, String, long[], long[], long[], java.util.List,
2630            long[], boolean, byte[], ServiceContext)}
2631            */
2632            @java.lang.Deprecated
2633            public com.liferay.portal.model.User updateUser(long userId,
2634                    java.lang.String oldPassword, java.lang.String newPassword1,
2635                    java.lang.String newPassword2, boolean passwordReset,
2636                    java.lang.String reminderQueryQuestion,
2637                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
2638                    java.lang.String emailAddress, long facebookId,
2639                    java.lang.String openId, java.lang.String languageId,
2640                    java.lang.String timeZoneId, java.lang.String greeting,
2641                    java.lang.String comments, java.lang.String firstName,
2642                    java.lang.String middleName, java.lang.String lastName, int prefixId,
2643                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
2644                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
2645                    java.lang.String facebookSn, java.lang.String icqSn,
2646                    java.lang.String jabberSn, java.lang.String msnSn,
2647                    java.lang.String mySpaceSn, java.lang.String skypeSn,
2648                    java.lang.String twitterSn, java.lang.String ymSn,
2649                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
2650                    long[] roleIds,
2651                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
2652                    long[] userGroupIds,
2653                    com.liferay.portal.service.ServiceContext serviceContext)
2654                    throws com.liferay.portal.kernel.exception.PortalException;
2655    
2656            /**
2657            * Updates the user.
2658            *
2659            * @param userId the primary key of the user
2660            * @param oldPassword the user's old password
2661            * @param newPassword1 the user's new password (optionally
2662            <code>null</code>)
2663            * @param newPassword2 the user's new password confirmation (optionally
2664            <code>null</code>)
2665            * @param passwordReset whether the user should be asked to reset their
2666            password the next time they login
2667            * @param reminderQueryQuestion the user's new password reset question
2668            * @param reminderQueryAnswer the user's new password reset answer
2669            * @param screenName the user's new screen name
2670            * @param emailAddress the user's new email address
2671            * @param facebookId the user's new Facebook ID
2672            * @param openId the user's new OpenID
2673            * @param portrait whether to update the user's portrait image
2674            * @param portraitBytes the new portrait image data
2675            * @param languageId the user's new language ID
2676            * @param timeZoneId the user's new time zone ID
2677            * @param greeting the user's new greeting
2678            * @param comments the user's new comments
2679            * @param firstName the user's new first name
2680            * @param middleName the user's new middle name
2681            * @param lastName the user's new last name
2682            * @param prefixId the user's new name prefix ID
2683            * @param suffixId the user's new name suffix ID
2684            * @param male whether user is male
2685            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
2686            for January)
2687            * @param birthdayDay the user's new birthday day
2688            * @param birthdayYear the user's birthday year
2689            * @param smsSn the user's new SMS screen name
2690            * @param aimSn the user's new AIM screen name
2691            * @param facebookSn the user's new Facebook screen name
2692            * @param icqSn the user's new ICQ screen name
2693            * @param jabberSn the user's new Jabber screen name
2694            * @param msnSn the user's new MSN screen name
2695            * @param mySpaceSn the user's new MySpace screen name
2696            * @param skypeSn the user's new Skype screen name
2697            * @param twitterSn the user's new Twitter screen name
2698            * @param ymSn the user's new Yahoo! Messenger screen name
2699            * @param jobTitle the user's new job title
2700            * @param groupIds the primary keys of the user's groups
2701            * @param organizationIds the primary keys of the user's organizations
2702            * @param roleIds the primary keys of the user's roles
2703            * @param userGroupRoles the user user's group roles
2704            * @param userGroupIds the primary keys of the user's user groups
2705            * @param serviceContext the service context to be applied (optionally
2706            <code>null</code>). Can set the UUID (with the <code>uuid</code>
2707            attribute), asset category IDs, asset tag names, and expando
2708            bridge attributes for the user.
2709            * @return the user
2710            * @throws PortalException if a user with the primary key could not be found
2711            or if the new information was invalid
2712            */
2713            public com.liferay.portal.model.User updateUser(long userId,
2714                    java.lang.String oldPassword, java.lang.String newPassword1,
2715                    java.lang.String newPassword2, boolean passwordReset,
2716                    java.lang.String reminderQueryQuestion,
2717                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
2718                    java.lang.String emailAddress, long facebookId,
2719                    java.lang.String openId, boolean portrait, byte[] portraitBytes,
2720                    java.lang.String languageId, java.lang.String timeZoneId,
2721                    java.lang.String greeting, java.lang.String comments,
2722                    java.lang.String firstName, java.lang.String middleName,
2723                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
2724                    int birthdayMonth, int birthdayDay, int birthdayYear,
2725                    java.lang.String smsSn, java.lang.String aimSn,
2726                    java.lang.String facebookSn, java.lang.String icqSn,
2727                    java.lang.String jabberSn, java.lang.String msnSn,
2728                    java.lang.String mySpaceSn, java.lang.String skypeSn,
2729                    java.lang.String twitterSn, java.lang.String ymSn,
2730                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
2731                    long[] roleIds,
2732                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
2733                    long[] userGroupIds,
2734                    com.liferay.portal.service.ServiceContext serviceContext)
2735                    throws com.liferay.portal.kernel.exception.PortalException;
2736    
2737            /**
2738            * Verifies the email address of the ticket.
2739            *
2740            * @param ticketKey the ticket key
2741            * @throws PortalException if a ticket matching the ticket key could not be
2742            found, if the ticket has expired, if the ticket is an email
2743            address ticket, or if the email address is invalid
2744            */
2745            public void verifyEmailAddress(java.lang.String ticketKey)
2746                    throws com.liferay.portal.kernel.exception.PortalException;
2747    }