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