1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.astrogrid.community.client.policy.manager ;
22
23 import org.astrogrid.community.common.policy.data.GroupData ;
24
25 import org.astrogrid.community.common.exception.CommunityPolicyException ;
26 import org.astrogrid.community.common.exception.CommunityServiceException ;
27 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
28
29 import org.astrogrid.community.client.service.CommunityServiceDelegate ;
30
31 /***
32 * Interface for our GroupManager delegate.
33 * This mirrors the GroupManager interface, without the RemoteExceptions.
34 *
35 */
36 public interface GroupManagerDelegate
37 extends CommunityServiceDelegate
38 {
39
40 /***
41 * Add a new Group.
42 * @param ident The Group identifier.
43 * @return A GroupData for the Group.
44 * @throws CommunityIdentifierException If the identifier is not valid.
45 * @throws CommunityPolicyException If the identifier is already in the database.
46 * @throws CommunityServiceException If there is an internal error in the service.
47 *
48 */
49 public GroupData addGroup(String ident)
50 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
51
52 /***
53 * Add a new Group.
54 * @param data The GroupData to add.
55 * @return A new GroupData for the Group.
56 * @throws CommunityIdentifierException If the identifier is not valid.
57 * @throws CommunityPolicyException If the identifier is already in the database.
58 * @throws CommunityServiceException If there is an internal error in the service.
59 *
60 */
61 public GroupData addGroup(GroupData data)
62 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
63
64 /***
65 * Request a Group details.
66 * @param ident The Group identifier.
67 * @return A GroupData for the Group.
68 * @throws CommunityIdentifierException If the identifier is not valid.
69 * @throws CommunityPolicyException If the identifier is not in the database.
70 * @throws CommunityServiceException If there is an internal error in the service.
71 *
72 */
73 public GroupData getGroup(String ident)
74 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
75
76 /***
77 * Update a Group.
78 * @param group The new GroupData to update.
79 * @return A new GroupData for the Group.
80 * @throws CommunityIdentifierException If the identifier is not valid.
81 * @throws CommunityPolicyException If the identifier is not in the database.
82 * @throws CommunityServiceException If there is an internal error in the service.
83 *
84 */
85 public GroupData setGroup(GroupData account)
86 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
87
88 /***
89 * Delete a Group.
90 * @param ident The Group identifier.
91 * @return The GroupData for the old Group.
92 * @throws CommunityIdentifierException If the identifier is not valid.
93 * @throws CommunityPolicyException If the identifier is not in the database.
94 * @throws CommunityServiceException If there is an internal error in the service.
95 *
96 */
97 public GroupData delGroup(String ident)
98 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
99
100 /***
101 * Request a list of local Groups.
102 * @return An array of GroupData objects.
103 * @throws CommunityServiceException If there is an internal error in the service.
104 *
105 */
106 public Object[] getLocalGroups()
107 throws CommunityServiceException ;
108
109 /***
110 * Request a list of local Groups that an Account belongs to, given the Account ident.
111 * @param account The Account ifentifier.
112 * @return An array of GroupData objects.
113 * @throws CommunityServiceException If there is an internal error in the service.
114 *
115 */
116 public Object[] getLocalAccountGroups(String account)
117 throws CommunityServiceException, CommunityIdentifierException ;
118
119 }