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.client.service.CommunityServiceDelegate ;
24
25 import org.astrogrid.community.common.policy.data.CommunityData ;
26
27 import org.astrogrid.community.common.exception.CommunityPolicyException ;
28 import org.astrogrid.community.common.exception.CommunityServiceException ;
29 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
30
31 /***
32 * Interface for our CommunityManager delegate.
33 * This mirrors the CommunityManager interface, without the RemoteExceptions.
34 *
35 */
36 public interface CommunityManagerDelegate
37 extends CommunityServiceDelegate
38 {
39 /***
40 * Add a new Community, given the Account ident.
41 * @param ident The Community identifier.
42 * @return A CommunityData for the Community.
43 * @throws CommunityIdentifierException If the identifier is not valid.
44 * @throws CommunityPolicyException If the identifier is already in the database.
45 * @throws CommunityServiceException If there is an internal error in the service.
46 *
47 */
48 public CommunityData addCommunity(String ident)
49 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
50
51 /***
52 * Request a Community details, given the Community ident.
53 * @param ident The Community identifier.
54 * @return A CommunityData for the Community.
55 * @throws CommunityIdentifierException If the identifier is not valid.
56 * @throws CommunityPolicyException If the identifier is not in the database.
57 * @throws CommunityServiceException If there is an internal error in the service.
58 *
59 */
60 public CommunityData getCommunity(String ident)
61 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
62
63 /***
64 * Update a Community.
65 * @param community The new CommunityData to update.
66 * @return A new CommunityData for the Community.
67 * @throws CommunityIdentifierException If the identifier is not valid.
68 * @throws CommunityPolicyException If the identifier is not in the database.
69 * @throws CommunityServiceException If there is an internal error in the service.
70 *
71 */
72 public CommunityData setCommunity(CommunityData community)
73 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
74
75 /***
76 * Delete a Community.
77 * @param ident The Community identifier.
78 * @return The CommunityData for the old Community.
79 * @throws CommunityIdentifierException If the identifier is not valid.
80 * @throws CommunityPolicyException If the identifier is not in the database.
81 * @throws CommunityServiceException If there is an internal error in the service.
82 *
83 */
84 public CommunityData delCommunity(String ident)
85 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
86
87 /***
88 * Request a list of Communities.
89 * @return An array of CommunityData objects.
90 * @throws CommunityServiceException If there is an internal error in the service.
91 *
92 */
93 public Object[] getCommunityList()
94 throws CommunityServiceException ;
95
96 }