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