View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/community/common/src/java/org/astrogrid/community/common/policy/service/PolicyService.java,v $</cvs:source>
3    * <cvs:author>$Author: dave $</cvs:author>
4    * <cvs:date>$Date: 2004/06/18 13:45:20 $</cvs:date>
5    * <cvs:version>$Revision: 1.7 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: PolicyService.java,v $
9    *   Revision 1.7  2004/06/18 13:45:20  dave
10   *   Merged development branch, dave-dev-200406081614, into HEAD
11   *
12   *   Revision 1.6.36.1  2004/06/17 13:38:59  dave
13   *   Tidied up old CVS log entries
14   *
15   * </cvs:log>
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      }