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