2 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
\r
4 * This library is free software; you can redistribute it and/or modify it under
\r
5 * the terms of the GNU Lesser General Public License as published by the Free
\r
6 * Software Foundation; either version 2.1 of the License, or (at your option)
\r
9 * This library is distributed in the hope that it will be useful, but WITHOUT
\r
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
\r
11 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
\r
15 package com.liferay.portal.service;
\r
17 import java.util.List;
\r
19 import com.liferay.portal.kernel.exception.PortalException;
\r
20 import com.liferay.portal.kernel.exception.SystemException;
\r
21 import com.liferay.portal.kernel.transaction.Isolation;
\r
22 import com.liferay.portal.kernel.transaction.Propagation;
\r
23 import com.liferay.portal.kernel.transaction.Transactional;
\r
24 import com.liferay.portal.kernel.util.OrderByComparator;
\r
25 import com.liferay.portal.model.User;
\r
28 * The interface for the user local service.
\r
31 * 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.
\r
34 * @author Brian Wing Shun Chan
\r
35 * @see UserLocalServiceUtil
\r
36 * @see com.liferay.portal.service.base.UserLocalServiceBaseImpl
\r
37 * @see com.liferay.portal.service.impl.UserLocalServiceImpl
\r
40 @Transactional(isolation = Isolation.PORTAL, rollbackFor = {
\r
41 PortalException.class, SystemException.class})
\r
42 public interface ExtUserLocalService extends BaseLocalService,
\r
43 PersistedModelLocalService {
\r
45 * NOTE FOR DEVELOPERS:
\r
47 * Never modify or reference this interface directly. Always use {@link UserLocalServiceUtil} to access the user local service. Add custom service methods to {@link com.liferay.portal.service.impl.UserLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
\r
51 * Adds the user to the database. Also notifies the appropriate model listeners.
\r
53 * @param user the user
\r
54 * @return the user that was added
\r
55 * @throws SystemException if a system exception occurred
\r
57 public com.liferay.portal.model.User addUser(
\r
58 com.liferay.portal.model.User user)
\r
59 throws com.liferay.portal.kernel.exception.SystemException;
\r
62 * Creates a new user with the primary key. Does not add the user to the database.
\r
64 * @param userId the primary key for the new user
\r
65 * @return the new user
\r
67 public com.liferay.portal.model.User createUser(long userId);
\r
70 * Deletes the user with the primary key from the database. Also notifies the appropriate model listeners.
\r
72 * @param userId the primary key of the user
\r
73 * @return the user that was removed
\r
74 * @throws PortalException if a user with the primary key could not be found
\r
75 * @throws SystemException if a system exception occurred
\r
77 public com.liferay.portal.model.User deleteUser(long userId)
\r
78 throws com.liferay.portal.kernel.exception.PortalException,
\r
79 com.liferay.portal.kernel.exception.SystemException;
\r
82 * Deletes the user from the database. Also notifies the appropriate model listeners.
\r
84 * @param user the user
\r
85 * @return the user that was removed
\r
86 * @throws PortalException
\r
87 * @throws SystemException if a system exception occurred
\r
89 public com.liferay.portal.model.User deleteUser(
\r
90 com.liferay.portal.model.User user)
\r
91 throws com.liferay.portal.kernel.exception.PortalException,
\r
92 com.liferay.portal.kernel.exception.SystemException;
\r
94 public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
\r
97 * Performs a dynamic query on the database and returns the matching rows.
\r
99 * @param dynamicQuery the dynamic query
\r
100 * @return the matching rows
\r
101 * @throws SystemException if a system exception occurred
\r
103 @SuppressWarnings("rawtypes")
\r
104 public java.util.List dynamicQuery(
\r
105 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
\r
106 throws com.liferay.portal.kernel.exception.SystemException;
\r
109 * Performs a dynamic query on the database and returns a range of the matching rows.
\r
112 * 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.
\r
115 * @param dynamicQuery the dynamic query
\r
116 * @param start the lower bound of the range of model instances
\r
117 * @param end the upper bound of the range of model instances (not inclusive)
\r
118 * @return the range of matching rows
\r
119 * @throws SystemException if a system exception occurred
\r
121 @SuppressWarnings("rawtypes")
\r
122 public java.util.List dynamicQuery(
\r
123 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
\r
124 int end) throws com.liferay.portal.kernel.exception.SystemException;
\r
127 * Performs a dynamic query on the database and returns an ordered range of the matching rows.
\r
130 * 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.
\r
133 * @param dynamicQuery the dynamic query
\r
134 * @param start the lower bound of the range of model instances
\r
135 * @param end the upper bound of the range of model instances (not inclusive)
\r
136 * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
\r
137 * @return the ordered range of matching rows
\r
138 * @throws SystemException if a system exception occurred
\r
140 @SuppressWarnings("rawtypes")
\r
141 public java.util.List dynamicQuery(
\r
142 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
\r
144 com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
\r
145 throws com.liferay.portal.kernel.exception.SystemException;
\r
148 * Returns the number of rows that match the dynamic query.
\r
150 * @param dynamicQuery the dynamic query
\r
151 * @return the number of rows that match the dynamic query
\r
152 * @throws SystemException if a system exception occurred
\r
154 public long dynamicQueryCount(
\r
155 com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
\r
156 throws com.liferay.portal.kernel.exception.SystemException;
\r
158 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
159 public com.liferay.portal.model.User fetchUser(long userId)
\r
160 throws com.liferay.portal.kernel.exception.SystemException;
\r
163 * Returns the user with the primary key.
\r
165 * @param userId the primary key of the user
\r
167 * @throws PortalException if a user with the primary key could not be found
\r
168 * @throws SystemException if a system exception occurred
\r
170 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
171 public com.liferay.portal.model.User getUser(long userId)
\r
172 throws com.liferay.portal.kernel.exception.PortalException,
\r
173 com.liferay.portal.kernel.exception.SystemException;
\r
175 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
176 public com.liferay.portal.model.PersistedModel getPersistedModel(
\r
177 java.io.Serializable primaryKeyObj)
\r
178 throws com.liferay.portal.kernel.exception.PortalException,
\r
179 com.liferay.portal.kernel.exception.SystemException;
\r
182 * Returns a range of all the users.
\r
185 * 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.
\r
188 * @param start the lower bound of the range of users
\r
189 * @param end the upper bound of the range of users (not inclusive)
\r
190 * @return the range of users
\r
191 * @throws SystemException if a system exception occurred
\r
193 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
194 public java.util.List<com.liferay.portal.model.User> getUsers(int start,
\r
195 int end) throws com.liferay.portal.kernel.exception.SystemException;
\r
198 * Returns the number of users.
\r
200 * @return the number of users
\r
201 * @throws SystemException if a system exception occurred
\r
203 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
204 public int getUsersCount()
\r
205 throws com.liferay.portal.kernel.exception.SystemException;
\r
208 * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
\r
210 * @param user the user
\r
211 * @return the user that was updated
\r
212 * @throws SystemException if a system exception occurred
\r
214 public com.liferay.portal.model.User updateUser(
\r
215 com.liferay.portal.model.User user)
\r
216 throws com.liferay.portal.kernel.exception.SystemException;
\r
219 * Updates the user in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
\r
221 * @param user the user
\r
222 * @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.
\r
223 * @return the user that was updated
\r
224 * @throws SystemException if a system exception occurred
\r
226 public com.liferay.portal.model.User updateUser(
\r
227 com.liferay.portal.model.User user, boolean merge)
\r
228 throws com.liferay.portal.kernel.exception.SystemException;
\r
231 * Returns the Spring bean ID for this bean.
\r
233 * @return the Spring bean ID for this bean
\r
235 public java.lang.String getBeanIdentifier();
\r
238 * Sets the Spring bean ID for this bean.
\r
240 * @param beanIdentifier the Spring bean ID for this bean
\r
242 public void setBeanIdentifier(java.lang.String beanIdentifier);
\r
244 public com.liferay.portal.model.User addDefaultAdminUser(long companyId,
\r
245 java.lang.String screenName, java.lang.String emailAddress,
\r
246 java.util.Locale locale, java.lang.String firstName,
\r
247 java.lang.String middleName, java.lang.String lastName)
\r
248 throws com.liferay.portal.kernel.exception.PortalException,
\r
249 com.liferay.portal.kernel.exception.SystemException;
\r
252 * Adds the user to the default groups, unless the user is already in these
\r
253 * groups. The default groups can be specified in
\r
254 * <code>portal.properties</code> with the key
\r
255 * <code>admin.default.group.names</code>.
\r
257 * @param userId the primary key of the user
\r
258 * @throws PortalException if a user with the primary key could not be found
\r
259 * @throws SystemException if a system exception occurred
\r
261 public void addDefaultGroups(long userId)
\r
262 throws com.liferay.portal.kernel.exception.PortalException,
\r
263 com.liferay.portal.kernel.exception.SystemException;
\r
266 * Adds the user to the default roles, unless the user already has these
\r
267 * roles. The default roles can be specified in
\r
268 * <code>portal.properties</code> with the key
\r
269 * <code>admin.default.role.names</code>.
\r
271 * @param userId the primary key of the user
\r
272 * @throws PortalException if a user with the primary key could not be found
\r
273 * @throws SystemException if a system exception occurred
\r
275 public void addDefaultRoles(long userId)
\r
276 throws com.liferay.portal.kernel.exception.PortalException,
\r
277 com.liferay.portal.kernel.exception.SystemException;
\r
280 * Adds the user to the default user groups, unless the user is already in
\r
281 * these user groups. The default user groups can be specified in
\r
282 * <code>portal.properties</code> with the property
\r
283 * <code>admin.default.user.group.names</code>.
\r
285 * @param userId the primary key of the user
\r
286 * @throws PortalException if a user with the primary key could not be found
\r
287 * @throws SystemException if a system exception occurred
\r
289 public void addDefaultUserGroups(long userId)
\r
290 throws com.liferay.portal.kernel.exception.PortalException,
\r
291 com.liferay.portal.kernel.exception.SystemException;
\r
294 * Adds the users to the group.
\r
296 * @param groupId the primary key of the group
\r
297 * @param userIds the primary keys of the users
\r
298 * @throws PortalException if a group or user with the primary key could not
\r
300 * @throws SystemException if a system exception occurred
\r
302 public void addGroupUsers(long groupId, long[] userIds)
\r
303 throws com.liferay.portal.kernel.exception.PortalException,
\r
304 com.liferay.portal.kernel.exception.SystemException;
\r
307 * Adds the users to the organization.
\r
309 * @param organizationId the primary key of the organization
\r
310 * @param userIds the primary keys of the users
\r
311 * @throws PortalException if an organization or user with the primary key
\r
313 * @throws SystemException if a system exception occurred
\r
315 public void addOrganizationUsers(long organizationId, long[] userIds)
\r
316 throws com.liferay.portal.kernel.exception.PortalException,
\r
317 com.liferay.portal.kernel.exception.SystemException;
\r
320 * Assigns the password policy to the users, removing any other currently
\r
321 * assigned password policies.
\r
323 * @param passwordPolicyId the primary key of the password policy
\r
324 * @param userIds the primary keys of the users
\r
325 * @throws SystemException if a system exception occurred
\r
327 public void addPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
\r
328 throws com.liferay.portal.kernel.exception.SystemException;
\r
331 * Adds the users to the role.
\r
333 * @param roleId the primary key of the role
\r
334 * @param userIds the primary keys of the users
\r
335 * @throws PortalException if a role or user with the primary key could not
\r
337 * @throws SystemException if a system exception occurred
\r
339 public void addRoleUsers(long roleId, long[] userIds)
\r
340 throws com.liferay.portal.kernel.exception.PortalException,
\r
341 com.liferay.portal.kernel.exception.SystemException;
\r
344 * Adds the users to the team.
\r
346 * @param teamId the primary key of the team
\r
347 * @param userIds the primary keys of the users
\r
348 * @throws PortalException if a team or user with the primary key could not
\r
350 * @throws SystemException if a system exception occurred
\r
352 public void addTeamUsers(long teamId, long[] userIds)
\r
353 throws com.liferay.portal.kernel.exception.PortalException,
\r
354 com.liferay.portal.kernel.exception.SystemException;
\r
360 * This method handles the creation and bookkeeping of the user including
\r
361 * its resources, metadata, and internal data structures. It is not
\r
362 * necessary to make subsequent calls to any methods to setup default
\r
363 * groups, resources, etc.
\r
366 * @param creatorUserId the primary key of the creator
\r
367 * @param companyId the primary key of the user's company
\r
368 * @param autoPassword whether a password should be automatically generated
\r
370 * @param password1 the user's password
\r
371 * @param password2 the user's password confirmation
\r
372 * @param autoScreenName whether a screen name should be automatically
\r
373 generated for the user
\r
374 * @param screenName the user's screen name
\r
375 * @param emailAddress the user's email address
\r
376 * @param facebookId the user's facebook ID
\r
377 * @param openId the user's OpenID
\r
378 * @param locale the user's locale
\r
379 * @param firstName the user's first name
\r
380 * @param middleName the user's middle name
\r
381 * @param lastName the user's last name
\r
382 * @param prefixId the user's name prefix ID
\r
383 * @param suffixId the user's name suffix ID
\r
384 * @param male whether the user is male
\r
385 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
\r
387 * @param birthdayDay the user's birthday day
\r
388 * @param birthdayYear the user's birthday year
\r
389 * @param jobTitle the user's job title
\r
390 * @param groupIds the primary keys of the user's groups
\r
391 * @param organizationIds the primary keys of the user's organizations
\r
392 * @param roleIds the primary keys of the roles this user possesses
\r
393 * @param userGroupIds the primary keys of the user's user groups
\r
394 * @param sendEmail whether to send the user an email notification about
\r
396 * @param serviceContext the user's service context (optionally
\r
397 <code>null</code>). Can set the universally unique identifier
\r
398 (with the <code>uuid</code> attribute), asset category IDs, asset
\r
399 tag names, and expando bridge attributes for the user.
\r
400 * @return the new user
\r
401 * @throws PortalException if the user's information was invalid
\r
402 * @throws SystemException if a system exception occurred
\r
404 public com.liferay.portal.model.User addUser(long creatorUserId,
\r
405 long companyId, boolean autoPassword, java.lang.String password1,
\r
406 java.lang.String password2, boolean autoScreenName,
\r
407 java.lang.String screenName, java.lang.String emailAddress,
\r
408 long facebookId, java.lang.String openId, java.util.Locale locale,
\r
409 java.lang.String firstName, java.lang.String middleName,
\r
410 java.lang.String lastName, int prefixId, int suffixId, boolean male,
\r
411 int birthdayMonth, int birthdayDay, int birthdayYear,
\r
412 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
\r
413 long[] roleIds, long[] userGroupIds, boolean sendEmail,
\r
414 com.liferay.portal.service.ServiceContext serviceContext)
\r
415 throws com.liferay.portal.kernel.exception.PortalException,
\r
416 com.liferay.portal.kernel.exception.SystemException;
\r
419 * Adds the users to the user group.
\r
421 * @param userGroupId the primary key of the user group
\r
422 * @param userIds the primary keys of the users
\r
423 * @throws PortalException if a user group or user with the primary could
\r
425 * @throws SystemException if a system exception occurred
\r
427 public void addUserGroupUsers(long userGroupId, long[] userIds)
\r
428 throws com.liferay.portal.kernel.exception.PortalException,
\r
429 com.liferay.portal.kernel.exception.SystemException;
\r
432 * Adds a user with workflow.
\r
435 * This method handles the creation and bookkeeping of the user including
\r
436 * its resources, metadata, and internal data structures. It is not
\r
437 * necessary to make subsequent calls to any methods to setup default
\r
438 * groups, resources, etc.
\r
441 * @param creatorUserId the primary key of the creator
\r
442 * @param companyId the primary key of the user's company
\r
443 * @param autoPassword whether a password should be automatically generated
\r
445 * @param password1 the user's password
\r
446 * @param password2 the user's password confirmation
\r
447 * @param autoScreenName whether a screen name should be automatically
\r
448 generated for the user
\r
449 * @param screenName the user's screen name
\r
450 * @param emailAddress the user's email address
\r
451 * @param facebookId the user's facebook ID
\r
452 * @param openId the user's OpenID
\r
453 * @param locale the user's locale
\r
454 * @param firstName the user's first name
\r
455 * @param middleName the user's middle name
\r
456 * @param lastName the user's last name
\r
457 * @param prefixId the user's name prefix ID
\r
458 * @param suffixId the user's name suffix ID
\r
459 * @param male whether the user is male
\r
460 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
\r
462 * @param birthdayDay the user's birthday day
\r
463 * @param birthdayYear the user's birthday year
\r
464 * @param jobTitle the user's job title
\r
465 * @param groupIds the primary keys of the user's groups
\r
466 * @param organizationIds the primary keys of the user's organizations
\r
467 * @param roleIds the primary keys of the roles this user possesses
\r
468 * @param userGroupIds the primary keys of the user's user groups
\r
469 * @param sendEmail whether to send the user an email notification about
\r
471 * @param serviceContext the user's service context (optionally
\r
472 <code>null</code>). Can set the universally unique identifier
\r
473 (with the <code>uuid</code> attribute), asset category IDs, asset
\r
474 tag names, and expando bridge attributes for the user.
\r
475 * @return the new user
\r
476 * @throws PortalException if the user's information was invalid
\r
477 * @throws SystemException if a system exception occurred
\r
479 public com.liferay.portal.model.User addUserWithWorkflow(
\r
480 long creatorUserId, long companyId, boolean autoPassword,
\r
481 java.lang.String password1, java.lang.String password2,
\r
482 boolean autoScreenName, java.lang.String screenName,
\r
483 java.lang.String emailAddress, long facebookId,
\r
484 java.lang.String openId, java.util.Locale locale,
\r
485 java.lang.String firstName, java.lang.String middleName,
\r
486 java.lang.String lastName, int prefixId, int suffixId, boolean male,
\r
487 int birthdayMonth, int birthdayDay, int birthdayYear,
\r
488 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
\r
489 long[] roleIds, long[] userGroupIds, boolean sendEmail,
\r
490 com.liferay.portal.service.ServiceContext serviceContext)
\r
491 throws com.liferay.portal.kernel.exception.PortalException,
\r
492 com.liferay.portal.kernel.exception.SystemException;
\r
495 * Attempts to authenticate the user by their email address and password,
\r
496 * while using the AuthPipeline.
\r
498 * @param companyId the primary key of the user's company
\r
499 * @param emailAddress the user's email address
\r
500 * @param password the user's password
\r
501 * @param headerMap the header map from the authentication request
\r
502 * @param parameterMap the parameter map from the authentication request
\r
503 * @param resultsMap the map of authentication results (may be nil). After
\r
504 a succesful authentication the user's primary key will be placed
\r
505 under the key <code>userId</code>.
\r
506 * @return the authentication status. This can be {@link
\r
507 com.liferay.portal.security.auth.Authenticator#FAILURE}
\r
508 indicating that the user's credentials are invalid, {@link
\r
509 com.liferay.portal.security.auth.Authenticator#SUCCESS}
\r
510 indicating a successful login, or {@link
\r
511 com.liferay.portal.security.auth.Authenticator#DNE} indicating
\r
512 that a user with that login does not exist.
\r
513 * @throws PortalException if <code>emailAddress</code> or
\r
514 <code>password</code> was <code>null</code>
\r
515 * @throws SystemException if a system exception occurred
\r
516 * @see com.liferay.portal.security.auth.AuthPipeline
\r
518 public int authenticateByEmailAddress(long companyId,
\r
519 java.lang.String emailAddress, java.lang.String password,
\r
520 java.util.Map<java.lang.String, java.lang.String[]> headerMap,
\r
521 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
\r
522 java.util.Map<java.lang.String, java.lang.Object> resultsMap)
\r
523 throws com.liferay.portal.kernel.exception.PortalException,
\r
524 com.liferay.portal.kernel.exception.SystemException;
\r
527 * Attempts to authenticate the user by their screen name and password,
\r
528 * while using the AuthPipeline.
\r
530 * @param companyId the primary key of the user's company
\r
531 * @param screenName the user's screen name
\r
532 * @param password the user's password
\r
533 * @param headerMap the header map from the authentication request
\r
534 * @param parameterMap the parameter map from the authentication request
\r
535 * @param resultsMap the map of authentication results (may be nil). After
\r
536 a succesful authentication the user's primary key will be placed
\r
537 under the key <code>userId</code>.
\r
538 * @return the authentication status. This can be {@link
\r
539 com.liferay.portal.security.auth.Authenticator#FAILURE}
\r
540 indicating that the user's credentials are invalid, {@link
\r
541 com.liferay.portal.security.auth.Authenticator#SUCCESS}
\r
542 indicating a successful login, or {@link
\r
543 com.liferay.portal.security.auth.Authenticator#DNE} indicating
\r
544 that a user with that login does not exist.
\r
545 * @throws PortalException if <code>screenName</code> or
\r
546 <code>password</code> was <code>null</code>
\r
547 * @throws SystemException if a system exception occurred
\r
548 * @see com.liferay.portal.security.auth.AuthPipeline
\r
550 public int authenticateByScreenName(long companyId,
\r
551 java.lang.String screenName, java.lang.String password,
\r
552 java.util.Map<java.lang.String, java.lang.String[]> headerMap,
\r
553 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
\r
554 java.util.Map<java.lang.String, java.lang.Object> resultsMap)
\r
555 throws com.liferay.portal.kernel.exception.PortalException,
\r
556 com.liferay.portal.kernel.exception.SystemException;
\r
559 * Attempts to authenticate the user by their primary key and password,
\r
560 * while using the AuthPipeline.
\r
562 * @param companyId the primary key of the user's company
\r
563 * @param userId the user's primary key
\r
564 * @param password the user's password
\r
565 * @param headerMap the header map from the authentication request
\r
566 * @param parameterMap the parameter map from the authentication request
\r
567 * @param resultsMap the map of authentication results (may be nil). After
\r
568 a succesful authentication the user's primary key will be placed
\r
569 under the key <code>userId</code>.
\r
570 * @return the authentication status. This can be {@link
\r
571 com.liferay.portal.security.auth.Authenticator#FAILURE}
\r
572 indicating that the user's credentials are invalid, {@link
\r
573 com.liferay.portal.security.auth.Authenticator#SUCCESS}
\r
574 indicating a successful login, or {@link
\r
575 com.liferay.portal.security.auth.Authenticator#DNE} indicating
\r
576 that a user with that login does not exist.
\r
577 * @throws PortalException if <code>userId</code> or <code>password</code>
\r
578 was <code>null</code>
\r
579 * @throws SystemException if a system exception occurred
\r
580 * @see com.liferay.portal.security.auth.AuthPipeline
\r
582 public int authenticateByUserId(long companyId, long userId,
\r
583 java.lang.String password,
\r
584 java.util.Map<java.lang.String, java.lang.String[]> headerMap,
\r
585 java.util.Map<java.lang.String, java.lang.String[]> parameterMap,
\r
586 java.util.Map<java.lang.String, java.lang.Object> resultsMap)
\r
587 throws com.liferay.portal.kernel.exception.PortalException,
\r
588 com.liferay.portal.kernel.exception.SystemException;
\r
591 * Attempts to authenticate the user using HTTP basic access authentication,
\r
592 * without using the AuthPipeline. Primarily used for authenticating users
\r
593 * of <code>tunnel-web</code>.
\r
596 * Authentication type specifies what <code>login</code> contains.The valid
\r
602 * <code>CompanyConstants.AUTH_TYPE_EA</code> - <code>login</code> is the
\r
603 * user's email address
\r
606 * <code>CompanyConstants.AUTH_TYPE_SN</code> - <code>login</code> is the
\r
607 * user's screen name
\r
610 * <code>CompanyConstants.AUTH_TYPE_ID</code> - <code>login</code> is the
\r
611 * user's primary key
\r
615 * @param companyId the primary key of the user's company
\r
616 * @param authType the type of authentication to perform
\r
617 * @param login either the user's email address, screen name, or primary
\r
618 key depending on the value of <code>authType</code>
\r
619 * @param password the user's password
\r
620 * @return the authentication status. This can be {@link
\r
621 com.liferay.portal.security.auth.Authenticator#FAILURE}
\r
622 indicating that the user's credentials are invalid, {@link
\r
623 com.liferay.portal.security.auth.Authenticator#SUCCESS}
\r
624 indicating a successful login, or {@link
\r
625 com.liferay.portal.security.auth.Authenticator#DNE} indicating
\r
626 that a user with that login does not exist.
\r
627 * @throws PortalException if a portal exception occurred
\r
628 * @throws SystemException if a system exception occurred
\r
630 public long authenticateForBasic(long companyId, java.lang.String authType,
\r
631 java.lang.String login, java.lang.String password)
\r
632 throws com.liferay.portal.kernel.exception.PortalException,
\r
633 com.liferay.portal.kernel.exception.SystemException;
\r
636 * Attempts to authenticate the user using HTTP digest access
\r
637 * authentication, without using the AuthPipeline. Primarily used for
\r
638 * authenticating users of <code>tunnel-web</code>.
\r
640 * @param companyId the primary key of the user's company
\r
641 * @param username either the user's email address, screen name, or primary
\r
643 * @param realm unused
\r
644 * @param nonce the number used once
\r
645 * @param method the request method
\r
646 * @param uri the request URI
\r
647 * @param response the authentication response hash
\r
648 * @return the user's primary key if authentication is succesful;
\r
649 <code>0</code> otherwise
\r
650 * @throws PortalException if a portal exception occurred
\r
651 * @throws SystemException if a system exception occurred
\r
653 public long authenticateForDigest(long companyId,
\r
654 java.lang.String username, java.lang.String realm,
\r
655 java.lang.String nonce, java.lang.String method, java.lang.String uri,
\r
656 java.lang.String response)
\r
657 throws com.liferay.portal.kernel.exception.PortalException,
\r
658 com.liferay.portal.kernel.exception.SystemException;
\r
661 * Attempts to authenticate the user using JAAS credentials, without using
\r
662 * the AuthPipeline.
\r
664 * @param userId the primary key of the user
\r
665 * @param encPassword the encrypted password
\r
666 * @return <code>true</code> if authentication is successful;
\r
667 <code>false</code> otherwise
\r
669 public boolean authenticateForJAAS(long userId, java.lang.String encPassword);
\r
672 * Checks if the user is currently locked out based on the password policy,
\r
673 * and performs maintenance on the user's lockout and failed login data.
\r
675 * @param user the user
\r
676 * @throws PortalException if the user was determined to still be locked out
\r
677 * @throws SystemException if a system exception occurred
\r
679 public void checkLockout(com.liferay.portal.model.User user)
\r
680 throws com.liferay.portal.kernel.exception.PortalException,
\r
681 com.liferay.portal.kernel.exception.SystemException;
\r
684 * Adds a failed login attempt to the user and updates the user's last
\r
685 * failed login date.
\r
687 * @param user the user
\r
688 * @throws SystemException if a system exception occurred
\r
690 public void checkLoginFailure(com.liferay.portal.model.User user)
\r
691 throws com.liferay.portal.kernel.exception.SystemException;
\r
694 * Adds a failed login attempt to the user with the email address and
\r
695 * updates the user's last failed login date.
\r
697 * @param companyId the primary key of the user's company
\r
698 * @param emailAddress the user's email address
\r
699 * @throws PortalException if a user with the email address could not be
\r
701 * @throws SystemException if a system exception occurred
\r
703 public void checkLoginFailureByEmailAddress(long companyId,
\r
704 java.lang.String emailAddress)
\r
705 throws com.liferay.portal.kernel.exception.PortalException,
\r
706 com.liferay.portal.kernel.exception.SystemException;
\r
709 * Adds a failed login attempt to the user and updates the user's last
\r
710 * failed login date.
\r
712 * @param userId the primary key of the user
\r
713 * @throws PortalException if a user with the primary key could not be found
\r
714 * @throws SystemException if a system exception occurred
\r
716 public void checkLoginFailureById(long userId)
\r
717 throws com.liferay.portal.kernel.exception.PortalException,
\r
718 com.liferay.portal.kernel.exception.SystemException;
\r
721 * Adds a failed login attempt to the user with the screen name and updates
\r
722 * the user's last failed login date.
\r
724 * @param companyId the primary key of the user's company
\r
725 * @param screenName the user's screen name
\r
726 * @throws PortalException if a user with the screen name could not be found
\r
727 * @throws SystemException if a system exception occurred
\r
729 public void checkLoginFailureByScreenName(long companyId,
\r
730 java.lang.String screenName)
\r
731 throws com.liferay.portal.kernel.exception.PortalException,
\r
732 com.liferay.portal.kernel.exception.SystemException;
\r
735 * Checks if the user's password is expired based on the password policy,
\r
736 * and performs maintenance on the user's grace login and password reset
\r
739 * @param user the user
\r
740 * @throws PortalException if the user's password has expired and the grace
\r
741 login limit has been exceeded
\r
742 * @throws SystemException if a system exception occurred
\r
744 public void checkPasswordExpired(com.liferay.portal.model.User user)
\r
745 throws com.liferay.portal.kernel.exception.PortalException,
\r
746 com.liferay.portal.kernel.exception.SystemException;
\r
749 * Removes all the users from the organization.
\r
751 * @param organizationId the primary key of the organization
\r
752 * @throws SystemException if a system exception occurred
\r
754 public void clearOrganizationUsers(long organizationId)
\r
755 throws com.liferay.portal.kernel.exception.SystemException;
\r
758 * Removes all the users from the user group.
\r
760 * @param userGroupId the primary key of the user group
\r
761 * @throws SystemException if a system exception occurred
\r
763 public void clearUserGroupUsers(long userGroupId)
\r
764 throws com.liferay.portal.kernel.exception.SystemException;
\r
767 * Completes the user's registration by generating a password and sending
\r
768 * the confirmation email.
\r
770 * @param user the user
\r
771 * @param serviceContext the user's service context. Can set whether a
\r
772 password should be generated (with the <code>autoPassword</code>
\r
773 attribute) and whether the confirmation email should be sent
\r
774 (with the <code>sendEmail</code> attribute) for the user.
\r
775 * @throws PortalException if a portal exception occurred
\r
776 * @throws SystemException if a system exception occurred
\r
778 public void completeUserRegistration(com.liferay.portal.model.User user,
\r
779 com.liferay.portal.service.ServiceContext serviceContext)
\r
780 throws com.liferay.portal.kernel.exception.PortalException,
\r
781 com.liferay.portal.kernel.exception.SystemException;
\r
784 * Decrypts the user's primary key and password from their encrypted forms.
\r
785 * Used for decrypting a user's credentials from the values stored in an
\r
786 * automatic login cookie.
\r
788 * @param companyId the primary key of the user's company
\r
789 * @param name the encrypted primary key of the user
\r
790 * @param password the encrypted password of the user
\r
791 * @return the user's primary key and password
\r
792 * @throws PortalException if a user with the primary key could not be found
\r
793 or if the user's password was incorrect
\r
794 * @throws SystemException if a system exception occurred
\r
796 public com.liferay.portal.kernel.util.KeyValuePair decryptUserId(
\r
797 long companyId, java.lang.String name, java.lang.String password)
\r
798 throws com.liferay.portal.kernel.exception.PortalException,
\r
799 com.liferay.portal.kernel.exception.SystemException;
\r
802 * Deletes the user's portrait image.
\r
804 * @param userId the primary key of the user
\r
805 * @throws PortalException if a user with the primary key could not be found
\r
806 or if the user's portrait could not be found
\r
807 * @throws SystemException if a system exception occurred
\r
809 public void deletePortrait(long userId)
\r
810 throws com.liferay.portal.kernel.exception.PortalException,
\r
811 com.liferay.portal.kernel.exception.SystemException;
\r
814 * Removes the user from the role.
\r
816 * @param roleId the primary key of the role
\r
817 * @param userId the primary key of the user
\r
818 * @throws PortalException if a role or user with the primary key could not
\r
820 * @throws SystemException if a system exception occurred
\r
822 public void deleteRoleUser(long roleId, long userId)
\r
823 throws com.liferay.portal.kernel.exception.PortalException,
\r
824 com.liferay.portal.kernel.exception.SystemException;
\r
827 * Removes the user from the user group.
\r
829 * @param userGroupId the primary key of the user group
\r
830 * @param userId the primary key of the user
\r
831 * @throws PortalException if a portal exception occurred
\r
832 * @throws SystemException if a system exception occurred
\r
834 public void deleteUserGroupUser(long userGroupId, long userId)
\r
835 throws com.liferay.portal.kernel.exception.PortalException,
\r
836 com.liferay.portal.kernel.exception.SystemException;
\r
839 * Encrypts the primary key of the user. Used when encrypting the user's
\r
840 * credentials for storage in an automatic login cookie.
\r
842 * @param name the primary key of the user
\r
843 * @return the user's encrypted primary key
\r
844 * @throws PortalException if a user with the primary key could not be found
\r
845 * @throws SystemException if a system exception occurred
\r
847 public java.lang.String encryptUserId(java.lang.String name)
\r
848 throws com.liferay.portal.kernel.exception.PortalException,
\r
849 com.liferay.portal.kernel.exception.SystemException;
\r
852 * Returns the user with the email address.
\r
854 * @param companyId the primary key of the user's company
\r
855 * @param emailAddress the user's email address
\r
856 * @return the user with the email address, or <code>null</code> if a user
\r
857 with the email address could not be found
\r
858 * @throws SystemException if a system exception occurred
\r
860 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
861 public com.liferay.portal.model.User fetchUserByEmailAddress(
\r
862 long companyId, java.lang.String emailAddress)
\r
863 throws com.liferay.portal.kernel.exception.SystemException;
\r
866 * Returns the user with the primary key.
\r
868 * @param userId the primary key of the user
\r
869 * @return the user with the primary key, or <code>null</code> if a user
\r
870 with the primary key could not be found
\r
871 * @throws SystemException if a system exception occurred
\r
873 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
874 public com.liferay.portal.model.User fetchUserById(long userId)
\r
875 throws com.liferay.portal.kernel.exception.SystemException;
\r
878 * Returns the user with the screen name.
\r
880 * @param companyId the primary key of the user's company
\r
881 * @param screenName the user's screen name
\r
882 * @return the user with the screen name, or <code>null</code> if a user
\r
883 with the screen name could not be found
\r
884 * @throws SystemException if a system exception occurred
\r
886 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
887 public com.liferay.portal.model.User fetchUserByScreenName(long companyId,
\r
888 java.lang.String screenName)
\r
889 throws com.liferay.portal.kernel.exception.SystemException;
\r
891 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
892 public List<com.liferay.portal.model.User> findUsersByEmail(String email)
\r
893 throws com.liferay.portal.kernel.exception.SystemException;
\r
897 * Returns a range of all the users belonging to the company.
\r
900 * Useful when paginating results. Returns a maximum of <code>end -
\r
901 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
902 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
903 * refers to the first result in the set. Setting both <code>start</code>
\r
904 * and <code>end</code> to {@link
\r
905 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
909 * @param companyId the primary key of the company
\r
910 * @param start the lower bound of the range of users
\r
911 * @param end the upper bound of the range of users (not inclusive)
\r
912 * @return the range of users belonging to the company
\r
913 * @throws SystemException if a system exception occurred
\r
915 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
916 public java.util.List<com.liferay.portal.model.User> getCompanyUsers(
\r
917 long companyId, int start, int end)
\r
918 throws com.liferay.portal.kernel.exception.SystemException;
\r
921 * Returns the number of users belonging to the company.
\r
923 * @param companyId the primary key of the company
\r
924 * @return the number of users belonging to the company
\r
925 * @throws SystemException if a system exception occurred
\r
927 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
928 public int getCompanyUsersCount(long companyId)
\r
929 throws com.liferay.portal.kernel.exception.SystemException;
\r
932 * Returns the default user for the company.
\r
934 * @param companyId the primary key of the company
\r
935 * @return the default user for the company
\r
936 * @throws PortalException if a default user for the company could not be
\r
938 * @throws SystemException if a system exception occurred
\r
940 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
941 public com.liferay.portal.model.User getDefaultUser(long companyId)
\r
942 throws com.liferay.portal.kernel.exception.PortalException,
\r
943 com.liferay.portal.kernel.exception.SystemException;
\r
946 * Returns the primary key of the default user for the company.
\r
948 * @param companyId the primary key of the company
\r
949 * @return the primary key of the default user for the company
\r
950 * @throws PortalException if a default user for the company could not be
\r
952 * @throws SystemException if a system exception occurred
\r
954 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
955 public long getDefaultUserId(long companyId)
\r
956 throws com.liferay.portal.kernel.exception.PortalException,
\r
957 com.liferay.portal.kernel.exception.SystemException;
\r
960 * Returns the primary keys of all the users belonging to the group.
\r
962 * @param groupId the primary key of the group
\r
963 * @return the primary keys of the users belonging to the group
\r
964 * @throws SystemException if a system exception occurred
\r
966 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
967 public long[] getGroupUserIds(long groupId)
\r
968 throws com.liferay.portal.kernel.exception.SystemException;
\r
971 * Returns all the users belonging to the group.
\r
973 * @param groupId the primary key of the group
\r
974 * @return the users belonging to the group
\r
975 * @throws SystemException if a system exception occurred
\r
977 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
978 public java.util.List<com.liferay.portal.model.User> getGroupUsers(
\r
980 throws com.liferay.portal.kernel.exception.SystemException;
\r
983 * Returns the number of users belonging to the group.
\r
985 * @param groupId the primary key of the group
\r
986 * @return the number of users belonging to the group
\r
987 * @throws SystemException if a system exception occurred
\r
989 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
990 public int getGroupUsersCount(long groupId)
\r
991 throws com.liferay.portal.kernel.exception.SystemException;
\r
994 * Returns the number of users with the status belonging to the group.
\r
996 * @param groupId the primary key of the group
\r
997 * @param status the workflow status
\r
998 * @return the number of users with the status belonging to the group
\r
999 * @throws PortalException if a group with the primary key could not be
\r
1001 * @throws SystemException if a system exception occurred
\r
1003 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1004 public int getGroupUsersCount(long groupId, int status)
\r
1005 throws com.liferay.portal.kernel.exception.PortalException,
\r
1006 com.liferay.portal.kernel.exception.SystemException;
\r
1009 * Returns all the users who have not had any announcements of the type
\r
1010 * delivered, excluding the default user.
\r
1012 * @param type the type of announcement
\r
1013 * @return the users who have not had any annoucements of the type delivered
\r
1014 * @throws SystemException if a system exception occurred
\r
1016 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1017 public java.util.List<com.liferay.portal.model.User> getNoAnnouncementsDeliveries(
\r
1018 java.lang.String type)
\r
1019 throws com.liferay.portal.kernel.exception.SystemException;
\r
1022 * Returns all the users who do not have any contacts.
\r
1024 * @return the users who do not have any contacts
\r
1025 * @throws SystemException if a system exception occurred
\r
1027 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1028 public java.util.List<com.liferay.portal.model.User> getNoContacts()
\r
1029 throws com.liferay.portal.kernel.exception.SystemException;
\r
1032 * Returns all the users who do not belong to any groups, excluding the
\r
1035 * @return the users who do not belong to any groups
\r
1036 * @throws SystemException if a system exception occurred
\r
1038 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1039 public java.util.List<com.liferay.portal.model.User> getNoGroups()
\r
1040 throws com.liferay.portal.kernel.exception.SystemException;
\r
1043 * Returns the primary keys of all the users belonging to the organization.
\r
1045 * @param organizationId the primary key of the organization
\r
1046 * @return the primary keys of the users belonging to the organization
\r
1047 * @throws SystemException if a system exception occurred
\r
1049 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1050 public long[] getOrganizationUserIds(long organizationId)
\r
1051 throws com.liferay.portal.kernel.exception.SystemException;
\r
1054 * Returns all the users belonging to the organization.
\r
1056 * @param organizationId the primary key of the organization
\r
1057 * @return the users belonging to the organization
\r
1058 * @throws SystemException if a system exception occurred
\r
1060 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1061 public java.util.List<com.liferay.portal.model.User> getOrganizationUsers(
\r
1062 long organizationId)
\r
1063 throws com.liferay.portal.kernel.exception.SystemException;
\r
1065 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1066 public List<User> getOrganizationUsers(long organizationId,
\r
1067 int start, int stop) throws SystemException;
\r
1069 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1070 public List<User> getOrganizationUsers(long organizationId,
\r
1071 int start, int stop, OrderByComparator orderComp) throws SystemException;
\r
1074 * Returns the number of users belonging to the organization.
\r
1076 * @param organizationId the primary key of the organization
\r
1077 * @return the number of users belonging to the organization
\r
1078 * @throws SystemException if a system exception occurred
\r
1080 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1081 public int getOrganizationUsersCount(long organizationId)
\r
1082 throws com.liferay.portal.kernel.exception.SystemException;
\r
1085 * Returns the number of users with the status belonging to the
\r
1088 * @param organizationId the primary key of the organization
\r
1089 * @param status the workflow status
\r
1090 * @return the number of users with the status belonging to the organization
\r
1091 * @throws PortalException if an organization with the primary key could not
\r
1093 * @throws SystemException if a system exception occurred
\r
1095 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1096 public int getOrganizationUsersCount(long organizationId, int status)
\r
1097 throws com.liferay.portal.kernel.exception.PortalException,
\r
1098 com.liferay.portal.kernel.exception.SystemException;
\r
1101 * Returns the primary keys of all the users belonging to the role.
\r
1103 * @param roleId the primary key of the role
\r
1104 * @return the primary keys of the users belonging to the role
\r
1105 * @throws SystemException if a system exception occurred
\r
1107 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1108 public long[] getRoleUserIds(long roleId)
\r
1109 throws com.liferay.portal.kernel.exception.SystemException;
\r
1112 * Returns all the users belonging to the role.
\r
1114 * @param roleId the primary key of the role
\r
1115 * @return the users belonging to the role
\r
1116 * @throws SystemException if a system exception occurred
\r
1118 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1119 public java.util.List<com.liferay.portal.model.User> getRoleUsers(
\r
1120 long roleId) throws com.liferay.portal.kernel.exception.SystemException;
\r
1123 * Returns a range of all the users belonging to the role.
\r
1126 * Useful when paginating results. Returns a maximum of <code>end -
\r
1127 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1128 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1129 * refers to the first result in the set. Setting both <code>start</code>
\r
1130 * and <code>end</code> to {@link
\r
1131 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1135 * @param roleId the primary key of the role
\r
1136 * @param start the lower bound of the range of users
\r
1137 * @param end the upper bound of the range of users (not inclusive)
\r
1138 * @return the range of users belonging to the role
\r
1139 * @throws SystemException if a system exception occurred
\r
1141 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1142 public java.util.List<com.liferay.portal.model.User> getRoleUsers(
\r
1143 long roleId, int start, int end)
\r
1144 throws com.liferay.portal.kernel.exception.SystemException;
\r
1147 * Returns the number of users belonging to the role.
\r
1149 * @param roleId the primary key of the role
\r
1150 * @return the number of users belonging to the role
\r
1151 * @throws SystemException if a system exception occurred
\r
1153 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1154 public int getRoleUsersCount(long roleId)
\r
1155 throws com.liferay.portal.kernel.exception.SystemException;
\r
1158 * Returns the number of users with the status belonging to the role.
\r
1160 * @param roleId the primary key of the role
\r
1161 * @param status the workflow status
\r
1162 * @return the number of users with the status belonging to the role
\r
1163 * @throws PortalException if an role with the primary key could not be
\r
1165 * @throws SystemException if a system exception occurred
\r
1167 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1168 public int getRoleUsersCount(long roleId, int status)
\r
1169 throws com.liferay.portal.kernel.exception.PortalException,
\r
1170 com.liferay.portal.kernel.exception.SystemException;
\r
1173 * Returns an ordered range of all the users with a social relation of the
\r
1174 * type with the user.
\r
1177 * Useful when paginating results. Returns a maximum of <code>end -
\r
1178 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1179 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1180 * refers to the first result in the set. Setting both <code>start</code>
\r
1181 * and <code>end</code> to {@link
\r
1182 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1186 * @param userId the primary key of the user
\r
1187 * @param type the type of social relation. The possible types can be found
\r
1189 com.liferay.portlet.social.model.SocialRelationConstants}.
\r
1190 * @param start the lower bound of the range of users
\r
1191 * @param end the upper bound of the range of users (not inclusive)
\r
1192 * @param obc the comparator to order the users by (optionally
\r
1193 <code>null</code>)
\r
1194 * @return the ordered range of users with a social relation of the type
\r
1196 * @throws PortalException if a user with the primary key could not be found
\r
1197 * @throws SystemException if a system exception occurred
\r
1199 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1200 public java.util.List<com.liferay.portal.model.User> getSocialUsers(
\r
1201 long userId, int type, int start, int end,
\r
1202 com.liferay.portal.kernel.util.OrderByComparator obc)
\r
1203 throws com.liferay.portal.kernel.exception.PortalException,
\r
1204 com.liferay.portal.kernel.exception.SystemException;
\r
1207 * Returns an ordered range of all the users with a social relation with the
\r
1211 * Useful when paginating results. Returns a maximum of <code>end -
\r
1212 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1213 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1214 * refers to the first result in the set. Setting both <code>start</code>
\r
1215 * and <code>end</code> to {@link
\r
1216 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1220 * @param userId the primary key of the user
\r
1221 * @param start the lower bound of the range of users
\r
1222 * @param end the upper bound of the range of users (not inclusive)
\r
1223 * @param obc the comparator to order the users by (optionally
\r
1224 <code>null</code>)
\r
1225 * @return the ordered range of users with a social relation with the user
\r
1226 * @throws PortalException if a user with the primary key could not be found
\r
1227 * @throws SystemException if a system exception occurred
\r
1229 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1230 public java.util.List<com.liferay.portal.model.User> getSocialUsers(
\r
1231 long userId, int start, int end,
\r
1232 com.liferay.portal.kernel.util.OrderByComparator obc)
\r
1233 throws com.liferay.portal.kernel.exception.PortalException,
\r
1234 com.liferay.portal.kernel.exception.SystemException;
\r
1237 * Returns an ordered range of all the users with a mutual social relation
\r
1238 * of the type with both of the given users.
\r
1241 * Useful when paginating results. Returns a maximum of <code>end -
\r
1242 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1243 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1244 * refers to the first result in the set. Setting both <code>start</code>
\r
1245 * and <code>end</code> to {@link
\r
1246 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1250 * @param userId1 the primary key of the first user
\r
1251 * @param userId2 the primary key of the second user
\r
1252 * @param type the type of social relation. The possible types can be found
\r
1254 com.liferay.portlet.social.model.SocialRelationConstants}.
\r
1255 * @param start the lower bound of the range of users
\r
1256 * @param end the upper bound of the range of users (not inclusive)
\r
1257 * @param obc the comparator to order the users by (optionally
\r
1258 <code>null</code>)
\r
1259 * @return the ordered range of users with a mutual social relation of the
\r
1260 type with the user
\r
1261 * @throws PortalException if a user with the primary key could not be found
\r
1262 * @throws SystemException if a system exception occurred
\r
1264 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1265 public java.util.List<com.liferay.portal.model.User> getSocialUsers(
\r
1266 long userId1, long userId2, int type, int start, int end,
\r
1267 com.liferay.portal.kernel.util.OrderByComparator obc)
\r
1268 throws com.liferay.portal.kernel.exception.PortalException,
\r
1269 com.liferay.portal.kernel.exception.SystemException;
\r
1272 * Returns an ordered range of all the users with a mutual social relation
\r
1273 * with both of the given users.
\r
1276 * Useful when paginating results. Returns a maximum of <code>end -
\r
1277 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1278 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1279 * refers to the first result in the set. Setting both <code>start</code>
\r
1280 * and <code>end</code> to {@link
\r
1281 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1285 * @param userId1 the primary key of the first user
\r
1286 * @param userId2 the primary key of the second user
\r
1287 * @param start the lower bound of the range of users
\r
1288 * @param end the upper bound of the range of users (not inclusive)
\r
1289 * @param obc the comparator to order the users by (optionally
\r
1290 <code>null</code>)
\r
1291 * @return the ordered range of users with a mutual social relation with the
\r
1293 * @throws PortalException if a user with the primary key could not be found
\r
1294 * @throws SystemException if a system exception occurred
\r
1296 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1297 public java.util.List<com.liferay.portal.model.User> getSocialUsers(
\r
1298 long userId1, long userId2, int start, int end,
\r
1299 com.liferay.portal.kernel.util.OrderByComparator obc)
\r
1300 throws com.liferay.portal.kernel.exception.PortalException,
\r
1301 com.liferay.portal.kernel.exception.SystemException;
\r
1304 * Returns the number of users with a social relation with the user.
\r
1306 * @param userId the primary key of the user
\r
1307 * @return the number of users with a social relation with the user
\r
1308 * @throws PortalException if a user with the primary key could not be found
\r
1309 * @throws SystemException if a system exception occurred
\r
1311 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1312 public int getSocialUsersCount(long userId)
\r
1313 throws com.liferay.portal.kernel.exception.PortalException,
\r
1314 com.liferay.portal.kernel.exception.SystemException;
\r
1317 * Returns the number of users with a social relation of the type with the
\r
1320 * @param userId the primary key of the user
\r
1321 * @param type the type of social relation. The possible types can be found
\r
1323 com.liferay.portlet.social.model.SocialRelationConstants}.
\r
1324 * @return the number of users with a social relation of the type with the
\r
1326 * @throws PortalException if a user with the primary key could not be found
\r
1327 * @throws SystemException if a system exception occurred
\r
1329 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1330 public int getSocialUsersCount(long userId, int type)
\r
1331 throws com.liferay.portal.kernel.exception.PortalException,
\r
1332 com.liferay.portal.kernel.exception.SystemException;
\r
1335 * Returns the number of users with a mutual social relation with both of
\r
1336 * the given users.
\r
1338 * @param userId1 the primary key of the first user
\r
1339 * @param userId2 the primary key of the second user
\r
1340 * @return the number of users with a mutual social relation with the user
\r
1341 * @throws PortalException if a user with the primary key could not be found
\r
1342 * @throws SystemException if a system exception occurred
\r
1344 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1345 public int getSocialUsersCount(long userId1, long userId2)
\r
1346 throws com.liferay.portal.kernel.exception.PortalException,
\r
1347 com.liferay.portal.kernel.exception.SystemException;
\r
1350 * Returns the number of users with a mutual social relation of the type
\r
1351 * with both of the given users.
\r
1353 * @param userId1 the primary key of the first user
\r
1354 * @param userId2 the primary key of the second user
\r
1355 * @param type the type of social relation. The possible types can be found
\r
1357 com.liferay.portlet.social.model.SocialRelationConstants}.
\r
1358 * @return the number of users with a mutual social relation of the type
\r
1360 * @throws PortalException if a user with the primary key could not be found
\r
1361 * @throws SystemException if a system exception occurred
\r
1363 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1364 public int getSocialUsersCount(long userId1, long userId2, int type)
\r
1365 throws com.liferay.portal.kernel.exception.PortalException,
\r
1366 com.liferay.portal.kernel.exception.SystemException;
\r
1369 * Returns the user with the contact ID.
\r
1371 * @param contactId the user's contact ID
\r
1372 * @return the user with the contact ID
\r
1373 * @throws PortalException if a user with the contact ID could not be found
\r
1374 * @throws SystemException if a system exception occurred
\r
1376 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1377 public com.liferay.portal.model.User getUserByContactId(long contactId)
\r
1378 throws com.liferay.portal.kernel.exception.PortalException,
\r
1379 com.liferay.portal.kernel.exception.SystemException;
\r
1382 * Returns the user with the email address.
\r
1384 * @param companyId the primary key of the user's company
\r
1385 * @param emailAddress the user's email address
\r
1386 * @return the user with the email address
\r
1387 * @throws PortalException if a user with the email address could not be
\r
1389 * @throws SystemException if a system exception occurred
\r
1391 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1392 public com.liferay.portal.model.User getUserByEmailAddress(long companyId,
\r
1393 java.lang.String emailAddress)
\r
1394 throws com.liferay.portal.kernel.exception.PortalException,
\r
1395 com.liferay.portal.kernel.exception.SystemException;
\r
1398 * Returns the user with the Facebook ID.
\r
1400 * @param companyId the primary key of the user's company
\r
1401 * @param facebookId the user's Facebook ID
\r
1402 * @return the user with the Facebook ID
\r
1403 * @throws PortalException if a user with the Facebook ID could not be found
\r
1404 * @throws SystemException if a system exception occurred
\r
1406 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1407 public com.liferay.portal.model.User getUserByFacebookId(long companyId,
\r
1409 throws com.liferay.portal.kernel.exception.PortalException,
\r
1410 com.liferay.portal.kernel.exception.SystemException;
\r
1413 * Returns the user with the primary key.
\r
1415 * @param userId the primary key of the user
\r
1416 * @return the user with the primary key
\r
1417 * @throws PortalException if a user with the primary key could not be found
\r
1418 * @throws SystemException if a system exception occurred
\r
1420 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1421 public com.liferay.portal.model.User getUserById(long userId)
\r
1422 throws com.liferay.portal.kernel.exception.PortalException,
\r
1423 com.liferay.portal.kernel.exception.SystemException;
\r
1426 * Returns the user with the primary key from the company.
\r
1428 * @param companyId the primary key of the user's company
\r
1429 * @param userId the primary key of the user
\r
1430 * @return the user with the primary key
\r
1431 * @throws PortalException if a user with the primary key from the company
\r
1432 could not be found
\r
1433 * @throws SystemException if a system exception occurred
\r
1435 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1436 public com.liferay.portal.model.User getUserById(long companyId, long userId)
\r
1437 throws com.liferay.portal.kernel.exception.PortalException,
\r
1438 com.liferay.portal.kernel.exception.SystemException;
\r
1441 * Returns the user with the OpenID.
\r
1443 * @param companyId the primary key of the user's company
\r
1444 * @param openId the user's OpenID
\r
1445 * @return the user with the OpenID
\r
1446 * @throws PortalException if a user with the OpenID could not be found
\r
1447 * @throws SystemException if a system exception occurred
\r
1449 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1450 public com.liferay.portal.model.User getUserByOpenId(long companyId,
\r
1451 java.lang.String openId)
\r
1452 throws com.liferay.portal.kernel.exception.PortalException,
\r
1453 com.liferay.portal.kernel.exception.SystemException;
\r
1456 * Returns the user with the portrait ID.
\r
1458 * @param portraitId the user's portrait ID
\r
1459 * @return the user with the portrait ID
\r
1460 * @throws PortalException if a user with the portrait ID could not be found
\r
1461 * @throws SystemException if a system exception occurred
\r
1463 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1464 public com.liferay.portal.model.User getUserByPortraitId(long portraitId)
\r
1465 throws com.liferay.portal.kernel.exception.PortalException,
\r
1466 com.liferay.portal.kernel.exception.SystemException;
\r
1469 * Returns the user with the screen name.
\r
1471 * @param companyId the primary key of the user's company
\r
1472 * @param screenName the user's screen name
\r
1473 * @return the user with the screen name
\r
1474 * @throws PortalException if a user with the screen name could not be found
\r
1475 * @throws SystemException if a system exception occurred
\r
1477 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1478 public com.liferay.portal.model.User getUserByScreenName(long companyId,
\r
1479 java.lang.String screenName)
\r
1480 throws com.liferay.portal.kernel.exception.PortalException,
\r
1481 com.liferay.portal.kernel.exception.SystemException;
\r
1484 * Returns the user with the universally unique identifier.
\r
1486 * @param uuid the user's universally unique identifier
\r
1487 * @return the user with the universally unique identifier
\r
1488 * @throws PortalException if a user with the universally unique identifier
\r
1489 could not be found
\r
1490 * @throws SystemException if a system exception occurred
\r
1492 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1493 public com.liferay.portal.model.User getUserByUuid(java.lang.String uuid)
\r
1494 throws com.liferay.portal.kernel.exception.PortalException,
\r
1495 com.liferay.portal.kernel.exception.SystemException;
\r
1498 * Returns all the users belonging to the user group.
\r
1500 * @param userGroupId the primary key of the user group
\r
1501 * @return the users belonging to the user group
\r
1502 * @throws SystemException if a system exception occurred
\r
1504 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1505 public java.util.List<com.liferay.portal.model.User> getUserGroupUsers(
\r
1507 throws com.liferay.portal.kernel.exception.SystemException;
\r
1510 * Returns the number of users belonging to the user group.
\r
1512 * @param userGroupId the primary key of the user group
\r
1513 * @return the number of users belonging to the user group
\r
1514 * @throws SystemException if a system exception occurred
\r
1516 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1517 public int getUserGroupUsersCount(long userGroupId)
\r
1518 throws com.liferay.portal.kernel.exception.SystemException;
\r
1521 * Returns the number of users with the status belonging to the user group.
\r
1523 * @param userGroupId the primary key of the user group
\r
1524 * @param status the workflow status
\r
1525 * @return the number of users with the status belonging to the user group
\r
1526 * @throws PortalException if a user group with the primary key could not be
\r
1528 * @throws SystemException if a system exception occurred
\r
1530 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1531 public int getUserGroupUsersCount(long userGroupId, int status)
\r
1532 throws com.liferay.portal.kernel.exception.PortalException,
\r
1533 com.liferay.portal.kernel.exception.SystemException;
\r
1536 * Returns the primary key of the user with the email address.
\r
1538 * @param companyId the primary key of the user's company
\r
1539 * @param emailAddress the user's email address
\r
1540 * @return the primary key of the user with the email address
\r
1541 * @throws PortalException if a user with the email address could not be
\r
1543 * @throws SystemException if a system exception occurred
\r
1545 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1546 public long getUserIdByEmailAddress(long companyId,
\r
1547 java.lang.String emailAddress)
\r
1548 throws com.liferay.portal.kernel.exception.PortalException,
\r
1549 com.liferay.portal.kernel.exception.SystemException;
\r
1552 * Returns the primary key of the user with the screen name.
\r
1554 * @param companyId the primary key of the user's company
\r
1555 * @param screenName the user's screen name
\r
1556 * @return the primary key of the user with the screen name
\r
1557 * @throws PortalException if a user with the screen name could not be found
\r
1558 * @throws SystemException if a system exception occurred
\r
1560 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1561 public long getUserIdByScreenName(long companyId,
\r
1562 java.lang.String screenName)
\r
1563 throws com.liferay.portal.kernel.exception.PortalException,
\r
1564 com.liferay.portal.kernel.exception.SystemException;
\r
1567 * Returns <code>true</code> if the user is a member of the group.
\r
1569 * @param groupId the primary key of the group
\r
1570 * @param userId the primary key of the user
\r
1571 * @return <code>true</code> if the user is a member of the group;
\r
1572 <code>false</code> otherwise
\r
1573 * @throws SystemException if a system exception occurred
\r
1575 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1576 public boolean hasGroupUser(long groupId, long userId)
\r
1577 throws com.liferay.portal.kernel.exception.SystemException;
\r
1580 * Returns <code>true</code> if the user is a member of the organization.
\r
1582 * @param organizationId the primary key of the organization
\r
1583 * @param userId the primary key of the user
\r
1584 * @return <code>true</code> if the user is a member of the organization;
\r
1585 <code>false</code> otherwise
\r
1586 * @throws SystemException if a system exception occurred
\r
1588 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1589 public boolean hasOrganizationUser(long organizationId, long userId)
\r
1590 throws com.liferay.portal.kernel.exception.SystemException;
\r
1593 * Returns <code>true</code> if the password policy has been assigned to the
\r
1596 * @param passwordPolicyId the primary key of the password policy
\r
1597 * @param userId the primary key of the user
\r
1598 * @return <code>true</code> if the password policy is assigned to the user;
\r
1599 <code>false</code> otherwise
\r
1600 * @throws SystemException if a system exception occurred
\r
1602 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1603 public boolean hasPasswordPolicyUser(long passwordPolicyId, long userId)
\r
1604 throws com.liferay.portal.kernel.exception.SystemException;
\r
1607 * Returns <code>true</code> if the user is a member of the role.
\r
1609 * @param roleId the primary key of the role
\r
1610 * @param userId the primary key of the user
\r
1611 * @return <code>true</code> if the user is a member of the role;
\r
1612 <code>false</code> otherwise
\r
1613 * @throws SystemException if a system exception occurred
\r
1615 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1616 public boolean hasRoleUser(long roleId, long userId)
\r
1617 throws com.liferay.portal.kernel.exception.SystemException;
\r
1620 * Returns <code>true</code> if the user has the role with the name,
\r
1621 * optionally through inheritance.
\r
1623 * @param companyId the primary key of the role's company
\r
1624 * @param name the name of the role (must be a regular role, not an
\r
1625 organization, site or provider role)
\r
1626 * @param userId the primary key of the user
\r
1627 * @param inherited whether to include roles inherited from organizations,
\r
1629 * @return <code>true</code> if the user has the role; <code>false</code>
\r
1631 * @throws PortalException if a role with the name could not be found
\r
1632 * @throws SystemException if a system exception occurred
\r
1634 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1635 public boolean hasRoleUser(long companyId, java.lang.String name,
\r
1636 long userId, boolean inherited)
\r
1637 throws com.liferay.portal.kernel.exception.PortalException,
\r
1638 com.liferay.portal.kernel.exception.SystemException;
\r
1641 * Returns <code>true</code> if the user is a member of the team.
\r
1643 * @param teamId the primary key of the team
\r
1644 * @param userId the primary key of the user
\r
1645 * @return <code>true</code> if the user is a member of the team;
\r
1646 <code>false</code> otherwise
\r
1647 * @throws SystemException if a system exception occurred
\r
1649 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1650 public boolean hasTeamUser(long teamId, long userId)
\r
1651 throws com.liferay.portal.kernel.exception.SystemException;
\r
1654 * Returns <code>true</code> if the user is a member of the user group.
\r
1656 * @param userGroupId the primary key of the user group
\r
1657 * @param userId the primary key of the user
\r
1658 * @return <code>true</code> if the user is a member of the user group;
\r
1659 <code>false</code> otherwise
\r
1660 * @throws SystemException if a system exception occurred
\r
1662 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1663 public boolean hasUserGroupUser(long userGroupId, long userId)
\r
1664 throws com.liferay.portal.kernel.exception.SystemException;
\r
1667 * Returns <code>true</code> if the user's password is expired.
\r
1669 * @param user the user
\r
1670 * @return <code>true</code> if the user's password is expired;
\r
1671 <code>false</code> otherwise
\r
1672 * @throws PortalException if the password policy for the user could not be
\r
1674 * @throws SystemException if a system exception occurred
\r
1676 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1677 public boolean isPasswordExpired(com.liferay.portal.model.User user)
\r
1678 throws com.liferay.portal.kernel.exception.PortalException,
\r
1679 com.liferay.portal.kernel.exception.SystemException;
\r
1682 * Returns <code>true</code> if the user's password is expiring soon.
\r
1684 * @param user the user
\r
1685 * @return <code>true</code> if the user's password is expiring soon;
\r
1686 <code>false</code> otherwise
\r
1687 * @throws PortalException if the password policy for the user could not be
\r
1689 * @throws SystemException if a system exception occurred
\r
1691 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1692 public boolean isPasswordExpiringSoon(com.liferay.portal.model.User user)
\r
1693 throws com.liferay.portal.kernel.exception.PortalException,
\r
1694 com.liferay.portal.kernel.exception.SystemException;
\r
1696 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1697 public com.liferay.portal.model.User loadGetDefaultUser(long companyId)
\r
1698 throws com.liferay.portal.kernel.exception.PortalException,
\r
1699 com.liferay.portal.kernel.exception.SystemException;
\r
1702 * Returns an ordered range of all the users who match the keywords and
\r
1703 * status, without using the indexer. It is preferable to use the indexed
\r
1704 * version {@link #search(long, String, int, LinkedHashMap, int, int, Sort)}
\r
1705 * instead of this method wherever possible for performance reasons.
\r
1708 * Useful when paginating results. Returns a maximum of <code>end -
\r
1709 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1710 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1711 * refers to the first result in the set. Setting both <code>start</code>
\r
1712 * and <code>end</code> to {@link
\r
1713 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1717 * @param companyId the primary key of the user's company
\r
1718 * @param keywords the keywords (space separated), which may occur in the
\r
1719 user's first name, middle name, last name, screen name, or email
\r
1721 * @param status the workflow status
\r
1722 * @param params the finder parameters (optionally <code>null</code>). For
\r
1723 more information see {@link
\r
1724 com.liferay.portal.service.persistence.UserFinder}.
\r
1725 * @param start the lower bound of the range of users
\r
1726 * @param end the upper bound of the range of users (not inclusive)
\r
1727 * @param obc the comparator to order the users by (optionally
\r
1728 <code>null</code>)
\r
1729 * @return the matching users
\r
1730 * @throws SystemException if a system exception occurred
\r
1731 * @see com.liferay.portal.service.persistence.UserFinder
\r
1733 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1734 public java.util.List<com.liferay.portal.model.User> search(
\r
1735 long companyId, java.lang.String keywords, int status,
\r
1736 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
\r
1737 int start, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
\r
1738 throws com.liferay.portal.kernel.exception.SystemException;
\r
1741 * Returns an ordered range of all the users who match the keywords and
\r
1742 * status, using the indexer. It is preferable to use this method instead of
\r
1743 * the non-indexed version whenever possible for performance reasons.
\r
1746 * Useful when paginating results. Returns a maximum of <code>end -
\r
1747 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1748 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1749 * refers to the first result in the set. Setting both <code>start</code>
\r
1750 * and <code>end</code> to {@link
\r
1751 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1755 * @param companyId the primary key of the user's company
\r
1756 * @param keywords the keywords (space separated), which may occur in the
\r
1757 user's first name, middle name, last name, screen name, or email
\r
1759 * @param status the workflow status
\r
1760 * @param params the indexer parameters (optionally <code>null</code>). For
\r
1761 more information see {@link
\r
1762 com.liferay.portlet.usersadmin.util.UserIndexer}.
\r
1763 * @param start the lower bound of the range of users
\r
1764 * @param end the upper bound of the range of users (not inclusive)
\r
1765 * @param sort the field and direction to sort by (optionally
\r
1766 <code>null</code>)
\r
1767 * @return the matching users
\r
1768 * @throws SystemException if a system exception occurred
\r
1769 * @see com.liferay.portlet.usersadmin.util.UserIndexer
\r
1771 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1772 public com.liferay.portal.kernel.search.Hits search(long companyId,
\r
1773 java.lang.String keywords, int status,
\r
1774 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
\r
1775 int start, int end, com.liferay.portal.kernel.search.Sort sort)
\r
1776 throws com.liferay.portal.kernel.exception.SystemException;
\r
1779 * Returns an ordered range of all the users with the status, and whose
\r
1780 * first name, middle name, last name, screen name, and email address match
\r
1781 * the keywords specified for them, without using the indexer. It is
\r
1782 * preferable to use the indexed version {@link #search(long, String,
\r
1783 * String, String, String, String, int, LinkedHashMap, boolean, int, int,
\r
1784 * Sort)} instead of this method wherever possible for performance reasons.
\r
1787 * Useful when paginating results. Returns a maximum of <code>end -
\r
1788 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1789 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1790 * refers to the first result in the set. Setting both <code>start</code>
\r
1791 * and <code>end</code> to {@link
\r
1792 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1796 * @param companyId the primary key of the user's company
\r
1797 * @param firstName the first name keywords (space separated)
\r
1798 * @param middleName the middle name keywords
\r
1799 * @param lastName the last name keywords
\r
1800 * @param screenName the screen name keywords
\r
1801 * @param emailAddress the email address keywords
\r
1802 * @param status the workflow status
\r
1803 * @param params the finder parameters (optionally <code>null</code>). For
\r
1804 more information see {@link
\r
1805 com.liferay.portal.service.persistence.UserFinder}.
\r
1806 * @param andSearch whether every field must match its keywords, or just
\r
1807 one field. For example, "users with the first name 'bob' and
\r
1808 last name 'smith'" vs "users with the first name 'bob'
\r
1809 or the last name 'smith'".
\r
1810 * @param start the lower bound of the range of users
\r
1811 * @param end the upper bound of the range of users (not inclusive)
\r
1812 * @param obc the comparator to order the users by (optionally
\r
1813 <code>null</code>)
\r
1814 * @return the matching users
\r
1815 * @throws SystemException if a system exception occurred
\r
1816 * @see com.liferay.portal.service.persistence.UserFinder
\r
1818 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1819 public java.util.List<com.liferay.portal.model.User> search(
\r
1820 long companyId, java.lang.String firstName,
\r
1821 java.lang.String middleName, java.lang.String lastName,
\r
1822 java.lang.String screenName, java.lang.String emailAddress, int status,
\r
1823 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
\r
1824 boolean andSearch, int start, int end,
\r
1825 com.liferay.portal.kernel.util.OrderByComparator obc)
\r
1826 throws com.liferay.portal.kernel.exception.SystemException;
\r
1829 * Returns an ordered range of all the users with the status, and whose
\r
1830 * first name, middle name, last name, screen name, and email address match
\r
1831 * the keywords specified for them, using the indexer. It is preferable to
\r
1832 * use this method instead of the non-indexed version whenever possible for
\r
1833 * performance reasons.
\r
1836 * Useful when paginating results. Returns a maximum of <code>end -
\r
1837 * start</code> instances. <code>start</code> and <code>end</code> are not
\r
1838 * primary keys, they are indexes in the result set. Thus, <code>0</code>
\r
1839 * refers to the first result in the set. Setting both <code>start</code>
\r
1840 * and <code>end</code> to {@link
\r
1841 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full
\r
1845 * @param companyId the primary key of the user's company
\r
1846 * @param firstName the first name keywords (space separated)
\r
1847 * @param middleName the middle name keywords
\r
1848 * @param lastName the last name keywords
\r
1849 * @param screenName the screen name keywords
\r
1850 * @param emailAddress the email address keywords
\r
1851 * @param status the workflow status
\r
1852 * @param params the indexer parameters (optionally <code>null</code>). For
\r
1853 more information see {@link
\r
1854 com.liferay.portlet.usersadmin.util.UserIndexer}.
\r
1855 * @param andSearch whether every field must match its keywords, or just
\r
1856 one field. For example, "users with the first name 'bob' and
\r
1857 last name 'smith'" vs "users with the first name 'bob'
\r
1858 or the last name 'smith'".
\r
1859 * @param start the lower bound of the range of users
\r
1860 * @param end the upper bound of the range of users (not inclusive)
\r
1861 * @param sort the field and direction to sort by (optionally
\r
1862 <code>null</code>)
\r
1863 * @return the matching users
\r
1864 * @throws SystemException if a system exception occurred
\r
1865 * @see com.liferay.portlet.usersadmin.util.UserIndexer
\r
1867 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1868 public com.liferay.portal.kernel.search.Hits search(long companyId,
\r
1869 java.lang.String firstName, java.lang.String middleName,
\r
1870 java.lang.String lastName, java.lang.String screenName,
\r
1871 java.lang.String emailAddress, int status,
\r
1872 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
\r
1873 boolean andSearch, int start, int end,
\r
1874 com.liferay.portal.kernel.search.Sort sort)
\r
1875 throws com.liferay.portal.kernel.exception.SystemException;
\r
1878 * Returns the number of users who match the keywords and status.
\r
1880 * @param companyId the primary key of the user's company
\r
1881 * @param keywords the keywords (space separated), which may occur in the
\r
1882 user's first name, middle name, last name, screen name, or email
\r
1884 * @param status the workflow status
\r
1885 * @param params the finder parameters (optionally <code>null</code>). For
\r
1886 more information see {@link
\r
1887 com.liferay.portal.service.persistence.UserFinder}.
\r
1888 * @return the number matching users
\r
1889 * @throws SystemException if a system exception occurred
\r
1891 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1892 public int searchCount(long companyId, java.lang.String keywords,
\r
1894 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params)
\r
1895 throws com.liferay.portal.kernel.exception.SystemException;
\r
1898 * Returns the number of users with the status, and whose first name, middle
\r
1899 * name, last name, screen name, and email address match the keywords
\r
1900 * specified for them.
\r
1902 * @param companyId the primary key of the user's company
\r
1903 * @param firstName the first name keywords (space separated)
\r
1904 * @param middleName the middle name keywords
\r
1905 * @param lastName the last name keywords
\r
1906 * @param screenName the screen name keywords
\r
1907 * @param emailAddress the email address keywords
\r
1908 * @param status the workflow status
\r
1909 * @param params the finder parameters (optionally <code>null</code>). For
\r
1910 more information see {@link
\r
1911 com.liferay.portal.service.persistence.UserFinder}.
\r
1912 * @param andSearch whether every field must match its keywords, or just
\r
1913 one field. For example, "users with the first name 'bob' and
\r
1914 last name 'smith'" vs "users with the first name 'bob'
\r
1915 or the last name 'smith'".
\r
1916 * @return the number of matching users
\r
1917 * @throws SystemException if a system exception occurred
\r
1919 @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
\r
1920 public int searchCount(long companyId, java.lang.String firstName,
\r
1921 java.lang.String middleName, java.lang.String lastName,
\r
1922 java.lang.String screenName, java.lang.String emailAddress, int status,
\r
1923 java.util.LinkedHashMap<java.lang.String, java.lang.Object> params,
\r
1924 boolean andSearch)
\r
1925 throws com.liferay.portal.kernel.exception.SystemException;
\r
1928 * Sends an email address verification to the user.
\r
1930 * @param user the verification email recipient
\r
1931 * @param emailAddress the recipient's email address
\r
1932 * @param serviceContext the service context. Must set the portal URL, main
\r
1933 path, primary key of the layout, remote address, remote host, and
\r
1934 agent for the user.
\r
1935 * @throws PortalException if a portal exception occurred
\r
1936 * @throws SystemException if a system exception occurred
\r
1938 public void sendEmailAddressVerification(
\r
1939 com.liferay.portal.model.User user, java.lang.String emailAddress,
\r
1940 com.liferay.portal.service.ServiceContext serviceContext)
\r
1941 throws com.liferay.portal.kernel.exception.PortalException,
\r
1942 com.liferay.portal.kernel.exception.SystemException;
\r
1945 * Sends the password email to the user with the email address. The content
\r
1946 * of this email can be specified in <code>portal.properties</code> with the
\r
1947 * <code>admin.email.password</code> keys.
\r
1949 * @param companyId the primary key of the user's company
\r
1950 * @param emailAddress the user's email address
\r
1951 * @param fromName the name of the individual that the email should be from
\r
1952 * @param fromAddress the address of the individual that the email should
\r
1954 * @param subject the email subject. If <code>null</code>, the subject
\r
1955 specified in <code>portal.properties</code> will be used.
\r
1956 * @param body the email body. If <code>null</code>, the body specified in
\r
1957 <code>portal.properties</code> will be used.
\r
1958 * @param serviceContext the user's service context
\r
1959 * @throws PortalException if a user with the email address could not be
\r
1961 * @throws SystemException if a system exception occurred
\r
1963 public void sendPassword(long companyId, java.lang.String emailAddress,
\r
1964 java.lang.String fromName, java.lang.String fromAddress,
\r
1965 java.lang.String subject, java.lang.String body,
\r
1966 com.liferay.portal.service.ServiceContext serviceContext)
\r
1967 throws com.liferay.portal.kernel.exception.PortalException,
\r
1968 com.liferay.portal.kernel.exception.SystemException;
\r
1971 * Sets the users in the role, removing and adding users to the role as
\r
1974 * @param roleId the primary key of the role
\r
1975 * @param userIds the primary keys of the users
\r
1976 * @throws PortalException if a portal exception occurred
\r
1977 * @throws SystemException if a system exception occurred
\r
1979 public void setRoleUsers(long roleId, long[] userIds)
\r
1980 throws com.liferay.portal.kernel.exception.PortalException,
\r
1981 com.liferay.portal.kernel.exception.SystemException;
\r
1984 * Sets the users in the user group, removing and adding users to the user
\r
1985 * group as necessary.
\r
1987 * @param userGroupId the primary key of the user group
\r
1988 * @param userIds the primary keys of the users
\r
1989 * @throws PortalException if a portal exception occurred
\r
1990 * @throws SystemException if a system exception occurred
\r
1992 public void setUserGroupUsers(long userGroupId, long[] userIds)
\r
1993 throws com.liferay.portal.kernel.exception.PortalException,
\r
1994 com.liferay.portal.kernel.exception.SystemException;
\r
1997 * Removes the users from the teams of a group.
\r
1999 * @param groupId the primary key of the group
\r
2000 * @param userIds the primary keys of the users
\r
2001 * @throws PortalException if a portal exception occurred
\r
2002 * @throws SystemException if a system exception occurred
\r
2004 public void unsetGroupTeamsUsers(long groupId, long[] userIds)
\r
2005 throws com.liferay.portal.kernel.exception.PortalException,
\r
2006 com.liferay.portal.kernel.exception.SystemException;
\r
2009 * Removes the users from the group.
\r
2011 * @param groupId the primary key of the group
\r
2012 * @param userIds the primary keys of the users
\r
2013 * @throws PortalException if a portal exception occurred
\r
2014 * @throws SystemException if a system exception occurred
\r
2016 public void unsetGroupUsers(long groupId, long[] userIds,
\r
2017 com.liferay.portal.service.ServiceContext serviceContext)
\r
2018 throws com.liferay.portal.kernel.exception.PortalException,
\r
2019 com.liferay.portal.kernel.exception.SystemException;
\r
2022 * Removes the users from the organization.
\r
2024 * @param organizationId the primary key of the organization
\r
2025 * @param userIds the primary keys of the users
\r
2026 * @throws PortalException if a portal exception occurred
\r
2027 * @throws SystemException if a system exception occurred
\r
2029 public void unsetOrganizationUsers(long organizationId, long[] userIds)
\r
2030 throws com.liferay.portal.kernel.exception.PortalException,
\r
2031 com.liferay.portal.kernel.exception.SystemException;
\r
2034 * Removes the users from the password policy.
\r
2036 * @param passwordPolicyId the primary key of the password policy
\r
2037 * @param userIds the primary keys of the users
\r
2038 * @throws SystemException if a system exception occurred
\r
2040 public void unsetPasswordPolicyUsers(long passwordPolicyId, long[] userIds)
\r
2041 throws com.liferay.portal.kernel.exception.SystemException;
\r
2044 * Removes the users from the role.
\r
2046 * @param roleId the primary key of the role
\r
2047 * @param users the users
\r
2048 * @throws PortalException if a portal exception occurred
\r
2049 * @throws SystemException if a system exception occurred
\r
2051 public void unsetRoleUsers(long roleId,
\r
2052 java.util.List<com.liferay.portal.model.User> users)
\r
2053 throws com.liferay.portal.kernel.exception.PortalException,
\r
2054 com.liferay.portal.kernel.exception.SystemException;
\r
2057 * Removes the users from the role.
\r
2059 * @param roleId the primary key of the role
\r
2060 * @param userIds the primary keys of the users
\r
2061 * @throws PortalException if a portal exception occurred
\r
2062 * @throws SystemException if a system exception occurred
\r
2064 public void unsetRoleUsers(long roleId, long[] userIds)
\r
2065 throws com.liferay.portal.kernel.exception.PortalException,
\r
2066 com.liferay.portal.kernel.exception.SystemException;
\r
2069 * Removes the users from the team.
\r
2071 * @param teamId the primary key of the team
\r
2072 * @param userIds the primary keys of the users
\r
2073 * @throws PortalException if a portal exception occurred
\r
2074 * @throws SystemException if a system exception occurred
\r
2076 public void unsetTeamUsers(long teamId, long[] userIds)
\r
2077 throws com.liferay.portal.kernel.exception.PortalException,
\r
2078 com.liferay.portal.kernel.exception.SystemException;
\r
2081 * Removes the users from the user group.
\r
2083 * @param userGroupId the primary key of the user group
\r
2084 * @param userIds the primary keys of the users
\r
2085 * @throws PortalException if a portal exception occurred
\r
2086 * @throws SystemException if a system exception occurred
\r
2088 public void unsetUserGroupUsers(long userGroupId, long[] userIds)
\r
2089 throws com.liferay.portal.kernel.exception.PortalException,
\r
2090 com.liferay.portal.kernel.exception.SystemException;
\r
2093 * Updates whether the user has agreed to the terms of use.
\r
2095 * @param userId the primary key of the user
\r
2096 * @param agreedToTermsOfUse whether the user has agreet to the terms of
\r
2098 * @return the user
\r
2099 * @throws PortalException if a user with the primary key could not be found
\r
2100 * @throws SystemException if a system exception occurred
\r
2102 public com.liferay.portal.model.User updateAgreedToTermsOfUse(long userId,
\r
2103 boolean agreedToTermsOfUse)
\r
2104 throws com.liferay.portal.kernel.exception.PortalException,
\r
2105 com.liferay.portal.kernel.exception.SystemException;
\r
2108 * Updates the user's asset with the new asset categories and tag names,
\r
2109 * removing and adding asset categories and tag names as necessary.
\r
2111 * @param userId the primary key of the user
\r
2112 * @param user ID the primary key of the user
\r
2113 * @param assetCategoryIds the primary key's of the new asset categories
\r
2114 * @param assetTagNames the new asset tag names
\r
2115 * @throws PortalException if a user with the primary key could not be found
\r
2116 * @throws SystemException if a system exception occurred
\r
2118 public void updateAsset(long userId, com.liferay.portal.model.User user,
\r
2119 long[] assetCategoryIds, java.lang.String[] assetTagNames)
\r
2120 throws com.liferay.portal.kernel.exception.PortalException,
\r
2121 com.liferay.portal.kernel.exception.SystemException;
\r
2124 * Updates the user's creation date.
\r
2126 * @param userId the primary key of the user
\r
2127 * @param createDate the new creation date
\r
2128 * @return the user
\r
2129 * @throws PortalException if a user with the primary key could not be found
\r
2130 * @throws SystemException if a system exception occurred
\r
2132 public com.liferay.portal.model.User updateCreateDate(long userId,
\r
2133 java.util.Date createDate)
\r
2134 throws com.liferay.portal.kernel.exception.PortalException,
\r
2135 com.liferay.portal.kernel.exception.SystemException;
\r
2138 * Updates the user's email address.
\r
2140 * @param userId the primary key of the user
\r
2141 * @param password the user's password
\r
2142 * @param emailAddress1 the user's new email address
\r
2143 * @param emailAddress2 the user's new email address confirmation
\r
2144 * @return the user
\r
2145 * @throws PortalException if a user with the primary key could not be found
\r
2146 * @throws SystemException if a system exception occurred
\r
2148 public com.liferay.portal.model.User updateEmailAddress(long userId,
\r
2149 java.lang.String password, java.lang.String emailAddress1,
\r
2150 java.lang.String emailAddress2)
\r
2151 throws com.liferay.portal.kernel.exception.PortalException,
\r
2152 com.liferay.portal.kernel.exception.SystemException;
\r
2155 * Updates the user's email address or sends verification email.
\r
2157 * @param userId the primary key of the user
\r
2158 * @param password the user's password
\r
2159 * @param emailAddress1 the user's new email address
\r
2160 * @param emailAddress2 the user's new email address confirmation
\r
2161 * @return the user
\r
2162 * @throws PortalException if a user with the primary key could not be found
\r
2163 * @throws SystemException if a system exception occurred
\r
2165 public com.liferay.portal.model.User updateEmailAddress(long userId,
\r
2166 java.lang.String password, java.lang.String emailAddress1,
\r
2167 java.lang.String emailAddress2,
\r
2168 com.liferay.portal.service.ServiceContext serviceContext)
\r
2169 throws com.liferay.portal.kernel.exception.PortalException,
\r
2170 com.liferay.portal.kernel.exception.SystemException;
\r
2173 * Updates whether the user has verified email address.
\r
2175 * @param userId the primary key of the user
\r
2176 * @param emailAddressVerified whether the user has verified email address
\r
2177 * @return the user
\r
2178 * @throws PortalException if a user with the primary key could not be found
\r
2179 * @throws SystemException if a system exception occurred
\r
2181 public com.liferay.portal.model.User updateEmailAddressVerified(
\r
2182 long userId, boolean emailAddressVerified)
\r
2183 throws com.liferay.portal.kernel.exception.PortalException,
\r
2184 com.liferay.portal.kernel.exception.SystemException;
\r
2187 * Updates the user's Facebook ID.
\r
2189 * @param userId the primary key of the user
\r
2190 * @param facebookId the user's new Facebook ID
\r
2191 * @return the user
\r
2192 * @throws PortalException if a user with the primary key could not be found
\r
2193 * @throws SystemException if a system exception occurred
\r
2195 public com.liferay.portal.model.User updateFacebookId(long userId,
\r
2197 throws com.liferay.portal.kernel.exception.PortalException,
\r
2198 com.liferay.portal.kernel.exception.SystemException;
\r
2201 * Sets the groups the user is in, removing and adding groups as necessary.
\r
2203 * @param userId the primary key of the user
\r
2204 * @param newGroupIds the primary keys of the groups
\r
2205 * @throws PortalException if a portal exception occurred
\r
2206 * @throws SystemException if a system exception occurred
\r
2208 public void updateGroups(long userId, long[] newGroupIds,
\r
2209 com.liferay.portal.service.ServiceContext serviceContext)
\r
2210 throws com.liferay.portal.kernel.exception.PortalException,
\r
2211 com.liferay.portal.kernel.exception.SystemException;
\r
2214 * Updates a user account that was automatically created when a guest user
\r
2215 * participated in an action (e.g. posting a comment) and only provided his
\r
2216 * name and email address.
\r
2218 * @param creatorUserId the primary key of the creator
\r
2219 * @param companyId the primary key of the user's company
\r
2220 * @param autoPassword whether a password should be automatically generated
\r
2222 * @param password1 the user's password
\r
2223 * @param password2 the user's password confirmation
\r
2224 * @param autoScreenName whether a screen name should be automatically
\r
2225 generated for the user
\r
2226 * @param screenName the user's screen name
\r
2227 * @param emailAddress the user's email address
\r
2228 * @param facebookId the user's facebook ID
\r
2229 * @param openId the user's OpenID
\r
2230 * @param locale the user's locale
\r
2231 * @param firstName the user's first name
\r
2232 * @param middleName the user's middle name
\r
2233 * @param lastName the user's last name
\r
2234 * @param prefixId the user's name prefix ID
\r
2235 * @param suffixId the user's name suffix ID
\r
2236 * @param male whether the user is male
\r
2237 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for
\r
2239 * @param birthdayDay the user's birthday day
\r
2240 * @param birthdayYear the user's birthday year
\r
2241 * @param jobTitle the user's job title
\r
2242 * @param updateUserInformation whether to update the user's information
\r
2243 * @param sendEmail whether to send the user an email notification about
\r
2245 * @param serviceContext the user's service context (optionally
\r
2246 <code>null</code>). Can set expando bridge attributes for the
\r
2248 * @return the user
\r
2249 * @throws PortalException if the user's information was invalid
\r
2250 * @throws SystemException if a system exception occurred
\r
2252 public com.liferay.portal.model.User updateIncompleteUser(
\r
2253 long creatorUserId, long companyId, boolean autoPassword,
\r
2254 java.lang.String password1, java.lang.String password2,
\r
2255 boolean autoScreenName, java.lang.String screenName,
\r
2256 java.lang.String emailAddress, long facebookId,
\r
2257 java.lang.String openId, java.util.Locale locale,
\r
2258 java.lang.String firstName, java.lang.String middleName,
\r
2259 java.lang.String lastName, int prefixId, int suffixId, boolean male,
\r
2260 int birthdayMonth, int birthdayDay, int birthdayYear,
\r
2261 java.lang.String jobTitle, boolean updateUserInformation,
\r
2262 boolean sendEmail,
\r
2263 com.liferay.portal.service.ServiceContext serviceContext)
\r
2264 throws com.liferay.portal.kernel.exception.PortalException,
\r
2265 com.liferay.portal.kernel.exception.SystemException;
\r
2268 * Updates the user's job title.
\r
2270 * @param userId the primary key of the user
\r
2271 * @param jobTitle the user's job title
\r
2272 * @return the user
\r
2273 * @throws PortalException if a user with the primary key could not be found
\r
2274 or if a contact could not be found matching the user's contact ID
\r
2275 * @throws SystemException if a system exception occurred
\r
2277 public com.liferay.portal.model.User updateJobTitle(long userId,
\r
2278 java.lang.String jobTitle)
\r
2279 throws com.liferay.portal.kernel.exception.PortalException,
\r
2280 com.liferay.portal.kernel.exception.SystemException;
\r
2283 * Updates the user's last login with the current time and the IP address.
\r
2285 * @param userId the primary key of the user
\r
2286 * @param loginIP the IP address the user logged in from
\r
2287 * @return the user
\r
2288 * @throws PortalException if a user with the primary key could not be found
\r
2289 * @throws SystemException if a system exception occurred
\r
2291 public com.liferay.portal.model.User updateLastLogin(long userId,
\r
2292 java.lang.String loginIP)
\r
2293 throws com.liferay.portal.kernel.exception.PortalException,
\r
2294 com.liferay.portal.kernel.exception.SystemException;
\r
2297 * Updates whether the user is locked out from logging in.
\r
2299 * @param user the user
\r
2300 * @param lockout whether the user is locked out
\r
2301 * @return the user
\r
2302 * @throws PortalException if a portal exception occurred
\r
2303 * @throws SystemException if a system exception occurred
\r
2305 public com.liferay.portal.model.User updateLockout(
\r
2306 com.liferay.portal.model.User user, boolean lockout)
\r
2307 throws com.liferay.portal.kernel.exception.PortalException,
\r
2308 com.liferay.portal.kernel.exception.SystemException;
\r
2311 * Updates whether the user is locked out from logging in.
\r
2313 * @param companyId the primary key of the user's company
\r
2314 * @param emailAddress the user's email address
\r
2315 * @param lockout whether the user is locked out
\r
2316 * @return the user
\r
2317 * @throws PortalException if a user with the email address could not be
\r
2319 * @throws SystemException if a system exception occurred
\r
2321 public com.liferay.portal.model.User updateLockoutByEmailAddress(
\r
2322 long companyId, java.lang.String emailAddress, boolean lockout)
\r
2323 throws com.liferay.portal.kernel.exception.PortalException,
\r
2324 com.liferay.portal.kernel.exception.SystemException;
\r
2327 * Updates whether the user is locked out from logging in.
\r
2329 * @param userId the primary key of the user
\r
2330 * @param lockout whether the user is locked out
\r
2331 * @return the user
\r
2332 * @throws PortalException if a user with the primary key could not be found
\r
2333 * @throws SystemException if a system exception occurred
\r
2335 public com.liferay.portal.model.User updateLockoutById(long userId,
\r
2337 throws com.liferay.portal.kernel.exception.PortalException,
\r
2338 com.liferay.portal.kernel.exception.SystemException;
\r
2341 * Updates whether the user is locked out from logging in.
\r
2343 * @param companyId the primary key of the user's company
\r
2344 * @param screenName the user's screen name
\r
2345 * @param lockout whether the user is locked out
\r
2346 * @return the user
\r
2347 * @throws PortalException if a user with the screen name could not be found
\r
2348 * @throws SystemException if a system exception occurred
\r
2350 public com.liferay.portal.model.User updateLockoutByScreenName(
\r
2351 long companyId, java.lang.String screenName, boolean lockout)
\r
2352 throws com.liferay.portal.kernel.exception.PortalException,
\r
2353 com.liferay.portal.kernel.exception.SystemException;
\r
2356 * Updates the user's modified date.
\r
2358 * @param userId the primary key of the user
\r
2359 * @param modifiedDate the new modified date
\r
2360 * @return the user
\r
2361 * @throws PortalException if a user with the primary key could not be found
\r
2362 * @throws SystemException if a system exception occurred
\r
2364 public com.liferay.portal.model.User updateModifiedDate(long userId,
\r
2365 java.util.Date modifiedDate)
\r
2366 throws com.liferay.portal.kernel.exception.PortalException,
\r
2367 com.liferay.portal.kernel.exception.SystemException;
\r
2370 * Updates the user's OpenID.
\r
2372 * @param userId the primary key of the user
\r
2373 * @param openId the new OpenID
\r
2374 * @return the user
\r
2375 * @throws PortalException if a user with the primary key could not be found
\r
2376 * @throws SystemException if a system exception occurred
\r
2378 public com.liferay.portal.model.User updateOpenId(long userId,
\r
2379 java.lang.String openId)
\r
2380 throws com.liferay.portal.kernel.exception.PortalException,
\r
2381 com.liferay.portal.kernel.exception.SystemException;
\r
2384 * Sets the organizations that the user is in, removing and adding
\r
2385 * organizations as necessary.
\r
2387 * @param userId the primary key of the user
\r
2388 * @param newOrganizationIds the primary keys of the organizations
\r
2389 * @throws PortalException if a user with the primary key could not be found
\r
2390 * @throws SystemException if a system exception occurred
\r
2392 public void updateOrganizations(long userId, long[] newOrganizationIds,
\r
2393 com.liferay.portal.service.ServiceContext serviceContext)
\r
2394 throws com.liferay.portal.kernel.exception.PortalException,
\r
2395 com.liferay.portal.kernel.exception.SystemException;
\r
2398 * Updates the user's password without tracking or validation of the change.
\r
2400 * @param userId the primary key of the user
\r
2401 * @param password1 the user's new password
\r
2402 * @param password2 the user's new password confirmation
\r
2403 * @param passwordReset whether the user should be asked to reset their
\r
2404 password the next time they log in
\r
2405 * @return the user
\r
2406 * @throws PortalException if a user with the primary key could not be found
\r
2407 * @throws SystemException if a system exception occurred
\r
2409 public com.liferay.portal.model.User updatePassword(long userId,
\r
2410 java.lang.String password1, java.lang.String password2,
\r
2411 boolean passwordReset)
\r
2412 throws com.liferay.portal.kernel.exception.PortalException,
\r
2413 com.liferay.portal.kernel.exception.SystemException;
\r
2416 * Updates the user's password, optionally with tracking and validation of
\r
2419 * @param userId the primary key of the user
\r
2420 * @param password1 the user's new password
\r
2421 * @param password2 the user's new password confirmation
\r
2422 * @param passwordReset whether the user should be asked to reset their
\r
2423 password the next time they login
\r
2424 * @param silentUpdate whether the password should be updated without being
\r
2425 tracked, or validated. Primarily used for password imports.
\r
2426 * @return the user
\r
2427 * @throws PortalException if a user with the primary key could not be found
\r
2428 * @throws SystemException if a system exception occurred
\r
2430 public com.liferay.portal.model.User updatePassword(long userId,
\r
2431 java.lang.String password1, java.lang.String password2,
\r
2432 boolean passwordReset, boolean silentUpdate)
\r
2433 throws com.liferay.portal.kernel.exception.PortalException,
\r
2434 com.liferay.portal.kernel.exception.SystemException;
\r
2437 * Updates the user's password with manually input information. This method
\r
2438 * should only be used when performing maintenance.
\r
2440 * @param userId the primary key of the user
\r
2441 * @param password the user's new password
\r
2442 * @param passwordEncrypted the user's new encrypted password
\r
2443 * @param passwordReset whether the user should be asked to reset their
\r
2444 password the next time they login
\r
2445 * @param passwordModifiedDate the new password modified date
\r
2446 * @return the user
\r
2447 * @throws PortalException if a user with the primary key could not be found
\r
2448 * @throws SystemException if a system exception occurred
\r
2450 public com.liferay.portal.model.User updatePasswordManually(long userId,
\r
2451 java.lang.String password, boolean passwordEncrypted,
\r
2452 boolean passwordReset, java.util.Date passwordModifiedDate)
\r
2453 throws com.liferay.portal.kernel.exception.PortalException,
\r
2454 com.liferay.portal.kernel.exception.SystemException;
\r
2457 * Updates whether the user should be asked to reset their password the next
\r
2458 * time they login.
\r
2460 * @param userId the primary key of the user
\r
2461 * @param passwordReset whether the user should be asked to reset their
\r
2462 password the next time they login
\r
2463 * @return the user
\r
2464 * @throws PortalException if a user with the primary key could not be found
\r
2465 * @throws SystemException if a system exception occurred
\r
2467 public com.liferay.portal.model.User updatePasswordReset(long userId,
\r
2468 boolean passwordReset)
\r
2469 throws com.liferay.portal.kernel.exception.PortalException,
\r
2470 com.liferay.portal.kernel.exception.SystemException;
\r
2473 * Updates the user's portrait image.
\r
2475 * @param userId the primary key of the user
\r
2476 * @param bytes the new portrait image data
\r
2477 * @return the user
\r
2478 * @throws PortalException if a user with the primary key could not be found
\r
2479 or if the new portrait was invalid
\r
2480 * @throws SystemException if a system exception occurred
\r
2482 public com.liferay.portal.model.User updatePortrait(long userId,
\r
2484 throws com.liferay.portal.kernel.exception.PortalException,
\r
2485 com.liferay.portal.kernel.exception.SystemException;
\r
2488 * Updates the user's password reset question and answer.
\r
2490 * @param userId the primary key of the user
\r
2491 * @param question the user's new password reset question
\r
2492 * @param answer the user's new password reset answer
\r
2493 * @return the user
\r
2494 * @throws PortalException if a user with the primary key could not be found
\r
2495 or if the new question or answer were invalid
\r
2496 * @throws SystemException if a system exception occurred
\r
2498 public com.liferay.portal.model.User updateReminderQuery(long userId,
\r
2499 java.lang.String question, java.lang.String answer)
\r
2500 throws com.liferay.portal.kernel.exception.PortalException,
\r
2501 com.liferay.portal.kernel.exception.SystemException;
\r
2504 * Updates the user's screen name.
\r
2506 * @param userId the primary key of the user
\r
2507 * @param screenName the user's new screen name
\r
2508 * @return the user
\r
2509 * @throws PortalException if a user with the primary key could not be found
\r
2510 or if the new screen name was invalid
\r
2511 * @throws SystemException if a system exception occurred
\r
2513 public com.liferay.portal.model.User updateScreenName(long userId,
\r
2514 java.lang.String screenName)
\r
2515 throws com.liferay.portal.kernel.exception.PortalException,
\r
2516 com.liferay.portal.kernel.exception.SystemException;
\r
2519 * Updates the user's workflow status.
\r
2521 * @param userId the primary key of the user
\r
2522 * @param status the user's new workflow status
\r
2523 * @return the user
\r
2524 * @throws PortalException if a user with the primary key could not be found
\r
2525 * @throws SystemException if a system exception occurred
\r
2527 public com.liferay.portal.model.User updateStatus(long userId, int status)
\r
2528 throws com.liferay.portal.kernel.exception.PortalException,
\r
2529 com.liferay.portal.kernel.exception.SystemException;
\r
2532 * Updates the user.
\r
2534 * @param userId the primary key of the user
\r
2535 * @param oldPassword the user's old password
\r
2536 * @param newPassword1 the user's new password (optionally
\r
2537 <code>null</code>)
\r
2538 * @param newPassword2 the user's new password confirmation (optionally
\r
2539 <code>null</code>)
\r
2540 * @param passwordReset whether the user should be asked to reset their
\r
2541 password the next time they login
\r
2542 * @param reminderQueryQuestion the user's new password reset question
\r
2543 * @param reminderQueryAnswer the user's new password reset answer
\r
2544 * @param screenName the user's new screen name
\r
2545 * @param emailAddress the user's new email address
\r
2546 * @param facebookId the user's new Facebook ID
\r
2547 * @param openId the user's new OpenID
\r
2548 * @param languageId the user's new language ID
\r
2549 * @param timeZoneId the user's new time zone ID
\r
2550 * @param greeting the user's new greeting
\r
2551 * @param comments the user's new comments
\r
2552 * @param firstName the user's new first name
\r
2553 * @param middleName the user's new middle name
\r
2554 * @param lastName the user's new last name
\r
2555 * @param prefixId the user's new name prefix ID
\r
2556 * @param suffixId the user's new name suffix ID
\r
2557 * @param male whether user is male
\r
2558 * @param birthdayMonth the user's new birthday month (0-based, meaning 0
\r
2560 * @param birthdayDay the user's new birthday day
\r
2561 * @param birthdayYear the user's birthday year
\r
2562 * @param smsSn the user's new SMS screen name
\r
2563 * @param aimSn the user's new AIM screen name
\r
2564 * @param facebookSn the user's new Facebook screen name
\r
2565 * @param icqSn the user's new ICQ screen name
\r
2566 * @param jabberSn the user's new Jabber screen name
\r
2567 * @param msnSn the user's new MSN screen name
\r
2568 * @param mySpaceSn the user's new MySpace screen name
\r
2569 * @param skypeSn the user's new Skype screen name
\r
2570 * @param twitterSn the user's new Twitter screen name
\r
2571 * @param ymSn the user's new Yahoo! Messenger screen name
\r
2572 * @param jobTitle the user's new job title
\r
2573 * @param groupIds the primary keys of the user's groups
\r
2574 * @param organizationIds the primary keys of the user's organizations
\r
2575 * @param roleIds the primary keys of the user's roles
\r
2576 * @param userGroupRoles the user user's group roles
\r
2577 * @param userGroupIds the primary keys of the user's user groups
\r
2578 * @param serviceContext the user's service context (optionally
\r
2579 <code>null</code>). Can set the universally unique identifier
\r
2580 (with the <code>uuid</code> attribute), asset category IDs, asset
\r
2581 tag names, and expando bridge attributes for the user.
\r
2582 * @return the user
\r
2583 * @throws PortalException if a user with the primary key could not be found
\r
2584 or if the new information was invalid
\r
2585 * @throws SystemException if a system exception occurred
\r
2587 public com.liferay.portal.model.User updateUser(long userId,
\r
2588 java.lang.String oldPassword, java.lang.String newPassword1,
\r
2589 java.lang.String newPassword2, boolean passwordReset,
\r
2590 java.lang.String reminderQueryQuestion,
\r
2591 java.lang.String reminderQueryAnswer, java.lang.String screenName,
\r
2592 java.lang.String emailAddress, long facebookId,
\r
2593 java.lang.String openId, java.lang.String languageId,
\r
2594 java.lang.String timeZoneId, java.lang.String greeting,
\r
2595 java.lang.String comments, java.lang.String firstName,
\r
2596 java.lang.String middleName, java.lang.String lastName, int prefixId,
\r
2597 int suffixId, boolean male, int birthdayMonth, int birthdayDay,
\r
2598 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn,
\r
2599 java.lang.String facebookSn, java.lang.String icqSn,
\r
2600 java.lang.String jabberSn, java.lang.String msnSn,
\r
2601 java.lang.String mySpaceSn, java.lang.String skypeSn,
\r
2602 java.lang.String twitterSn, java.lang.String ymSn,
\r
2603 java.lang.String jobTitle, long[] groupIds, long[] organizationIds,
\r
2605 java.util.List<com.liferay.portal.model.UserGroupRole> userGroupRoles,
\r
2606 long[] userGroupIds,
\r
2607 com.liferay.portal.service.ServiceContext serviceContext)
\r
2608 throws com.liferay.portal.kernel.exception.PortalException,
\r
2609 com.liferay.portal.kernel.exception.SystemException;
\r
2612 * Verifies the email address of the ticket.
\r
2614 * @param ticketKey the ticket key
\r
2615 * @throws PortalException if a ticket matching the ticket key could not be
\r
2616 found, if the ticket has expired, if the ticket is an email
\r
2617 address ticket, or if the email address is invalid
\r
2618 * @throws SystemException if a system exception occurred
\r
2620 public void verifyEmailAddress(java.lang.String ticketKey)
\r
2621 throws com.liferay.portal.kernel.exception.PortalException,
\r
2622 com.liferay.portal.kernel.exception.SystemException;
\r