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