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