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.service.GroupServiceUtil; 020 021 import java.rmi.RemoteException; 022 023 /** 024 * <p> 025 * This class provides a SOAP utility for the 026 * {@link com.liferay.portal.service.GroupServiceUtil} service utility. The 027 * static methods of this class calls the same methods of the service utility. 028 * However, the signatures are different because it is difficult for SOAP to 029 * support certain types. 030 * </p> 031 * 032 * <p> 033 * ServiceBuilder follows certain rules in translating the methods. For example, 034 * if the method in the service utility returns a {@link java.util.List}, that 035 * is translated to an array of {@link com.liferay.portal.model.GroupSoap}. 036 * If the method in the service utility returns a 037 * {@link com.liferay.portal.model.Group}, that is translated to a 038 * {@link com.liferay.portal.model.GroupSoap}. Methods that SOAP cannot 039 * safely wire are skipped. 040 * </p> 041 * 042 * <p> 043 * The benefits of using the SOAP utility is that it is cross platform 044 * compatible. SOAP allows different languages like Java, .NET, C++, PHP, and 045 * even Perl, to call the generated services. One drawback of SOAP is that it is 046 * slow because it needs to serialize all calls into a text format (XML). 047 * </p> 048 * 049 * <p> 050 * You can see a list of services at http://localhost:8080/api/axis. Set the 051 * property <b>axis.servlet.hosts.allowed</b> in portal.properties to configure 052 * security. 053 * </p> 054 * 055 * <p> 056 * The SOAP utility is only generated for remote services. 057 * </p> 058 * 059 * @author Brian Wing Shun Chan 060 * @see GroupServiceHttp 061 * @see com.liferay.portal.model.GroupSoap 062 * @see com.liferay.portal.service.GroupServiceUtil 063 * @generated 064 */ 065 public class GroupServiceSoap { 066 /** 067 * Adds a group. 068 * 069 * @param parentGroupId the primary key of the parent group 070 * @param liveGroupId the primary key of the live group 071 * @param name the entity's name 072 * @param description the group's description (optionally 073 <code>null</code>) 074 * @param type the group's type. For more information see {@link 075 com.liferay.portal.model.GroupConstants} 076 * @param friendlyURL the group's friendlyURL (optionally 077 <code>null</code>) 078 * @param site whether the group is to be associated with a main site 079 * @param active whether the group is active 080 * @param serviceContext the service context to be applied (optionally 081 <code>null</code>). Can set the asset category IDs and asset tag 082 names for the group, and can set whether the group is for staging 083 * @return the group 084 * @throws PortalException if the user did not have permission to add the 085 group, if a creator could not be found, if the group's 086 information was invalid, if a layout could not be found, or if a 087 valid friendly URL could not be created for the group 088 * @throws SystemException if a system exception occurred 089 */ 090 public static com.liferay.portal.model.GroupSoap addGroup( 091 long parentGroupId, long liveGroupId, java.lang.String name, 092 java.lang.String description, int type, java.lang.String friendlyURL, 093 boolean site, boolean active, 094 com.liferay.portal.service.ServiceContext serviceContext) 095 throws RemoteException { 096 try { 097 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId, 098 liveGroupId, name, description, type, friendlyURL, site, 099 active, serviceContext); 100 101 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 102 } 103 catch (Exception e) { 104 _log.error(e, e); 105 106 throw new RemoteException(e.getMessage()); 107 } 108 } 109 110 /** 111 * Adds the group using the group default live group ID. 112 * 113 * @param parentGroupId the primary key of the parent group 114 * @param name the entity's name 115 * @param description the group's description (optionally 116 <code>null</code>) 117 * @param type the group's type. For more information see {@link 118 com.liferay.portal.model.GroupConstants} 119 * @param friendlyURL the group's friendlyURL 120 * @param site whether the group is to be associated with a main site 121 * @param active whether the group is active 122 * @param serviceContext the service context to be applied (optionally 123 <code>null</code>). Can set asset category IDs and asset tag 124 names for the group, and can set whether the group is for 125 staging 126 * @return the group 127 * @throws PortalException if the user did not have permission to add 128 the group, if a creator could not be found, if the group's 129 information was invalid, if a layout could not be found, or 130 if a valid friendly URL could not be created for the group 131 * @throws SystemException if a system exception occurred 132 * @deprecated {@link #addGroup(long, long, String, String, int, String, 133 boolean, boolean, ServiceContext)} 134 */ 135 public static com.liferay.portal.model.GroupSoap addGroup( 136 long parentGroupId, java.lang.String name, 137 java.lang.String description, int type, java.lang.String friendlyURL, 138 boolean site, boolean active, 139 com.liferay.portal.service.ServiceContext serviceContext) 140 throws RemoteException { 141 try { 142 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(parentGroupId, 143 name, description, type, friendlyURL, site, active, 144 serviceContext); 145 146 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 147 } 148 catch (Exception e) { 149 _log.error(e, e); 150 151 throw new RemoteException(e.getMessage()); 152 } 153 } 154 155 /** 156 * @deprecated {@link #addGroup(long, String, String, int, String, boolean, 157 boolean, ServiceContext)} 158 */ 159 public static com.liferay.portal.model.GroupSoap addGroup( 160 java.lang.String name, java.lang.String description, int type, 161 java.lang.String friendlyURL, boolean site, boolean active, 162 com.liferay.portal.service.ServiceContext serviceContext) 163 throws RemoteException { 164 try { 165 com.liferay.portal.model.Group returnValue = GroupServiceUtil.addGroup(name, 166 description, type, friendlyURL, site, active, serviceContext); 167 168 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 169 } 170 catch (Exception e) { 171 _log.error(e, e); 172 173 throw new RemoteException(e.getMessage()); 174 } 175 } 176 177 /** 178 * Adds the groups to the role. 179 * 180 * @param roleId the primary key of the role 181 * @param groupIds the primary keys of the groups 182 * @throws PortalException if the user did not have permission to update the 183 role 184 * @throws SystemException if a system exception occurred 185 */ 186 public static void addRoleGroups(long roleId, long[] groupIds) 187 throws RemoteException { 188 try { 189 GroupServiceUtil.addRoleGroups(roleId, groupIds); 190 } 191 catch (Exception e) { 192 _log.error(e, e); 193 194 throw new RemoteException(e.getMessage()); 195 } 196 } 197 198 /** 199 * Deletes the group. 200 * 201 * <p> 202 * The group is unstaged and its assets and resources including layouts, 203 * membership requests, subscriptions, teams, blogs, bookmarks, calendar 204 * events, image gallery, journals, message boards, polls, shopping related 205 * entities, software catalog, and wikis are also deleted. 206 * </p> 207 * 208 * @param groupId the primary key of the group 209 * @throws PortalException if the user did not have permission to delete the 210 group or its assets or resources, if a group with the primary key 211 could not be found, or if the group was a system group 212 * @throws SystemException if a system exception occurred 213 */ 214 public static void deleteGroup(long groupId) throws RemoteException { 215 try { 216 GroupServiceUtil.deleteGroup(groupId); 217 } 218 catch (Exception e) { 219 _log.error(e, e); 220 221 throw new RemoteException(e.getMessage()); 222 } 223 } 224 225 /** 226 * Returns the group with the primary key. 227 * 228 * @param groupId the primary key of the group 229 * @return the group with the primary key 230 * @throws PortalException if a group with the primary key could not be 231 found or if the current user did not have permission to view the 232 group 233 * @throws SystemException if a system exception occurred 234 */ 235 public static com.liferay.portal.model.GroupSoap getGroup(long groupId) 236 throws RemoteException { 237 try { 238 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(groupId); 239 240 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 241 } 242 catch (Exception e) { 243 _log.error(e, e); 244 245 throw new RemoteException(e.getMessage()); 246 } 247 } 248 249 /** 250 * Returns the group with the name. 251 * 252 * @param companyId the primary key of the company 253 * @param name the group's name 254 * @return the group with the name 255 * @throws PortalException if a matching group could not be found or if the 256 current user did not have permission to view the group 257 * @throws SystemException if a system exception occurred 258 */ 259 public static com.liferay.portal.model.GroupSoap getGroup(long companyId, 260 java.lang.String name) throws RemoteException { 261 try { 262 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getGroup(companyId, 263 name); 264 265 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 266 } 267 catch (Exception e) { 268 _log.error(e, e); 269 270 throw new RemoteException(e.getMessage()); 271 } 272 } 273 274 /** 275 * Returns a range of all the site groups for which the user has control 276 * panel access. 277 * 278 * @param portlets the portlets to manage 279 * @param max the upper bound of the range of groups to consider (not 280 inclusive) 281 * @return the range of site groups for which the user has Control Panel 282 access 283 * @throws PortalException if a portal exception occurred 284 * @throws SystemException if a system exception occurred 285 */ 286 public static com.liferay.portal.model.GroupSoap[] getManageableSites( 287 java.util.Collection<com.liferay.portal.model.Portlet> portlets, int max) 288 throws RemoteException { 289 try { 290 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getManageableSites(portlets, 291 max); 292 293 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 294 } 295 catch (Exception e) { 296 _log.error(e, e); 297 298 throw new RemoteException(e.getMessage()); 299 } 300 } 301 302 /** 303 * Returns the groups associated with the organizations. 304 * 305 * @param organizations the organizations 306 * @return the groups associated with the organizations 307 * @throws PortalException if a portal exception occurred 308 * @throws SystemException if a system exception occurred 309 */ 310 public static com.liferay.portal.model.GroupSoap[] getOrganizationsGroups( 311 com.liferay.portal.model.OrganizationSoap[] organizations) 312 throws RemoteException { 313 try { 314 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getOrganizationsGroups(com.liferay.portal.model.impl.OrganizationModelImpl.toModels( 315 organizations)); 316 317 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 318 } 319 catch (Exception e) { 320 _log.error(e, e); 321 322 throw new RemoteException(e.getMessage()); 323 } 324 } 325 326 /** 327 * Returns the group associated with the user. 328 * 329 * @param companyId the primary key of the company 330 * @param userId the primary key of the user 331 * @return the group associated with the user 332 * @throws PortalException if a matching group could not be found or if the 333 current user did not have permission to view the group 334 * @throws SystemException if a system exception occurred 335 */ 336 public static com.liferay.portal.model.GroupSoap getUserGroup( 337 long companyId, long userId) throws RemoteException { 338 try { 339 com.liferay.portal.model.Group returnValue = GroupServiceUtil.getUserGroup(companyId, 340 userId); 341 342 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 343 } 344 catch (Exception e) { 345 _log.error(e, e); 346 347 throw new RemoteException(e.getMessage()); 348 } 349 } 350 351 /** 352 * Returns the groups associated with the user groups. 353 * 354 * @param userGroups the user groups 355 * @return the groups associated with the user groups 356 * @throws PortalException if any one of the user group's group could not be 357 found 358 * @throws SystemException if a system exception occurred 359 */ 360 public static com.liferay.portal.model.GroupSoap[] getUserGroupsGroups( 361 com.liferay.portal.model.UserGroupSoap[] userGroups) 362 throws RemoteException { 363 try { 364 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserGroupsGroups(com.liferay.portal.model.impl.UserGroupModelImpl.toModels( 365 userGroups)); 366 367 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 368 } 369 catch (Exception e) { 370 _log.error(e, e); 371 372 throw new RemoteException(e.getMessage()); 373 } 374 } 375 376 /** 377 * Returns the range of all groups associated with the user's organization 378 * groups, including the ancestors of the organization groups, unless portal 379 * property <code>organizations.membership.strict</code> is set to 380 * <code>true</code>. 381 * 382 * <p> 383 * Useful when paginating results. Returns a maximum of <code>end - 384 * start</code> instances. <code>start</code> and <code>end</code> are not 385 * primary keys, they are indexes in the result set. Thus, <code>0</code> 386 * refers to the first result in the set. Setting both <code>start</code> 387 * and <code>end</code> to {@link 388 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 389 * result set. 390 * </p> 391 * 392 * @param userId the primary key of the user 393 * @param start the lower bound of the range of groups to consider 394 * @param end the upper bound of the range of groups to consider (not 395 inclusive) 396 * @return the range of groups associated with the user's organizations 397 * @throws PortalException if a user with the primary key could not be found 398 or if another portal exception occurred 399 * @throws SystemException if a system exception occurred 400 */ 401 public static com.liferay.portal.model.GroupSoap[] getUserOrganizationsGroups( 402 long userId, int start, int end) throws RemoteException { 403 try { 404 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserOrganizationsGroups(userId, 405 start, end); 406 407 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 408 } 409 catch (Exception e) { 410 _log.error(e, e); 411 412 throw new RemoteException(e.getMessage()); 413 } 414 } 415 416 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 417 long userId, java.lang.String[] classNames, 418 boolean includeControlPanel, int max) throws RemoteException { 419 try { 420 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 421 classNames, includeControlPanel, max); 422 423 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 424 } 425 catch (Exception e) { 426 _log.error(e, e); 427 428 throw new RemoteException(e.getMessage()); 429 } 430 } 431 432 /** 433 * Returns the user's group "places" associated with the group 434 * entity class names, including the Control Panel group if the user is 435 * permitted to view the Control Panel. 436 * 437 * <p> 438 * <ul> <li> Class name "User" includes the user's layout set 439 * group. </li> <li> Class name "Organization" includes the user's 440 * immediate organization groups and inherited organization groups. </li> 441 * <li> Class name "Group" includes the user's immediate 442 * organization groups and site groups. </li> <li> A <code>classNames</code> 443 * value of <code>null</code> includes the user's layout set group, 444 * organization groups, inherited organization groups, and site groups. 445 * </li> </ul> 446 * </p> 447 * 448 * @param userId the primary key of the user 449 * @param classNames the group entity class names (optionally 450 <code>null</code>). For more information see {@link 451 #getUserPlaces(long, String[], int)} 452 * @param max the maximum number of groups to return 453 * @return the user's group "places" 454 * @throws PortalException if a portal exception occurred 455 * @throws SystemException if a system exception occurred 456 */ 457 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 458 long userId, java.lang.String[] classNames, int max) 459 throws RemoteException { 460 try { 461 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 462 classNames, max); 463 464 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 465 } 466 catch (Exception e) { 467 _log.error(e, e); 468 469 throw new RemoteException(e.getMessage()); 470 } 471 } 472 473 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 474 long userId, java.lang.String[] classNames, java.lang.String name, 475 boolean active, boolean includeControlPanel, int start, int end) 476 throws RemoteException { 477 try { 478 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(userId, 479 classNames, name, active, includeControlPanel, start, end); 480 481 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 482 } 483 catch (Exception e) { 484 _log.error(e, e); 485 486 throw new RemoteException(e.getMessage()); 487 } 488 } 489 490 /** 491 * Returns the guest or current user's group "places" associated 492 * with the group entity class names, including the Control Panel group if 493 * the user is permitted to view the Control Panel. 494 * 495 * <p> 496 * <ul> <li> Class name "User" includes the user's layout set 497 * group. </li> <li> Class name "Organization" includes the user's 498 * immediate organization groups and inherited organization groups. </li> 499 * <li> Class name "Group" includes the user's immediate 500 * organization groups and site groups. </li> <li> A <code>classNames</code> 501 * value of <code>null</code> includes the user's layout set group, 502 * organization groups, inherited organization groups, and site groups. 503 * </li> </ul> 504 * </p> 505 * 506 * @param classNames the group entity class names (optionally 507 <code>null</code>). For more information see {@link 508 #getUserPlaces(String[], int)} 509 * @param max the maximum number of groups to return 510 * @return the user's group "places" 511 * @throws PortalException if a portal exception occurred 512 * @throws SystemException if a system exception occurred 513 */ 514 public static com.liferay.portal.model.GroupSoap[] getUserPlaces( 515 java.lang.String[] classNames, int max) throws RemoteException { 516 try { 517 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserPlaces(classNames, 518 max); 519 520 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 521 } 522 catch (Exception e) { 523 _log.error(e, e); 524 525 throw new RemoteException(e.getMessage()); 526 } 527 } 528 529 /** 530 * Returns the number of the guest or current user's group 531 * "places" associated with the group entity class names, 532 * including the Control Panel group if the user is permitted to view the 533 * Control Panel. 534 * 535 * @return the number of user's group "places" 536 * @throws PortalException if a portal exception occurred 537 * @throws SystemException if a system exception occurred 538 */ 539 public static int getUserPlacesCount() throws RemoteException { 540 try { 541 int returnValue = GroupServiceUtil.getUserPlacesCount(); 542 543 return returnValue; 544 } 545 catch (Exception e) { 546 _log.error(e, e); 547 548 throw new RemoteException(e.getMessage()); 549 } 550 } 551 552 /** 553 * Returns the guest or current user's layout set group, organization 554 * groups, inherited organization groups, and site groups. 555 * 556 * @return the user's layout set group, organization groups, and inherited 557 organization groups, and site groups 558 * @throws PortalException if a portal exception occurred 559 * @throws SystemException if a system exception occurred 560 */ 561 public static com.liferay.portal.model.GroupSoap[] getUserSites() 562 throws RemoteException { 563 try { 564 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.getUserSites(); 565 566 return com.liferay.portal.model.GroupSoap.toSoapModels(returnValue); 567 } 568 catch (Exception e) { 569 _log.error(e, e); 570 571 throw new RemoteException(e.getMessage()); 572 } 573 } 574 575 /** 576 * Returns <code>true</code> if the user is associated with the group, 577 * including the user's inherited organizations and user groups. System and 578 * staged groups are not included. 579 * 580 * @param userId the primary key of the user 581 * @param groupId the primary key of the group 582 * @return <code>true</code> if the user is associated with the group; 583 <code>false</code> otherwise 584 * @throws PortalException if the current user did not have permission to 585 view the user or group members 586 * @throws SystemException if a system exception occurred 587 */ 588 public static boolean hasUserGroup(long userId, long groupId) 589 throws RemoteException { 590 try { 591 boolean returnValue = GroupServiceUtil.hasUserGroup(userId, groupId); 592 593 return returnValue; 594 } 595 catch (Exception e) { 596 _log.error(e, e); 597 598 throw new RemoteException(e.getMessage()); 599 } 600 } 601 602 /** 603 * Returns an ordered range of all the site groups and organization groups 604 * that match the name and description, optionally including the user's 605 * inherited organization groups and user groups. System and staged groups 606 * are not included. 607 * 608 * <p> 609 * Useful when paginating results. Returns a maximum of <code>end - 610 * start</code> instances. <code>start</code> and <code>end</code> are not 611 * primary keys, they are indexes in the result set. Thus, <code>0</code> 612 * refers to the first result in the set. Setting both <code>start</code> 613 * and <code>end</code> to {@link 614 * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full 615 * result set. 616 * </p> 617 * 618 * @param companyId the primary key of the company 619 * @param name the group's name (optionally <code>null</code>) 620 * @param description the group's description (optionally 621 <code>null</code>) 622 * @param params the finder params (optionally <code>null</code>). To 623 include the user's inherited organizations and user groups in the 624 search, add entries having "usersGroups" and 625 "inherit" as keys mapped to the the user's ID. For more 626 information see {@link 627 com.liferay.portal.service.persistence.GroupFinder} 628 * @param start the lower bound of the range of groups to return 629 * @param end the upper bound of the range of groups to return (not 630 inclusive) 631 * @return the matching groups ordered by name 632 * @throws PortalException if a portal exception occurred 633 * @throws SystemException if a system exception occurred 634 */ 635 public static com.liferay.portal.model.GroupSoap[] search(long companyId, 636 java.lang.String name, java.lang.String description, 637 java.lang.String[] params, int start, int end) 638 throws RemoteException { 639 try { 640 java.util.List<com.liferay.portal.model.Group> returnValue = GroupServiceUtil.search(companyId, 641 name, description, params, start, end); 642 643 return com.liferay.portal.model.GroupSoap.toSoapModels(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 number of groups and organization groups that match the name 654 * and description, optionally including the user's inherited organizations 655 * and user groups. System and staged groups are not included. 656 * 657 * @param companyId the primary key of the company 658 * @param name the group's name (optionally <code>null</code>) 659 * @param description the group's description (optionally 660 <code>null</code>) 661 * @param params the finder params (optionally <code>null</code>). To 662 include the user's inherited organizations and user groups in the 663 search, add entries having "usersGroups" and 664 "inherit" as keys mapped to the the user's ID. For more 665 information see {@link 666 com.liferay.portal.service.persistence.GroupFinder} 667 * @return the number of matching groups 668 * @throws SystemException if a system exception occurred 669 */ 670 public static int searchCount(long companyId, java.lang.String name, 671 java.lang.String description, java.lang.String[] params) 672 throws RemoteException { 673 try { 674 int returnValue = GroupServiceUtil.searchCount(companyId, name, 675 description, params); 676 677 return returnValue; 678 } 679 catch (Exception e) { 680 _log.error(e, e); 681 682 throw new RemoteException(e.getMessage()); 683 } 684 } 685 686 /** 687 * Sets the groups associated with the role, removing and adding 688 * associations as necessary. 689 * 690 * @param roleId the primary key of the role 691 * @param groupIds the primary keys of the groups 692 * @throws PortalException if the user did not have permission to update 693 update the role 694 * @throws SystemException if a system exception occurred 695 */ 696 public static void setRoleGroups(long roleId, long[] groupIds) 697 throws RemoteException { 698 try { 699 GroupServiceUtil.setRoleGroups(roleId, groupIds); 700 } 701 catch (Exception e) { 702 _log.error(e, e); 703 704 throw new RemoteException(e.getMessage()); 705 } 706 } 707 708 /** 709 * Removes the groups from the role. 710 * 711 * @param roleId the primary key of the role 712 * @param groupIds the primary keys of the groups 713 * @throws PortalException if the user did not have permission to update the 714 role 715 * @throws SystemException if a system exception occurred 716 */ 717 public static void unsetRoleGroups(long roleId, long[] groupIds) 718 throws RemoteException { 719 try { 720 GroupServiceUtil.unsetRoleGroups(roleId, groupIds); 721 } 722 catch (Exception e) { 723 _log.error(e, e); 724 725 throw new RemoteException(e.getMessage()); 726 } 727 } 728 729 /** 730 * Updates the group's friendly URL. 731 * 732 * @param groupId the primary key of the group 733 * @param friendlyURL the group's new friendlyURL (optionally 734 <code>null</code>) 735 * @return the group 736 * @throws PortalException if the user did not have permission to update the 737 group, if a group with the primary key could not be found, or if 738 a valid friendly URL could not be created for the group 739 * @throws SystemException if a system exception occurred 740 */ 741 public static com.liferay.portal.model.GroupSoap updateFriendlyURL( 742 long groupId, java.lang.String friendlyURL) throws RemoteException { 743 try { 744 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateFriendlyURL(groupId, 745 friendlyURL); 746 747 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 748 } 749 catch (Exception e) { 750 _log.error(e, e); 751 752 throw new RemoteException(e.getMessage()); 753 } 754 } 755 756 /** 757 * Updates the group. 758 * 759 * @param groupId the primary key of the group 760 * @param parentGroupId the primary key of the parent group 761 * @param name the group's new name 762 * @param description the group's new description (optionally 763 <code>null</code>) 764 * @param type the group's new type. For more information see {@link 765 com.liferay.portal.model.GroupConstants} 766 * @param friendlyURL the group's new friendlyURL (optionally 767 <code>null</code>) 768 * @param active whether the group is active 769 * @param serviceContext the service context to be applied (optionally 770 <code>null</code>). Can set the asset category IDs and asset tag 771 names for the group. 772 * @return the group 773 * @throws PortalException if the user did not have permission to update the 774 group, if a group with the primary key could not be found, if the 775 friendly URL was invalid or could one not be created 776 * @throws SystemException if a system exception occurred 777 */ 778 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId, 779 long parentGroupId, java.lang.String name, 780 java.lang.String description, int type, java.lang.String friendlyURL, 781 boolean active, com.liferay.portal.service.ServiceContext serviceContext) 782 throws RemoteException { 783 try { 784 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId, 785 parentGroupId, name, description, type, friendlyURL, 786 active, serviceContext); 787 788 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 789 } 790 catch (Exception e) { 791 _log.error(e, e); 792 793 throw new RemoteException(e.getMessage()); 794 } 795 } 796 797 /** 798 * Updates the group's type settings. 799 * 800 * @param groupId the primary key of the group 801 * @param typeSettings the group's new type settings (optionally 802 <code>null</code>) 803 * @return the group 804 * @throws PortalException if the user did not have permission to update the 805 group or if a group with the primary key could not be found 806 * @throws SystemException if a system exception occurred 807 */ 808 public static com.liferay.portal.model.GroupSoap updateGroup(long groupId, 809 java.lang.String typeSettings) throws RemoteException { 810 try { 811 com.liferay.portal.model.Group returnValue = GroupServiceUtil.updateGroup(groupId, 812 typeSettings); 813 814 return com.liferay.portal.model.GroupSoap.toSoapModel(returnValue); 815 } 816 catch (Exception e) { 817 _log.error(e, e); 818 819 throw new RemoteException(e.getMessage()); 820 } 821 } 822 823 private static Log _log = LogFactoryUtil.getLog(GroupServiceSoap.class); 824 }