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.kim.util.KimConstants; | |
20 | ||
21 | import javax.jws.WebMethod; | |
22 | import javax.jws.WebParam; | |
23 | import javax.jws.WebResult; | |
24 | import javax.jws.WebService; | |
25 | import javax.jws.soap.SOAPBinding; | |
26 | ||
27 | @WebService(name = "GroupUpdateService", targetNamespace = KimConstants.Namespaces.KIM_NAMESPACE_2_0) | |
28 | @SOAPBinding(style = SOAPBinding.Style.DOCUMENT, use = SOAPBinding.Use.LITERAL, parameterStyle = SOAPBinding.ParameterStyle.WRAPPED) | |
29 | public interface GroupUpdateService { | |
30 | ||
31 | /** | |
32 | * Creates a new group using the given Group. | |
33 | * | |
34 | * <p> | |
35 | * This will attempt to create a new Group | |
36 | * </p> | |
37 | * | |
38 | * @param group The new group to be created | |
39 | * @return a the Group that has been created. | |
40 | */ | |
41 | @WebMethod(operationName = "createGroup") | |
42 | @WebResult(name = "group") | |
43 | Group createGroup(@WebParam(name="group") Group group) throws UnsupportedOperationException; | |
44 | ||
45 | /** | |
46 | * Updates an existing group using the given Group. | |
47 | * | |
48 | * <p> | |
49 | * This will attempt to update an existing Group. For this to return without exceptions, the passed in Group | |
50 | * must have it's Id set and be a valid group that already exists. | |
51 | * </p> | |
52 | * | |
53 | * @param group The group to be updated | |
54 | * @return a the Group that has been updated. | |
55 | */ | |
56 | @WebMethod(operationName = "updateGroup") | |
57 | @WebResult(name = "group") | |
58 | Group updateGroup(@WebParam(name="group") Group group) throws UnsupportedOperationException; | |
59 | ||
60 | /** | |
61 | * Updates a group using the given Group. | |
62 | * | |
63 | * <p> | |
64 | * 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 | |
65 | * this method will inactivate the old group and create a new group with the same members with the passed in groups properties. | |
66 | * </p> | |
67 | * | |
68 | * @param groupId Id of the Group to be updated | |
69 | * @param group Group object to use for update | |
70 | * @return a the Group that has been updated. | |
71 | */ | |
72 | @WebMethod(operationName = "updateGroupWithId") | |
73 | @WebResult(name = "group") | |
74 | Group updateGroup(@WebParam(name="groupId") String groupId, @WebParam(name="group") Group group) throws UnsupportedOperationException; | |
75 | ||
76 | /** | |
77 | * Adds the group with the id supplied in childId as a member of the group with the id supplied in parentId. | |
78 | * | |
79 | * @param childId Id of the Group to be added to the members of Parent | |
80 | * @param parentId Id of the Group object to add the member to | |
81 | * @return true if the member was added successfully. | |
82 | */ | |
83 | @WebMethod(operationName = "addGroupToGroup") | |
84 | @WebResult(name = "addedToGroup") | |
85 | boolean addGroupToGroup(@WebParam(name="childId") String childId, @WebParam(name="parentId") String parentId) throws UnsupportedOperationException; | |
86 | ||
87 | /** | |
88 | * Removes the group with the id supplied in childId from the group with the id supplied in parentId. | |
89 | * | |
90 | * @param childId Id of the Group to be removed from the members of Parent | |
91 | * @param parentId Id of the Group object to remove the member from | |
92 | * @return true if the member was removed successfully. | |
93 | */ | |
94 | @WebMethod(operationName = "removeGroupFromGroup") | |
95 | @WebResult(name = "removedFromGroup") | |
96 | boolean removeGroupFromGroup(@WebParam(name="childId") String childId, @WebParam(name="parentId") String parentId) throws UnsupportedOperationException; | |
97 | ||
98 | /** | |
99 | * Add the principal with the given principalId as a member of the group with the given groupId. | |
100 | * | |
101 | * @param principalId Id of the Principal to be added to the members of the Parent Group | |
102 | * @param groupId Id of the Group object to add the member to | |
103 | * @return true if the member was added successfully. | |
104 | */ | |
105 | @WebMethod(operationName = "addPrincipalToGroup") | |
106 | @WebResult(name = "addedToGroup") | |
107 | boolean addPrincipalToGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws UnsupportedOperationException; | |
108 | ||
109 | /** | |
110 | * Removes the member principal with the given principalId from the group with the given groupId. | |
111 | * | |
112 | * @param principalId Id of the Principal to be removed from the members of the Parent Group | |
113 | * @param groupId Id of the Group object to remove the member from | |
114 | * @return true if the member was removed successfully. | |
115 | */ | |
116 | @WebMethod(operationName = "removePrincipalFromGroup") | |
117 | @WebResult(name = "removedFromGroup") | |
118 | boolean removePrincipalFromGroup(@WebParam(name="principalId") String principalId, @WebParam(name="groupId") String groupId) throws UnsupportedOperationException; | |
119 | ||
120 | /** | |
121 | * Removes all members from the group with the given groupId. | |
122 | * | |
123 | * @param groupId Id of the Group object to remove the members from | |
124 | */ | |
125 | @WebMethod(operationName = "removeAllMembers") | |
126 | void removeAllMembers( @WebParam(name="groupId") String groupId ) throws UnsupportedOperationException; | |
127 | } |