001 /** 002 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved. 003 * 004 * This library is free software; you can redistribute it and/or modify it under 005 * the terms of the GNU Lesser General Public License as published by the Free 006 * Software Foundation; either version 2.1 of the License, or (at your option) 007 * any later version. 008 * 009 * This library is distributed in the hope that it will be useful, but WITHOUT 010 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 011 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more 012 * details. 013 */ 014 015 package com.liferay.portal.service.http; 016 017 import com.liferay.portal.kernel.log.Log; 018 import com.liferay.portal.kernel.log.LogFactoryUtil; 019 import com.liferay.portal.kernel.util.LocaleUtil; 020 import com.liferay.portal.service.UserServiceUtil; 021 022 import java.rmi.RemoteException; 023 024 /** 025 * <p> 026 * This class provides a SOAP utility for the 027 * {@link com.liferay.portal.service.UserServiceUtil} service utility. The 028 * static methods of this class calls the same methods of the service utility. 029 * However, the signatures are different because it is difficult for SOAP to 030 * support certain types. 031 * </p> 032 * 033 * <p> 034 * ServiceBuilder follows certain rules in translating the methods. For example, 035 * if the method in the service utility returns a {@link java.util.List}, that 036 * is translated to an array of {@link com.liferay.portal.model.UserSoap}. 037 * If the method in the service utility returns a 038 * {@link com.liferay.portal.model.User}, that is translated to a 039 * {@link com.liferay.portal.model.UserSoap}. Methods that SOAP cannot 040 * safely wire are skipped. 041 * </p> 042 * 043 * <p> 044 * The benefits of using the SOAP utility is that it is cross platform 045 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 046 * even Perl, to call the generated services. One drawback of SOAP is that it is 047 * slow because it needs to serialize all calls into a text format (XML). 048 * </p> 049 * 050 * <p> 051 * You can see a list of services at http://localhost:8080/api/axis. Set the 052 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 053 * security. 054 * </p> 055 * 056 * <p> 057 * The SOAP utility is only generated for remote services. 058 * </p> 059 * 060 * @author Brian Wing Shun Chan 061 * @see UserServiceHttp 062 * @see com.liferay.portal.model.UserSoap 063 * @see com.liferay.portal.service.UserServiceUtil 064 * @generated 065 */ 066 public class UserServiceSoap { 067 /** 068 * Adds the users to the group. 069 * 070 * @param groupId the primary key of the group 071 * @param userIds the primary keys of the users 072 * @param serviceContext the service context (optionally <code>null</code>) 073 * @throws PortalException if a group or user with the primary key could not 074 be found, or if the user did not have permission to assign group 075 members 076 * @throws SystemException if a system exception occurred 077 */ 078 public static void addGroupUsers(long groupId, long[] userIds, 079 com.liferay.portal.service.ServiceContext serviceContext) 080 throws RemoteException { 081 try { 082 UserServiceUtil.addGroupUsers(groupId, userIds, serviceContext); 083 } 084 catch (Exception e) { 085 _log.error(e, e); 086 087 throw new RemoteException(e.getMessage()); 088 } 089 } 090 091 /** 092 * Adds the users to the organization. 093 * 094 * @param organizationId the primary key of the organization 095 * @param userIds the primary keys of the users 096 * @throws PortalException if an organization or user with the primary key 097 could not be found, if the user did not have permission to assign 098 organization members, or if current user did not have an 099 organization in common with a given user 100 * @throws SystemException if a system exception occurred 101 */ 102 public static void addOrganizationUsers(long organizationId, long[] userIds) 103 throws RemoteException { 104 try { 105 UserServiceUtil.addOrganizationUsers(organizationId, userIds); 106 } 107 catch (Exception e) { 108 _log.error(e, e); 109 110 throw new RemoteException(e.getMessage()); 111 } 112 } 113 114 /** 115 * Assigns the password policy to the users, removing any other currently 116 * assigned password policies. 117 * 118 * @param passwordPolicyId the primary key of the password policy 119 * @param userIds the primary keys of the users 120 * @throws PortalException if the user did not have permission to assign 121 policy members 122 * @throws SystemException if a system exception occurred 123 */ 124 public static void addPasswordPolicyUsers(long passwordPolicyId, 125 long[] userIds) throws RemoteException { 126 try { 127 UserServiceUtil.addPasswordPolicyUsers(passwordPolicyId, userIds); 128 } 129 catch (Exception e) { 130 _log.error(e, e); 131 132 throw new RemoteException(e.getMessage()); 133 } 134 } 135 136 /** 137 * Adds the users to the role. 138 * 139 * @param roleId the primary key of the role 140 * @param userIds the primary keys of the users 141 * @throws PortalException if a role or user with the primary key could not 142 be found or if the user did not have permission to assign role 143 members 144 * @throws SystemException if a system exception occurred 145 */ 146 public static void addRoleUsers(long roleId, long[] userIds) 147 throws RemoteException { 148 try { 149 UserServiceUtil.addRoleUsers(roleId, userIds); 150 } 151 catch (Exception e) { 152 _log.error(e, e); 153 154 throw new RemoteException(e.getMessage()); 155 } 156 } 157 158 /** 159 * Adds the users to the team. 160 * 161 * @param teamId the primary key of the team 162 * @param userIds the primary keys of the users 163 * @throws PortalException if a team or user with the primary key could not 164 be found or if the user did not have permission to assign team 165 members 166 * @throws SystemException if a system exception occurred 167 */ 168 public static void addTeamUsers(long teamId, long[] userIds) 169 throws RemoteException { 170 try { 171 UserServiceUtil.addTeamUsers(teamId, userIds); 172 } 173 catch (Exception e) { 174 _log.error(e, e); 175 176 throw new RemoteException(e.getMessage()); 177 } 178 } 179 180 /** 181 * Adds a user. 182 * 183 * <p> 184 * This method handles the creation and bookkeeping of the user including 185 * its resources, metadata, and internal data structures. It is not 186 * necessary to make subsequent calls to any methods to setup default 187 * groups, resources, etc. 188 * </p> 189 * 190 * @param companyId the primary key of the user's company 191 * @param autoPassword whether a password should be automatically generated 192 for the user 193 * @param password1 the user's password 194 * @param password2 the user's password confirmation 195 * @param autoScreenName whether a screen name should be automatically 196 generated for the user 197 * @param screenName the user's screen name 198 * @param emailAddress the user's email address 199 * @param facebookId the user's facebook ID 200 * @param openId the user's OpenID 201 * @param locale the user's locale 202 * @param firstName the user's first name 203 * @param middleName the user's middle name 204 * @param lastName the user's last name 205 * @param prefixId the user's name prefix ID 206 * @param suffixId the user's name suffix ID 207 * @param male whether the user is male 208 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 209 January) 210 * @param birthdayDay the user's birthday day 211 * @param birthdayYear the user's birthday year 212 * @param jobTitle the user's job title 213 * @param groupIds the primary keys of the user's groups 214 * @param organizationIds the primary keys of the user's organizations 215 * @param roleIds the primary keys of the roles this user possesses 216 * @param userGroupIds the primary keys of the user's user groups 217 * @param sendEmail whether to send the user an email notification about 218 their new account 219 * @param serviceContext the user's service context (optionally 220 <code>null</code>). Can set the universally unique identifier 221 (with the <code>uuid</code> attribute), asset category IDs, asset 222 tag names, and expando bridge attributes for the user. 223 * @return the new user 224 * @throws PortalException if the user's information was invalid, if the 225 creator did not have permission to add users, or if the email 226 address was reserved 227 * @throws SystemException if a system exception occurred 228 */ 229 public static com.liferay.portal.model.UserSoap addUser(long companyId, 230 boolean autoPassword, java.lang.String password1, 231 java.lang.String password2, boolean autoScreenName, 232 java.lang.String screenName, java.lang.String emailAddress, 233 long facebookId, java.lang.String openId, String locale, 234 java.lang.String firstName, java.lang.String middleName, 235 java.lang.String lastName, int prefixId, int suffixId, boolean male, 236 int birthdayMonth, int birthdayDay, int birthdayYear, 237 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 238 long[] roleIds, long[] userGroupIds, boolean sendEmail, 239 com.liferay.portal.service.ServiceContext serviceContext) 240 throws RemoteException { 241 try { 242 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId, 243 autoPassword, password1, password2, autoScreenName, 244 screenName, emailAddress, facebookId, openId, 245 LocaleUtil.fromLanguageId(locale), firstName, middleName, 246 lastName, prefixId, suffixId, male, birthdayMonth, 247 birthdayDay, birthdayYear, jobTitle, groupIds, 248 organizationIds, roleIds, userGroupIds, sendEmail, 249 serviceContext); 250 251 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 252 } 253 catch (Exception e) { 254 _log.error(e, e); 255 256 throw new RemoteException(e.getMessage()); 257 } 258 } 259 260 /** 261 * Adds a user with additional parameters. 262 * 263 * <p> 264 * This method handles the creation and bookkeeping of the user including 265 * its resources, metadata, and internal data structures. It is not 266 * necessary to make subsequent calls to any methods to setup default 267 * groups, resources, etc. 268 * </p> 269 * 270 * @param companyId the primary key of the user's company 271 * @param autoPassword whether a password should be automatically generated 272 for the user 273 * @param password1 the user's password 274 * @param password2 the user's password confirmation 275 * @param autoScreenName whether a screen name should be automatically 276 generated for the user 277 * @param screenName the user's screen name 278 * @param emailAddress the user's email address 279 * @param facebookId the user's facebook ID 280 * @param openId the user's OpenID 281 * @param locale the user's locale 282 * @param firstName the user's first name 283 * @param middleName the user's middle name 284 * @param lastName the user's last name 285 * @param prefixId the user's name prefix ID 286 * @param suffixId the user's name suffix ID 287 * @param male whether the user is male 288 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 289 January) 290 * @param birthdayDay the user's birthday day 291 * @param birthdayYear the user's birthday year 292 * @param jobTitle the user's job title 293 * @param groupIds the primary keys of the user's groups 294 * @param organizationIds the primary keys of the user's organizations 295 * @param roleIds the primary keys of the roles this user possesses 296 * @param userGroupIds the primary keys of the user's user groups 297 * @param addresses the user's addresses 298 * @param emailAddresses the user's email addresses 299 * @param phones the user's phone numbers 300 * @param websites the user's websites 301 * @param announcementsDelivers the announcements deliveries 302 * @param sendEmail whether to send the user an email notification about 303 their new account 304 * @param serviceContext the user's service context (optionally 305 <code>null</code>). Can set the universally unique identifier 306 (with the <code>uuid</code> attribute), asset category IDs, asset 307 tag names, and expando bridge attributes for the user. 308 * @return the new user 309 * @throws PortalException if the user's information was invalid, if the 310 creator did not have permission to add users, if the email 311 address was reserved, or some other portal exception occurred 312 * @throws SystemException if a system exception occurred 313 */ 314 public static com.liferay.portal.model.UserSoap addUser(long companyId, 315 boolean autoPassword, java.lang.String password1, 316 java.lang.String password2, boolean autoScreenName, 317 java.lang.String screenName, java.lang.String emailAddress, 318 long facebookId, java.lang.String openId, String locale, 319 java.lang.String firstName, java.lang.String middleName, 320 java.lang.String lastName, int prefixId, int suffixId, boolean male, 321 int birthdayMonth, int birthdayDay, int birthdayYear, 322 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 323 long[] roleIds, long[] userGroupIds, 324 com.liferay.portal.model.AddressSoap[] addresses, 325 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 326 com.liferay.portal.model.PhoneSoap[] phones, 327 com.liferay.portal.model.WebsiteSoap[] websites, 328 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers, 329 boolean sendEmail, 330 com.liferay.portal.service.ServiceContext serviceContext) 331 throws RemoteException { 332 try { 333 com.liferay.portal.model.User returnValue = UserServiceUtil.addUser(companyId, 334 autoPassword, password1, password2, autoScreenName, 335 screenName, emailAddress, facebookId, openId, 336 LocaleUtil.fromLanguageId(locale), firstName, middleName, 337 lastName, prefixId, suffixId, male, birthdayMonth, 338 birthdayDay, birthdayYear, jobTitle, groupIds, 339 organizationIds, roleIds, userGroupIds, 340 com.liferay.portal.model.impl.AddressModelImpl.toModels( 341 addresses), 342 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 343 emailAddresses), 344 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 345 phones), 346 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 347 websites), 348 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels( 349 announcementsDelivers), sendEmail, serviceContext); 350 351 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 352 } 353 catch (Exception e) { 354 _log.error(e, e); 355 356 throw new RemoteException(e.getMessage()); 357 } 358 } 359 360 /** 361 * Adds the users to the user group. 362 * 363 * @param userGroupId the primary key of the user group 364 * @param userIds the primary keys of the users 365 * @throws PortalException if a user group or user with the primary could 366 could not be found, or if the current user did not have 367 permission to assign group members 368 * @throws SystemException if a system exception occurred 369 */ 370 public static void addUserGroupUsers(long userGroupId, long[] userIds) 371 throws RemoteException { 372 try { 373 UserServiceUtil.addUserGroupUsers(userGroupId, userIds); 374 } 375 catch (Exception e) { 376 _log.error(e, e); 377 378 throw new RemoteException(e.getMessage()); 379 } 380 } 381 382 /** 383 * Adds a user with workflow. 384 * 385 * <p> 386 * This method handles the creation and bookkeeping of the user including 387 * its resources, metadata, and internal data structures. It is not 388 * necessary to make subsequent calls to any methods to setup default 389 * groups, resources, etc. 390 * </p> 391 * 392 * @param companyId the primary key of the user's company 393 * @param autoPassword whether a password should be automatically generated 394 for the user 395 * @param password1 the user's password 396 * @param password2 the user's password confirmation 397 * @param autoScreenName whether a screen name should be automatically 398 generated for the user 399 * @param screenName the user's screen name 400 * @param emailAddress the user's email address 401 * @param facebookId the user's facebook ID 402 * @param openId the user's OpenID 403 * @param locale the user's locale 404 * @param firstName the user's first name 405 * @param middleName the user's middle name 406 * @param lastName the user's last name 407 * @param prefixId the user's name prefix ID 408 * @param suffixId the user's name suffix ID 409 * @param male whether the user is male 410 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 411 January) 412 * @param birthdayDay the user's birthday day 413 * @param birthdayYear the user's birthday year 414 * @param jobTitle the user's job title 415 * @param groupIds the primary keys of the user's groups 416 * @param organizationIds the primary keys of the user's organizations 417 * @param roleIds the primary keys of the roles this user possesses 418 * @param userGroupIds the primary keys of the user's user groups 419 * @param sendEmail whether to send the user an email notification about 420 their new account 421 * @param serviceContext the user's service context (optionally 422 <code>null</code>). Can set the universally unique identifier 423 (with the <code>uuid</code> attribute), asset category IDs, asset 424 tag names, and expando bridge attributes for the user. 425 * @return the new user 426 * @throws PortalException if the user's information was invalid, if the 427 creator did not have permission to add users, or if the email 428 address was reserved 429 * @throws SystemException if a system exception occurred 430 */ 431 public static com.liferay.portal.model.UserSoap addUserWithWorkflow( 432 long companyId, boolean autoPassword, java.lang.String password1, 433 java.lang.String password2, boolean autoScreenName, 434 java.lang.String screenName, java.lang.String emailAddress, 435 long facebookId, java.lang.String openId, String locale, 436 java.lang.String firstName, java.lang.String middleName, 437 java.lang.String lastName, int prefixId, int suffixId, boolean male, 438 int birthdayMonth, int birthdayDay, int birthdayYear, 439 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 440 long[] roleIds, long[] userGroupIds, boolean sendEmail, 441 com.liferay.portal.service.ServiceContext serviceContext) 442 throws RemoteException { 443 try { 444 com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId, 445 autoPassword, password1, password2, autoScreenName, 446 screenName, emailAddress, facebookId, openId, 447 LocaleUtil.fromLanguageId(locale), firstName, middleName, 448 lastName, prefixId, suffixId, male, birthdayMonth, 449 birthdayDay, birthdayYear, jobTitle, groupIds, 450 organizationIds, roleIds, userGroupIds, sendEmail, 451 serviceContext); 452 453 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 454 } 455 catch (Exception e) { 456 _log.error(e, e); 457 458 throw new RemoteException(e.getMessage()); 459 } 460 } 461 462 /** 463 * Adds a user with workflow and additional parameters. 464 * 465 * <p> 466 * This method handles the creation and bookkeeping of the user including 467 * its resources, metadata, and internal data structures. It is not 468 * necessary to make subsequent calls to any methods to setup default 469 * groups, resources, etc. 470 * </p> 471 * 472 * @param companyId the primary key of the user's company 473 * @param autoPassword whether a password should be automatically generated 474 for the user 475 * @param password1 the user's password 476 * @param password2 the user's password confirmation 477 * @param autoScreenName whether a screen name should be automatically 478 generated for the user 479 * @param screenName the user's screen name 480 * @param emailAddress the user's email address 481 * @param facebookId the user's facebook ID 482 * @param openId the user's OpenID 483 * @param locale the user's locale 484 * @param firstName the user's first name 485 * @param middleName the user's middle name 486 * @param lastName the user's last name 487 * @param prefixId the user's name prefix ID 488 * @param suffixId the user's name suffix ID 489 * @param male whether the user is male 490 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 491 January) 492 * @param birthdayDay the user's birthday day 493 * @param birthdayYear the user's birthday year 494 * @param jobTitle the user's job title 495 * @param groupIds the primary keys of the user's groups 496 * @param organizationIds the primary keys of the user's organizations 497 * @param roleIds the primary keys of the roles this user possesses 498 * @param userGroupIds the primary keys of the user's user groups 499 * @param addresses the user's addresses 500 * @param emailAddresses the user's email addresses 501 * @param phones the user's phone numbers 502 * @param websites the user's websites 503 * @param announcementsDelivers the announcements deliveries 504 * @param sendEmail whether to send the user an email notification about 505 their new account 506 * @param serviceContext the user's service context (optionally 507 <code>null</code>). Can set the universally unique identifier 508 (with the <code>uuid</code> attribute), asset category IDs, asset 509 tag names, and expando bridge attributes for the user. 510 * @return the new user 511 * @throws PortalException if the user's information was invalid, if the 512 creator did not have permission to add users, if the email 513 address was reserved, or some other portal exception occurred 514 * @throws SystemException if a system exception occurred 515 */ 516 public static com.liferay.portal.model.UserSoap addUserWithWorkflow( 517 long companyId, boolean autoPassword, java.lang.String password1, 518 java.lang.String password2, boolean autoScreenName, 519 java.lang.String screenName, java.lang.String emailAddress, 520 long facebookId, java.lang.String openId, String locale, 521 java.lang.String firstName, java.lang.String middleName, 522 java.lang.String lastName, int prefixId, int suffixId, boolean male, 523 int birthdayMonth, int birthdayDay, int birthdayYear, 524 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 525 long[] roleIds, long[] userGroupIds, 526 com.liferay.portal.model.AddressSoap[] addresses, 527 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 528 com.liferay.portal.model.PhoneSoap[] phones, 529 com.liferay.portal.model.WebsiteSoap[] websites, 530 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers, 531 boolean sendEmail, 532 com.liferay.portal.service.ServiceContext serviceContext) 533 throws RemoteException { 534 try { 535 com.liferay.portal.model.User returnValue = UserServiceUtil.addUserWithWorkflow(companyId, 536 autoPassword, password1, password2, autoScreenName, 537 screenName, emailAddress, facebookId, openId, 538 LocaleUtil.fromLanguageId(locale), firstName, middleName, 539 lastName, prefixId, suffixId, male, birthdayMonth, 540 birthdayDay, birthdayYear, jobTitle, groupIds, 541 organizationIds, roleIds, userGroupIds, 542 com.liferay.portal.model.impl.AddressModelImpl.toModels( 543 addresses), 544 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 545 emailAddresses), 546 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 547 phones), 548 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 549 websites), 550 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels( 551 announcementsDelivers), sendEmail, serviceContext); 552 553 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 554 } 555 catch (Exception e) { 556 _log.error(e, e); 557 558 throw new RemoteException(e.getMessage()); 559 } 560 } 561 562 /** 563 * Deletes the user's portrait image. 564 * 565 * @param userId the primary key of the user 566 * @throws PortalException if a user with the primary key could not be 567 found, if the user's portrait could not be found, or if the 568 current user did not have permission to update the user 569 * @throws SystemException if a system exception occurred 570 */ 571 public static void deletePortrait(long userId) throws RemoteException { 572 try { 573 UserServiceUtil.deletePortrait(userId); 574 } 575 catch (Exception e) { 576 _log.error(e, e); 577 578 throw new RemoteException(e.getMessage()); 579 } 580 } 581 582 /** 583 * Removes the user from the role. 584 * 585 * @param roleId the primary key of the role 586 * @param userId the primary key of the user 587 * @throws PortalException if a role or user with the primary key could not 588 be found, or if the current user did not have permission to 589 assign role members 590 * @throws SystemException if a system exception occurred 591 */ 592 public static void deleteRoleUser(long roleId, long userId) 593 throws RemoteException { 594 try { 595 UserServiceUtil.deleteRoleUser(roleId, userId); 596 } 597 catch (Exception e) { 598 _log.error(e, e); 599 600 throw new RemoteException(e.getMessage()); 601 } 602 } 603 604 /** 605 * Deletes the user. 606 * 607 * @param userId the primary key of the user 608 * @throws PortalException if a user with the primary key could not be found 609 or if the current user did not have permission to delete the user 610 * @throws SystemException if a system exception occurred 611 */ 612 public static void deleteUser(long userId) throws RemoteException { 613 try { 614 UserServiceUtil.deleteUser(userId); 615 } 616 catch (Exception e) { 617 _log.error(e, e); 618 619 throw new RemoteException(e.getMessage()); 620 } 621 } 622 623 public static com.liferay.portal.model.UserSoap[] getCompanyUsers( 624 long companyId, int start, int end) throws RemoteException { 625 try { 626 java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getCompanyUsers(companyId, 627 start, end); 628 629 return com.liferay.portal.model.UserSoap.toSoapModels(returnValue); 630 } 631 catch (Exception e) { 632 _log.error(e, e); 633 634 throw new RemoteException(e.getMessage()); 635 } 636 } 637 638 public static int getCompanyUsersCount(long companyId) 639 throws RemoteException { 640 try { 641 int returnValue = UserServiceUtil.getCompanyUsersCount(companyId); 642 643 return returnValue; 644 } 645 catch (Exception e) { 646 _log.error(e, e); 647 648 throw new RemoteException(e.getMessage()); 649 } 650 } 651 652 /** 653 * Returns the primary keys of all the users belonging to the group. 654 * 655 * @param groupId the primary key of the group 656 * @return the primary keys of the users belonging to the group 657 * @throws PortalException if the current user did not have permission to 658 view group assignments 659 * @throws SystemException if a system exception occurred 660 */ 661 public static long[] getGroupUserIds(long groupId) 662 throws RemoteException { 663 try { 664 long[] returnValue = UserServiceUtil.getGroupUserIds(groupId); 665 666 return returnValue; 667 } 668 catch (Exception e) { 669 _log.error(e, e); 670 671 throw new RemoteException(e.getMessage()); 672 } 673 } 674 675 /** 676 * Returns all the users belonging to the group. 677 * 678 * @param groupId the primary key of the group 679 * @return the users belonging to the group 680 * @throws PortalException if the current user did not have permission to 681 view group assignments 682 * @throws SystemException if a system exception occurred 683 */ 684 public static com.liferay.portal.model.UserSoap[] getGroupUsers( 685 long groupId) throws RemoteException { 686 try { 687 java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getGroupUsers(groupId); 688 689 return com.liferay.portal.model.UserSoap.toSoapModels(returnValue); 690 } 691 catch (Exception e) { 692 _log.error(e, e); 693 694 throw new RemoteException(e.getMessage()); 695 } 696 } 697 698 /** 699 * Returns the primary keys of all the users belonging to the organization. 700 * 701 * @param organizationId the primary key of the organization 702 * @return the primary keys of the users belonging to the organization 703 * @throws PortalException if the current user did not have permission to 704 view organization assignments 705 * @throws SystemException if a system exception occurred 706 */ 707 public static long[] getOrganizationUserIds(long organizationId) 708 throws RemoteException { 709 try { 710 long[] returnValue = UserServiceUtil.getOrganizationUserIds(organizationId); 711 712 return returnValue; 713 } 714 catch (Exception e) { 715 _log.error(e, e); 716 717 throw new RemoteException(e.getMessage()); 718 } 719 } 720 721 /** 722 * Returns all the users belonging to the organization. 723 * 724 * @param organizationId the primary key of the organization 725 * @return users belonging to the organization 726 * @throws PortalException if the current user did not have permission to 727 view organization assignments 728 * @throws SystemException if a system exception occurred 729 */ 730 public static com.liferay.portal.model.UserSoap[] getOrganizationUsers( 731 long organizationId) throws RemoteException { 732 try { 733 java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getOrganizationUsers(organizationId); 734 735 return com.liferay.portal.model.UserSoap.toSoapModels(returnValue); 736 } 737 catch (Exception e) { 738 _log.error(e, e); 739 740 throw new RemoteException(e.getMessage()); 741 } 742 } 743 744 /** 745 * Returns the primary keys of all the users belonging to the role. 746 * 747 * @param roleId the primary key of the role 748 * @return the primary keys of the users belonging to the role 749 * @throws PortalException if the current user did not have permission to 750 view role members 751 * @throws SystemException if a system exception occurred 752 */ 753 public static long[] getRoleUserIds(long roleId) throws RemoteException { 754 try { 755 long[] returnValue = UserServiceUtil.getRoleUserIds(roleId); 756 757 return returnValue; 758 } 759 catch (Exception e) { 760 _log.error(e, e); 761 762 throw new RemoteException(e.getMessage()); 763 } 764 } 765 766 /** 767 * Returns the user with the email address. 768 * 769 * @param companyId the primary key of the user's company 770 * @param emailAddress the user's email address 771 * @return the user with the email address 772 * @throws PortalException if a user with the email address could not be 773 found or if the current user did not have permission to view the 774 user 775 * @throws SystemException if a system exception occurred 776 */ 777 public static com.liferay.portal.model.UserSoap getUserByEmailAddress( 778 long companyId, java.lang.String emailAddress) 779 throws RemoteException { 780 try { 781 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByEmailAddress(companyId, 782 emailAddress); 783 784 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 785 } 786 catch (Exception e) { 787 _log.error(e, e); 788 789 throw new RemoteException(e.getMessage()); 790 } 791 } 792 793 /** 794 * Returns the user with the primary key. 795 * 796 * @param userId the primary key of the user 797 * @return the user with the primary key 798 * @throws PortalException if a user with the primary key could not be found 799 or if the current user did not have permission to view the user 800 * @throws SystemException if a system exception occurred 801 */ 802 public static com.liferay.portal.model.UserSoap getUserById(long userId) 803 throws RemoteException { 804 try { 805 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserById(userId); 806 807 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 808 } 809 catch (Exception e) { 810 _log.error(e, e); 811 812 throw new RemoteException(e.getMessage()); 813 } 814 } 815 816 /** 817 * Returns the user with the screen name. 818 * 819 * @param companyId the primary key of the user's company 820 * @param screenName the user's screen name 821 * @return the user with the screen name 822 * @throws PortalException if a user with the screen name could not be found 823 or if the current user did not have permission to view the user 824 * @throws SystemException if a system exception occurred 825 */ 826 public static com.liferay.portal.model.UserSoap getUserByScreenName( 827 long companyId, java.lang.String screenName) throws RemoteException { 828 try { 829 com.liferay.portal.model.User returnValue = UserServiceUtil.getUserByScreenName(companyId, 830 screenName); 831 832 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 833 } 834 catch (Exception e) { 835 _log.error(e, e); 836 837 throw new RemoteException(e.getMessage()); 838 } 839 } 840 841 public static com.liferay.portal.model.UserSoap[] getUserGroupUsers( 842 long userGroupId) throws RemoteException { 843 try { 844 java.util.List<com.liferay.portal.model.User> returnValue = UserServiceUtil.getUserGroupUsers(userGroupId); 845 846 return com.liferay.portal.model.UserSoap.toSoapModels(returnValue); 847 } 848 catch (Exception e) { 849 _log.error(e, e); 850 851 throw new RemoteException(e.getMessage()); 852 } 853 } 854 855 /** 856 * Returns the primary key of the user with the email address. 857 * 858 * @param companyId the primary key of the user's company 859 * @param emailAddress the user's email address 860 * @return the primary key of the user with the email address 861 * @throws PortalException if a user with the email address could not be 862 found 863 * @throws SystemException if a system exception occurred 864 */ 865 public static long getUserIdByEmailAddress(long companyId, 866 java.lang.String emailAddress) throws RemoteException { 867 try { 868 long returnValue = UserServiceUtil.getUserIdByEmailAddress(companyId, 869 emailAddress); 870 871 return returnValue; 872 } 873 catch (Exception e) { 874 _log.error(e, e); 875 876 throw new RemoteException(e.getMessage()); 877 } 878 } 879 880 /** 881 * Returns the primary key of the user with the screen name. 882 * 883 * @param companyId the primary key of the user's company 884 * @param screenName the user's screen name 885 * @return the primary key of the user with the screen name 886 * @throws PortalException if a user with the screen name could not be found 887 * @throws SystemException if a system exception occurred 888 */ 889 public static long getUserIdByScreenName(long companyId, 890 java.lang.String screenName) throws RemoteException { 891 try { 892 long returnValue = UserServiceUtil.getUserIdByScreenName(companyId, 893 screenName); 894 895 return returnValue; 896 } 897 catch (Exception e) { 898 _log.error(e, e); 899 900 throw new RemoteException(e.getMessage()); 901 } 902 } 903 904 /** 905 * Returns <code>true</code> if the user is a member of the group. 906 * 907 * @param groupId the primary key of the group 908 * @param userId the primary key of the user 909 * @return <code>true</code> if the user is a member of the group; 910 <code>false</code> otherwise 911 * @throws PortalException if the current user did not have permission to 912 view the user or group members 913 * @throws SystemException if a system exception occurred 914 */ 915 public static boolean hasGroupUser(long groupId, long userId) 916 throws RemoteException { 917 try { 918 boolean returnValue = UserServiceUtil.hasGroupUser(groupId, userId); 919 920 return returnValue; 921 } 922 catch (Exception e) { 923 _log.error(e, e); 924 925 throw new RemoteException(e.getMessage()); 926 } 927 } 928 929 /** 930 * Returns <code>true</code> if the user is a member of the role. 931 * 932 * @param roleId the primary key of the role 933 * @param userId the primary key of the user 934 * @return <code>true</code> if the user is a member of the role; 935 <code>false</code> otherwise 936 * @throws PortalException if the current user did not have permission to 937 view the user or role members 938 * @throws SystemException if a system exception occurred 939 */ 940 public static boolean hasRoleUser(long roleId, long userId) 941 throws RemoteException { 942 try { 943 boolean returnValue = UserServiceUtil.hasRoleUser(roleId, userId); 944 945 return returnValue; 946 } 947 catch (Exception e) { 948 _log.error(e, e); 949 950 throw new RemoteException(e.getMessage()); 951 } 952 } 953 954 /** 955 * Returns <code>true</code> if the user has the role with the name, 956 * optionally through inheritance. 957 * 958 * @param companyId the primary key of the role's company 959 * @param name the name of the role (must be a regular role, not an 960 organization, site or provider role) 961 * @param userId the primary key of the user 962 * @param inherited whether to include roles inherited from organizations, 963 sites, etc. 964 * @return <code>true</code> if the user has the role; <code>false</code> 965 otherwise 966 * @throws PortalException if a role with the name could not be found 967 * @throws SystemException if a system exception occurred 968 */ 969 public static boolean hasRoleUser(long companyId, java.lang.String name, 970 long userId, boolean inherited) throws RemoteException { 971 try { 972 boolean returnValue = UserServiceUtil.hasRoleUser(companyId, name, 973 userId, inherited); 974 975 return returnValue; 976 } 977 catch (Exception e) { 978 _log.error(e, e); 979 980 throw new RemoteException(e.getMessage()); 981 } 982 } 983 984 /** 985 * Sets the users in the role, removing and adding users to the role as 986 * necessary. 987 * 988 * @param roleId the primary key of the role 989 * @param userIds the primary keys of the users 990 * @throws PortalException if the current user did not have permission to 991 assign role members 992 * @throws SystemException if a system exception occurred 993 */ 994 public static void setRoleUsers(long roleId, long[] userIds) 995 throws RemoteException { 996 try { 997 UserServiceUtil.setRoleUsers(roleId, userIds); 998 } 999 catch (Exception e) { 1000 _log.error(e, e); 1001 1002 throw new RemoteException(e.getMessage()); 1003 } 1004 } 1005 1006 /** 1007 * Sets the users in the user group, removing and adding users to the user 1008 * group as necessary. 1009 * 1010 * @param userGroupId the primary key of the user group 1011 * @param userIds the primary keys of the users 1012 * @throws PortalException if the current user did not have permission to 1013 assign group members 1014 * @throws SystemException if a system exception occurred 1015 */ 1016 public static void setUserGroupUsers(long userGroupId, long[] userIds) 1017 throws RemoteException { 1018 try { 1019 UserServiceUtil.setUserGroupUsers(userGroupId, userIds); 1020 } 1021 catch (Exception e) { 1022 _log.error(e, e); 1023 1024 throw new RemoteException(e.getMessage()); 1025 } 1026 } 1027 1028 /** 1029 * Removes the users from the teams of a group. 1030 * 1031 * @param groupId the primary key of the group 1032 * @param userIds the primary keys of the users 1033 * @throws PortalException if the current user did not have permission to 1034 modify user group assignments 1035 * @throws SystemException if a system exception occurred 1036 */ 1037 public static void unsetGroupTeamsUsers(long groupId, long[] userIds) 1038 throws RemoteException { 1039 try { 1040 UserServiceUtil.unsetGroupTeamsUsers(groupId, userIds); 1041 } 1042 catch (Exception e) { 1043 _log.error(e, e); 1044 1045 throw new RemoteException(e.getMessage()); 1046 } 1047 } 1048 1049 /** 1050 * Removes the users from the group. 1051 * 1052 * @param groupId the primary key of the group 1053 * @param userIds the primary keys of the users 1054 * @param serviceContext the service context (optionally <code>null</code>) 1055 * @throws PortalException if the current user did not have permission to 1056 modify group assignments 1057 * @throws SystemException if a system exception occurred 1058 */ 1059 public static void unsetGroupUsers(long groupId, long[] userIds, 1060 com.liferay.portal.service.ServiceContext serviceContext) 1061 throws RemoteException { 1062 try { 1063 UserServiceUtil.unsetGroupUsers(groupId, userIds, serviceContext); 1064 } 1065 catch (Exception e) { 1066 _log.error(e, e); 1067 1068 throw new RemoteException(e.getMessage()); 1069 } 1070 } 1071 1072 /** 1073 * Removes the users from the organization. 1074 * 1075 * @param organizationId the primary key of the organization 1076 * @param userIds the primary keys of the users 1077 * @throws PortalException if the current user did not have permission to 1078 modify organization assignments 1079 * @throws SystemException if a system exception occurred 1080 */ 1081 public static void unsetOrganizationUsers(long organizationId, 1082 long[] userIds) throws RemoteException { 1083 try { 1084 UserServiceUtil.unsetOrganizationUsers(organizationId, userIds); 1085 } 1086 catch (Exception e) { 1087 _log.error(e, e); 1088 1089 throw new RemoteException(e.getMessage()); 1090 } 1091 } 1092 1093 /** 1094 * Removes the users from the password policy. 1095 * 1096 * @param passwordPolicyId the primary key of the password policy 1097 * @param userIds the primary keys of the users 1098 * @throws PortalException if the current user did not have permission to 1099 modify policy assignments 1100 * @throws SystemException if a system exception occurred 1101 */ 1102 public static void unsetPasswordPolicyUsers(long passwordPolicyId, 1103 long[] userIds) throws RemoteException { 1104 try { 1105 UserServiceUtil.unsetPasswordPolicyUsers(passwordPolicyId, userIds); 1106 } 1107 catch (Exception e) { 1108 _log.error(e, e); 1109 1110 throw new RemoteException(e.getMessage()); 1111 } 1112 } 1113 1114 /** 1115 * Removes the users from the role. 1116 * 1117 * @param roleId the primary key of the role 1118 * @param userIds the primary keys of the users 1119 * @throws PortalException if the current user did not have permission to 1120 modify role assignments 1121 * @throws SystemException if a system exception occurred 1122 */ 1123 public static void unsetRoleUsers(long roleId, long[] userIds) 1124 throws RemoteException { 1125 try { 1126 UserServiceUtil.unsetRoleUsers(roleId, userIds); 1127 } 1128 catch (Exception e) { 1129 _log.error(e, e); 1130 1131 throw new RemoteException(e.getMessage()); 1132 } 1133 } 1134 1135 /** 1136 * Removes the users from the team. 1137 * 1138 * @param teamId the primary key of the team 1139 * @param userIds the primary keys of the users 1140 * @throws PortalException if the current user did not have permission to 1141 modify team assignments 1142 * @throws SystemException if a system exception occurred 1143 */ 1144 public static void unsetTeamUsers(long teamId, long[] userIds) 1145 throws RemoteException { 1146 try { 1147 UserServiceUtil.unsetTeamUsers(teamId, userIds); 1148 } 1149 catch (Exception e) { 1150 _log.error(e, e); 1151 1152 throw new RemoteException(e.getMessage()); 1153 } 1154 } 1155 1156 /** 1157 * Removes the users from the user group. 1158 * 1159 * @param userGroupId the primary key of the user group 1160 * @param userIds the primary keys of the users 1161 * @throws PortalException if the current user did not have permission to 1162 modify user group assignments 1163 * @throws SystemException if a system exception occurred 1164 */ 1165 public static void unsetUserGroupUsers(long userGroupId, long[] userIds) 1166 throws RemoteException { 1167 try { 1168 UserServiceUtil.unsetUserGroupUsers(userGroupId, userIds); 1169 } 1170 catch (Exception e) { 1171 _log.error(e, e); 1172 1173 throw new RemoteException(e.getMessage()); 1174 } 1175 } 1176 1177 /** 1178 * Updates the user's response to the terms of use agreement. 1179 * 1180 * @param userId the primary key of the user 1181 * @param agreedToTermsOfUse whether the user has agree to the terms of use 1182 * @return the user 1183 * @throws PortalException if the current user did not have permission to 1184 update the user's agreement to terms-of-use 1185 * @throws SystemException if a system exception occurred 1186 */ 1187 public static com.liferay.portal.model.UserSoap updateAgreedToTermsOfUse( 1188 long userId, boolean agreedToTermsOfUse) throws RemoteException { 1189 try { 1190 com.liferay.portal.model.User returnValue = UserServiceUtil.updateAgreedToTermsOfUse(userId, 1191 agreedToTermsOfUse); 1192 1193 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1194 } 1195 catch (Exception e) { 1196 _log.error(e, e); 1197 1198 throw new RemoteException(e.getMessage()); 1199 } 1200 } 1201 1202 /** 1203 * Updates the user's email address. 1204 * 1205 * @param userId the primary key of the user 1206 * @param password the user's password 1207 * @param emailAddress1 the user's new email address 1208 * @param emailAddress2 the user's new email address confirmation 1209 * @param serviceContext the service context. Must set the portal URL, main 1210 path, primary key of the layout, remote address, remote host, and 1211 agent for the user. 1212 * @return the user 1213 * @throws PortalException if a user with the primary key could not be found 1214 or if the current user did not have permission to update the user 1215 * @throws SystemException if a system exception occurred 1216 */ 1217 public static com.liferay.portal.model.UserSoap updateEmailAddress( 1218 long userId, java.lang.String password, java.lang.String emailAddress1, 1219 java.lang.String emailAddress2, 1220 com.liferay.portal.service.ServiceContext serviceContext) 1221 throws RemoteException { 1222 try { 1223 com.liferay.portal.model.User returnValue = UserServiceUtil.updateEmailAddress(userId, 1224 password, emailAddress1, emailAddress2, serviceContext); 1225 1226 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1227 } 1228 catch (Exception e) { 1229 _log.error(e, e); 1230 1231 throw new RemoteException(e.getMessage()); 1232 } 1233 } 1234 1235 /** 1236 * Updates a user account that was automatically created when a guest user 1237 * participated in an action (e.g. posting a comment) and only provided his 1238 * name and email address. 1239 * 1240 * @param companyId the primary key of the user's company 1241 * @param autoPassword whether a password should be automatically generated 1242 for the user 1243 * @param password1 the user's password 1244 * @param password2 the user's password confirmation 1245 * @param autoScreenName whether a screen name should be automatically 1246 generated for the user 1247 * @param screenName the user's screen name 1248 * @param emailAddress the user's email address 1249 * @param facebookId the user's facebook ID 1250 * @param openId the user's OpenID 1251 * @param locale the user's locale 1252 * @param firstName the user's first name 1253 * @param middleName the user's middle name 1254 * @param lastName the user's last name 1255 * @param prefixId the user's name prefix ID 1256 * @param suffixId the user's name suffix ID 1257 * @param male whether the user is male 1258 * @param birthdayMonth the user's birthday month (0-based, meaning 0 for 1259 January) 1260 * @param birthdayDay the user's birthday day 1261 * @param birthdayYear the user's birthday year 1262 * @param jobTitle the user's job title 1263 * @param updateUserInformation whether to update the user's information 1264 * @param sendEmail whether to send the user an email notification about 1265 their new account 1266 * @param serviceContext the user's service context (optionally 1267 <code>null</code>). Can set the expando bridge attributes for the 1268 user. 1269 * @return the user 1270 * @throws PortalException if the user's information was invalid or if the 1271 email address was reserved 1272 * @throws SystemException if a system exception occurred 1273 */ 1274 public static com.liferay.portal.model.UserSoap updateIncompleteUser( 1275 long companyId, boolean autoPassword, java.lang.String password1, 1276 java.lang.String password2, boolean autoScreenName, 1277 java.lang.String screenName, java.lang.String emailAddress, 1278 long facebookId, java.lang.String openId, String locale, 1279 java.lang.String firstName, java.lang.String middleName, 1280 java.lang.String lastName, int prefixId, int suffixId, boolean male, 1281 int birthdayMonth, int birthdayDay, int birthdayYear, 1282 java.lang.String jobTitle, boolean updateUserInformation, 1283 boolean sendEmail, 1284 com.liferay.portal.service.ServiceContext serviceContext) 1285 throws RemoteException { 1286 try { 1287 com.liferay.portal.model.User returnValue = UserServiceUtil.updateIncompleteUser(companyId, 1288 autoPassword, password1, password2, autoScreenName, 1289 screenName, emailAddress, facebookId, openId, 1290 LocaleUtil.fromLanguageId(locale), firstName, middleName, 1291 lastName, prefixId, suffixId, male, birthdayMonth, 1292 birthdayDay, birthdayYear, jobTitle, updateUserInformation, 1293 sendEmail, serviceContext); 1294 1295 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1296 } 1297 catch (Exception e) { 1298 _log.error(e, e); 1299 1300 throw new RemoteException(e.getMessage()); 1301 } 1302 } 1303 1304 /** 1305 * Updates whether the user is locked out from logging in. 1306 * 1307 * @param userId the primary key of the user 1308 * @param lockout whether the user is locked out 1309 * @return the user 1310 * @throws PortalException if the user did not have permission to lock out 1311 the user 1312 * @throws SystemException if a system exception occurred 1313 */ 1314 public static com.liferay.portal.model.UserSoap updateLockoutById( 1315 long userId, boolean lockout) throws RemoteException { 1316 try { 1317 com.liferay.portal.model.User returnValue = UserServiceUtil.updateLockoutById(userId, 1318 lockout); 1319 1320 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1321 } 1322 catch (Exception e) { 1323 _log.error(e, e); 1324 1325 throw new RemoteException(e.getMessage()); 1326 } 1327 } 1328 1329 /** 1330 * Updates the user's OpenID. 1331 * 1332 * @param userId the primary key of the user 1333 * @param openId the new OpenID 1334 * @return the user 1335 * @throws PortalException if a user with the primary key could not be found 1336 or if the current user did not have permission to update the user 1337 * @throws SystemException if a system exception occurred 1338 */ 1339 public static com.liferay.portal.model.UserSoap updateOpenId(long userId, 1340 java.lang.String openId) throws RemoteException { 1341 try { 1342 com.liferay.portal.model.User returnValue = UserServiceUtil.updateOpenId(userId, 1343 openId); 1344 1345 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1346 } 1347 catch (Exception e) { 1348 _log.error(e, e); 1349 1350 throw new RemoteException(e.getMessage()); 1351 } 1352 } 1353 1354 /** 1355 * Sets the organizations that the user is in, removing and adding 1356 * organizations as necessary. 1357 * 1358 * @param userId the primary key of the user 1359 * @param organizationIds the primary keys of the organizations 1360 * @param serviceContext the service context. Must set whether user 1361 indexing is enabled. 1362 * @throws PortalException if a user with the primary key could not be found 1363 or if the current user did not have permission to update the user 1364 * @throws SystemException if a system exception occurred 1365 */ 1366 public static void updateOrganizations(long userId, long[] organizationIds, 1367 com.liferay.portal.service.ServiceContext serviceContext) 1368 throws RemoteException { 1369 try { 1370 UserServiceUtil.updateOrganizations(userId, organizationIds, 1371 serviceContext); 1372 } 1373 catch (Exception e) { 1374 _log.error(e, e); 1375 1376 throw new RemoteException(e.getMessage()); 1377 } 1378 } 1379 1380 /** 1381 * Updates the user's password without tracking or validation of the change. 1382 * 1383 * @param userId the primary key of the user 1384 * @param password1 the user's new password 1385 * @param password2 the user's new password confirmation 1386 * @param passwordReset whether the user should be asked to reset their 1387 password the next time they log in 1388 * @return the user 1389 * @throws PortalException if a user with the primary key could not be found 1390 or if the current user did not have permission to update the user 1391 * @throws SystemException if a system exception occurred 1392 */ 1393 public static com.liferay.portal.model.UserSoap updatePassword( 1394 long userId, java.lang.String password1, java.lang.String password2, 1395 boolean passwordReset) throws RemoteException { 1396 try { 1397 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePassword(userId, 1398 password1, password2, passwordReset); 1399 1400 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1401 } 1402 catch (Exception e) { 1403 _log.error(e, e); 1404 1405 throw new RemoteException(e.getMessage()); 1406 } 1407 } 1408 1409 /** 1410 * Updates the user's portrait image. 1411 * 1412 * @param userId the primary key of the user 1413 * @param bytes the new portrait image data 1414 * @return the user 1415 * @throws PortalException if a user with the primary key could not be 1416 found, if the new portrait was invalid, or if the current user 1417 did not have permission to update the user 1418 * @throws SystemException if a system exception occurred 1419 */ 1420 public static com.liferay.portal.model.UserSoap updatePortrait( 1421 long userId, byte[] bytes) throws RemoteException { 1422 try { 1423 com.liferay.portal.model.User returnValue = UserServiceUtil.updatePortrait(userId, 1424 bytes); 1425 1426 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1427 } 1428 catch (Exception e) { 1429 _log.error(e, e); 1430 1431 throw new RemoteException(e.getMessage()); 1432 } 1433 } 1434 1435 /** 1436 * Updates the user's password reset question and answer. 1437 * 1438 * @param userId the primary key of the user 1439 * @param question the user's new password reset question 1440 * @param answer the user's new password reset answer 1441 * @return the user 1442 * @throws PortalException if a user with the primary key could not be 1443 found, if the new question or answer were invalid, or if the 1444 current user did not have permission to update the user 1445 * @throws SystemException if a system exception occurred 1446 */ 1447 public static com.liferay.portal.model.UserSoap updateReminderQuery( 1448 long userId, java.lang.String question, java.lang.String answer) 1449 throws RemoteException { 1450 try { 1451 com.liferay.portal.model.User returnValue = UserServiceUtil.updateReminderQuery(userId, 1452 question, answer); 1453 1454 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1455 } 1456 catch (Exception e) { 1457 _log.error(e, e); 1458 1459 throw new RemoteException(e.getMessage()); 1460 } 1461 } 1462 1463 /** 1464 * Updates the user's screen name. 1465 * 1466 * @param userId the primary key of the user 1467 * @param screenName the user's new screen name 1468 * @return the user 1469 * @throws PortalException if a user with the primary key could not be 1470 found, if the new screen name was invalid, or if the current user 1471 did not have permission to update the user 1472 * @throws SystemException if a system exception occurred 1473 */ 1474 public static com.liferay.portal.model.UserSoap updateScreenName( 1475 long userId, java.lang.String screenName) throws RemoteException { 1476 try { 1477 com.liferay.portal.model.User returnValue = UserServiceUtil.updateScreenName(userId, 1478 screenName); 1479 1480 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1481 } 1482 catch (Exception e) { 1483 _log.error(e, e); 1484 1485 throw new RemoteException(e.getMessage()); 1486 } 1487 } 1488 1489 /** 1490 * Updates the user's workflow status. 1491 * 1492 * @param userId the primary key of the user 1493 * @param status the user's new workflow status 1494 * @return the user 1495 * @throws PortalException if a user with the primary key could not be 1496 found, if the current user was updating her own status to 1497 anything but {@link 1498 com.liferay.portal.kernel.workflow.WorkflowConstants#STATUS_APPROVED}, 1499 or if the current user did not have permission to update the 1500 user's workflow status. 1501 * @throws SystemException if a system exception occurred 1502 */ 1503 public static com.liferay.portal.model.UserSoap updateStatus(long userId, 1504 int status) throws RemoteException { 1505 try { 1506 com.liferay.portal.model.User returnValue = UserServiceUtil.updateStatus(userId, 1507 status); 1508 1509 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1510 } 1511 catch (Exception e) { 1512 _log.error(e, e); 1513 1514 throw new RemoteException(e.getMessage()); 1515 } 1516 } 1517 1518 /** 1519 * Updates the user with additional parameters. 1520 * 1521 * @param userId the primary key of the user 1522 * @param oldPassword the user's old password 1523 * @param newPassword1 the user's new password (optionally 1524 <code>null</code>) 1525 * @param newPassword2 the user's new password confirmation (optionally 1526 <code>null</code>) 1527 * @param passwordReset whether the user should be asked to reset their 1528 password the next time they login 1529 * @param reminderQueryQuestion the user's new password reset question 1530 * @param reminderQueryAnswer the user's new password reset answer 1531 * @param screenName the user's new screen name 1532 * @param emailAddress the user's new email address 1533 * @param facebookId the user's new Facebook ID 1534 * @param openId the user's new OpenID 1535 * @param languageId the user's new language ID 1536 * @param timeZoneId the user's new time zone ID 1537 * @param greeting the user's new greeting 1538 * @param comments the user's new comments 1539 * @param firstName the user's new first name 1540 * @param middleName the user's new middle name 1541 * @param lastName the user's new last name 1542 * @param prefixId the user's new name prefix ID 1543 * @param suffixId the user's new name suffix ID 1544 * @param male whether user is male 1545 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1546 for January) 1547 * @param birthdayDay the user's new birthday day 1548 * @param birthdayYear the user's birthday year 1549 * @param smsSn the user's new SMS screen name 1550 * @param aimSn the user's new AIM screen name 1551 * @param facebookSn the user's new Facebook screen name 1552 * @param icqSn the user's new ICQ screen name 1553 * @param jabberSn the user's new Jabber screen name 1554 * @param msnSn the user's new MSN screen name 1555 * @param mySpaceSn the user's new MySpace screen name 1556 * @param skypeSn the user's new Skype screen name 1557 * @param twitterSn the user's new Twitter screen name 1558 * @param ymSn the user's new Yahoo! Messenger screen name 1559 * @param jobTitle the user's new job title 1560 * @param groupIds the primary keys of the user's groups 1561 * @param organizationIds the primary keys of the user's organizations 1562 * @param roleIds the primary keys of the user's roles 1563 * @param userGroupRoles the user user's group roles 1564 * @param userGroupIds the primary keys of the user's user groups 1565 * @param addresses the user's addresses 1566 * @param emailAddresses the user's email addresses 1567 * @param phones the user's phone numbers 1568 * @param websites the user's websites 1569 * @param announcementsDelivers the announcements deliveries 1570 * @param serviceContext the user's service context (optionally 1571 <code>null</code>). Can set the universally unique identifier 1572 (with the <code>uuid</code> attribute), asset category IDs, asset 1573 tag names, and expando bridge attributes for the user. 1574 * @return the user 1575 * @throws PortalException if a user with the primary key could not be 1576 found, if the new information was invalid, or if the current user 1577 did not have permission to update the user 1578 * @throws SystemException if a system exception occurred 1579 */ 1580 public static com.liferay.portal.model.UserSoap updateUser(long userId, 1581 java.lang.String oldPassword, java.lang.String newPassword1, 1582 java.lang.String newPassword2, boolean passwordReset, 1583 java.lang.String reminderQueryQuestion, 1584 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1585 java.lang.String emailAddress, long facebookId, 1586 java.lang.String openId, java.lang.String languageId, 1587 java.lang.String timeZoneId, java.lang.String greeting, 1588 java.lang.String comments, java.lang.String firstName, 1589 java.lang.String middleName, java.lang.String lastName, int prefixId, 1590 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1591 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1592 java.lang.String facebookSn, java.lang.String icqSn, 1593 java.lang.String jabberSn, java.lang.String msnSn, 1594 java.lang.String mySpaceSn, java.lang.String skypeSn, 1595 java.lang.String twitterSn, java.lang.String ymSn, 1596 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1597 long[] roleIds, 1598 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles, 1599 long[] userGroupIds, com.liferay.portal.model.AddressSoap[] addresses, 1600 com.liferay.portal.model.EmailAddressSoap[] emailAddresses, 1601 com.liferay.portal.model.PhoneSoap[] phones, 1602 com.liferay.portal.model.WebsiteSoap[] websites, 1603 com.liferay.portlet.announcements.model.AnnouncementsDeliverySoap[] announcementsDelivers, 1604 com.liferay.portal.service.ServiceContext serviceContext) 1605 throws RemoteException { 1606 try { 1607 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId, 1608 oldPassword, newPassword1, newPassword2, passwordReset, 1609 reminderQueryQuestion, reminderQueryAnswer, screenName, 1610 emailAddress, facebookId, openId, languageId, timeZoneId, 1611 greeting, comments, firstName, middleName, lastName, 1612 prefixId, suffixId, male, birthdayMonth, birthdayDay, 1613 birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn, 1614 msnSn, mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, 1615 groupIds, organizationIds, roleIds, 1616 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels( 1617 userGroupRoles), userGroupIds, 1618 com.liferay.portal.model.impl.AddressModelImpl.toModels( 1619 addresses), 1620 com.liferay.portal.model.impl.EmailAddressModelImpl.toModels( 1621 emailAddresses), 1622 com.liferay.portal.model.impl.PhoneModelImpl.toModels( 1623 phones), 1624 com.liferay.portal.model.impl.WebsiteModelImpl.toModels( 1625 websites), 1626 com.liferay.portlet.announcements.model.impl.AnnouncementsDeliveryModelImpl.toModels( 1627 announcementsDelivers), serviceContext); 1628 1629 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1630 } 1631 catch (Exception e) { 1632 _log.error(e, e); 1633 1634 throw new RemoteException(e.getMessage()); 1635 } 1636 } 1637 1638 /** 1639 * Updates the user. 1640 * 1641 * @param userId the primary key of the user 1642 * @param oldPassword the user's old password 1643 * @param newPassword1 the user's new password (optionally 1644 <code>null</code>) 1645 * @param newPassword2 the user's new password confirmation (optionally 1646 <code>null</code>) 1647 * @param passwordReset whether the user should be asked to reset their 1648 password the next time they login 1649 * @param reminderQueryQuestion the user's new password reset question 1650 * @param reminderQueryAnswer the user's new password reset answer 1651 * @param screenName the user's new screen name 1652 * @param emailAddress the user's new email address 1653 * @param facebookId the user's new Facebook ID 1654 * @param openId the user's new OpenID 1655 * @param languageId the user's new language ID 1656 * @param timeZoneId the user's new time zone ID 1657 * @param greeting the user's new greeting 1658 * @param comments the user's new comments 1659 * @param firstName the user's new first name 1660 * @param middleName the user's new middle name 1661 * @param lastName the user's new last name 1662 * @param prefixId the user's new name prefix ID 1663 * @param suffixId the user's new name suffix ID 1664 * @param male whether user is male 1665 * @param birthdayMonth the user's new birthday month (0-based, meaning 0 1666 for January) 1667 * @param birthdayDay the user's new birthday day 1668 * @param birthdayYear the user's birthday year 1669 * @param smsSn the user's new SMS screen name 1670 * @param aimSn the user's new AIM screen name 1671 * @param facebookSn the user's new Facebook screen name 1672 * @param icqSn the user's new ICQ screen name 1673 * @param jabberSn the user's new Jabber screen name 1674 * @param msnSn the user's new MSN screen name 1675 * @param mySpaceSn the user's new MySpace screen name 1676 * @param skypeSn the user's new Skype screen name 1677 * @param twitterSn the user's new Twitter screen name 1678 * @param ymSn the user's new Yahoo! Messenger screen name 1679 * @param jobTitle the user's new job title 1680 * @param groupIds the primary keys of the user's groups 1681 * @param organizationIds the primary keys of the user's organizations 1682 * @param roleIds the primary keys of the user's roles 1683 * @param userGroupRoles the user user's group roles 1684 * @param userGroupIds the primary keys of the user's user groups 1685 * @param serviceContext the user's service context (optionally 1686 <code>null</code>). Can set the universally unique identifier 1687 (with the <code>uuid</code> attribute), asset category IDs, asset 1688 tag names, and expando bridge attributes for the user. 1689 * @return the user 1690 * @throws PortalException if a user with the primary key could not be 1691 found, if the new information was invalid, or if the current user 1692 did not have permission to update the user 1693 * @throws SystemException if a system exception occurred 1694 */ 1695 public static com.liferay.portal.model.UserSoap updateUser(long userId, 1696 java.lang.String oldPassword, java.lang.String newPassword1, 1697 java.lang.String newPassword2, boolean passwordReset, 1698 java.lang.String reminderQueryQuestion, 1699 java.lang.String reminderQueryAnswer, java.lang.String screenName, 1700 java.lang.String emailAddress, long facebookId, 1701 java.lang.String openId, java.lang.String languageId, 1702 java.lang.String timeZoneId, java.lang.String greeting, 1703 java.lang.String comments, java.lang.String firstName, 1704 java.lang.String middleName, java.lang.String lastName, int prefixId, 1705 int suffixId, boolean male, int birthdayMonth, int birthdayDay, 1706 int birthdayYear, java.lang.String smsSn, java.lang.String aimSn, 1707 java.lang.String facebookSn, java.lang.String icqSn, 1708 java.lang.String jabberSn, java.lang.String msnSn, 1709 java.lang.String mySpaceSn, java.lang.String skypeSn, 1710 java.lang.String twitterSn, java.lang.String ymSn, 1711 java.lang.String jobTitle, long[] groupIds, long[] organizationIds, 1712 long[] roleIds, 1713 com.liferay.portal.model.UserGroupRoleSoap[] userGroupRoles, 1714 long[] userGroupIds, 1715 com.liferay.portal.service.ServiceContext serviceContext) 1716 throws RemoteException { 1717 try { 1718 com.liferay.portal.model.User returnValue = UserServiceUtil.updateUser(userId, 1719 oldPassword, newPassword1, newPassword2, passwordReset, 1720 reminderQueryQuestion, reminderQueryAnswer, screenName, 1721 emailAddress, facebookId, openId, languageId, timeZoneId, 1722 greeting, comments, firstName, middleName, lastName, 1723 prefixId, suffixId, male, birthdayMonth, birthdayDay, 1724 birthdayYear, smsSn, aimSn, facebookSn, icqSn, jabberSn, 1725 msnSn, mySpaceSn, skypeSn, twitterSn, ymSn, jobTitle, 1726 groupIds, organizationIds, roleIds, 1727 com.liferay.portal.model.impl.UserGroupRoleModelImpl.toModels( 1728 userGroupRoles), userGroupIds, serviceContext); 1729 1730 return com.liferay.portal.model.UserSoap.toSoapModel(returnValue); 1731 } 1732 catch (Exception e) { 1733 _log.error(e, e); 1734 1735 throw new RemoteException(e.getMessage()); 1736 } 1737 } 1738 1739 private static Log _log = LogFactoryUtil.getLog(UserServiceSoap.class); 1740 }