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