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 n 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, readOnly = true)
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, readOnly = true)
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            */
1378            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1379            public com.liferay.portal.model.User fetchUserByContactId(long contactId)
1380                    throws com.liferay.portal.kernel.exception.SystemException;
1381    
1382            /**
1383            * Returns the user with the email address.
1384            *
1385            * @param companyId the primary key of the user's company
1386            * @param emailAddress the user's email address
1387            * @return the user with the email address, or <code>null</code> if a user
1388            with the email address could not be found
1389            * @throws SystemException if a system exception occurred
1390            */
1391            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1392            public com.liferay.portal.model.User fetchUserByEmailAddress(
1393                    long companyId, java.lang.String emailAddress)
1394                    throws com.liferay.portal.kernel.exception.SystemException;
1395    
1396            /**
1397            * Returns the user with the Facebook ID.
1398            *
1399            * @param companyId the primary key of the user's company
1400            * @param facebookId the user's Facebook ID
1401            * @return the user with the Facebook ID, or <code>null</code> if a user
1402            with the Facebook ID could not be found
1403            * @throws SystemException if a system exception occurred
1404            */
1405            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1406            public com.liferay.portal.model.User fetchUserByFacebookId(long companyId,
1407                    long facebookId)
1408                    throws com.liferay.portal.kernel.exception.SystemException;
1409    
1410            /**
1411            * Returns the user with the primary key.
1412            *
1413            * @param userId the primary key of the user
1414            * @return the user with the primary key, or <code>null</code> if a user
1415            with the primary key could not be found
1416            * @throws SystemException if a system exception occurred
1417            */
1418            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1419            public com.liferay.portal.model.User fetchUserById(long userId)
1420                    throws com.liferay.portal.kernel.exception.SystemException;
1421    
1422            /**
1423            * Returns the user with the OpenID.
1424            *
1425            * @param companyId the primary key of the user's company
1426            * @param openId the user's OpenID
1427            * @return the user with the OpenID, or <code>null</code> if a user with the
1428            OpenID could not be found
1429            * @throws SystemException if a system exception occurred
1430            */
1431            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1432            public com.liferay.portal.model.User fetchUserByOpenId(long companyId,
1433                    java.lang.String openId)
1434                    throws com.liferay.portal.kernel.exception.SystemException;
1435    
1436            /**
1437            * Returns the user with the screen name.
1438            *
1439            * @param companyId the primary key of the user's company
1440            * @param screenName the user's screen name
1441            * @return the user with the screen name, or <code>null</code> if a user
1442            with the screen name could not be found
1443            * @throws SystemException if a system exception occurred
1444            */
1445            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1446            public com.liferay.portal.model.User fetchUserByScreenName(long companyId,
1447                    java.lang.String screenName)
1448                    throws com.liferay.portal.kernel.exception.SystemException;
1449    
1450            /**
1451            * Returns a range of all the users belonging to the company.
1452            *
1453            * <p>
1454            * Useful when paginating results. Returns a maximum of <code>end -
1455            * start</code> instances. <code>start</code> and <code>end</code> are not
1456            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1457            * refers to the first result in the set. Setting both <code>start</code>
1458            * and <code>end</code> to {@link
1459            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1460            * result set.
1461            * </p>
1462            *
1463            * @param companyId the primary key of the company
1464            * @param start the lower bound of the range of users
1465            * @param end the upper bound of the range of users (not inclusive)
1466            * @return the range of users belonging to the company
1467            * @throws SystemException if a system exception occurred
1468            */
1469            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1470            public java.util.List<com.liferay.portal.model.User> getCompanyUsers(
1471                    long companyId, int start, int end)
1472                    throws com.liferay.portal.kernel.exception.SystemException;
1473    
1474            /**
1475            * Returns the number of users belonging to the company.
1476            *
1477            * @param companyId the primary key of the company
1478            * @return the number of users belonging to the company
1479            * @throws SystemException if a system exception occurred
1480            */
1481            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1482            public int getCompanyUsersCount(long companyId)
1483                    throws com.liferay.portal.kernel.exception.SystemException;
1484    
1485            /**
1486            * Returns the default user for the company.
1487            *
1488            * @param companyId the primary key of the company
1489            * @return the default user for the company
1490            * @throws PortalException if a default user for the company could not be
1491            found
1492            * @throws SystemException if a system exception occurred
1493            */
1494            @com.liferay.portal.kernel.spring.aop.Skip
1495            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1496            public com.liferay.portal.model.User getDefaultUser(long companyId)
1497                    throws com.liferay.portal.kernel.exception.PortalException,
1498                            com.liferay.portal.kernel.exception.SystemException;
1499    
1500            /**
1501            * Returns the primary key of the default user for the company.
1502            *
1503            * @param companyId the primary key of the company
1504            * @return the primary key of the default user for the company
1505            * @throws PortalException if a default user for the company could not be
1506            found
1507            * @throws SystemException if a system exception occurred
1508            */
1509            @com.liferay.portal.kernel.spring.aop.Skip
1510            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1511            public long getDefaultUserId(long companyId)
1512                    throws com.liferay.portal.kernel.exception.PortalException,
1513                            com.liferay.portal.kernel.exception.SystemException;
1514    
1515            /**
1516            * Returns the primary keys of all the users belonging to the group.
1517            *
1518            * @param groupId the primary key of the group
1519            * @return the primary keys of the users belonging to the group
1520            * @throws SystemException if a system exception occurred
1521            */
1522            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1523            public long[] getGroupUserIds(long groupId)
1524                    throws com.liferay.portal.kernel.exception.SystemException;
1525    
1526            /**
1527            * Returns the number of users with the status belonging to the group.
1528            *
1529            * @param groupId the primary key of the group
1530            * @param status the workflow status
1531            * @return the number of users with the status belonging to the group
1532            * @throws PortalException if a group with the primary key could not be
1533            found
1534            * @throws SystemException if a system exception occurred
1535            */
1536            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1537            public int getGroupUsersCount(long groupId, int status)
1538                    throws com.liferay.portal.kernel.exception.PortalException,
1539                            com.liferay.portal.kernel.exception.SystemException;
1540    
1541            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1542            public java.util.List<com.liferay.portal.model.User> getInheritedRoleUsers(
1543                    long roleId, int start, int end,
1544                    com.liferay.portal.kernel.util.OrderByComparator obc)
1545                    throws com.liferay.portal.kernel.exception.PortalException,
1546                            com.liferay.portal.kernel.exception.SystemException;
1547    
1548            /**
1549            * Returns all the users who have not had any announcements of the type
1550            * delivered, excluding the default user.
1551            *
1552            * @param type the type of announcement
1553            * @return the users who have not had any annoucements of the type delivered
1554            * @throws SystemException if a system exception occurred
1555            */
1556            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1557            public java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
1558                    java.lang.String type)
1559                    throws com.liferay.portal.kernel.exception.SystemException;
1560    
1561            /**
1562            * Returns all the users who do not have any contacts.
1563            *
1564            * @return the users who do not have any contacts
1565            * @throws SystemException if a system exception occurred
1566            */
1567            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1568            public java.util.List<com.liferay.portal.model.User> getNoContacts()
1569                    throws com.liferay.portal.kernel.exception.SystemException;
1570    
1571            /**
1572            * Returns all the users who do not belong to any groups, excluding the
1573            * default user.
1574            *
1575            * @return the users who do not belong to any groups
1576            * @throws SystemException if a system exception occurred
1577            */
1578            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1579            public java.util.List<com.liferay.portal.model.User> getNoGroups()
1580                    throws com.liferay.portal.kernel.exception.SystemException;
1581    
1582            /**
1583            * Returns the primary keys of all the users belonging to the organization.
1584            *
1585            * @param organizationId the primary key of the organization
1586            * @return the primary keys of the users belonging to the organization
1587            * @throws SystemException if a system exception occurred
1588            */
1589            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1590            public long[] getOrganizationUserIds(long organizationId)
1591                    throws com.liferay.portal.kernel.exception.SystemException;
1592    
1593            /**
1594            * Returns the number of users with the status belonging to the
1595            * organization.
1596            *
1597            * @param organizationId the primary key of the organization
1598            * @param status the workflow status
1599            * @return the number of users with the status belonging to the organization
1600            * @throws PortalException if an organization with the primary key could not
1601            be found
1602            * @throws SystemException if a system exception occurred
1603            */
1604            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1605            public int getOrganizationUsersCount(long organizationId, int status)
1606                    throws com.liferay.portal.kernel.exception.PortalException,
1607                            com.liferay.portal.kernel.exception.SystemException;
1608    
1609            /**
1610            * Returns the primary keys of all the users belonging to the role.
1611            *
1612            * @param roleId the primary key of the role
1613            * @return the primary keys of the users belonging to the role
1614            * @throws SystemException if a system exception occurred
1615            */
1616            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1617            public long[] getRoleUserIds(long roleId)
1618                    throws com.liferay.portal.kernel.exception.SystemException;
1619    
1620            /**
1621            * Returns the number of users with the status belonging to the role.
1622            *
1623            * @param roleId the primary key of the role
1624            * @param status the workflow status
1625            * @return the number of users with the status belonging to the role
1626            * @throws PortalException if an role with the primary key could not be
1627            found
1628            * @throws SystemException if a system exception occurred
1629            */
1630            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1631            public int getRoleUsersCount(long roleId, int status)
1632                    throws com.liferay.portal.kernel.exception.PortalException,
1633                            com.liferay.portal.kernel.exception.SystemException;
1634    
1635            /**
1636            * Returns an ordered range of all the users with a social relation of the
1637            * type with the user.
1638            *
1639            * <p>
1640            * Useful when paginating results. Returns a maximum of <code>end -
1641            * start</code> instances. <code>start</code> and <code>end</code> are not
1642            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1643            * refers to the first result in the set. Setting both <code>start</code>
1644            * and <code>end</code> to {@link
1645            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1646            * result set.
1647            * </p>
1648            *
1649            * @param userId the primary key of the user
1650            * @param type the type of social relation. The possible types can be found
1651            in {@link
1652            com.liferay.portlet.social.model.SocialRelationConstants}.
1653            * @param start the lower bound of the range of users
1654            * @param end the upper bound of the range of users (not inclusive)
1655            * @param obc the comparator to order the users by (optionally
1656            <code>null</code>)
1657            * @return the ordered range of users with a social relation of the type
1658            with the user
1659            * @throws PortalException if a user with the primary key could not be found
1660            * @throws SystemException if a system exception occurred
1661            */
1662            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1663            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1664                    long userId, int type, int start, int end,
1665                    com.liferay.portal.kernel.util.OrderByComparator obc)
1666                    throws com.liferay.portal.kernel.exception.PortalException,
1667                            com.liferay.portal.kernel.exception.SystemException;
1668    
1669            /**
1670            * Returns an ordered range of all the users with a social relation with the
1671            * user.
1672            *
1673            * <p>
1674            * Useful when paginating results. Returns a maximum of <code>end -
1675            * start</code> instances. <code>start</code> and <code>end</code> are not
1676            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1677            * refers to the first result in the set. Setting both <code>start</code>
1678            * and <code>end</code> to {@link
1679            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1680            * result set.
1681            * </p>
1682            *
1683            * @param userId the primary key of the user
1684            * @param start the lower bound of the range of users
1685            * @param end the upper bound of the range of users (not inclusive)
1686            * @param obc the comparator to order the users by (optionally
1687            <code>null</code>)
1688            * @return the ordered range of users with a social relation with the user
1689            * @throws PortalException if a user with the primary key could not be found
1690            * @throws SystemException if a system exception occurred
1691            */
1692            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1693            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1694                    long userId, int start, int end,
1695                    com.liferay.portal.kernel.util.OrderByComparator obc)
1696                    throws com.liferay.portal.kernel.exception.PortalException,
1697                            com.liferay.portal.kernel.exception.SystemException;
1698    
1699            /**
1700            * Returns an ordered range of all the users with a mutual social relation
1701            * of the type with both of the given users.
1702            *
1703            * <p>
1704            * Useful when paginating results. Returns a maximum of <code>end -
1705            * start</code> instances. <code>start</code> and <code>end</code> are not
1706            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1707            * refers to the first result in the set. Setting both <code>start</code>
1708            * and <code>end</code> to {@link
1709            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1710            * result set.
1711            * </p>
1712            *
1713            * @param userId1 the primary key of the first user
1714            * @param userId2 the primary key of the second user
1715            * @param type the type of social relation. The possible types can be found
1716            in {@link
1717            com.liferay.portlet.social.model.SocialRelationConstants}.
1718            * @param start the lower bound of the range of users
1719            * @param end the upper bound of the range of users (not inclusive)
1720            * @param obc the comparator to order the users by (optionally
1721            <code>null</code>)
1722            * @return the ordered range of users with a mutual social relation of the
1723            type with the user
1724            * @throws PortalException if a user with the primary key could not be found
1725            * @throws SystemException if a system exception occurred
1726            */
1727            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1728            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1729                    long userId1, long userId2, int type, int start, int end,
1730                    com.liferay.portal.kernel.util.OrderByComparator obc)
1731                    throws com.liferay.portal.kernel.exception.PortalException,
1732                            com.liferay.portal.kernel.exception.SystemException;
1733    
1734            /**
1735            * Returns an ordered range of all the users with a mutual social relation
1736            * with both of the given users.
1737            *
1738            * <p>
1739            * Useful when paginating results. Returns a maximum of <code>end -
1740            * start</code> instances. <code>start</code> and <code>end</code> are not
1741            * primary keys, they are indexes in the result set. Thus, <code>0</code>
1742            * refers to the first result in the set. Setting both <code>start</code>
1743            * and <code>end</code> to {@link
1744            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
1745            * result set.
1746            * </p>
1747            *
1748            * @param userId1 the primary key of the first user
1749            * @param userId2 the primary key of the second user
1750            * @param start the lower bound of the range of users
1751            * @param end the upper bound of the range of users (not inclusive)
1752            * @param obc the comparator to order the users by (optionally
1753            <code>null</code>)
1754            * @return the ordered range of users with a mutual social relation with the
1755            user
1756            * @throws PortalException if a user with the primary key could not be found
1757            * @throws SystemException if a system exception occurred
1758            */
1759            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1760            public java.util.List<com.liferay.portal.model.User> getSocialUsers(
1761                    long userId1, long userId2, int start, int end,
1762                    com.liferay.portal.kernel.util.OrderByComparator obc)
1763                    throws com.liferay.portal.kernel.exception.PortalException,
1764                            com.liferay.portal.kernel.exception.SystemException;
1765    
1766            /**
1767            * Returns the number of users with a social relation with the user.
1768            *
1769            * @param userId the primary key of the user
1770            * @return the number of users with a social relation with the user
1771            * @throws PortalException if a user with the primary key could not be found
1772            * @throws SystemException if a system exception occurred
1773            */
1774            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1775            public int getSocialUsersCount(long userId)
1776                    throws com.liferay.portal.kernel.exception.PortalException,
1777                            com.liferay.portal.kernel.exception.SystemException;
1778    
1779            /**
1780            * Returns the number of users with a social relation of the type with the
1781            * user.
1782            *
1783            * @param userId the primary key of the user
1784            * @param type the type of social relation. The possible types can be found
1785            in {@link
1786            com.liferay.portlet.social.model.SocialRelationConstants}.
1787            * @return the number of users with a social relation of the type with the
1788            user
1789            * @throws PortalException if a user with the primary key could not be found
1790            * @throws SystemException if a system exception occurred
1791            */
1792            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1793            public int getSocialUsersCount(long userId, int type)
1794                    throws com.liferay.portal.kernel.exception.PortalException,
1795                            com.liferay.portal.kernel.exception.SystemException;
1796    
1797            /**
1798            * Returns the number of users with a mutual social relation with both of
1799            * the given users.
1800            *
1801            * @param userId1 the primary key of the first user
1802            * @param userId2 the primary key of the second user
1803            * @return the number of users with a mutual social relation with the user
1804            * @throws PortalException if a user with the primary key could not be found
1805            * @throws SystemException if a system exception occurred
1806            */
1807            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1808            public int getSocialUsersCount(long userId1, long userId2)
1809                    throws com.liferay.portal.kernel.exception.PortalException,
1810                            com.liferay.portal.kernel.exception.SystemException;
1811    
1812            /**
1813            * Returns the number of users with a mutual social relation of the type
1814            * with both of the given users.
1815            *
1816            * @param userId1 the primary key of the first user
1817            * @param userId2 the primary key of the second user
1818            * @param type the type of social relation. The possible types can be found
1819            in {@link
1820            com.liferay.portlet.social.model.SocialRelationConstants}.
1821            * @return the number of users with a mutual social relation of the type
1822            with the user
1823            * @throws PortalException if a user with the primary key could not be found
1824            * @throws SystemException if a system exception occurred
1825            */
1826            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1827            public int getSocialUsersCount(long userId1, long userId2, int type)
1828                    throws com.liferay.portal.kernel.exception.PortalException,
1829                            com.liferay.portal.kernel.exception.SystemException;
1830    
1831            /**
1832            * Returns the user with the contact ID.
1833            *
1834            * @param contactId the user's contact ID
1835            * @return the user with the contact ID
1836            * @throws PortalException if a user with the contact ID could not be found
1837            * @throws SystemException if a system exception occurred
1838            */
1839            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1840            public com.liferay.portal.model.User getUserByContactId(long contactId)
1841                    throws com.liferay.portal.kernel.exception.PortalException,
1842                            com.liferay.portal.kernel.exception.SystemException;
1843    
1844            /**
1845            * Returns the user with the email address.
1846            *
1847            * @param companyId the primary key of the user's company
1848            * @param emailAddress the user's email address
1849            * @return the user with the email address
1850            * @throws PortalException if a user with the email address could not be
1851            found
1852            * @throws SystemException if a system exception occurred
1853            */
1854            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1855            public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
1856                    java.lang.String emailAddress)
1857                    throws com.liferay.portal.kernel.exception.PortalException,
1858                            com.liferay.portal.kernel.exception.SystemException;
1859    
1860            /**
1861            * Returns the user with the Facebook ID.
1862            *
1863            * @param companyId the primary key of the user's company
1864            * @param facebookId the user's Facebook ID
1865            * @return the user with the Facebook ID
1866            * @throws PortalException if a user with the Facebook ID could not be found
1867            * @throws SystemException if a system exception occurred
1868            */
1869            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1870            public com.liferay.portal.model.User getUserByFacebookId(long companyId,
1871                    long facebookId)
1872                    throws com.liferay.portal.kernel.exception.PortalException,
1873                            com.liferay.portal.kernel.exception.SystemException;
1874    
1875            /**
1876            * Returns the user with the primary key.
1877            *
1878            * @param userId the primary key of the user
1879            * @return the user with the primary key
1880            * @throws PortalException if a user with the primary key 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 getUserById(long userId)
1885                    throws com.liferay.portal.kernel.exception.PortalException,
1886                            com.liferay.portal.kernel.exception.SystemException;
1887    
1888            /**
1889            * Returns the user with the primary key from the company.
1890            *
1891            * @param companyId the primary key of the user's company
1892            * @param userId the primary key of the user
1893            * @return the user with the primary key
1894            * @throws PortalException if a user with the primary key from the company
1895            could not be found
1896            * @throws SystemException if a system exception occurred
1897            */
1898            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1899            public com.liferay.portal.model.User getUserById(long companyId, long userId)
1900                    throws com.liferay.portal.kernel.exception.PortalException,
1901                            com.liferay.portal.kernel.exception.SystemException;
1902    
1903            /**
1904            * Returns the user with the OpenID.
1905            *
1906            * @param companyId the primary key of the user's company
1907            * @param openId the user's OpenID
1908            * @return the user with the OpenID
1909            * @throws PortalException if a user with the OpenID could not be found
1910            * @throws SystemException if a system exception occurred
1911            */
1912            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1913            public com.liferay.portal.model.User getUserByOpenId(long companyId,
1914                    java.lang.String openId)
1915                    throws com.liferay.portal.kernel.exception.PortalException,
1916                            com.liferay.portal.kernel.exception.SystemException;
1917    
1918            /**
1919            * Returns the user with the portrait ID.
1920            *
1921            * @param portraitId the user's portrait ID
1922            * @return the user with the portrait ID
1923            * @throws PortalException if a user with the portrait ID could not be found
1924            * @throws SystemException if a system exception occurred
1925            */
1926            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1927            public com.liferay.portal.model.User getUserByPortraitId(long portraitId)
1928                    throws com.liferay.portal.kernel.exception.PortalException,
1929                            com.liferay.portal.kernel.exception.SystemException;
1930    
1931            /**
1932            * Returns the user with the screen name.
1933            *
1934            * @param companyId the primary key of the user's company
1935            * @param screenName the user's screen name
1936            * @return the user with the screen name
1937            * @throws PortalException if a user with the screen name could not be found
1938            * @throws SystemException if a system exception occurred
1939            */
1940            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1941            public com.liferay.portal.model.User getUserByScreenName(long companyId,
1942                    java.lang.String screenName)
1943                    throws com.liferay.portal.kernel.exception.PortalException,
1944                            com.liferay.portal.kernel.exception.SystemException;
1945    
1946            /**
1947            * Returns the user with the UUID.
1948            *
1949            * @param uuid the user's UUID
1950            * @return the user with the UUID
1951            * @throws PortalException if a user with the UUID could not be found
1952            * @throws SystemException if a system exception occurred
1953            * @deprecated As of 6.2.0, replaced by {@link
1954            #getUserByUuidAndCompanyId(String, long)}
1955            */
1956            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1957            public com.liferay.portal.model.User getUserByUuid(java.lang.String uuid)
1958                    throws com.liferay.portal.kernel.exception.PortalException,
1959                            com.liferay.portal.kernel.exception.SystemException;
1960    
1961            /**
1962            * Returns the number of users with the status belonging to the user group.
1963            *
1964            * @param userGroupId the primary key of the user group
1965            * @param status the workflow status
1966            * @return the number of users with the status belonging to the user group
1967            * @throws PortalException if a user group with the primary key could not be
1968            found
1969            * @throws SystemException if a system exception occurred
1970            */
1971            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1972            public int getUserGroupUsersCount(long userGroupId, int status)
1973                    throws com.liferay.portal.kernel.exception.PortalException,
1974                            com.liferay.portal.kernel.exception.SystemException;
1975    
1976            /**
1977            * Returns the primary key of the user with the email address.
1978            *
1979            * @param companyId the primary key of the user's company
1980            * @param emailAddress the user's email address
1981            * @return the primary key of the user with the email address
1982            * @throws PortalException if a user with the email address could not be
1983            found
1984            * @throws SystemException if a system exception occurred
1985            */
1986            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
1987            public long getUserIdByEmailAddress(long companyId,
1988                    java.lang.String emailAddress)
1989                    throws com.liferay.portal.kernel.exception.PortalException,
1990                            com.liferay.portal.kernel.exception.SystemException;
1991    
1992            /**
1993            * Returns the primary key of the user with the screen name.
1994            *
1995            * @param companyId the primary key of the user's company
1996            * @param screenName the user's screen name
1997            * @return the primary key of the user with the screen name
1998            * @throws PortalException if a user with the screen name could not be found
1999            * @throws SystemException if a system exception occurred
2000            */
2001            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2002            public long getUserIdByScreenName(long companyId,
2003                    java.lang.String screenName)
2004                    throws com.liferay.portal.kernel.exception.PortalException,
2005                            com.liferay.portal.kernel.exception.SystemException;
2006    
2007            /**
2008            * Returns <code>true</code> if the password policy has been assigned to the
2009            * user.
2010            *
2011            * @param passwordPolicyId the primary key of the password policy
2012            * @param userId the primary key of the user
2013            * @return <code>true</code> if the password policy is assigned to the user;
2014            <code>false</code> otherwise
2015            * @throws SystemException if a system exception occurred
2016            */
2017            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2018            public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId)
2019                    throws com.liferay.portal.kernel.exception.SystemException;
2020    
2021            /**
2022            * Returns <code>true</code> if the user has the role with the name,
2023            * optionally through inheritance.
2024            *
2025            * @param companyId the primary key of the role's company
2026            * @param name the name of the role (must be a regular role, not an
2027            organization, site or provider role)
2028            * @param userId the primary key of the user
2029            * @param inherited whether to include roles inherited from organizations,
2030            sites, etc.
2031            * @return <code>true</code> if the user has the role; <code>false</code>
2032            otherwise
2033            * @throws PortalException if a role with the name could not be found
2034            * @throws SystemException if a system exception occurred
2035            */
2036            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2037            public boolean hasRoleUser(long companyId, java.lang.String name,
2038                    long userId, boolean inherited)
2039                    throws com.liferay.portal.kernel.exception.PortalException,
2040                            com.liferay.portal.kernel.exception.SystemException;
2041    
2042            /**
2043            * Returns <code>true</code> if the user's password is expired.
2044            *
2045            * @param user the user
2046            * @return <code>true</code> if the user's password is expired;
2047            <code>false</code> otherwise
2048            * @throws PortalException if the password policy for the user could not be
2049            found
2050            * @throws SystemException if a system exception occurred
2051            */
2052            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2053            public boolean isPasswordExpired(com.liferay.portal.model.User user)
2054                    throws com.liferay.portal.kernel.exception.PortalException,
2055                            com.liferay.portal.kernel.exception.SystemException;
2056    
2057            /**
2058            * Returns <code>true</code> if the password policy is configured to warn
2059            * the user that his password is expiring and the remaining time until
2060            * expiration is equal or less than the configured warning time.
2061            *
2062            * @param user the user
2063            * @return <code>true</code> if the user's password is expiring soon;
2064            <code>false</code> otherwise
2065            * @throws PortalException if the password policy for the user could not be
2066            found
2067            * @throws SystemException if a system exception occurred
2068            */
2069            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2070            public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user)
2071                    throws com.liferay.portal.kernel.exception.PortalException,
2072                            com.liferay.portal.kernel.exception.SystemException;
2073    
2074            /**
2075            * Returns the default user for the company.
2076            *
2077            * @param companyId the primary key of the company
2078            * @return the default user for the company
2079            * @throws PortalException if the user could not be found
2080            * @throws SystemException if a system exception occurred
2081            */
2082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2083            public com.liferay.portal.model.User loadGetDefaultUser(long companyId)
2084                    throws com.liferay.portal.kernel.exception.PortalException,
2085                            com.liferay.portal.kernel.exception.SystemException;
2086    
2087            /**
2088            * Returns an ordered range of all the users who match the keywords and
2089            * status, without using the indexer. It is preferable to use the indexed
2090            * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)}
2091            * instead of this method wherever possible for performance reasons.
2092            *
2093            * <p>
2094            * Useful when paginating results. Returns a maximum of <code>end -
2095            * start</code> instances. <code>start</code> and <code>end</code> are not
2096            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2097            * refers to the first result in the set. Setting both <code>start</code>
2098            * and <code>end</code> to {@link
2099            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2100            * result set.
2101            * </p>
2102            *
2103            * @param companyId the primary key of the user's company
2104            * @param keywords the keywords (space separated), which may occur in the
2105            user's first name, middle name, last name, screen name, or email
2106            address
2107            * @param status the workflow status
2108            * @param params the finder parameters (optionally <code>null</code>). For
2109            more information see {@link
2110            com.liferay.portal.service.persistence.UserFinder}.
2111            * @param start the lower bound of the range of users
2112            * @param end the upper bound of the range of users (not inclusive)
2113            * @param obc the comparator to order the users by (optionally
2114            <code>null</code>)
2115            * @return the matching users
2116            * @throws SystemException if a system exception occurred
2117            * @see com.liferay.portal.service.persistence.UserFinder
2118            */
2119            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2120            public java.util.List<com.liferay.portal.model.User> search(
2121                    long companyId, java.lang.String keywords, int status,
2122                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2123                    int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
2124                    throws com.liferay.portal.kernel.exception.SystemException;
2125    
2126            /**
2127            * Returns an ordered range of all the users who match the keywords and
2128            * status, using the indexer. It is preferable to use this method instead of
2129            * the non-indexed version whenever possible for performance reasons.
2130            *
2131            * <p>
2132            * Useful when paginating results. Returns a maximum of <code>end -
2133            * start</code> instances. <code>start</code> and <code>end</code> are not
2134            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2135            * refers to the first result in the set. Setting both <code>start</code>
2136            * and <code>end</code> to {@link
2137            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2138            * result set.
2139            * </p>
2140            *
2141            * @param companyId the primary key of the user's company
2142            * @param keywords the keywords (space separated), which may occur in the
2143            user's first name, middle name, last name, screen name, or email
2144            address
2145            * @param status the workflow status
2146            * @param params the indexer parameters (optionally <code>null</code>). For
2147            more information see {@link
2148            com.liferay.portlet.usersadmin.util.UserIndexer}.
2149            * @param start the lower bound of the range of users
2150            * @param end the upper bound of the range of users (not inclusive)
2151            * @param sort the field and direction to sort by (optionally
2152            <code>null</code>)
2153            * @return the matching users
2154            * @throws SystemException if a system exception occurred
2155            * @see com.liferay.portlet.usersadmin.util.UserIndexer
2156            */
2157            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2158            public com.liferay.portal.kernel.search.Hits search(long companyId,
2159                    java.lang.String keywords, int status,
2160                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2161                    int start, int end, com.liferay.portal.kernel.search.Sort sort)
2162                    throws com.liferay.portal.kernel.exception.SystemException;
2163    
2164            /**
2165            * Returns an ordered range of all the users with the status, and whose
2166            * first name, middle name, last name, screen name, and email address match
2167            * the keywords specified for them, without using the indexer. It is
2168            * preferable to use the indexed version {@link #search(long, String,
2169            * String, String, String, String, int, LinkedHashMap, boolean, int, int,
2170            * Sort)} instead of this method wherever possible for performance reasons.
2171            *
2172            * <p>
2173            * Useful when paginating results. Returns a maximum of <code>end -
2174            * start</code> instances. <code>start</code> and <code>end</code> are not
2175            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2176            * refers to the first result in the set. Setting both <code>start</code>
2177            * and <code>end</code> to {@link
2178            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2179            * result set.
2180            * </p>
2181            *
2182            * @param companyId the primary key of the user's company
2183            * @param firstName the first name keywords (space separated)
2184            * @param middleName the middle name keywords
2185            * @param lastName the last name keywords
2186            * @param screenName the screen name keywords
2187            * @param emailAddress the email address keywords
2188            * @param status the workflow status
2189            * @param params the finder parameters (optionally <code>null</code>). For
2190            more information see {@link
2191            com.liferay.portal.service.persistence.UserFinder}.
2192            * @param andSearch whether every field must match its keywords, or just
2193            one field. For example, &quot;users with the first name 'bob' and
2194            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2195            or the last name 'smith'&quot;.
2196            * @param start the lower bound of the range of users
2197            * @param end the upper bound of the range of users (not inclusive)
2198            * @param obc the comparator to order the users by (optionally
2199            <code>null</code>)
2200            * @return the matching users
2201            * @throws SystemException if a system exception occurred
2202            * @see com.liferay.portal.service.persistence.UserFinder
2203            */
2204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2205            public java.util.List<com.liferay.portal.model.User> search(
2206                    long companyId, java.lang.String firstName,
2207                    java.lang.String middleName, java.lang.String lastName,
2208                    java.lang.String screenName, java.lang.String emailAddress, int status,
2209                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2210                    boolean andSearch, int start, int end,
2211                    com.liferay.portal.kernel.util.OrderByComparator obc)
2212                    throws com.liferay.portal.kernel.exception.SystemException;
2213    
2214            /**
2215            * Returns an ordered range of all the users with the status, and whose
2216            * first name, middle name, last name, screen name, and email address match
2217            * the keywords specified for them, using the indexer. It is preferable to
2218            * use this method instead of the non-indexed version whenever possible for
2219            * performance reasons.
2220            *
2221            * <p>
2222            * Useful when paginating results. Returns a maximum of <code>end -
2223            * start</code> instances. <code>start</code> and <code>end</code> are not
2224            * primary keys, they are indexes in the result set. Thus, <code>0</code>
2225            * refers to the first result in the set. Setting both <code>start</code>
2226            * and <code>end</code> to {@link
2227            * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
2228            * result set.
2229            * </p>
2230            *
2231            * @param companyId the primary key of the user's company
2232            * @param firstName the first name keywords (space separated)
2233            * @param middleName the middle name keywords
2234            * @param lastName the last name keywords
2235            * @param screenName the screen name keywords
2236            * @param emailAddress the email address keywords
2237            * @param status the workflow status
2238            * @param params the indexer parameters (optionally <code>null</code>). For
2239            more information see {@link
2240            com.liferay.portlet.usersadmin.util.UserIndexer}.
2241            * @param andSearch whether every field must match its keywords, or just
2242            one field. For example, &quot;users with the first name 'bob' and
2243            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2244            or the last name 'smith'&quot;.
2245            * @param start the lower bound of the range of users
2246            * @param end the upper bound of the range of users (not inclusive)
2247            * @param sort the field and direction to sort by (optionally
2248            <code>null</code>)
2249            * @return the matching users
2250            * @throws SystemException if a system exception occurred
2251            * @see com.liferay.portlet.usersadmin.util.UserIndexer
2252            */
2253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2254            public com.liferay.portal.kernel.search.Hits search(long companyId,
2255                    java.lang.String firstName, java.lang.String middleName,
2256                    java.lang.String lastName, java.lang.String screenName,
2257                    java.lang.String emailAddress, int status,
2258                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2259                    boolean andSearch, int start, int end,
2260                    com.liferay.portal.kernel.search.Sort sort)
2261                    throws com.liferay.portal.kernel.exception.SystemException;
2262    
2263            /**
2264            * Returns the number of users who match the keywords and status.
2265            *
2266            * @param companyId the primary key of the user's company
2267            * @param keywords the keywords (space separated), which may occur in the
2268            user's first name, middle name, last name, screen name, or email
2269            address
2270            * @param status the workflow status
2271            * @param params the finder parameters (optionally <code>null</code>). For
2272            more information see {@link
2273            com.liferay.portal.service.persistence.UserFinder}.
2274            * @return the number matching users
2275            * @throws SystemException if a system exception occurred
2276            */
2277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2278            public int searchCount(long companyId, java.lang.String keywords,
2279                    int status,
2280                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
2281                    throws com.liferay.portal.kernel.exception.SystemException;
2282    
2283            /**
2284            * Returns the number of users with the status, and whose first name, middle
2285            * name, last name, screen name, and email address match the keywords
2286            * specified for them.
2287            *
2288            * @param companyId the primary key of the user's company
2289            * @param firstName the first name keywords (space separated)
2290            * @param middleName the middle name keywords
2291            * @param lastName the last name keywords
2292            * @param screenName the screen name keywords
2293            * @param emailAddress the email address keywords
2294            * @param status the workflow status
2295            * @param params the finder parameters (optionally <code>null</code>). For
2296            more information see {@link
2297            com.liferay.portal.service.persistence.UserFinder}.
2298            * @param andSearch whether every field must match its keywords, or just
2299            one field. For example, &quot;users with the first name 'bob' and
2300            last name 'smith'&quot; vs &quot;users with the first name 'bob'
2301            or the last name 'smith'&quot;.
2302            * @return the number of matching users
2303            * @throws SystemException if a system exception occurred
2304            */
2305            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
2306            public int searchCount(long companyId, java.lang.String firstName,
2307                    java.lang.String middleName, java.lang.String lastName,
2308                    java.lang.String screenName, java.lang.String emailAddress, int status,
2309                    java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
2310                    boolean andSearch)
2311                    throws com.liferay.portal.kernel.exception.SystemException;
2312    
2313            /**
2314            * Sends an email address verification to the user.
2315            *
2316            * @param user the verification email recipient
2317            * @param emailAddress the recipient's email address
2318            * @param serviceContext the service context to be applied. Must set the
2319            portal URL, main path, primary key of the layout, remote address,
2320            remote host, and agent for the user.
2321            * @throws PortalException if a portal exception occurred
2322            * @throws SystemException if a system exception occurred
2323            */
2324            public void sendEmailAddressVerification(
2325                    com.liferay.portal.model.User user, java.lang.String emailAddress,
2326                    com.liferay.portal.service.ServiceContext serviceContext)
2327                    throws com.liferay.portal.kernel.exception.PortalException,
2328                            com.liferay.portal.kernel.exception.SystemException;
2329    
2330            /**
2331            * Sends the password email to the user with the email address. The content
2332            * of this email can be specified in <code>portal.properties</code> with the
2333            * <code>admin.email.password</code> keys.
2334            *
2335            * @param companyId the primary key of the user's company
2336            * @param emailAddress the user's email address
2337            * @param fromName the name of the individual that the email should be from
2338            * @param fromAddress the address of the individual that the email should
2339            be from
2340            * @param subject the email subject. If <code>null</code>, the subject
2341            specified in <code>portal.properties</code> will be used.
2342            * @param body the email body. If <code>null</code>, the body specified in
2343            <code>portal.properties</code> will be used.
2344            * @param serviceContext the service context to be applied
2345            * @throws PortalException if a user with the email address could not be
2346            found
2347            * @throws SystemException if a system exception occurred
2348            */
2349            public void sendPassword(long companyId, java.lang.String emailAddress,
2350                    java.lang.String fromName, java.lang.String fromAddress,
2351                    java.lang.String subject, java.lang.String body,
2352                    com.liferay.portal.service.ServiceContext serviceContext)
2353                    throws com.liferay.portal.kernel.exception.PortalException,
2354                            com.liferay.portal.kernel.exception.SystemException;
2355    
2356            /**
2357            * Removes the users from the teams of a group.
2358            *
2359            * @param groupId the primary key of the group
2360            * @param userIds the primary keys of the users
2361            * @throws PortalException if a portal exception occurred
2362            * @throws SystemException if a system exception occurred
2363            */
2364            public void unsetGroupTeamsUsers(long groupId, long[] userIds)
2365                    throws com.liferay.portal.kernel.exception.PortalException,
2366                            com.liferay.portal.kernel.exception.SystemException;
2367    
2368            /**
2369            * Removes the users from the group.
2370            *
2371            * @param groupId the primary key of the group
2372            * @param userIds the primary keys of the users
2373            * @param serviceContext the service context to be applied (optionally
2374            <code>null</code>)
2375            * @throws PortalException if a portal exception occurred
2376            * @throws SystemException if a system exception occurred
2377            */
2378            public void unsetGroupUsers(long groupId, long[] userIds,
2379                    com.liferay.portal.service.ServiceContext serviceContext)
2380                    throws com.liferay.portal.kernel.exception.PortalException,
2381                            com.liferay.portal.kernel.exception.SystemException;
2382    
2383            /**
2384            * Removes the users from the organization.
2385            *
2386            * @param organizationId the primary key of the organization
2387            * @param userIds the primary keys of the users
2388            * @throws PortalException if a portal exception occurred
2389            * @throws SystemException if a system exception occurred
2390            */
2391            public void unsetOrganizationUsers(long organizationId, long[] userIds)
2392                    throws com.liferay.portal.kernel.exception.PortalException,
2393                            com.liferay.portal.kernel.exception.SystemException;
2394    
2395            /**
2396            * Removes the users from the password policy.
2397            *
2398            * @param passwordPolicyId the primary key of the password policy
2399            * @param userIds the primary keys of the users
2400            * @throws SystemException if a system exception occurred
2401            */
2402            public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
2403                    throws com.liferay.portal.kernel.exception.SystemException;
2404    
2405            /**
2406            * Removes the users from the role.
2407            *
2408            * @param roleId the primary key of the role
2409            * @param users the users
2410            * @throws PortalException if a portal exception occurred
2411            * @throws SystemException if a system exception occurred
2412            */
2413            public void unsetRoleUsers(long roleId,
2414                    java.util.List<com.liferay.portal.model.User> users)
2415                    throws com.liferay.portal.kernel.exception.PortalException,
2416                            com.liferay.portal.kernel.exception.SystemException;
2417    
2418            /**
2419            * Removes the users from the role.
2420            *
2421            * @param roleId the primary key of the role
2422            * @param userIds the primary keys of the users
2423            * @throws PortalException if a portal exception occurred
2424            * @throws SystemException if a system exception occurred
2425            */
2426            public void unsetRoleUsers(long roleId, long[] userIds)
2427                    throws com.liferay.portal.kernel.exception.PortalException,
2428                            com.liferay.portal.kernel.exception.SystemException;
2429    
2430            /**
2431            * Removes the users from the team.
2432            *
2433            * @param teamId the primary key of the team
2434            * @param userIds the primary keys of the users
2435            * @throws PortalException if a portal exception occurred
2436            * @throws SystemException if a system exception occurred
2437            */
2438            public void unsetTeamUsers(long teamId, long[] userIds)
2439                    throws com.liferay.portal.kernel.exception.PortalException,
2440                            com.liferay.portal.kernel.exception.SystemException;
2441    
2442            /**
2443            * Removes the users from the user group.
2444            *
2445            * @param userGroupId the primary key of the user group
2446            * @param userIds the primary keys of the users
2447            * @throws PortalException if a portal exception occurred
2448            * @throws SystemException if a system exception occurred
2449            */
2450            public void unsetUserGroupUsers(long userGroupId, long[] userIds)
2451                    throws com.liferay.portal.kernel.exception.PortalException,
2452                            com.liferay.portal.kernel.exception.SystemException;
2453    
2454            /**
2455            * Updates whether the user has agreed to the terms of use.
2456            *
2457            * @param userId the primary key of the user
2458            * @param agreedToTermsOfUse whether the user has agreet to the terms of
2459            use
2460            * @return the user
2461            * @throws PortalException if a user with the primary key could not be found
2462            * @throws SystemException if a system exception occurred
2463            */
2464            public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
2465                    boolean agreedToTermsOfUse)
2466                    throws com.liferay.portal.kernel.exception.PortalException,
2467                            com.liferay.portal.kernel.exception.SystemException;
2468    
2469            /**
2470            * Updates the user's asset with the new asset categories and tag names,
2471            * removing and adding asset categories and tag names as necessary.
2472            *
2473            * @param userId the primary key of the user
2474            * @param user ID the primary key of the user
2475            * @param assetCategoryIds the primary key's of the new asset categories
2476            * @param assetTagNames the new asset tag names
2477            * @throws PortalException if a user with the primary key could not be found
2478            * @throws SystemException if a system exception occurred
2479            */
2480            public void updateAsset(long userId, com.liferay.portal.model.User user,
2481                    long[] assetCategoryIds, java.lang.String[] assetTagNames)
2482                    throws com.liferay.portal.kernel.exception.PortalException,
2483                            com.liferay.portal.kernel.exception.SystemException;
2484    
2485            /**
2486            * Updates the user's creation date.
2487            *
2488            * @param userId the primary key of the user
2489            * @param createDate the new creation date
2490            * @return the user
2491            * @throws PortalException if a user with the primary key could not be found
2492            * @throws SystemException if a system exception occurred
2493            */
2494            public com.liferay.portal.model.User updateCreateDate(long userId,
2495                    java.util.Date createDate)
2496                    throws com.liferay.portal.kernel.exception.PortalException,
2497                            com.liferay.portal.kernel.exception.SystemException;
2498    
2499            /**
2500            * Updates the user's email address.
2501            *
2502            * @param userId the primary key of the user
2503            * @param password the user's password
2504            * @param emailAddress1 the user's new email address
2505            * @param emailAddress2 the user's new email address confirmation
2506            * @return the user
2507            * @throws PortalException if a user with the primary key could not be found
2508            * @throws SystemException if a system exception occurred
2509            */
2510            public com.liferay.portal.model.User updateEmailAddress(long userId,
2511                    java.lang.String password, java.lang.String emailAddress1,
2512                    java.lang.String emailAddress2)
2513                    throws com.liferay.portal.kernel.exception.PortalException,
2514                            com.liferay.portal.kernel.exception.SystemException;
2515    
2516            /**
2517            * Updates the user's email address or sends verification email.
2518            *
2519            * @param userId the primary key of the user
2520            * @param password the user's password
2521            * @param emailAddress1 the user's new email address
2522            * @param emailAddress2 the user's new email address confirmation
2523            * @param serviceContext the service context to be applied. Must set the
2524            portal URL, main path, primary key of the layout, remote address,
2525            remote host, and agent for the user.
2526            * @return the user
2527            * @throws PortalException if a user with the primary key could not be found
2528            * @throws SystemException if a system exception occurred
2529            */
2530            public com.liferay.portal.model.User updateEmailAddress(long userId,
2531                    java.lang.String password, java.lang.String emailAddress1,
2532                    java.lang.String emailAddress2,
2533                    com.liferay.portal.service.ServiceContext serviceContext)
2534                    throws com.liferay.portal.kernel.exception.PortalException,
2535                            com.liferay.portal.kernel.exception.SystemException;
2536    
2537            /**
2538            * Updates whether the user has verified email address.
2539            *
2540            * @param userId the primary key of the user
2541            * @param emailAddressVerified whether the user has verified email address
2542            * @return the user
2543            * @throws PortalException if a user with the primary key could not be found
2544            * @throws SystemException if a system exception occurred
2545            */
2546            public com.liferay.portal.model.User updateEmailAddressVerified(
2547                    long userId, boolean emailAddressVerified)
2548                    throws com.liferay.portal.kernel.exception.PortalException,
2549                            com.liferay.portal.kernel.exception.SystemException;
2550    
2551            /**
2552            * Updates the user's Facebook ID.
2553            *
2554            * @param userId the primary key of the user
2555            * @param facebookId the user's new Facebook ID
2556            * @return the user
2557            * @throws PortalException if a user with the primary key could not be found
2558            * @throws SystemException if a system exception occurred
2559            */
2560            public com.liferay.portal.model.User updateFacebookId(long userId,
2561                    long facebookId)
2562                    throws com.liferay.portal.kernel.exception.PortalException,
2563                            com.liferay.portal.kernel.exception.SystemException;
2564    
2565            /**
2566            * Sets the groups the user is in, removing and adding groups as necessary.
2567            *
2568            * @param userId the primary key of the user
2569            * @param newGroupIds the primary keys of the groups
2570            * @param serviceContext the service context to be applied (optionally
2571            <code>null</code>)
2572            * @throws PortalException if a portal exception occurred
2573            * @throws SystemException if a system exception occurred
2574            */
2575            public void updateGroups(long userId, long[] newGroupIds,
2576                    com.liferay.portal.service.ServiceContext serviceContext)
2577                    throws com.liferay.portal.kernel.exception.PortalException,
2578                            com.liferay.portal.kernel.exception.SystemException;
2579    
2580            /**
2581            * Updates a user account that was automatically created when a guest user
2582            * participated in an action (e.g. posting a comment) and only provided his
2583            * name and email address.
2584            *
2585            * @param creatorUserId the primary key of the creator
2586            * @param companyId the primary key of the user's company
2587            * @param autoPassword whether a password should be automatically generated
2588            for the user
2589            * @param password1 the user's password
2590            * @param password2 the user's password confirmation
2591            * @param autoScreenName whether a screen name should be automatically
2592            generated for the user
2593            * @param screenName the user's screen name
2594            * @param emailAddress the user's email address
2595            * @param facebookId the user's facebook ID
2596            * @param openId the user's OpenID
2597            * @param locale the user's locale
2598            * @param firstName the user's first name
2599            * @param middleName the user's middle name
2600            * @param lastName the user's last name
2601            * @param prefixId the user's name prefix ID
2602            * @param suffixId the user's name suffix ID
2603            * @param male whether the user is male
2604            * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
2605            January)
2606            * @param birthdayDay the user's birthday day
2607            * @param birthdayYear the user's birthday year
2608            * @param jobTitle the user's job title
2609            * @param updateUserInformation whether to update the user's information
2610            * @param sendEmail whether to send the user an email notification about
2611            their new account
2612            * @param serviceContext the service context to be applied (optionally
2613            <code>null</code>). Can set expando bridge attributes for the
2614            user.
2615            * @return the user
2616            * @throws PortalException if the user's information was invalid
2617            * @throws SystemException if a system exception occurred
2618            */
2619            public com.liferay.portal.model.User updateIncompleteUser(
2620                    long creatorUserId, long companyId, boolean autoPassword,
2621                    java.lang.String password1, java.lang.String password2,
2622                    boolean autoScreenName, java.lang.String screenName,
2623                    java.lang.String emailAddress, long facebookId,
2624                    java.lang.String openId, java.util.Locale locale,
2625                    java.lang.String firstName, java.lang.String middleName,
2626                    java.lang.String lastName, int prefixId, int suffixId, boolean male,
2627                    int birthdayMonth, int birthdayDay, int birthdayYear,
2628                    java.lang.String jobTitle, boolean updateUserInformation,
2629                    boolean sendEmail,
2630                    com.liferay.portal.service.ServiceContext serviceContext)
2631                    throws com.liferay.portal.kernel.exception.PortalException,
2632                            com.liferay.portal.kernel.exception.SystemException;
2633    
2634            /**
2635            * Updates the user's job title.
2636            *
2637            * @param userId the primary key of the user
2638            * @param jobTitle the user's job title
2639            * @return the user
2640            * @throws PortalException if a user with the primary key could not be found
2641            or if a contact could not be found matching the user's contact ID
2642            * @throws SystemException if a system exception occurred
2643            */
2644            public com.liferay.portal.model.User updateJobTitle(long userId,
2645                    java.lang.String jobTitle)
2646                    throws com.liferay.portal.kernel.exception.PortalException,
2647                            com.liferay.portal.kernel.exception.SystemException;
2648    
2649            /**
2650            * Updates the user's last login with the current time and the IP address.
2651            *
2652            * @param userId the primary key of the user
2653            * @param loginIP the IP address the user logged in from
2654            * @return the user
2655            * @throws PortalException if a user with the primary key could not be found
2656            * @throws SystemException if a system exception occurred
2657            */
2658            public com.liferay.portal.model.User updateLastLogin(long userId,
2659                    java.lang.String loginIP)
2660                    throws com.liferay.portal.kernel.exception.PortalException,
2661                            com.liferay.portal.kernel.exception.SystemException;
2662    
2663            /**
2664            * Updates whether the user is locked out from logging in.
2665            *
2666            * @param user the user
2667            * @param lockout whether the user is locked out
2668            * @return the user
2669            * @throws PortalException if a portal exception occurred
2670            * @throws SystemException if a system exception occurred
2671            */
2672            public com.liferay.portal.model.User updateLockout(
2673                    com.liferay.portal.model.User user, boolean lockout)
2674                    throws com.liferay.portal.kernel.exception.PortalException,
2675                            com.liferay.portal.kernel.exception.SystemException;
2676    
2677            /**
2678            * Updates whether the user is locked out from logging in.
2679            *
2680            * @param companyId the primary key of the user's company
2681            * @param emailAddress the user's email address
2682            * @param lockout whether the user is locked out
2683            * @return the user
2684            * @throws PortalException if a user with the email address could not be
2685            found
2686            * @throws SystemException if a system exception occurred
2687            */
2688            public com.liferay.portal.model.User updateLockoutByEmailAddress(
2689                    long companyId, java.lang.String emailAddress, boolean lockout)
2690                    throws com.liferay.portal.kernel.exception.PortalException,
2691                            com.liferay.portal.kernel.exception.SystemException;
2692    
2693            /**
2694            * Updates whether the user is locked out from logging in.
2695            *
2696            * @param userId the primary key of the user
2697            * @param lockout whether the user is locked out
2698            * @return the user
2699            * @throws PortalException if a user with the primary key could not be found
2700            * @throws SystemException if a system exception occurred
2701            */
2702            public com.liferay.portal.model.User updateLockoutById(long userId,
2703                    boolean lockout)
2704                    throws com.liferay.portal.kernel.exception.PortalException,
2705                            com.liferay.portal.kernel.exception.SystemException;
2706    
2707            /**
2708            * Updates whether the user is locked out from logging in.
2709            *
2710            * @param companyId the primary key of the user's company
2711            * @param screenName the user's screen name
2712            * @param lockout whether the user is locked out
2713            * @return the user
2714            * @throws PortalException if a user with the screen name could not be found
2715            * @throws SystemException if a system exception occurred
2716            */
2717            public com.liferay.portal.model.User updateLockoutByScreenName(
2718                    long companyId, java.lang.String screenName, boolean lockout)
2719                    throws com.liferay.portal.kernel.exception.PortalException,
2720                            com.liferay.portal.kernel.exception.SystemException;
2721    
2722            /**
2723            * Updates the user's modified date.
2724            *
2725            * @param userId the primary key of the user
2726            * @param modifiedDate the new modified date
2727            * @return the user
2728            * @throws PortalException if a user with the primary key could not be found
2729            * @throws SystemException if a system exception occurred
2730            */
2731            public com.liferay.portal.model.User updateModifiedDate(long userId,
2732                    java.util.Date modifiedDate)
2733                    throws com.liferay.portal.kernel.exception.PortalException,
2734                            com.liferay.portal.kernel.exception.SystemException;
2735    
2736            /**
2737            * Updates the user's OpenID.
2738            *
2739            * @param userId the primary key of the user
2740            * @param openId the new OpenID
2741            * @return the user
2742            * @throws PortalException if a user with the primary key could not be found
2743            * @throws SystemException if a system exception occurred
2744            */
2745            public com.liferay.portal.model.User updateOpenId(long userId,
2746                    java.lang.String openId)
2747                    throws com.liferay.portal.kernel.exception.PortalException,
2748                            com.liferay.portal.kernel.exception.SystemException;
2749    
2750            /**
2751            * Sets the organizations that the user is in, removing and adding
2752            * organizations as necessary.
2753            *
2754            * @param userId the primary key of the user
2755            * @param newOrganizationIds the primary keys of the organizations
2756            * @param serviceContext the service context to be applied. Must set
2757            whether user indexing is enabled.
2758            * @throws PortalException if a user with the primary key could not be found
2759            * @throws SystemException if a system exception occurred
2760            */
2761            public void updateOrganizations(long userId, long[] newOrganizationIds,
2762                    com.liferay.portal.service.ServiceContext serviceContext)
2763                    throws com.liferay.portal.kernel.exception.PortalException,
2764                            com.liferay.portal.kernel.exception.SystemException;
2765    
2766            /**
2767            * Updates the user's password without tracking or validation of the change.
2768            *
2769            * @param userId the primary key of the user
2770            * @param password1 the user's new password
2771            * @param password2 the user's new password confirmation
2772            * @param passwordReset whether the user should be asked to reset their
2773            password the next time they log in
2774            * @return the user
2775            * @throws PortalException if a user with the primary key could not be found
2776            * @throws SystemException if a system exception occurred
2777            */
2778            public com.liferay.portal.model.User updatePassword(long userId,
2779                    java.lang.String password1, java.lang.String password2,
2780                    boolean passwordReset)
2781                    throws com.liferay.portal.kernel.exception.PortalException,
2782                            com.liferay.portal.kernel.exception.SystemException;
2783    
2784            /**
2785            * Updates the user's password, optionally with tracking and validation of
2786            * the change.
2787            *
2788            * @param userId the primary key of the user
2789            * @param password1 the user's new password
2790            * @param password2 the user's new password confirmation
2791            * @param passwordReset whether the user should be asked to reset their
2792            password the next time they login
2793            * @param silentUpdate whether the password should be updated without being
2794            tracked, or validated. Primarily used for password imports.
2795            * @return the user
2796            * @throws PortalException if a user with the primary key could not be found
2797            * @throws SystemException if a system exception occurred
2798            */
2799            public com.liferay.portal.model.User updatePassword(long userId,
2800                    java.lang.String password1, java.lang.String password2,
2801                    boolean passwordReset, boolean silentUpdate)
2802                    throws com.liferay.portal.kernel.exception.PortalException,
2803                            com.liferay.portal.kernel.exception.SystemException;
2804    
2805            /**
2806            * Updates the user's password with manually input information. This method
2807            * should only be used when performing maintenance.
2808            *
2809            * @param userId the primary key of the user
2810            * @param password the user's new password
2811            * @param passwordEncrypted the user's new encrypted password
2812            * @param passwordReset whether the user should be asked to reset their
2813            password the next time they login
2814            * @param passwordModifiedDate the new password modified date
2815            * @return the user
2816            * @throws PortalException if a user with the primary key could not be found
2817            * @throws SystemException if a system exception occurred
2818            */
2819            public com.liferay.portal.model.User updatePasswordManually(long userId,
2820                    java.lang.String password, boolean passwordEncrypted,
2821                    boolean passwordReset, java.util.Date passwordModifiedDate)
2822                    throws com.liferay.portal.kernel.exception.PortalException,
2823                            com.liferay.portal.kernel.exception.SystemException;
2824    
2825            /**
2826            * Updates whether the user should be asked to reset their password the next
2827            * time they login.
2828            *
2829            * @param userId the primary key of the user
2830            * @param passwordReset whether the user should be asked to reset their
2831            password the next time they login
2832            * @return the user
2833            * @throws PortalException if a user with the primary key could not be found
2834            * @throws SystemException if a system exception occurred
2835            */
2836            public com.liferay.portal.model.User updatePasswordReset(long userId,
2837                    boolean passwordReset)
2838                    throws com.liferay.portal.kernel.exception.PortalException,
2839                            com.liferay.portal.kernel.exception.SystemException;
2840    
2841            /**
2842            * Updates the user's portrait image.
2843            *
2844            * @param userId the primary key of the user
2845            * @param bytes the new portrait image data
2846            * @return the user
2847            * @throws PortalException if a user with the primary key could not be found
2848            or if the new portrait was invalid
2849            * @throws SystemException if a system exception occurred
2850            */
2851            public com.liferay.portal.model.User updatePortrait(long userId,
2852                    byte[] bytes)
2853                    throws com.liferay.portal.kernel.exception.PortalException,
2854                            com.liferay.portal.kernel.exception.SystemException;
2855    
2856            /**
2857            * Updates the user's password reset question and answer.
2858            *
2859            * @param userId the primary key of the user
2860            * @param question the user's new password reset question
2861            * @param answer the user's new password reset answer
2862            * @return the user
2863            * @throws PortalException if a user with the primary key could not be found
2864            or if the new question or answer were invalid
2865            * @throws SystemException if a system exception occurred
2866            */
2867            public com.liferay.portal.model.User updateReminderQuery(long userId,
2868                    java.lang.String question, java.lang.String answer)
2869                    throws com.liferay.portal.kernel.exception.PortalException,
2870                            com.liferay.portal.kernel.exception.SystemException;
2871    
2872            /**
2873            * Updates the user's screen name.
2874            *
2875            * @param userId the primary key of the user
2876            * @param screenName the user's new screen name
2877            * @return the user
2878            * @throws PortalException if a user with the primary key could not be found
2879            or if the new screen name was invalid
2880            * @throws SystemException if a system exception occurred
2881            */
2882            public com.liferay.portal.model.User updateScreenName(long userId,
2883                    java.lang.String screenName)
2884                    throws com.liferay.portal.kernel.exception.PortalException,
2885                            com.liferay.portal.kernel.exception.SystemException;
2886    
2887            /**
2888            * Updates the user's workflow status.
2889            *
2890            * @param userId the primary key of the user
2891            * @param status the user's new workflow status
2892            * @return the user
2893            * @throws PortalException if a user with the primary key could not be
2894            found
2895            * @throws SystemException if a system exception occurred
2896            * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int,
2897            ServiceContext)}
2898            */
2899            @java.lang.Deprecated
2900            public com.liferay.portal.model.User updateStatus(long userId, int status)
2901                    throws com.liferay.portal.kernel.exception.PortalException,
2902                            com.liferay.portal.kernel.exception.SystemException;
2903    
2904            /**
2905            * Updates the user's workflow status.
2906            *
2907            * @param userId the primary key of the user
2908            * @param status the user's new workflow status
2909            * @param serviceContext the service context to be applied. You can specify
2910            an unencrypted custom password (used by an LDAP listener) for the
2911            user via attribute <code>passwordUnencrypted</code>.
2912            * @return the user
2913            * @throws PortalException if a user with the primary key could not be found
2914            * @throws SystemException if a system exception occurred
2915            */
2916            public com.liferay.portal.model.User updateStatus(long userId, int status,
2917                    com.liferay.portal.service.ServiceContext serviceContext)
2918                    throws com.liferay.portal.kernel.exception.PortalException,
2919                            com.liferay.portal.kernel.exception.SystemException;
2920    
2921            /**
2922            * Updates the user.
2923            *
2924            * @param userId the primary key of the user
2925            * @param oldPassword the user's old password
2926            * @param newPassword1 the user's new password (optionally
2927            <code>null</code>)
2928            * @param newPassword2 the user's new password confirmation (optionally
2929            <code>null</code>)
2930            * @param passwordReset whether the user should be asked to reset their
2931            password the next time they login
2932            * @param reminderQueryQuestion the user's new password reset question
2933            * @param reminderQueryAnswer the user's new password reset answer
2934            * @param screenName the user's new screen name
2935            * @param emailAddress the user's new email address
2936            * @param facebookId the user's new Facebook ID
2937            * @param openId the user's new OpenID
2938            * @param languageId the user's new language ID
2939            * @param timeZoneId the user's new time zone ID
2940            * @param greeting the user's new greeting
2941            * @param comments the user's new comments
2942            * @param firstName the user's new first name
2943            * @param middleName the user's new middle name
2944            * @param lastName the user's new last name
2945            * @param prefixId the user's new name prefix ID
2946            * @param suffixId the user's new name suffix ID
2947            * @param male whether user is male
2948            * @param birthdayMonth the user's new birthday month (0-based, meaning 0
2949            for January)
2950            * @param birthdayDay the user's new birthday day
2951            * @param birthdayYear the user's birthday year
2952            * @param smsSn the user's new SMS screen name
2953            * @param aimSn the user's new AIM screen name
2954            * @param facebookSn the user's new Facebook screen name
2955            * @param icqSn the user's new ICQ screen name
2956            * @param jabberSn the user's new Jabber screen name
2957            * @param msnSn the user's new MSN screen name
2958            * @param mySpaceSn the user's new MySpace screen name
2959            * @param skypeSn the user's new Skype screen name
2960            * @param twitterSn the user's new Twitter screen name
2961            * @param ymSn the user's new Yahoo! Messenger screen name
2962            * @param jobTitle the user's new job title
2963            * @param groupIds the primary keys of the user's groups
2964            * @param organizationIds the primary keys of the user's organizations
2965            * @param roleIds the primary keys of the user's roles
2966            * @param userGroupRoles the user user's group roles
2967            * @param userGroupIds the primary keys of the user's user groups
2968            * @param serviceContext the service context to be applied (optionally
2969            <code>null</code>). Can set the UUID (with the <code>uuid</code>
2970            attribute), asset category IDs, asset tag names, and expando
2971            bridge attributes for the user.
2972            * @return the user
2973            * @throws PortalException if a user with the primary key could not be found
2974            or if the new information was invalid
2975            * @throws SystemException if a system exception occurred
2976            */
2977            public com.liferay.portal.model.User updateUser(long userId,
2978                    java.lang.String oldPassword, java.lang.String newPassword1,
2979                    java.lang.String newPassword2, boolean passwordReset,
2980                    java.lang.String reminderQueryQuestion,
2981                    java.lang.String reminderQueryAnswer, java.lang.String screenName,
2982                    java.lang.String emailAddress, long facebookId,
2983                    java.lang.String openId, java.lang.String languageId,
2984                    java.lang.String timeZoneId, java.lang.String greeting,
2985                    java.lang.String comments, java.lang.String firstName,
2986                    java.lang.String middleName, java.lang.String lastName, int prefixId,
2987                    int suffixId, boolean male, int birthdayMonth, int birthdayDay,
2988                    int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
2989                    java.lang.String facebookSn, java.lang.String icqSn,
2990                    java.lang.String jabberSn, java.lang.String msnSn,
2991                    java.lang.String mySpaceSn, java.lang.String skypeSn,
2992                    java.lang.String twitterSn, java.lang.String ymSn,
2993                    java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
2994                    long[] roleIds,
2995                    java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
2996                    long[] userGroupIds,
2997                    com.liferay.portal.service.ServiceContext serviceContext)
2998                    throws com.liferay.portal.kernel.exception.PortalException,
2999                            com.liferay.portal.kernel.exception.SystemException;
3000    
3001            /**
3002            * Verifies the email address of the ticket.
3003            *
3004            * @param ticketKey the ticket key
3005            * @throws PortalException if a ticket matching the ticket key could not be
3006            found, if the ticket has expired, if the ticket is an email
3007            address ticket, or if the email address is invalid
3008            * @throws SystemException if a system exception occurred
3009            */
3010            public void verifyEmailAddress(java.lang.String ticketKey)
3011                    throws com.liferay.portal.kernel.exception.PortalException,
3012                            com.liferay.portal.kernel.exception.SystemException;
3013    }