View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/community/client/src/java/org/astrogrid/community/client/policy/service/PolicyServiceDelegate.java,v $</cvs:source>
3    * <cvs:author>$Author: dave $</cvs:author>
4    * <cvs:date>$Date: 2004/06/18 13:45:19 $</cvs:date>
5    * <cvs:version>$Revision: 1.5 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: PolicyServiceDelegate.java,v $
9    *   Revision 1.5  2004/06/18 13:45:19  dave
10   *   Merged development branch, dave-dev-200406081614, into HEAD
11   *
12   *   Revision 1.4.36.2  2004/06/17 15:10:03  dave
13   *   Removed unused imports (PMD report).
14   *
15   *   Revision 1.4.36.1  2004/06/17 13:38:58  dave
16   *   Tidied up old CVS log entries
17   *
18   * </cvs:log>
19   *
20   */
21  package org.astrogrid.community.client.policy.service ;
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.client.service.CommunityServiceDelegate ;
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  /***
33   * Interface for our PolicyService delegate.
34   * This mirrors the PolicyService interface, without the RemoteExceptions.
35   *
36   */
37  public interface PolicyServiceDelegate
38      extends CommunityServiceDelegate
39      {
40  
41      /***
42       * Confirm permissions.
43       * @param credentials The credentials, containing the account and group identifiers.
44       * @param resource The resource identifier.
45       * @param action The action you want to perform.
46       * @return A PolicyPermission object confirming the permission.
47       * @throws CommunityIdentifierException If one of the identifiers is invalid.
48       * @throws CommunityPolicyException If there is no matching permission.
49       * @throws CommunityServiceException If there is an internal error in the service.
50       *
51       */
52      public PolicyPermission checkPermissions(PolicyCredentials credentials, String resource, String action)
53          throws CommunityServiceException, CommunityPolicyException, CommunityIdentifierException ;
54  
55      /***
56       * Confirm membership.
57       * @param credentials The credentials, containing the account and group identifiers.
58       * @return A PolicyCredentials object confirming the membership.
59       * @throws CommunityIdentifierException If one of the identifiers is invalid.
60       * @throws CommunityPolicyException If there is no matching permission.
61       * @throws CommunityServiceException If there is an internal error in the service.
62       *
63       */
64      public PolicyCredentials checkMembership(PolicyCredentials credentials)
65          throws CommunityServiceException, CommunityPolicyException, CommunityIdentifierException ;
66  
67      }