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