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