1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.astrogrid.community.common.policy.service ;
19
20 import java.rmi.Remote ;
21 import java.rmi.RemoteException ;
22
23 import org.astrogrid.community.common.policy.data.PolicyPermission ;
24 import org.astrogrid.community.common.policy.data.PolicyCredentials ;
25
26 import org.astrogrid.community.common.service.CommunityService ;
27
28 import org.astrogrid.community.common.exception.CommunityPolicyException ;
29 import org.astrogrid.community.common.exception.CommunityServiceException ;
30 import org.astrogrid.community.common.exception.CommunityIdentifierException ;
31
32 public interface PolicyService
33 extends Remote, CommunityService
34 {
35
36 /***
37 * Confirm permissions.
38 * @param credentials The credentials, containing the account and group identifiers.
39 * @param resource The resource identifier.
40 * @param action The action you want to perform.
41 * @return A PolicyPermission object confirming the permission.
42 * @throws CommunityIdentifierException If one of the identifiers is invalid.
43 * @throws CommunityPolicyException If there is no matching permission.
44 * @throws CommunityServiceException If there is an internal error in the service.
45 * @throws RemoteException If the WebService call fails.
46 *
47 */
48 public PolicyPermission checkPermissions(PolicyCredentials credentials, String resource, String action)
49 throws RemoteException, CommunityServiceException, CommunityPolicyException, CommunityIdentifierException ;
50
51 /***
52 * Confirm membership.
53 * @param credentials The credentials, containing the account and group identifiers.
54 * @return A PolicyCredentials object confirming the membership.
55 * @throws CommunityIdentifierException If one of the identifiers is invalid.
56 * @throws CommunityPolicyException If there is no matching permission.
57 * @throws CommunityServiceException If there is an internal error in the service.
58 * @throws RemoteException If the WebService call fails.
59 *
60 */
61 public PolicyCredentials checkMembership(PolicyCredentials credentials)
62 throws RemoteException, CommunityServiceException, CommunityPolicyException, CommunityIdentifierException ;
63
64 }