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
27
28
29 package org.astrogrid.community.client.policy.manager ;
30
31 import org.astrogrid.community.client.service.CommunityServiceDelegate ;
32
33 import org.astrogrid.community.common.policy.data.ResourceData ;
34
35 import org.astrogrid.community.common.exception.CommunityServiceException ;
36 import org.astrogrid.community.common.exception.CommunityResourceException ;
37 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
38
39 /***
40 * Interface for our ResourceManager delegate.
41 * This mirrors the ResourceManager interface, without the RemoteExceptions.
42 *
43 */
44 public interface ResourceManagerDelegate
45 extends CommunityServiceDelegate
46 {
47 /***
48 * Register a new Resource.
49 * @return A new ResourceData object to represent the resource.
50 * @throws CommunityServiceException If there is an internal error in the service.
51 *
52 */
53 public ResourceData addResource()
54 throws CommunityServiceException ;
55
56 /***
57 * Request the details for a Resource.
58 * @param The resource identifier.
59 * @return The requested ResourceData object.
60 * @throws CommunityResourceException If unable to locate the resource.
61 * @throws CommunityServiceException If there is an internal error in the service.
62 * @throws CommunityIdentifierException If the resource identifier is not valid.
63 *
64 */
65 public ResourceData getResource(String ident)
66 throws CommunityIdentifierException, CommunityResourceException, CommunityServiceException ;
67
68 /***
69 * Request the details for a Resource.
70 * @return The requested ResourceData object.
71 * @throws CommunityResourceException If unable to locate the resource.
72 * @throws CommunityServiceException If there is an internal error in the service.
73 * @throws CommunityIdentifierException If the resource identifier is not valid.
74 *
75 */
76 public Object[] getResources();
77
78
79 /***
80 * Update the details for a Resource.
81 * @param The ResourceData to update.
82 * @return The updated ResourceData.
83 * @throws CommunityResourceException If unable to locate the resource.
84 * @throws CommunityServiceException If there is an internal error in the service.
85 * @throws CommunityIdentifierException If the resource identifier is not valid.
86 *
87 */
88 public ResourceData setResource(ResourceData resource)
89 throws CommunityIdentifierException, CommunityResourceException, CommunityServiceException ;
90
91 /***
92 * Delete a Resource.
93 * @param The resource identifier.
94 * @return The original ResourceData.
95 * @throws CommunityResourceException If unable to locate the resource.
96 * @throws CommunityServiceException If there is an internal error in the service.
97 * @throws CommunityIdentifierException If the identifier is not valid.
98 *
99 */
100 public ResourceData delResource(String ident)
101 throws CommunityIdentifierException, CommunityResourceException, CommunityServiceException ;
102
103 }