001 /** 002 * Copyright (c) 2000-present Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.kernel.service; 016 017 import aQute.bnd.annotation.ProviderType; 018 019 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil; 020 import com.liferay.portal.kernel.util.ReferenceRegistry; 021 022 /** 023 * Provides the remote service utility for User. This utility wraps 024 * {@link com.liferay.portal.service.impl.UserServiceImpl} and is the 025 * primary access point for service operations in application layer code running 026 * on a remote server. Methods of this service are expected to have security 027 * checks based on the propagated JAAS credentials because this service can be 028 * accessed remotely. 029 * 030 * @author Brian Wing Shun Chan 031 * @see UserService 032 * @see com.liferay.portal.service.base.UserServiceBaseImpl 033 * @see com.liferay.portal.service.impl.UserServiceImpl 034 * @generated 035 */ 036 @ProviderType 037 public class UserServiceUtil { 038 /* 039 * NOTE FOR DEVELOPERS: 040 * 041 * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.UserServiceImpl} and rerun ServiceBuilder to regenerate this class. 042 */ 043 044 /** 045 * Returns <code>true</code> if the user is a member of the group. 046 * 047 * @param groupId the primary key of the group 048 * @param userId the primary key of the user 049 * @return <code>true</code> if the user is a member of the group; 050 <code>false</code> otherwise 051 */ 052 public static boolean hasGroupUser(long groupId, long userId) 053 throws com.liferay.portal.kernel.exception.PortalException { 054 return getService().hasGroupUser(groupId, userId); 055 } 056 057 /** 058 * Returns <code>true</code> if the user has the role with the name, 059 * optionally through inheritance. 060 * 061 * @param companyId the primary key of the role's company 062 * @param name the name of the role (must be a regular role, not an 063 organization, site or provider role) 064 * @param userId the primary key of the user 065 * @param inherited whether to include roles inherited from organizations, 066 sites, etc. 067 * @return <code>true</code> if the user has the role; <code>false</code> 068 otherwise 069 */ 070 public static boolean hasRoleUser(long companyId, java.lang.String name, 071 long userId, boolean inherited) 072 throws com.liferay.portal.kernel.exception.PortalException { 073 return getService().hasRoleUser(companyId, name, userId, inherited); 074 } 075 076 /** 077 * Returns <code>true</code> if the user is a member of the role. 078 * 079 * @param roleId the primary key of the role 080 * @param userId the primary key of the user 081 * @return <code>true</code> if the user is a member of the role; 082 <code>false</code> otherwise 083 */ 084 public static boolean hasRoleUser(long roleId, long userId) 085 throws com.liferay.portal.kernel.exception.PortalException { 086 return getService().hasRoleUser(roleId, userId); 087 } 088 089 /** 090 * Sends a password notification email to the user matching the email 091 * address. The portal's settings determine whether a password is sent 092 * explicitly or whether a link for resetting the user's password is sent. 093 * The method sends the email asynchronously and returns before the email is 094 * sent. 095 * 096 * <p> 097 * The content of the notification email is specified with the 098 * <code>admin.email.password</code> portal property keys. They can be 099 * overridden via a <code>portal-ext.properties</code> file or modified 100 * through the Portal Settings UI. 101 * </p> 102 * 103 * @param companyId the primary key of the user's company 104 * @param emailAddress the user's email address 105 * @return <code>true</code> if the notification email includes a new 106 password; <code>false</code> if the notification email only 107 contains a reset link 108 */ 109 public static boolean sendPasswordByEmailAddress(long companyId, 110 java.lang.String emailAddress) 111 throws com.liferay.portal.kernel.exception.PortalException { 112 return getService().sendPasswordByEmailAddress(companyId, emailAddress); 113 } 114 115 /** 116 * Sends a password notification email to the user matching the screen name. 117 * The portal's settings determine whether a password is sent explicitly or 118 * whether a link for resetting the user's password is sent. The method 119 * sends the email asynchronously and returns before the email is sent. 120 * 121 * <p> 122 * The content of the notification email is specified with the 123 * <code>admin.email.password</code> portal property keys. They can be 124 * overridden via a <code>portal-ext.properties</code> file or modified 125 * through the Portal Settings UI. 126 * </p> 127 * 128 * @param companyId the primary key of the user's company 129 * @param screenName the user's screen name 130 * @return <code>true</code> if the notification email includes a new 131 password; <code>false</code> if the notification email only 132 contains a reset link 133 */ 134 public static boolean sendPasswordByScreenName(long companyId, 135 java.lang.String screenName) 136 throws com.liferay.portal.kernel.exception.PortalException { 137 return getService().sendPasswordByScreenName(companyId, screenName); 138 } 139 140 /** 141 * Sends a password notification email to the user matching the ID. The 142 * portal's settings determine whether a password is sent explicitly or 143 * whether a link for resetting the user's password is sent. The method 144 * sends the email asynchronously and returns before the email is sent. 145 * 146 * <p> 147 * The content of the notification email is specified with the 148 * <code>admin.email.password</code> portal property keys. They can be 149 * overridden via a <code>portal-ext.properties</code> file or modified 150 * through the Portal Settings UI. 151 * </p> 152 * 153 * @param userId the user's primary key 154 * @return <code>true</code> if the notification email includes a new 155 password; <code>false</code> if the notification email only 156 contains a reset link 157 */ 158 public static boolean sendPasswordByUserId(long userId) 159 throws com.liferay.portal.kernel.exception.PortalException { 160 return getService().sendPasswordByUserId(userId); 161 } 162 163 /** 164 * Adds a user. 165 * 166 * <p> 167 * This method handles the creation and bookkeeping of the user including 168 * its resources, metadata, and internal data structures. It is not 169 * necessary to make subsequent calls to any methods to setup default 170 * groups, resources, etc. 171 * </p> 172 * 173 * @param companyId the primary key of the user's company 174 * @param autoPassword whether a password should be automatically generated 175 for the user 176 * @param password1 the user's password 177 * @param password2 the user's password confirmation 178 * @param autoScreenName whether a screen name should be automatically 179 generated for the user 180 * @param screenName the user's screen name 181 * @param emailAddress the user's email address 182 * @param facebookId the user's facebook ID 183 * @param openId the user's OpenID 184 * @param locale the user's locale 185 * @param firstName the user's first name 186 * @param middleName the user's middle name 187 * @param lastName the user's last name 188 * @param prefixId the user's name prefix ID 189 * @param suffixId the user's name suffix ID 190 * @param male whether the user is male 191 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 192 January) 193 * @param birthdayDay the user's birthday day 194 * @param birthdayYear the user's birthday year 195 * @param jobTitle the user's job title 196 * @param groupIds the primary keys of the user's groups 197 * @param organizationIds the primary keys of the user's organizations 198 * @param roleIds the primary keys of the roles this user possesses 199 * @param userGroupIds the primary keys of the user's user groups 200 * @param sendEmail whether to send the user an email notification about 201 their new account 202 * @param serviceContext the service context to be applied (optionally 203 <code>null</code>). Can set the UUID (with the <code>uuid</code> 204 attribute), asset category IDs, asset tag names, and expando 205 bridge attributes for the user. 206 * @return the new user 207 */ 208 public static com.liferay.portal.kernel.model.User addUser(long companyId, 209 boolean autoPassword, java.lang.String password1, 210 java.lang.String password2, boolean autoScreenName, 211 java.lang.String screenName, java.lang.String emailAddress, 212 long facebookId, java.lang.String openId, java.util.Locale locale, 213 java.lang.String firstName, java.lang.String middleName, 214 java.lang.String lastName, long prefixId, long suffixId, boolean male, 215 int birthdayMonth, int birthdayDay, int birthdayYear, 216 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 217 long[] roleIds, long[] userGroupIds, boolean sendEmail, 218 ServiceContext serviceContext) 219 throws com.liferay.portal.kernel.exception.PortalException { 220 return getService() 221 .addUser(companyId, autoPassword, password1, password2, 222 autoScreenName, screenName, emailAddress, facebookId, openId, 223 locale, firstName, middleName, lastName, prefixId, suffixId, male, 224 birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, 225 organizationIds, roleIds, userGroupIds, sendEmail, serviceContext); 226 } 227 228 /** 229 * Adds a user with additional parameters. 230 * 231 * <p> 232 * This method handles the creation and bookkeeping of the user including 233 * its resources, metadata, and internal data structures. It is not 234 * necessary to make subsequent calls to any methods to setup default 235 * groups, resources, etc. 236 * </p> 237 * 238 * @param companyId the primary key of the user's company 239 * @param autoPassword whether a password should be automatically generated 240 for the user 241 * @param password1 the user's password 242 * @param password2 the user's password confirmation 243 * @param autoScreenName whether a screen name should be automatically 244 generated for the user 245 * @param screenName the user's screen name 246 * @param emailAddress the user's email address 247 * @param facebookId the user's facebook ID 248 * @param openId the user's OpenID 249 * @param locale the user's locale 250 * @param firstName the user's first name 251 * @param middleName the user's middle name 252 * @param lastName the user's last name 253 * @param prefixId the user's name prefix ID 254 * @param suffixId the user's name suffix ID 255 * @param male whether the user is male 256 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 257 January) 258 * @param birthdayDay the user's birthday day 259 * @param birthdayYear the user's birthday year 260 * @param jobTitle the user's job title 261 * @param groupIds the primary keys of the user's groups 262 * @param organizationIds the primary keys of the user's organizations 263 * @param roleIds the primary keys of the roles this user possesses 264 * @param userGroupIds the primary keys of the user's user groups 265 * @param addresses the user's addresses 266 * @param emailAddresses the user's email addresses 267 * @param phones the user's phone numbers 268 * @param websites the user's websites 269 * @param announcementsDelivers the announcements deliveries 270 * @param sendEmail whether to send the user an email notification about 271 their new account 272 * @param serviceContext the service context to be applied (optionally 273 <code>null</code>). Can set the UUID (with the <code>uuid</code> 274 attribute), asset category IDs, asset tag names, and expando 275 bridge attributes for the user. 276 * @return the new user 277 */ 278 public static com.liferay.portal.kernel.model.User addUser(long companyId, 279 boolean autoPassword, java.lang.String password1, 280 java.lang.String password2, boolean autoScreenName, 281 java.lang.String screenName, java.lang.String emailAddress, 282 long facebookId, java.lang.String openId, java.util.Locale locale, 283 java.lang.String firstName, java.lang.String middleName, 284 java.lang.String lastName, long prefixId, long suffixId, boolean male, 285 int birthdayMonth, int birthdayDay, int birthdayYear, 286 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 287 long[] roleIds, long[] userGroupIds, 288 java.util.List<com.liferay.portal.kernel.model.Address> addresses, 289 java.util.List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses, 290 java.util.List<com.liferay.portal.kernel.model.Phone> phones, 291 java.util.List<com.liferay.portal.kernel.model.Website> websites, 292 java.util.List<com.liferay.announcements.kernel.model.AnnouncementsDelivery> announcementsDelivers, 293 boolean sendEmail, ServiceContext serviceContext) 294 throws com.liferay.portal.kernel.exception.PortalException { 295 return getService() 296 .addUser(companyId, autoPassword, password1, password2, 297 autoScreenName, screenName, emailAddress, facebookId, openId, 298 locale, firstName, middleName, lastName, prefixId, suffixId, male, 299 birthdayMonth, birthdayDay, birthdayYear, jobTitle, groupIds, 300 organizationIds, roleIds, userGroupIds, addresses, emailAddresses, 301 phones, websites, announcementsDelivers, sendEmail, serviceContext); 302 } 303 304 /** 305 * Adds a user with workflow. 306 * 307 * <p> 308 * This method handles the creation and bookkeeping of the user including 309 * its resources, metadata, and internal data structures. It is not 310 * necessary to make subsequent calls to any methods to setup default 311 * groups, resources, etc. 312 * </p> 313 * 314 * @param companyId the primary key of the user's company 315 * @param autoPassword whether a password should be automatically generated 316 for the user 317 * @param password1 the user's password 318 * @param password2 the user's password confirmation 319 * @param autoScreenName whether a screen name should be automatically 320 generated for the user 321 * @param screenName the user's screen name 322 * @param emailAddress the user's email address 323 * @param facebookId the user's facebook ID 324 * @param openId the user's OpenID 325 * @param locale the user's locale 326 * @param firstName the user's first name 327 * @param middleName the user's middle name 328 * @param lastName the user's last name 329 * @param prefixId the user's name prefix ID 330 * @param suffixId the user's name suffix ID 331 * @param male whether the user is male 332 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 333 January) 334 * @param birthdayDay the user's birthday day 335 * @param birthdayYear the user's birthday year 336 * @param jobTitle the user's job title 337 * @param groupIds the primary keys of the user's groups 338 * @param organizationIds the primary keys of the user's organizations 339 * @param roleIds the primary keys of the roles this user possesses 340 * @param userGroupIds the primary keys of the user's user groups 341 * @param sendEmail whether to send the user an email notification about 342 their new account 343 * @param serviceContext the service context to be applied (optionally 344 <code>null</code>). Can set the UUID (with the <code>uuid</code> 345 attribute), asset category IDs, asset tag names, and expando 346 bridge attributes for the user. 347 * @return the new user 348 */ 349 public static com.liferay.portal.kernel.model.User addUserWithWorkflow( 350 long companyId, boolean autoPassword, java.lang.String password1, 351 java.lang.String password2, boolean autoScreenName, 352 java.lang.String screenName, java.lang.String emailAddress, 353 long facebookId, java.lang.String openId, java.util.Locale locale, 354 java.lang.String firstName, java.lang.String middleName, 355 java.lang.String lastName, long prefixId, long suffixId, boolean male, 356 int birthdayMonth, int birthdayDay, int birthdayYear, 357 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 358 long[] roleIds, long[] userGroupIds, boolean sendEmail, 359 ServiceContext serviceContext) 360 throws com.liferay.portal.kernel.exception.PortalException { 361 return getService() 362 .addUserWithWorkflow(companyId, autoPassword, password1, 363 password2, autoScreenName, screenName, emailAddress, facebookId, 364 openId, locale, firstName, middleName, lastName, prefixId, 365 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 366 groupIds, organizationIds, roleIds, userGroupIds, sendEmail, 367 serviceContext); 368 } 369 370 /** 371 * Adds a user with workflow and additional parameters. 372 * 373 * <p> 374 * This method handles the creation and bookkeeping of the user including 375 * its resources, metadata, and internal data structures. It is not 376 * necessary to make subsequent calls to any methods to setup default 377 * groups, resources, etc. 378 * </p> 379 * 380 * @param companyId the primary key of the user's company 381 * @param autoPassword whether a password should be automatically generated 382 for the user 383 * @param password1 the user's password 384 * @param password2 the user's password confirmation 385 * @param autoScreenName whether a screen name should be automatically 386 generated for the user 387 * @param screenName the user's screen name 388 * @param emailAddress the user's email address 389 * @param facebookId the user's facebook ID 390 * @param openId the user's OpenID 391 * @param locale the user's locale 392 * @param firstName the user's first name 393 * @param middleName the user's middle name 394 * @param lastName the user's last name 395 * @param prefixId the user's name prefix ID 396 * @param suffixId the user's name suffix ID 397 * @param male whether the user is male 398 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 399 January) 400 * @param birthdayDay the user's birthday day 401 * @param birthdayYear the user's birthday year 402 * @param jobTitle the user's job title 403 * @param groupIds the primary keys of the user's groups 404 * @param organizationIds the primary keys of the user's organizations 405 * @param roleIds the primary keys of the roles this user possesses 406 * @param userGroupIds the primary keys of the user's user groups 407 * @param addresses the user's addresses 408 * @param emailAddresses the user's email addresses 409 * @param phones the user's phone numbers 410 * @param websites the user's websites 411 * @param announcementsDelivers the announcements deliveries 412 * @param sendEmail whether to send the user an email notification about 413 their new account 414 * @param serviceContext the service context to be applied (optionally 415 <code>null</code>). Can set the UUID (with the <code>uuid</code> 416 attribute), asset category IDs, asset tag names, and expando 417 bridge attributes for the user. 418 * @return the new user 419 */ 420 public static com.liferay.portal.kernel.model.User addUserWithWorkflow( 421 long companyId, boolean autoPassword, java.lang.String password1, 422 java.lang.String password2, boolean autoScreenName, 423 java.lang.String screenName, java.lang.String emailAddress, 424 long facebookId, java.lang.String openId, java.util.Locale locale, 425 java.lang.String firstName, java.lang.String middleName, 426 java.lang.String lastName, long prefixId, long suffixId, boolean male, 427 int birthdayMonth, int birthdayDay, int birthdayYear, 428 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 429 long[] roleIds, long[] userGroupIds, 430 java.util.List<com.liferay.portal.kernel.model.Address> addresses, 431 java.util.List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses, 432 java.util.List<com.liferay.portal.kernel.model.Phone> phones, 433 java.util.List<com.liferay.portal.kernel.model.Website> websites, 434 java.util.List<com.liferay.announcements.kernel.model.AnnouncementsDelivery> announcementsDelivers, 435 boolean sendEmail, ServiceContext serviceContext) 436 throws com.liferay.portal.kernel.exception.PortalException { 437 return getService() 438 .addUserWithWorkflow(companyId, autoPassword, password1, 439 password2, autoScreenName, screenName, emailAddress, facebookId, 440 openId, locale, firstName, middleName, lastName, prefixId, 441 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 442 groupIds, organizationIds, roleIds, userGroupIds, addresses, 443 emailAddresses, phones, websites, announcementsDelivers, sendEmail, 444 serviceContext); 445 } 446 447 public static com.liferay.portal.kernel.model.User getCurrentUser() 448 throws com.liferay.portal.kernel.exception.PortalException { 449 return getService().getCurrentUser(); 450 } 451 452 /** 453 * Returns the user with the email address. 454 * 455 * @param companyId the primary key of the user's company 456 * @param emailAddress the user's email address 457 * @return the user with the email address 458 */ 459 public static com.liferay.portal.kernel.model.User getUserByEmailAddress( 460 long companyId, java.lang.String emailAddress) 461 throws com.liferay.portal.kernel.exception.PortalException { 462 return getService().getUserByEmailAddress(companyId, emailAddress); 463 } 464 465 /** 466 * Returns the user with the primary key. 467 * 468 * @param userId the primary key of the user 469 * @return the user with the primary key 470 */ 471 public static com.liferay.portal.kernel.model.User getUserById(long userId) 472 throws com.liferay.portal.kernel.exception.PortalException { 473 return getService().getUserById(userId); 474 } 475 476 /** 477 * Returns the user with the screen name. 478 * 479 * @param companyId the primary key of the user's company 480 * @param screenName the user's screen name 481 * @return the user with the screen name 482 */ 483 public static com.liferay.portal.kernel.model.User getUserByScreenName( 484 long companyId, java.lang.String screenName) 485 throws com.liferay.portal.kernel.exception.PortalException { 486 return getService().getUserByScreenName(companyId, screenName); 487 } 488 489 /** 490 * Updates the user's response to the terms of use agreement. 491 * 492 * @param userId the primary key of the user 493 * @param agreedToTermsOfUse whether the user has agree to the terms of use 494 * @return the user 495 */ 496 public static com.liferay.portal.kernel.model.User updateAgreedToTermsOfUse( 497 long userId, boolean agreedToTermsOfUse) 498 throws com.liferay.portal.kernel.exception.PortalException { 499 return getService().updateAgreedToTermsOfUse(userId, agreedToTermsOfUse); 500 } 501 502 /** 503 * Updates the user's email address. 504 * 505 * @param userId the primary key of the user 506 * @param password the user's password 507 * @param emailAddress1 the user's new email address 508 * @param emailAddress2 the user's new email address confirmation 509 * @param serviceContext the service context to be applied. Must set the 510 portal URL, main path, primary key of the layout, remote address, 511 remote host, and agent for the user. 512 * @return the user 513 */ 514 public static com.liferay.portal.kernel.model.User updateEmailAddress( 515 long userId, java.lang.String password, java.lang.String emailAddress1, 516 java.lang.String emailAddress2, ServiceContext serviceContext) 517 throws com.liferay.portal.kernel.exception.PortalException { 518 return getService() 519 .updateEmailAddress(userId, password, emailAddress1, 520 emailAddress2, serviceContext); 521 } 522 523 /** 524 * Updates a user account that was automatically created when a guest user 525 * participated in an action (e.g. posting a comment) and only provided his 526 * name and email address. 527 * 528 * @param companyId the primary key of the user's company 529 * @param autoPassword whether a password should be automatically generated 530 for the user 531 * @param password1 the user's password 532 * @param password2 the user's password confirmation 533 * @param autoScreenName whether a screen name should be automatically 534 generated for the user 535 * @param screenName the user's screen name 536 * @param emailAddress the user's email address 537 * @param facebookId the user's facebook ID 538 * @param openId the user's OpenID 539 * @param locale the user's locale 540 * @param firstName the user's first name 541 * @param middleName the user's middle name 542 * @param lastName the user's last name 543 * @param prefixId the user's name prefix ID 544 * @param suffixId the user's name suffix ID 545 * @param male whether the user is male 546 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 547 January) 548 * @param birthdayDay the user's birthday day 549 * @param birthdayYear the user's birthday year 550 * @param jobTitle the user's job title 551 * @param updateUserInformation whether to update the user's information 552 * @param sendEmail whether to send the user an email notification about 553 their new account 554 * @param serviceContext the service context to be applied (optionally 555 <code>null</code>). Can set the expando bridge attributes for the 556 user. 557 * @return the user 558 */ 559 public static com.liferay.portal.kernel.model.User updateIncompleteUser( 560 long companyId, boolean autoPassword, java.lang.String password1, 561 java.lang.String password2, boolean autoScreenName, 562 java.lang.String screenName, java.lang.String emailAddress, 563 long facebookId, java.lang.String openId, java.util.Locale locale, 564 java.lang.String firstName, java.lang.String middleName, 565 java.lang.String lastName, long prefixId, long suffixId, boolean male, 566 int birthdayMonth, int birthdayDay, int birthdayYear, 567 java.lang.String jobTitle, boolean updateUserInformation, 568 boolean sendEmail, ServiceContext serviceContext) 569 throws com.liferay.portal.kernel.exception.PortalException { 570 return getService() 571 .updateIncompleteUser(companyId, autoPassword, password1, 572 password2, autoScreenName, screenName, emailAddress, facebookId, 573 openId, locale, firstName, middleName, lastName, prefixId, 574 suffixId, male, birthdayMonth, birthdayDay, birthdayYear, jobTitle, 575 updateUserInformation, sendEmail, serviceContext); 576 } 577 578 /** 579 * Updates whether the user is locked out from logging in. 580 * 581 * @param userId the primary key of the user 582 * @param lockout whether the user is locked out 583 * @return the user 584 */ 585 public static com.liferay.portal.kernel.model.User updateLockoutById( 586 long userId, boolean lockout) 587 throws com.liferay.portal.kernel.exception.PortalException { 588 return getService().updateLockoutById(userId, lockout); 589 } 590 591 /** 592 * Updates the user's OpenID. 593 * 594 * @param userId the primary key of the user 595 * @param openId the new OpenID 596 * @return the user 597 */ 598 public static com.liferay.portal.kernel.model.User updateOpenId( 599 long userId, java.lang.String openId) 600 throws com.liferay.portal.kernel.exception.PortalException { 601 return getService().updateOpenId(userId, openId); 602 } 603 604 /** 605 * Updates the user's password without tracking or validation of the change. 606 * 607 * @param userId the primary key of the user 608 * @param password1 the user's new password 609 * @param password2 the user's new password confirmation 610 * @param passwordReset whether the user should be asked to reset their 611 password the next time they log in 612 * @return the user 613 */ 614 public static com.liferay.portal.kernel.model.User updatePassword( 615 long userId, java.lang.String password1, java.lang.String password2, 616 boolean passwordReset) 617 throws com.liferay.portal.kernel.exception.PortalException { 618 return getService() 619 .updatePassword(userId, password1, password2, passwordReset); 620 } 621 622 /** 623 * Updates the user's portrait image. 624 * 625 * @param userId the primary key of the user 626 * @param bytes the new portrait image data 627 * @return the user 628 */ 629 public static com.liferay.portal.kernel.model.User updatePortrait( 630 long userId, byte[] bytes) 631 throws com.liferay.portal.kernel.exception.PortalException { 632 return getService().updatePortrait(userId, bytes); 633 } 634 635 /** 636 * Updates the user's password reset question and answer. 637 * 638 * @param userId the primary key of the user 639 * @param question the user's new password reset question 640 * @param answer the user's new password reset answer 641 * @return the user 642 */ 643 public static com.liferay.portal.kernel.model.User updateReminderQuery( 644 long userId, java.lang.String question, java.lang.String answer) 645 throws com.liferay.portal.kernel.exception.PortalException { 646 return getService().updateReminderQuery(userId, question, answer); 647 } 648 649 /** 650 * Updates the user's screen name. 651 * 652 * @param userId the primary key of the user 653 * @param screenName the user's new screen name 654 * @return the user 655 */ 656 public static com.liferay.portal.kernel.model.User updateScreenName( 657 long userId, java.lang.String screenName) 658 throws com.liferay.portal.kernel.exception.PortalException { 659 return getService().updateScreenName(userId, screenName); 660 } 661 662 /** 663 * Updates the user's workflow status. 664 * 665 * @param userId the primary key of the user 666 * @param status the user's new workflow status 667 * @return the user 668 * @deprecated As of 7.0.0, replaced by {@link #updateStatus(long, int, 669 ServiceContext)} 670 */ 671 @Deprecated 672 public static com.liferay.portal.kernel.model.User updateStatus( 673 long userId, int status) 674 throws com.liferay.portal.kernel.exception.PortalException { 675 return getService().updateStatus(userId, status); 676 } 677 678 /** 679 * Updates the user's workflow status. 680 * 681 * @param userId the primary key of the user 682 * @param status the user's new workflow status 683 * @param serviceContext the service context to be applied. You can specify 684 an unencrypted custom password (used by an LDAP listener) for the 685 user via attribute <code>passwordUnencrypted</code>. 686 * @return the user 687 */ 688 public static com.liferay.portal.kernel.model.User updateStatus( 689 long userId, int status, ServiceContext serviceContext) 690 throws com.liferay.portal.kernel.exception.PortalException { 691 return getService().updateStatus(userId, status, serviceContext); 692 } 693 694 /** 695 * Updates the user with additional parameters. 696 * 697 * @param userId the primary key of the user 698 * @param oldPassword the user's old password 699 * @param newPassword1 the user's new password (optionally 700 <code>null</code>) 701 * @param newPassword2 the user's new password confirmation (optionally 702 <code>null</code>) 703 * @param passwordReset whether the user should be asked to reset their 704 password the next time they login 705 * @param reminderQueryQuestion the user's new password reset question 706 * @param reminderQueryAnswer the user's new password reset answer 707 * @param screenName the user's new screen name 708 * @param emailAddress the user's new email address 709 * @param facebookId the user's new Facebook ID 710 * @param openId the user's new OpenID 711 * @param portrait whether to update the user's portrait image 712 * @param portraitBytes the new portrait image data 713 * @param languageId the user's new language ID 714 * @param timeZoneId the user's new time zone ID 715 * @param greeting the user's new greeting 716 * @param comments the user's new comments 717 * @param firstName the user's new first name 718 * @param middleName the user's new middle name 719 * @param lastName the user's new last name 720 * @param prefixId the user's new name prefix ID 721 * @param suffixId the user's new name suffix ID 722 * @param male whether user is male 723 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 724 for January) 725 * @param birthdayDay the user's new birthday day 726 * @param birthdayYear the user's birthday year 727 * @param smsSn the user's new SMS screen name 728 * @param facebookSn the user's new Facebook screen name 729 * @param jabberSn the user's new Jabber screen name 730 * @param skypeSn the user's new Skype screen name 731 * @param twitterSn the user's new Twitter screen name 732 * @param jobTitle the user's new job title 733 * @param groupIds the primary keys of the user's groups 734 * @param organizationIds the primary keys of the user's organizations 735 * @param roleIds the primary keys of the user's roles 736 * @param userGroupRoles the user user's group roles 737 * @param userGroupIds the primary keys of the user's user groups 738 * @param addresses the user's addresses 739 * @param emailAddresses the user's email addresses 740 * @param phones the user's phone numbers 741 * @param websites the user's websites 742 * @param announcementsDelivers the announcements deliveries 743 * @param serviceContext the service context to be applied (optionally 744 <code>null</code>). Can set the UUID (with the <code>uuid</code> 745 attribute), asset category IDs, asset tag names, and expando 746 bridge attributes for the user. 747 * @return the user 748 */ 749 public static com.liferay.portal.kernel.model.User updateUser(long userId, 750 java.lang.String oldPassword, java.lang.String newPassword1, 751 java.lang.String newPassword2, boolean passwordReset, 752 java.lang.String reminderQueryQuestion, 753 java.lang.String reminderQueryAnswer, java.lang.String screenName, 754 java.lang.String emailAddress, long facebookId, 755 java.lang.String openId, boolean portrait, byte[] portraitBytes, 756 java.lang.String languageId, java.lang.String timeZoneId, 757 java.lang.String greeting, java.lang.String comments, 758 java.lang.String firstName, java.lang.String middleName, 759 java.lang.String lastName, long prefixId, long suffixId, boolean male, 760 int birthdayMonth, int birthdayDay, int birthdayYear, 761 java.lang.String smsSn, java.lang.String facebookSn, 762 java.lang.String jabberSn, java.lang.String skypeSn, 763 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 764 long[] organizationIds, long[] roleIds, 765 java.util.List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, 766 long[] userGroupIds, 767 java.util.List<com.liferay.portal.kernel.model.Address> addresses, 768 java.util.List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses, 769 java.util.List<com.liferay.portal.kernel.model.Phone> phones, 770 java.util.List<com.liferay.portal.kernel.model.Website> websites, 771 java.util.List<com.liferay.announcements.kernel.model.AnnouncementsDelivery> announcementsDelivers, 772 ServiceContext serviceContext) 773 throws com.liferay.portal.kernel.exception.PortalException { 774 return getService() 775 .updateUser(userId, oldPassword, newPassword1, newPassword2, 776 passwordReset, reminderQueryQuestion, reminderQueryAnswer, 777 screenName, emailAddress, facebookId, openId, portrait, 778 portraitBytes, languageId, timeZoneId, greeting, comments, 779 firstName, middleName, lastName, prefixId, suffixId, male, 780 birthdayMonth, birthdayDay, birthdayYear, smsSn, facebookSn, 781 jabberSn, skypeSn, twitterSn, jobTitle, groupIds, organizationIds, 782 roleIds, userGroupRoles, userGroupIds, addresses, emailAddresses, 783 phones, websites, announcementsDelivers, serviceContext); 784 } 785 786 /** 787 * Updates the user. 788 * 789 * @param userId the primary key of the user 790 * @param oldPassword the user's old password 791 * @param newPassword1 the user's new password (optionally 792 <code>null</code>) 793 * @param newPassword2 the user's new password confirmation (optionally 794 <code>null</code>) 795 * @param passwordReset whether the user should be asked to reset their 796 password the next time they login 797 * @param reminderQueryQuestion the user's new password reset question 798 * @param reminderQueryAnswer the user's new password reset answer 799 * @param screenName the user's new screen name 800 * @param emailAddress the user's new email address 801 * @param facebookId the user's new Facebook ID 802 * @param openId the user's new OpenID 803 * @param languageId the user's new language ID 804 * @param timeZoneId the user's new time zone ID 805 * @param greeting the user's new greeting 806 * @param comments the user's new comments 807 * @param firstName the user's new first name 808 * @param middleName the user's new middle name 809 * @param lastName the user's new last name 810 * @param prefixId the user's new name prefix ID 811 * @param suffixId the user's new name suffix ID 812 * @param male whether user is male 813 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 814 for January) 815 * @param birthdayDay the user's new birthday day 816 * @param birthdayYear the user's birthday year 817 * @param smsSn the user's new SMS screen name 818 * @param facebookSn the user's new Facebook screen name 819 * @param jabberSn the user's new Jabber screen name 820 * @param skypeSn the user's new Skype screen name 821 * @param twitterSn the user's new Twitter screen name 822 * @param jobTitle the user's new job title 823 * @param groupIds the primary keys of the user's groups 824 * @param organizationIds the primary keys of the user's organizations 825 * @param roleIds the primary keys of the user's roles 826 * @param userGroupRoles the user user's group roles 827 * @param userGroupIds the primary keys of the user's user groups 828 * @param serviceContext the service context to be applied (optionally 829 <code>null</code>). Can set the UUID (with the <code>uuid</code> 830 attribute), asset category IDs, asset tag names, and expando 831 bridge attributes for the user. 832 * @return the user 833 */ 834 public static com.liferay.portal.kernel.model.User updateUser(long userId, 835 java.lang.String oldPassword, java.lang.String newPassword1, 836 java.lang.String newPassword2, boolean passwordReset, 837 java.lang.String reminderQueryQuestion, 838 java.lang.String reminderQueryAnswer, java.lang.String screenName, 839 java.lang.String emailAddress, long facebookId, 840 java.lang.String openId, java.lang.String languageId, 841 java.lang.String timeZoneId, java.lang.String greeting, 842 java.lang.String comments, java.lang.String firstName, 843 java.lang.String middleName, java.lang.String lastName, long prefixId, 844 long suffixId, boolean male, int birthdayMonth, int birthdayDay, 845 int birthdayYear, java.lang.String smsSn, java.lang.String facebookSn, 846 java.lang.String jabberSn, java.lang.String skypeSn, 847 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 848 long[] organizationIds, long[] roleIds, 849 java.util.List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, 850 long[] userGroupIds, ServiceContext serviceContext) 851 throws com.liferay.portal.kernel.exception.PortalException { 852 return getService() 853 .updateUser(userId, oldPassword, newPassword1, newPassword2, 854 passwordReset, reminderQueryQuestion, reminderQueryAnswer, 855 screenName, emailAddress, facebookId, openId, languageId, 856 timeZoneId, greeting, comments, firstName, middleName, lastName, 857 prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, 858 smsSn, facebookSn, jabberSn, skypeSn, twitterSn, jobTitle, 859 groupIds, organizationIds, roleIds, userGroupRoles, userGroupIds, 860 serviceContext); 861 } 862 863 /** 864 * Updates the user with additional parameters. 865 * 866 * @param userId the primary key of the user 867 * @param oldPassword the user's old password 868 * @param newPassword1 the user's new password (optionally 869 <code>null</code>) 870 * @param newPassword2 the user's new password confirmation (optionally 871 <code>null</code>) 872 * @param passwordReset whether the user should be asked to reset their 873 password the next time they login 874 * @param reminderQueryQuestion the user's new password reset question 875 * @param reminderQueryAnswer the user's new password reset answer 876 * @param screenName the user's new screen name 877 * @param emailAddress the user's new email address 878 * @param facebookId the user's new Facebook ID 879 * @param openId the user's new OpenID 880 * @param languageId the user's new language ID 881 * @param timeZoneId the user's new time zone ID 882 * @param greeting the user's new greeting 883 * @param comments the user's new comments 884 * @param firstName the user's new first name 885 * @param middleName the user's new middle name 886 * @param lastName the user's new last name 887 * @param prefixId the user's new name prefix ID 888 * @param suffixId the user's new name suffix ID 889 * @param male whether user is male 890 * @param birthdayMonth the user's new birthday month (0-based, meaning 891 0 for January) 892 * @param birthdayDay the user's new birthday day 893 * @param birthdayYear the user's birthday year 894 * @param smsSn the user's new SMS screen name 895 * @param facebookSn the user's new Facebook screen name 896 * @param jabberSn the user's new Jabber screen name 897 * @param skypeSn the user's new Skype screen name 898 * @param twitterSn the user's new Twitter screen name 899 * @param jobTitle the user's new job title 900 * @param groupIds the primary keys of the user's groups 901 * @param organizationIds the primary keys of the user's organizations 902 * @param roleIds the primary keys of the user's roles 903 * @param userGroupRoles the user user's group roles 904 * @param userGroupIds the primary keys of the user's user groups 905 * @param addresses the user's addresses 906 * @param emailAddresses the user's email addresses 907 * @param phones the user's phone numbers 908 * @param websites the user's websites 909 * @param announcementsDelivers the announcements deliveries 910 * @param serviceContext the service context to be applied (optionally 911 <code>null</code>). Can set the UUID (with the 912 <code>uuid</code> attribute), asset category IDs, asset tag 913 names, and expando bridge attributes for the user. 914 * @return the user 915 * @deprecated As of 7.0.0, replaced by {@link #updateUser(long, String, 916 String, String, boolean, String, String, String, String, 917 long, String, boolean, byte[], String, String, String, 918 String, String, String, String, long, long, boolean, int, 919 int, int, String, String, String, String, String, String, 920 long[], long[], long[], List, long[], List, List, List, List, 921 List, ServiceContext)} 922 */ 923 @Deprecated 924 public static com.liferay.portal.kernel.model.User updateUser(long userId, 925 java.lang.String oldPassword, java.lang.String newPassword1, 926 java.lang.String newPassword2, boolean passwordReset, 927 java.lang.String reminderQueryQuestion, 928 java.lang.String reminderQueryAnswer, java.lang.String screenName, 929 java.lang.String emailAddress, long facebookId, 930 java.lang.String openId, java.lang.String languageId, 931 java.lang.String timeZoneId, java.lang.String greeting, 932 java.lang.String comments, java.lang.String firstName, 933 java.lang.String middleName, java.lang.String lastName, long prefixId, 934 long suffixId, boolean male, int birthdayMonth, int birthdayDay, 935 int birthdayYear, java.lang.String smsSn, java.lang.String facebookSn, 936 java.lang.String jabberSn, java.lang.String skypeSn, 937 java.lang.String twitterSn, java.lang.String jobTitle, long[] groupIds, 938 long[] organizationIds, long[] roleIds, 939 java.util.List<com.liferay.portal.kernel.model.UserGroupRole> userGroupRoles, 940 long[] userGroupIds, 941 java.util.List<com.liferay.portal.kernel.model.Address> addresses, 942 java.util.List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses, 943 java.util.List<com.liferay.portal.kernel.model.Phone> phones, 944 java.util.List<com.liferay.portal.kernel.model.Website> websites, 945 java.util.List<com.liferay.announcements.kernel.model.AnnouncementsDelivery> announcementsDelivers, 946 ServiceContext serviceContext) 947 throws com.liferay.portal.kernel.exception.PortalException { 948 return getService() 949 .updateUser(userId, oldPassword, newPassword1, newPassword2, 950 passwordReset, reminderQueryQuestion, reminderQueryAnswer, 951 screenName, emailAddress, facebookId, openId, languageId, 952 timeZoneId, greeting, comments, firstName, middleName, lastName, 953 prefixId, suffixId, male, birthdayMonth, birthdayDay, birthdayYear, 954 smsSn, facebookSn, jabberSn, skypeSn, twitterSn, jobTitle, 955 groupIds, organizationIds, roleIds, userGroupRoles, userGroupIds, 956 addresses, emailAddresses, phones, websites, announcementsDelivers, 957 serviceContext); 958 } 959 960 public static int getCompanyUsersCount(long companyId) 961 throws com.liferay.portal.kernel.exception.PortalException { 962 return getService().getCompanyUsersCount(companyId); 963 } 964 965 /** 966 * Returns the OSGi service identifier. 967 * 968 * @return the OSGi service identifier 969 */ 970 public static java.lang.String getOSGiServiceIdentifier() { 971 return getService().getOSGiServiceIdentifier(); 972 } 973 974 public static java.util.List<com.liferay.portal.kernel.model.User> getCompanyUsers( 975 long companyId, int start, int end) 976 throws com.liferay.portal.kernel.exception.PortalException { 977 return getService().getCompanyUsers(companyId, start, end); 978 } 979 980 /** 981 * Returns all the users belonging to the group. 982 * 983 * @param groupId the primary key of the group 984 * @return the users belonging to the group 985 */ 986 public static java.util.List<com.liferay.portal.kernel.model.User> getGroupUsers( 987 long groupId) 988 throws com.liferay.portal.kernel.exception.PortalException { 989 return getService().getGroupUsers(groupId); 990 } 991 992 /** 993 * Returns all the users belonging to the organization. 994 * 995 * @param organizationId the primary key of the organization 996 * @return users belonging to the organization 997 */ 998 public static java.util.List<com.liferay.portal.kernel.model.User> getOrganizationUsers( 999 long organizationId) 1000 throws com.liferay.portal.kernel.exception.PortalException { 1001 return getService().getOrganizationUsers(organizationId); 1002 } 1003 1004 public static java.util.List<com.liferay.portal.kernel.model.User> getUserGroupUsers( 1005 long userGroupId) 1006 throws com.liferay.portal.kernel.exception.PortalException { 1007 return getService().getUserGroupUsers(userGroupId); 1008 } 1009 1010 /** 1011 * Returns the primary key of the user with the email address. 1012 * 1013 * @param companyId the primary key of the user's company 1014 * @param emailAddress the user's email address 1015 * @return the primary key of the user with the email address 1016 */ 1017 public static long getUserIdByEmailAddress(long companyId, 1018 java.lang.String emailAddress) 1019 throws com.liferay.portal.kernel.exception.PortalException { 1020 return getService().getUserIdByEmailAddress(companyId, emailAddress); 1021 } 1022 1023 /** 1024 * Returns the primary key of the user with the screen name. 1025 * 1026 * @param companyId the primary key of the user's company 1027 * @param screenName the user's screen name 1028 * @return the primary key of the user with the screen name 1029 */ 1030 public static long getUserIdByScreenName(long companyId, 1031 java.lang.String screenName) 1032 throws com.liferay.portal.kernel.exception.PortalException { 1033 return getService().getUserIdByScreenName(companyId, screenName); 1034 } 1035 1036 /** 1037 * Returns the primary keys of all the users belonging to the group. 1038 * 1039 * @param groupId the primary key of the group 1040 * @return the primary keys of the users belonging to the group 1041 */ 1042 public static long[] getGroupUserIds(long groupId) 1043 throws com.liferay.portal.kernel.exception.PortalException { 1044 return getService().getGroupUserIds(groupId); 1045 } 1046 1047 /** 1048 * Returns the primary keys of all the users belonging to the organization. 1049 * 1050 * @param organizationId the primary key of the organization 1051 * @return the primary keys of the users belonging to the organization 1052 */ 1053 public static long[] getOrganizationUserIds(long organizationId) 1054 throws com.liferay.portal.kernel.exception.PortalException { 1055 return getService().getOrganizationUserIds(organizationId); 1056 } 1057 1058 /** 1059 * Returns the primary keys of all the users belonging to the role. 1060 * 1061 * @param roleId the primary key of the role 1062 * @return the primary keys of the users belonging to the role 1063 */ 1064 public static long[] getRoleUserIds(long roleId) 1065 throws com.liferay.portal.kernel.exception.PortalException { 1066 return getService().getRoleUserIds(roleId); 1067 } 1068 1069 /** 1070 * Adds the users to the group. 1071 * 1072 * @param groupId the primary key of the group 1073 * @param userIds the primary keys of the users 1074 * @param serviceContext the service context to be applied (optionally 1075 <code>null</code>) 1076 */ 1077 public static void addGroupUsers(long groupId, long[] userIds, 1078 ServiceContext serviceContext) 1079 throws com.liferay.portal.kernel.exception.PortalException { 1080 getService().addGroupUsers(groupId, userIds, serviceContext); 1081 } 1082 1083 /** 1084 * Adds the users to the organization. 1085 * 1086 * @param organizationId the primary key of the organization 1087 * @param userIds the primary keys of the users 1088 */ 1089 public static void addOrganizationUsers(long organizationId, long[] userIds) 1090 throws com.liferay.portal.kernel.exception.PortalException { 1091 getService().addOrganizationUsers(organizationId, userIds); 1092 } 1093 1094 /** 1095 * Assigns the password policy to the users, removing any other currently 1096 * assigned password policies. 1097 * 1098 * @param passwordPolicyId the primary key of the password policy 1099 * @param userIds the primary keys of the users 1100 */ 1101 public static void addPasswordPolicyUsers(long passwordPolicyId, 1102 long[] userIds) 1103 throws com.liferay.portal.kernel.exception.PortalException { 1104 getService().addPasswordPolicyUsers(passwordPolicyId, userIds); 1105 } 1106 1107 /** 1108 * Adds the users to the role. 1109 * 1110 * @param roleId the primary key of the role 1111 * @param userIds the primary keys of the users 1112 */ 1113 public static void addRoleUsers(long roleId, long[] userIds) 1114 throws com.liferay.portal.kernel.exception.PortalException { 1115 getService().addRoleUsers(roleId, userIds); 1116 } 1117 1118 /** 1119 * Adds the users to the team. 1120 * 1121 * @param teamId the primary key of the team 1122 * @param userIds the primary keys of the users 1123 */ 1124 public static void addTeamUsers(long teamId, long[] userIds) 1125 throws com.liferay.portal.kernel.exception.PortalException { 1126 getService().addTeamUsers(teamId, userIds); 1127 } 1128 1129 /** 1130 * Adds the users to the user group. 1131 * 1132 * @param userGroupId the primary key of the user group 1133 * @param userIds the primary keys of the users 1134 */ 1135 public static void addUserGroupUsers(long userGroupId, long[] userIds) 1136 throws com.liferay.portal.kernel.exception.PortalException { 1137 getService().addUserGroupUsers(userGroupId, userIds); 1138 } 1139 1140 /** 1141 * Deletes the user's portrait image. 1142 * 1143 * @param userId the primary key of the user 1144 */ 1145 public static void deletePortrait(long userId) 1146 throws com.liferay.portal.kernel.exception.PortalException { 1147 getService().deletePortrait(userId); 1148 } 1149 1150 /** 1151 * Removes the user from the role. 1152 * 1153 * @param roleId the primary key of the role 1154 * @param userId the primary key of the user 1155 */ 1156 public static void deleteRoleUser(long roleId, long userId) 1157 throws com.liferay.portal.kernel.exception.PortalException { 1158 getService().deleteRoleUser(roleId, userId); 1159 } 1160 1161 /** 1162 * Deletes the user. 1163 * 1164 * @param userId the primary key of the user 1165 */ 1166 public static void deleteUser(long userId) 1167 throws com.liferay.portal.kernel.exception.PortalException { 1168 getService().deleteUser(userId); 1169 } 1170 1171 /** 1172 * Sets the users in the role, removing and adding users to the role as 1173 * necessary. 1174 * 1175 * @param roleId the primary key of the role 1176 * @param userIds the primary keys of the users 1177 */ 1178 public static void setRoleUsers(long roleId, long[] userIds) 1179 throws com.liferay.portal.kernel.exception.PortalException { 1180 getService().setRoleUsers(roleId, userIds); 1181 } 1182 1183 /** 1184 * Sets the users in the user group, removing and adding users to the user 1185 * group as necessary. 1186 * 1187 * @param userGroupId the primary key of the user group 1188 * @param userIds the primary keys of the users 1189 */ 1190 public static void setUserGroupUsers(long userGroupId, long[] userIds) 1191 throws com.liferay.portal.kernel.exception.PortalException { 1192 getService().setUserGroupUsers(userGroupId, userIds); 1193 } 1194 1195 /** 1196 * Removes the users from the teams of a group. 1197 * 1198 * @param groupId the primary key of the group 1199 * @param userIds the primary keys of the users 1200 */ 1201 public static void unsetGroupTeamsUsers(long groupId, long[] userIds) 1202 throws com.liferay.portal.kernel.exception.PortalException { 1203 getService().unsetGroupTeamsUsers(groupId, userIds); 1204 } 1205 1206 /** 1207 * Removes the users from the group. 1208 * 1209 * @param groupId the primary key of the group 1210 * @param userIds the primary keys of the users 1211 * @param serviceContext the service context to be applied (optionally 1212 <code>null</code>) 1213 */ 1214 public static void unsetGroupUsers(long groupId, long[] userIds, 1215 ServiceContext serviceContext) 1216 throws com.liferay.portal.kernel.exception.PortalException { 1217 getService().unsetGroupUsers(groupId, userIds, serviceContext); 1218 } 1219 1220 /** 1221 * Removes the users from the organization. 1222 * 1223 * @param organizationId the primary key of the organization 1224 * @param userIds the primary keys of the users 1225 */ 1226 public static void unsetOrganizationUsers(long organizationId, 1227 long[] userIds) 1228 throws com.liferay.portal.kernel.exception.PortalException { 1229 getService().unsetOrganizationUsers(organizationId, userIds); 1230 } 1231 1232 /** 1233 * Removes the users from the password policy. 1234 * 1235 * @param passwordPolicyId the primary key of the password policy 1236 * @param userIds the primary keys of the users 1237 */ 1238 public static void unsetPasswordPolicyUsers(long passwordPolicyId, 1239 long[] userIds) 1240 throws com.liferay.portal.kernel.exception.PortalException { 1241 getService().unsetPasswordPolicyUsers(passwordPolicyId, userIds); 1242 } 1243 1244 /** 1245 * Removes the users from the role. 1246 * 1247 * @param roleId the primary key of the role 1248 * @param userIds the primary keys of the users 1249 */ 1250 public static void unsetRoleUsers(long roleId, long[] userIds) 1251 throws com.liferay.portal.kernel.exception.PortalException { 1252 getService().unsetRoleUsers(roleId, userIds); 1253 } 1254 1255 /** 1256 * Removes the users from the team. 1257 * 1258 * @param teamId the primary key of the team 1259 * @param userIds the primary keys of the users 1260 */ 1261 public static void unsetTeamUsers(long teamId, long[] userIds) 1262 throws com.liferay.portal.kernel.exception.PortalException { 1263 getService().unsetTeamUsers(teamId, userIds); 1264 } 1265 1266 /** 1267 * Removes the users from the user group. 1268 * 1269 * @param userGroupId the primary key of the user group 1270 * @param userIds the primary keys of the users 1271 */ 1272 public static void unsetUserGroupUsers(long userGroupId, long[] userIds) 1273 throws com.liferay.portal.kernel.exception.PortalException { 1274 getService().unsetUserGroupUsers(userGroupId, userIds); 1275 } 1276 1277 /** 1278 * Sets the organizations that the user is in, removing and adding 1279 * organizations as necessary. 1280 * 1281 * @param userId the primary key of the user 1282 * @param organizationIds the primary keys of the organizations 1283 * @param serviceContext the service context to be applied. Must set whether 1284 user indexing is enabled. 1285 */ 1286 public static void updateOrganizations(long userId, long[] organizationIds, 1287 ServiceContext serviceContext) 1288 throws com.liferay.portal.kernel.exception.PortalException { 1289 getService().updateOrganizations(userId, organizationIds, serviceContext); 1290 } 1291 1292 public static UserService getService() { 1293 if (_service == null) { 1294 _service = (UserService)PortalBeanLocatorUtil.locate(UserService.class.getName()); 1295 1296 ReferenceRegistry.registerReference(UserServiceUtil.class, 1297 "_service"); 1298 } 1299 1300 return _service; 1301 } 1302 1303 private static UserService _service; 1304 }