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 import org.astrogrid.community.common.policy.data.AccountData ;
25
26 import org.astrogrid.community.common.exception.CommunityPolicyException ;
27 import org.astrogrid.community.common.exception.CommunityServiceException ;
28 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
29
30 /***
31 * Interface for our AccountManager delegate.
32 * This mirrors the AccountManager interface, without the RemoteExceptions.
33 * @see AccountManager
34 * @todo Add Ivorn methods
35 *
36 */
37 public interface AccountManagerDelegate
38 extends CommunityServiceDelegate
39 {
40 /***
41 * Add a new Account, given the Account ident.
42 * @param ident The Account identifier.
43 * @return An AccountData for the Account.
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 AccountData addAccount(String ident)
50 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
51
52 /***
53 * Add a new Account, given the Account data.
54 * @param account The AccountData to add.
55 * @return A new AccountData for the Account.
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 AccountData addAccount(AccountData account)
62 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
63
64 /***
65 * Request an Account details, given the Account ident.
66 * @param ident The Account identifier.
67 * @return An AccountData for the Account.
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 AccountData getAccount(String ident)
74 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
75
76 /***
77 * Update an Account.
78 * @param account The new AccountData to update.
79 * @return A new AccountData for the Account.
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 AccountData setAccount(AccountData account)
86 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
87
88 /***
89 * Delete an Account.
90 * @param ident The Account identifier.
91 * @return The AccountData for the old Account.
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 AccountData delAccount(String ident)
98 throws CommunityServiceException, CommunityIdentifierException, CommunityPolicyException ;
99
100 /***
101 * Request a list of local Accounts.
102 * @return An array of AccountData objects.
103 * @throws CommunityServiceException If there is an internal error in the service.
104 *
105 */
106 public Object[] getLocalAccounts()
107 throws CommunityServiceException ;
108
109 }