View Javadoc

1   /*
2    * <cvs:source>$Source: /devel/astrogrid/community/common/src/java/org/astrogrid/community/common/policy/manager/PermissionManager.java,v $</cvs:source>
3    * <cvs:author>$Author: jdt $</cvs:author>
4    * <cvs:date>$Date: 2004/11/22 13:03:04 $</cvs:date>
5    * <cvs:version>$Revision: 1.10 $</cvs:version>
6    *
7    * <cvs:log>
8    *   $Log: PermissionManager.java,v $
9    *   Revision 1.10  2004/11/22 13:03:04  jdt
10   *   Merges from Comm_KMB_585
11   *
12   *   Revision 1.9  2004/10/29 15:50:05  jdt
13   *   merges from Community_AdminInterface (bug 579)
14   *
15   *   Revision 1.8.100.1  2004/10/18 22:10:28  KevinBenson
16   *   some bug fixes to the PermissionManager.  Also made it throw some exceptions.
17   *   Made  it and GroupManagerImnpl use the Resolver objects to actually get a group(PermissionManageriMnpl)
18   *   or account (GroupMember) from the other community.  Changed also for it to grab a ResourceData from the
19   *   database to verifity it is in our database.  Add a few of these resolver dependencies as well.
20   *   And last but not least fixed the GroupMemberData object to get rid of a few set methods so Castor
21   *   will now work correctly in Windows
22   *
23   *   Revision 1.8  2004/06/18 13:45:20  dave
24   *   Merged development branch, dave-dev-200406081614, into HEAD
25   *
26   *   Revision 1.7.24.2  2004/06/17 13:38:59  dave
27   *   Tidied up old CVS log entries
28   *
29   * </cvs:log>
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     }