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
30
31
32 package org.astrogrid.community.common.policy.manager ;
33
34 import java.rmi.Remote ;
35 import java.rmi.RemoteException ;
36
37 import org.astrogrid.community.common.policy.data.PolicyPermission ;
38 import org.astrogrid.community.common.service.CommunityService ;
39
40 import org.astrogrid.community.common.exception.CommunityPolicyException ;
41 import org.astrogrid.community.common.exception.CommunityServiceException ;
42 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
43
44 /***
45 * Public interface for our PermissionManager service.
46 *
47 */
48 public interface PermissionManager
49 extends Remote, CommunityService
50 {
51 /***
52 * Create a new PolicyPermission.
53 *
54 */
55 public PolicyPermission addPermission(String resource, String group, String action)
56 throws CommunityServiceException, CommunityIdentifierException,
57 CommunityPolicyException, RemoteException ;
58
59 /***
60 * Request a PolicyPermission.
61 *
62 */
63 public PolicyPermission getPermission(String resource, String group, String action)
64 throws CommunityIdentifierException, CommunityServiceException,
65 CommunityPolicyException, RemoteException ;
66
67 /***
68 * Request a PolicyPermission.
69 *
70 */
71 public Object[] getPermissions() throws RemoteException;
72
73
74 /***
75 * Update a PolicyPermission.
76 *
77 */
78 public PolicyPermission setPermission(PolicyPermission permission)
79 throws CommunityIdentifierException, CommunityServiceException,
80 CommunityPolicyException, RemoteException ;
81
82 /***
83 * Delete a PolicyPermission.
84 *
85 */
86 public boolean delPermission(String resource, String group, String action)
87 throws CommunityServiceException, CommunityIdentifierException,
88 CommunityPolicyException, RemoteException ;
89
90 /***
91 * Request a list of PolicyPermissions for a resource.
92 * TODO - Need to put something like this back in.
93 * TODO - Possibly requesting all permissions for a resource.
94 * TODO - Possibly requesting all permissions for a group and resource.
95 *
96 public Object[] getPermissionList(String resource)
97 throws RemoteException ;
98 */
99
100 }