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