1 /*
2 * Copyright (c) 2003
3 * Information Desire GmbH
4 * All rights reserved.
5 */
6 package com.infodesire.infobit;
7 import com.infodesire.infobit.data.Acl;
8 import com.infodesire.infobit.data.Capability;
9
10 import java.util.Collection;
11
12 /***
13 * manager for all aspects of acl handling
14 *
15 * @author konstantin
16 * @created August 11, 2003
17 * @version $Revision: 1.4 $
18 */
19 public interface AclManager {
20
21 /***
22 * load acl by name
23 *
24 * @param name acl or null if nothing found
25 * @return
26 * @exception InfobitException thrown by infobit system to indicate
27 * internal problems
28 */
29 Acl getAcl(String name) throws InfobitException;
30
31
32 /***
33 * create new acl. user shall nave enough permissions to do this.
34 *
35 * @param name unique acl name
36 * @return Description of the Returned Value
37 * @exception InfobitException thrown on internal errors
38 * @exception InfobitSecurityException thrown on security violations
39 */
40 Acl createAcl(String name) throws InfobitException, InfobitSecurityException;
41
42
43 /***
44 * update acl contents
45 *
46 * @param acl acl to be updated
47 * @return the same acl
48 * @exception InfobitException Description of Exception
49 * @exception InfobitSecurityException Description of Exception
50 */
51 Acl updateAcl(Acl acl) throws InfobitException, InfobitSecurityException;
52
53
54 /***
55 * Gets the Capability attribute of the AclManager object
56 *
57 * @param name Description of Parameter
58 * @return The Capability value
59 * @exception InfobitException Description of Exception
60 * @exception InfobitSecurityException Description of Exception
61 */
62 Capability getCapability(String name) throws InfobitException, InfobitSecurityException;
63
64
65 /***
66 * DOCUMENT METHOD
67 *
68 * @return Description of the Returned Value
69 * @exception InfobitException Description of Exception
70 * @exception InfobitSecurityException Description of Exception
71 */
72 Collection listCapabilities() throws InfobitException, InfobitSecurityException;
73
74
75 /***
76 * remove given acl if possible. rmoval will be refused ( and excetpion
77 * thrown )
78 *
79 * @param acl Description of Parameter
80 * @exception InfobitException Description of Exception
81 * @exception InfobitSecurityException Description of Exception
82 * @exception InfobitIntegrityException Description of Exception
83 */
84 void removeAcl(Acl acl) throws InfobitIntegrityException, InfobitException, InfobitSecurityException;
85
86
87 /***
88 * provide list of acls on system
89 *
90 * @return Description of the Returned Value
91 * @exception InfobitException Description of Exception
92 */
93 Collection listAcl() throws InfobitException;
94
95
96
97 /***
98 * DOCUMENT METHOD
99 *
100 * @param capability Description of Parameter
101 * @param role Description of Parameter
102 * @param acl Description of Parameter
103 * @exception InfobitSecurityException Description of Exception
104 * @exception InfobitException Description of Exception
105 */
106 void grantPermission(Acl acl, Capability capability, String role) throws InfobitException, InfobitSecurityException;
107
108
109 /***
110 * DOCUMENT METHOD
111 *
112 * @param capability Description of Parameter
113 * @param role Description of Parameter
114 * @param acl Description of Parameter
115 * @exception InfobitSecurityException Description of Exception
116 * @exception InfobitException Description of Exception
117 */
118 void revokePermission(Acl acl, Capability capability, String role) throws InfobitException, InfobitSecurityException;
119
120
121 /***
122 * create new capability instance
123 *
124 * @param name Description of Parameter
125 * @return Description of the Returned Value
126 * @exception InfobitException Description of Exception
127 * @exception InfobitSecurityException Description of Exception
128 */
129 Capability createCapability(String name) throws InfobitException, InfobitSecurityException;
130
131
132 /***
133 * remove capability of possible
134 *
135 * @param capability Description of Parameter
136 * @exception InfobitException Description of Exception
137 * @exception InfobitSecurityException Description of Exception
138 * @exception InfobitIntegrityException Description of Exception
139 */
140 void removeCapability(Capability capability) throws InfobitException, InfobitIntegrityException, InfobitSecurityException;
141
142
143 /***
144 * DOCUMENT METHOD
145 *
146 * @param cap Description of Parameter
147 * @exception InfobitException Description of Exception
148 * @exception InfobitSecurityException Description of Exception
149 */
150 public void updateCapability(Capability cap) throws InfobitException, InfobitSecurityException;
151 }
152
This page was automatically generated by Maven