Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
GroupUpdateService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2006-2011 The Kuali Foundation | |
3 | * | |
4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.opensource.org/licenses/ecl2.php | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
13 | * See the License for the specific language governing permissions and | |
14 | * limitations under the License. | |
15 | */ | |
16 | ||
17 | package org.kuali.rice.kim.api.group; | |
18 | ||
19 | import org.kuali.rice.core.api.exception.RiceIllegalArgumentException; | |
20 | import org.kuali.rice.kim.util.KimConstants; | |
21 | ||
22 | import javax.jws.WebMethod; | |
23 | import javax.jws.WebParam; | |
24 | import javax.jws.WebResult; | |
25 | import javax.jws.WebService; | |
26 | import javax.jws.soap.SOAPBinding; | |
27 | ||
28 | @WebService(name = "GroupUpdateService", targetNamespace = KimConstants.Namespaces.KIM_NAMESPACE_2_0) | |
29 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
30 | public interface GroupUpdateService { | |
31 | ||
32 | /** | |
33 | * Creates a new group using the given Group. | |
34 | * | |
35 | * <p> | |
36 | * This will attempt to create a new Group | |
37 | * </p> | |
38 | * | |
39 | * @param group The new group to be created | |
40 | * @return a the Group that has been created. | |
41 | */ | |
42 | @WebMethod(operationName = "createGroup") | |
43 | @WebResult(name = "group") | |
44 | Group createGroup(@WebParam(name="group") Group group) throws RiceIllegalArgumentException; | |
45 | ||
46 | /** | |
47 | * Updates an existing group using the given Group. | |
48 | * | |
49 | * <p> | |
50 | * This will attempt to update an existing Group. For this to return without exceptions, the passed in Group | |
51 | * must have it's Id set and be a valid group that already exists. | |
52 | * </p> | |
53 | * | |
54 | * @param group The group to be updated | |
55 | * @return a the Group that has been updated. | |
56 | */ | |
57 | @WebMethod(operationName = "updateGroup") | |
58 | @WebResult(name = "group") | |
59 | Group updateGroup(@WebParam(name="group") Group group) throws RiceIllegalArgumentException; | |
60 | ||
61 | /** | |
62 | * Updates a group using the given Group. | |
63 | * | |
64 | * <p> | |
65 | * 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 | |
66 | * this method will inactivate the old group and create a new group with the same members with the passed in groups properties. | |
67 | * </p> | |
68 | * | |
69 | * @param groupId Id of the Group to be updated | |
70 | * @param group Group object to use for update | |
71 | * @return a the Group that has been updated. | |
72 | */ | |
73 | @WebMethod(operationName = "updateGroupWithId") | |
74 | @WebResult(name = "group") | |
75 | Group updateGroup(@WebParam(name="groupId") String groupId, @WebParam(name="group") Group group) throws RiceIllegalArgumentException; | |
76 | ||
77 | /** | |
78 | * Adds the group with the id supplied in childId as a member of the group with the id supplied in parentId. | |
79 | * | |
80 | * @param childId Id of the Group to be added to the members of Parent | |
81 | * @param parentId Id of the Group object to add the member to | |
82 | * @return true if the member was added successfully. | |
83 | */ | |
84 | @WebMethod(operationName = "addGroupToGroup") | |
85 | @WebResult(name = "addedToGroup") | |
86 | boolean addGroupToGroup(@WebParam(name="childId") String childId, @WebParam(name="parentId") String parentId) throws RiceIllegalArgumentException; | |
87 | ||
88 | /** | |
89 | * Removes the group with the id supplied in childId from the group with the id supplied in parentId. | |
90 | * | |
91 | * @param childId Id of the Group to be removed from the members of Parent | |
92 | * @param parentId Id of the Group object to remove the member from | |
93 | * @return true if the member was removed successfully. | |
94 | */ | |
95 | @WebMethod(operationName = "removeGroupFromGroup") | |
96 | @WebResult(name = "removedFromGroup") | |
97 | boolean removeGroupFromGroup(@WebParam(name="childId") String childId, @WebParam(name="parentId") String parentId) throws RiceIllegalArgumentException; | |
98 | ||
99 | /** | |
100 | * Add the principal with the given principalId as a member of the group with the given groupId. | |
101 | * | |
102 | * @param principalId Id of the Principal to be added to the members of the Parent Group | |
103 | * @param groupId Id of the Group object to add the member to | |
104 | * @return true if the member was added successfully. | |
105 | */ | |
106 | @WebMethod(operationName = "addPrincipalToGroup") | |
107 | @WebResult(name = "addedToGroup") | |
108 | boolean addPrincipalToGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; | |
109 | ||
110 | /** | |
111 | * Removes the member principal with the given principalId from the group with the given groupId. | |
112 | * | |
113 | * @param principalId Id of the Principal to be removed from the members of the Parent Group | |
114 | * @param groupId Id of the Group object to remove the member from | |
115 | * @return true if the member was removed successfully. | |
116 | */ | |
117 | @WebMethod(operationName = "removePrincipalFromGroup") | |
118 | @WebResult(name = "removedFromGroup") | |
119 | boolean removePrincipalFromGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws RiceIllegalArgumentException; | |
120 | ||
121 | /** | |
122 | * Removes all members from the group with the given groupId. | |
123 | * | |
124 | * @param groupId Id of the Group object to remove the members from | |
125 | */ | |
126 | @WebMethod(operationName = "removeAllMembers") | |
127 | void removeAllMembers( @WebParam(name="groupId") String groupId ) throws RiceIllegalArgumentException; | |
128 | } |