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