001 /** 002 * Copyright 2005-2012 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.rice.kim.api.group; 017 018 import org.kuali.rice.core.api.criteria.QueryByCriteria; 019 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; 020 import org.kuali.rice.core.api.util.jaxb.MapStringStringAdapter; 021 import org.kuali.rice.kim.api.KimConstants; 022 import org.springframework.cache.annotation.CacheEvict; 023 import org.springframework.cache.annotation.Cacheable; 024 025 import javax.jws.WebMethod; 026 import javax.jws.WebParam; 027 import javax.jws.WebResult; 028 import javax.jws.WebService; 029 import javax.jws.soap.SOAPBinding; 030 import javax.xml.bind.annotation.XmlElement; 031 import javax.xml.bind.annotation.XmlElementWrapper; 032 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; 033 import java.util.Collection; 034 import java.util.List; 035 import java.util.Map; 036 037 @WebService(name = "groupService", targetNamespace = KimConstants.Namespaces.KIM_NAMESPACE_2_0) 038 @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) 039 public interface GroupService { 040 041 /** 042 * Get all the groups for a given principal. 043 * 044 * <p> 045 * This will include all groups directly assigned as well as those inferred 046 * by the fact that they are members of higher level groups. 047 * </p> 048 * 049 * @param principalId The id of the Principal 050 * @return a list of Group objects in which the given Principal is a member of. An empty list is returned if an invalid or 051 * non-existant principalId is supplied. 052 * @throws IllegalArgumentException if the principalId is null or blank 053 */ 054 @WebMethod(operationName = "getGroupsByPrincipalId") 055 @XmlElementWrapper(name = "groups", required = true) 056 @XmlElement(name = "group", required = false) 057 @WebResult(name = "groups") 058 @Cacheable(value= Group.Cache.NAME, key="'principalId=' + #p0") 059 List<Group> getGroupsByPrincipalId(@WebParam(name = "principalId") String principalId) throws RiceIllegalArgumentException; 060 061 062 /** 063 * Get all the groups within a namespace for a given principal. 064 * 065 * <p> 066 * This will include all groups directly assigned as well as those inferred 067 * by the fact that they are members of higher level groups, and filtered by Group namespace. 068 * </p> 069 * 070 * @param principalId The id of the Principal 071 * @param namespaceCode The namespace code of the desired Groups to return 072 * @return a list of Group objects in which the given Principal is a member of, filtered by Group namespace. An empty list is returned if an invalid or 073 * non-existant principalId is supplied. 074 * @throws IllegalArgumentException if the principalId, namespaceCode is null or blank 075 */ 076 @WebMethod(operationName = "getGroupsByPrincipalIdAndNamespaceCode") 077 @XmlElementWrapper(name = "groups", required = true) 078 @XmlElement(name = "group", required = false) 079 @WebResult(name = "groups") 080 @Cacheable(value= Group.Cache.NAME, key="'principalId=' + #p0 + '|' + 'namespaceCode=' + #p1") 081 List<Group> getGroupsByPrincipalIdAndNamespaceCode(@WebParam(name = "principalId") String principalId, 082 @WebParam(name = "namespaceCode") String namespaceCode) throws RiceIllegalArgumentException; 083 084 /** 085 * Query for groups based on the given search criteria which is a Map of group field names to values. 086 * 087 * <p> 088 * This method returns it's results as a List of group ids that match the given search criteria. 089 * </p> 090 * 091 * @param queryByCriteria the criteria. Cannot be null. 092 * @return a list of groupId Strings in which the given criteria match Group properties. An empty list is returned if an invalid or 093 * non-existent criteria is supplied. 094 * @throws IllegalArgumentException if the queryByCriteria is null 095 */ 096 @WebMethod(operationName = "findGroupIds") 097 @XmlElementWrapper(name = "groupIds", required = true) 098 @XmlElement(name = "groupId", required = false) 099 @WebResult(name = "groupIds") 100 List<String> findGroupIds(@WebParam(name = "query") QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException; 101 102 /** 103 * Query for groups based on the given search criteria which is a Map of group field names to values. 104 * 105 * <p> 106 * This method returns it's results as a List of Groups that match the given search criteria. 107 * </p> 108 * 109 * @param queryByCriteria the criteria. Cannot be null. 110 * @return a list of Group objects in which the given criteria match Group properties. An empty list is returned if an invalid or 111 * non-existent criteria is supplied. 112 * @throws IllegalArgumentException if the queryByCriteria is null 113 */ 114 @WebMethod(operationName = "findGroups") 115 @WebResult(name = "results") 116 GroupQueryResults findGroups(@WebParam(name = "query") QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException; 117 118 /** 119 * Query for group members based on the given search criteria which is a Map of group member field names to values. 120 * 121 * <p> 122 * This method returns it's results as a List of GroupMemberss that match the given search criteria. 123 * </p> 124 * 125 * @param queryByCriteria the criteria. Cannot be null. 126 * @return a list of GroupMember objects in which the given criteria match Group properties. An empty list is returned if an invalid or 127 * non-existent criteria is supplied. 128 * @throws IllegalArgumentException if the queryByCriteria is null 129 */ 130 @WebMethod(operationName = "findGroupMembers") 131 @WebResult(name = "results") 132 GroupMemberQueryResults findGroupMembers(@WebParam(name = "query") QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException; 133 /** 134 * Lookup a Group based on the passed in id. 135 * 136 * 137 * @param id String that matches the desired Groups id 138 * @return a Group with the given id value. A null reference is returned if an invalid or 139 * non-existant id is supplied. 140 * @throws IllegalArgumentException if the groupId is null or blank 141 */ 142 @WebMethod(operationName = "getGroup") 143 @WebResult(name = "group") 144 @Cacheable(value= Group.Cache.NAME, key="'id=' + #p0") 145 Group getGroup(@WebParam(name="id") String id) throws RiceIllegalArgumentException; 146 147 /** 148 * Lookup a Group based on the passed in namespace and name. 149 * 150 * 151 * @param namespaceCode String that matches the desired Group's namespaceCode 152 * @param groupName String that matches the desired Group's name 153 * @return a Group with the given namespace and name values. A null reference is returned if an invalid or 154 * non-existant id is supplied. 155 * @throws IllegalArgumentException if the namespaceCode, groupName is null or blank 156 */ 157 @WebMethod(operationName = "getGroupByNameAndNamespaceCode") 158 @WebResult(name = "group") 159 @Cacheable(value= Group.Cache.NAME, key="'namespaceCode=' + #p0 + '|' + 'groupName=' + #p1") 160 Group getGroupByNameAndNamespaceCode(@WebParam(name = "namespaceCode") String namespaceCode, 161 @WebParam(name = "groupName") String groupName) throws RiceIllegalArgumentException; 162 163 /** 164 * Gets all groups for the given collection of group ids. 165 * 166 * <p>The result is a Map containing the group id as the key and the Group as the value.</p> 167 * 168 * @param ids Collection that matches the desired Groups' id 169 * @return a Map of Groups with the given id values. An empty Map is returned if an invalid or 170 * non-existant id is supplied. 171 * @throws IllegalArgumentException if the groupIds null or empty 172 */ 173 @WebMethod(operationName = "getGroups") 174 @XmlElementWrapper(name = "groups", required = true) 175 @XmlElement(name = "group", required = false) 176 @WebResult(name = "groups") 177 @Cacheable(value= Group.Cache.NAME, key="'ids=' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0)") 178 List<Group> getGroups(@WebParam(name="ids") Collection<String> ids) throws RiceIllegalArgumentException; 179 180 181 /** 182 * Check whether the give principal is a member of the group. 183 * 184 * <p>Will return true if the principal is a member of the group or a group assigned to this group.</p> 185 * 186 * @param principalId Id of the principal 187 * @param groupId Id string of group 188 * @return true if principal is a member of the group or a member of a group assigned to the the group. 189 * @throws IllegalArgumentException if the principalId, groupId is null or blank 190 */ 191 @WebMethod(operationName = "isMemberOfGroup") 192 @WebResult(name = "isMember") 193 @Cacheable(value= GroupMember.Cache.NAME, key="'{isMemberOfGroup}' + 'principalId=' + #p0 + '|' + 'groupId=' + #p1") 194 boolean isMemberOfGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 195 196 /** 197 * Check whether the give principal is a member of the group. 198 * 199 * <p>This will not recurse into contained groups. 200 */ 201 /** 202 * Check whether the give principal is a member of the group. 203 * 204 * <p>This method does not recurse into contained groups.</p> 205 * 206 * @param principalId Id of the principal 207 * @param groupId Id string of group 208 * @return true if principal is a direct member of the group. 209 * @throws IllegalArgumentException if the principalId, groupId is null or blank 210 */ 211 @WebMethod(operationName = "isDirectMemberOfGroup") 212 @WebResult(name = "isDirectMember") 213 @Cacheable(value= GroupMember.Cache.NAME, key="'{isDirectMemberOfGroup}' + 'principalId=' + #p0 + '|' + 'groupId=' + #p1") 214 boolean isDirectMemberOfGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 215 216 /** 217 * Get all the groups for the given principal. Recurses into parent groups 218 * to provide a comprehensive list. 219 * 220 * <p> 221 * This returns id for all groups for a given principal id. 222 * </p> 223 * 224 * @param principalId Id of a Principal 225 * @return a list of Group Ids in which the principal is a member of. 226 * @throws IllegalArgumentException if the principalId is null or blank 227 */ 228 @WebMethod(operationName = "getGroupIdsByPrincipalId") 229 @XmlElementWrapper(name = "groupIds", required = true) 230 @XmlElement(name = "groupId", required = false) 231 @WebResult(name = "groupIds") 232 @Cacheable(value= GroupMember.Cache.NAME, key="'{getGroupIdsByPrincipalId}' + 'principalId=' + #p0") 233 List<String> getGroupIdsByPrincipalId(@WebParam(name = "principalId") String principalId) throws RiceIllegalArgumentException; 234 235 /** 236 * Get all the groups for the given principal. Recurses into parent groups 237 * to provide a comprehensive list. This is limited to the passed in Group's namespace. 238 * 239 * <p> 240 * This returns id for all groups for a given principal id, limited to specific Group namespace. 241 * </p> 242 * 243 * @param principalId Id of a Principal 244 * @param namespaceCode Namspace code to limit group results to 245 * @return a list of Group Ids in which the principal is a member of, limited to the passed in namespace. 246 * @throws IllegalArgumentException if the principalId, namespaceCode is null or blank 247 */ 248 @WebMethod(operationName = "getGroupIdsByPrincipalIdAndNamespaceCode") 249 @XmlElementWrapper(name = "groupIds", required = true) 250 @XmlElement(name = "groupId", required = false) 251 @WebResult(name = "groupIds") 252 @Cacheable(value= GroupMember.Cache.NAME, key="'{getGroupIdsByPrincipalIdAndNamespaceCode}' + 'principalId=' + #p0 + '|' + 'namespaceCode=' + #p1") 253 List<String> getGroupIdsByPrincipalIdAndNamespaceCode(@WebParam(name = "principalId") String principalId, 254 @WebParam(name = "namespaceCode") String namespaceCode) throws RiceIllegalArgumentException; 255 256 257 /** 258 * Get all the groups for the given principal. Does not recurse into parent groups. 259 * 260 * <p> 261 * This returns id for all groups for a given principal id. 262 * </p> 263 * 264 * @param principalId Id of a Principal 265 * @return a list of Group Ids in which the principal is directly a member of. 266 * @throws IllegalArgumentException if the principalId is null or blank 267 */ 268 @WebMethod(operationName = "getDirectGroupIdsByPrincipalId") 269 @XmlElementWrapper(name = "groupIds", required = true) 270 @XmlElement(name = "groupId", required = false) 271 @WebResult(name = "groupIds") 272 @Cacheable(value= GroupMember.Cache.NAME, key="'{getDirectGroupIdsByPrincipalId}' + 'principalId=' + #p0") 273 List<String> getDirectGroupIdsByPrincipalId(@WebParam(name = "principalId") String principalId) throws RiceIllegalArgumentException; 274 275 276 /** 277 * Check whether the group identified by groupMemberId is a member of the group 278 * identified by groupId. This will recurse through all groups. 279 * 280 * <p>Will return true if the group is a member of the group or a group assigned to this group.</p> 281 * 282 * @param groupMemberId Id of the principal 283 * @param groupId Id string of group 284 * @return true if group is a member of the group or a member of a group assigned to the the group. 285 * @throws IllegalArgumentException if the groupMemberId, groupId is null or blank 286 */ 287 @WebMethod(operationName = "isGroupMemberOfGroup") 288 @WebResult(name = "isMember") 289 @Cacheable(value= GroupMember.Cache.NAME, key="'{isGroupMemberOfGroup}' + 'groupMemberId=' + #p0 + '|' + 'groupId=' + #p1") 290 boolean isGroupMemberOfGroup(@WebParam(name="groupMemberId") String groupMemberId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 291 292 293 /** 294 * Returns all principal ids that are members of the given group id. Recurses into contained groups for 295 * comprehensive list. 296 * 297 * <p>Will return a list of all principal ids for members this group.</p> 298 * 299 * @param groupId Id string of group 300 * @return List of principal ids 301 * @throws IllegalArgumentException if the groupId is null or blank 302 */ 303 @WebMethod(operationName = "getMemberPrincipalIds") 304 @XmlElementWrapper(name = "principalIds", required = true) 305 @XmlElement(name = "principalId", required = false) 306 @WebResult(name = "principalIds") 307 @Cacheable(value= GroupMember.Cache.NAME, key="'{getMemberPrincipalIds}' + 'groupId=' + #p0") 308 List<String> getMemberPrincipalIds(@WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 309 310 311 /** 312 * Returns all principal ids that are direct members of the given group id. 313 * 314 * <p>Will return a list of all principal ids for direct members this group.</p> 315 * 316 * @param groupId Id string of group 317 * @return List of direct member principal ids. 318 * @throws IllegalArgumentException if the groupId is null or blank 319 */ 320 @WebMethod(operationName = "getDirectMemberPrincipalIds") 321 @XmlElementWrapper(name = "principalIds", required = true) 322 @XmlElement(name = "principalId", required = false) 323 @WebResult(name = "principalIds") 324 @Cacheable(value= GroupMember.Cache.NAME, key="'{getDirectMemberPrincipalIds}' + 'groupId=' + #p0") 325 List<String> getDirectMemberPrincipalIds(@WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 326 327 328 /** 329 * Returns all group ids that are members of the given group id. Recurses into contained groups for 330 * a comprehensive list. 331 * 332 * <p>Will return a list of all group ids for members this group.</p> 333 * 334 * @param groupId Id string of group 335 * @return List of group ids 336 * @throws IllegalArgumentException if the groupId is null or blank 337 */ 338 @WebMethod(operationName = "getMemberGroupIds") 339 @XmlElementWrapper(name = "groupIds", required = true) 340 @XmlElement(name = "groupId", required = false) 341 @WebResult(name = "groupIds") 342 @Cacheable(value= GroupMember.Cache.NAME, key="'{getMemberGroupIds}' + 'groupId=' + #p0") 343 List<String> getMemberGroupIds( @WebParam(name="groupId") String groupId ) throws RiceIllegalArgumentException; 344 345 346 /** 347 * Returns all group ids that are direct members of the given group id. 348 * 349 * <p>Will return a list of all group ids for direct members this group.</p> 350 * 351 * @param groupId Id string of group 352 * @return List of direct member group ids. 353 * @throws IllegalArgumentException if the groupId is null or blank 354 */ 355 @WebMethod(operationName = "getDirectMemberOfGroup") 356 @XmlElementWrapper(name = "groupIds", required = true) 357 @XmlElement(name = "groupId", required = false) 358 @WebResult(name = "groupIds") 359 @Cacheable(value= GroupMember.Cache.NAME, key="'{getDirectMemberGroupIds}' + 'groupId=' + #p0") 360 List<String> getDirectMemberGroupIds( @WebParam(name="groupId") String groupId ) throws RiceIllegalArgumentException; 361 362 363 /** 364 * Returns all parent groups ids that the given group id is a member of. Recurses parent groups for 365 * a comprehensive list. 366 * 367 * <p>Will return a list of all group ids that the given group id is a member of.</p> 368 * 369 * @param groupId Id string of group 370 * @return List of parent group ids. 371 * @throws IllegalArgumentException if the groupId is null or blank 372 */ 373 @WebMethod(operationName = "getParentGroupIds") 374 @XmlElementWrapper(name = "groupIds", required = true) 375 @XmlElement(name = "groupId", required = false) 376 @WebResult(name = "groupIds") 377 @Cacheable(value= GroupMember.Cache.NAME, key="'{getParentGroupIds}' + 'groupId=' + #p0") 378 List<String> getParentGroupIds(@WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 379 380 381 /** 382 * Returns all parent groups ids that the given group id is a member of. 383 * 384 * <p>Will return a list of all group ids that the given group id is a member of.</p> 385 * 386 * @param groupId Id string of group 387 * @return List of parent group ids. 388 * @throws IllegalArgumentException if the groupId is null or blank 389 */ 390 @WebMethod(operationName = "getDirectParentGroupIds") 391 @XmlElementWrapper(name = "groupIds", required = true) 392 @XmlElement(name = "groupId", required = false) 393 @WebResult(name = "groupIds") 394 @Cacheable(value= GroupMember.Cache.NAME, key="'{getDirectParentGroupIds}' + 'groupId=' + #p0") 395 List<String> getDirectParentGroupIds(@WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 396 397 /** 398 * Get all the attributes of the given group. 399 * @throws IllegalArgumentException if the groupId is null or blank 400 */ 401 @WebMethod(operationName = "getAttributes") 402 @WebResult(name = "attributes") 403 @XmlJavaTypeAdapter(value = MapStringStringAdapter.class) 404 @Cacheable(value= Group.Cache.NAME, key="'{getAttributes}' + 'groupId=' + #p0") 405 Map<String, String> getAttributes( @WebParam(name="groupId") String groupId ) throws RiceIllegalArgumentException; 406 407 408 /** 409 * Get all GroupMembers all the groups with a given group id. 410 * 411 * <p> 412 * The collection of GroupMembers will contain members for a the group in no defined order. 413 * </p> 414 * 415 * @param groupId Id of group 416 * @return Collection of GroupMembers. 417 * @throws IllegalArgumentException if the groupId is null or blank 418 */ 419 @WebMethod(operationName = "getMembersOfGroup") 420 @XmlElementWrapper(name = "members", required = true) 421 @XmlElement(name = "member", required = false) 422 @WebResult(name = "members") 423 @Cacheable(value= GroupMember.Cache.NAME, key="'groupId=' + #p0") 424 List<GroupMember> getMembersOfGroup( @WebParam(name="groupId") String groupId ) throws RiceIllegalArgumentException; 425 426 427 /** 428 * Get all GroupMembers all the groups with the given group ids. 429 * 430 * <p> 431 * The collection of GroupMembers will contain members for all the groups in no defined order. 432 * The values returned may or may not be grouped by group id. 433 * </p> 434 * 435 * @param groupIds Ids of groups 436 * @return Collection of GroupMembers. 437 * @throws IllegalArgumentException if the groupIds is null or empty 438 */ 439 @WebMethod(operationName = "getMembers") 440 @XmlElementWrapper(name = "members", required = true) 441 @XmlElement(name = "member", required = false) 442 @WebResult(name = "members") 443 @Cacheable(value= GroupMember.Cache.NAME, key="'groupIds=' + T(org.kuali.rice.core.api.cache.CacheKeyUtils).key(#p0)") 444 List<GroupMember> getMembers( @WebParam(name="groupIds") List<String> groupIds ) throws RiceIllegalArgumentException; 445 446 447 /** 448 * Creates a new group using the given Group. 449 * 450 * <p> 451 * This will attempt to create a new Group 452 * </p> 453 * 454 * @param group The new group to be created 455 * @return a the Group that has been created. 456 * @throws IllegalArgumentException if the group is null 457 */ 458 @WebMethod(operationName = "createGroup") 459 @WebResult(name = "group") 460 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 461 Group createGroup(@WebParam(name="group") Group group) throws RiceIllegalArgumentException; 462 463 /** 464 * Updates an existing group using the given Group. 465 * 466 * <p> 467 * This will attempt to update an existing Group. For this to return without exceptions, the passed in Group 468 * must have it's Id set and be a valid group that already exists. 469 * </p> 470 * 471 * @param group The group to be updated 472 * @return a the Group that has been updated. 473 * @throws IllegalArgumentException if the group is null 474 */ 475 @WebMethod(operationName = "updateGroup") 476 @WebResult(name = "group") 477 @CacheEvict(value={Group.Cache.NAME, GroupMember.Cache.NAME}, allEntries = true) 478 Group updateGroup(@WebParam(name="group") Group group) throws RiceIllegalArgumentException; 479 480 /** 481 * Updates a group using the given Group. 482 * 483 * <p> 484 * This will attempt to update an existing group with data from the passed in group. If the passed in groupId and the group.id values are different 485 * this method will inactivate the old group and create a new group with the same members with the passed in groups properties. 486 * </p> 487 * 488 * @param groupId Id of the Group to be updated 489 * @param group Group object to use for update 490 * @return a the Group that has been updated. 491 * @throws IllegalArgumentException if the group is null or the groupId is null or blank 492 */ 493 @WebMethod(operationName = "updateGroupWithId") 494 @WebResult(name = "group") 495 @CacheEvict(value={Group.Cache.NAME, GroupMember.Cache.NAME}, allEntries = true) 496 Group updateGroup(@WebParam(name="groupId") String groupId, @WebParam(name="group") Group group) throws RiceIllegalArgumentException; 497 498 /** 499 * Creates a new group using the given GroupMember. 500 * 501 * <p> 502 * This will attempt to create a new GroupMember 503 * </p> 504 * 505 * @param groupMember The new groupMember to be created 506 * @return a the GroupMember that has been created. 507 * @throws IllegalArgumentException if the group is null 508 */ 509 @WebMethod(operationName = "createGroupMember") 510 @WebResult(name = "groupMember") 511 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 512 GroupMember createGroupMember(@WebParam(name="groupMember") GroupMember groupMember) throws RiceIllegalArgumentException; 513 514 /** 515 * Updates an existing group using the given GroupMember. 516 * 517 * <p> 518 * This will attempt to update an existing GroupMember. For this to return without exceptions, the passed in 519 * GroupMember must have it's Id set and be a valid groupMember that already exists. 520 * </p> 521 * 522 * @param groupMember The groupMember to be updated 523 * @return a the GroupMember that has been updated. 524 * @throws IllegalArgumentException if the groupMember is null 525 */ 526 @WebMethod(operationName = "updateGroupMember") 527 @WebResult(name = "groupMember") 528 @CacheEvict(value={Group.Cache.NAME, GroupMember.Cache.NAME}, allEntries = true) 529 GroupMember updateGroupMember(@WebParam(name="groupMember") GroupMember groupMember) throws RiceIllegalArgumentException; 530 531 /** 532 * Adds the group with the id supplied in childId as a member of the group with the id supplied in parentId. 533 * 534 * @param childId Id of the Group to be added to the members of Parent 535 * @param parentId Id of the Group object to add the member to 536 * @return true if the member was added successfully. 537 * @throws IllegalArgumentException if the childId, parentId is null or blank 538 */ 539 @WebMethod(operationName = "addGroupToGroup") 540 @WebResult(name = "addedToGroup") 541 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 542 boolean addGroupToGroup(@WebParam(name="childId") String childId, @WebParam(name="parentId") String parentId) throws RiceIllegalArgumentException; 543 544 /** 545 * Removes the group with the id supplied in childId from the group with the id supplied in parentId. 546 * 547 * @param childId Id of the Group to be removed from the members of Parent 548 * @param parentId Id of the Group object to remove the member from 549 * @return true if the member was removed successfully. 550 * @throws IllegalArgumentException if the childId, parentId is null or blank 551 */ 552 @WebMethod(operationName = "removeGroupFromGroup") 553 @WebResult(name = "removedFromGroup") 554 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 555 boolean removeGroupFromGroup(@WebParam(name="childId") String childId, @WebParam(name="parentId") String parentId) throws RiceIllegalArgumentException; 556 557 /** 558 * Add the principal with the given principalId as a member of the group with the given groupId. 559 * 560 * @param principalId Id of the Principal to be added to the members of the Parent Group 561 * @param groupId Id of the Group object to add the member to 562 * @return true if the member was added successfully. 563 * @throws IllegalArgumentException if the principalId, groupId is null or blank 564 */ 565 @WebMethod(operationName = "addPrincipalToGroup") 566 @WebResult(name = "addedToGroup") 567 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 568 boolean addPrincipalToGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 569 570 /** 571 * Removes the member principal with the given principalId from the group with the given groupId. 572 * 573 * @param principalId Id of the Principal to be removed from the members of the Parent Group 574 * @param groupId Id of the Group object to remove the member from 575 * @return true if the member was removed successfully. 576 * @throws IllegalArgumentException if the principalId, groupId is null or blank 577 */ 578 @WebMethod(operationName = "removePrincipalFromGroup") 579 @WebResult(name = "removedFromGroup") 580 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 581 boolean removePrincipalFromGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; 582 583 /** 584 * Removes all members from the group with the given groupId. 585 * 586 * @param groupId Id of the Group object to remove the members from 587 * @throws IllegalArgumentException if the groupId is null or blank 588 */ 589 @WebMethod(operationName = "removeAllMembers") 590 @CacheEvict(value={Group.Cache.NAME,GroupMember.Cache.NAME}, allEntries = true) 591 void removeAllMembers( @WebParam(name="groupId") String groupId ) throws RiceIllegalArgumentException; 592 }