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