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