KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > webdocwf > dods > access > User


1 /**
2  * Title: DODS Access User Interface<p>
3  * Description: Determines if the user has access to details of DODS object or the whole class<p>
4  * Copyright: Copyright (c) Together Teamlösungen EDV-Dienstleistungen GmbH. under LGPL<p>
5  * Company: Together Teamlösungen EDV-Dienstleistungen GmbH.<p>
6  * @author Alfred Madl
7  * @version 1.0
8  */

9 package org.webdocwf.dods.access;
10
11 import com.lutris.appserver.server.sql.Query;
12 import com.lutris.dods.builder.generator.dataobject.GenericDO;
13
14 public interface User {
15
16     /**
17      * Get the name of the user for output.
18      * Used for Exception printing.
19      *
20      * @return The printable name of the user.
21      */

22     public String JavaDoc getName();
23
24     /**
25      * Restrict the Query for DODS Query access using SQL
26      *
27      * @param query The DODS Query object which will be executed
28      */

29     public void restrictQuery(Query query) throws AccessEvalException;
30
31     /**
32      * Decide whether the User is allowed to
33      * copy
34      * the DO
35      *
36      * @param obj The object which will be copied
37      * @return Whether the User has the right to perform this task
38      */

39     public boolean hasDOCopyAccess(GenericDO obj) throws AccessEvalException;
40
41     /**
42      * Decide whether the User is allowed to
43      * read the existance of
44      * the DO
45      *
46      * @param obj The object which will be read
47      * @return Whether the User has the right to perform this task
48      */

49     public boolean hasDOGetAccess(GenericDO obj) throws AccessEvalException;
50
51     /**
52      * Decide whether the User is allowed to
53      * read the version of
54      * the DO
55      *
56      * @param obj The object which version will be read
57      * @return Whether the User has the right to perform this task
58      */

59     public boolean hasDOGetVersionAccess(GenericDO obj) throws AccessEvalException;
60
61     /**
62      * Decide whether the User is allowed to
63      * read the readOnly attribute of
64      * the DO
65      *
66      * @param obj The object which readonly attribute will be read
67      * @return Whether the User has the right to perform this task
68      */

69     public boolean hasDOIsReadOnlyAccess(GenericDO obj) throws AccessEvalException;
70
71     /**
72      * Decide whether the User is allowed to
73      * set the readOnly attribute = true of
74      * the DO
75      *
76      * @param obj The object which readonly attribute will be set to true
77      * @return Whether the User has the right to perform this task
78      */

79     public boolean hasDOMakeReadOnlyAccess(GenericDO obj) throws AccessEvalException;
80
81     /**
82      * Decide whether the User is allowed to
83      * set the readOnly attribute = false of
84      * the DO
85      *
86      * @param obj The object which readonly attribute will be set to false
87      * @return Whether the User has the right to perform this task
88      */

89     public boolean hasDOMakeReadWriteAccess(GenericDO obj) throws AccessEvalException;
90
91     /**
92      * Decide whether the User is allowed to
93      * delete
94      * the DO
95      *
96      * @param obj The object which will be deleted
97      * @return Whether the User has the right to perform this task
98      */

99     public boolean hasDODeleteAccess(GenericDO obj) throws AccessEvalException;
100
101     /**
102      * Decide whether the User is allowed to
103      * read an attribute with a certain value/type of
104      * the DO, used for enums
105      *
106      * @param obj The object which will be read
107      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
108      * @param value The current value of the attribute which will be read
109      * @param type The current type of the attribute which will be read
110      * @return Whether the User has the right to perform this task
111      */

112     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, String JavaDoc type, String JavaDoc value) throws AccessEvalException;
113
114     /**
115      * Decide whether the User is allowed to
116      * read an attribute with a certain value of
117      * the DO
118      *
119      * @param obj The object which will be read
120      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
121      * @param value The current value of the attribute which will be read
122      * @return Whether the User has the right to perform this task
123      */

124     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, Object JavaDoc value) throws AccessEvalException;
125
126     /**
127      * Decide whether the User is allowed to
128      * read an attribute with a certain value of
129      * the DO
130      *
131      * @param obj The object which will be read
132      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
133      * @param value The current value of the attribute which will be read
134      * @return Whether the User has the right to perform this task
135      */

136     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, boolean value) throws AccessEvalException;
137
138     /**
139      * Decide whether the User is allowed to
140      * read an attribute with a certain value of
141      * the DO
142      *
143      * @param obj The object which will be read
144      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
145      * @param value The current value of the attribute which will be read
146      * @return Whether the User has the right to perform this task
147      */

148     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, byte value) throws AccessEvalException;
149
150     /**
151      * Decide whether the User is allowed to
152      * read an attribute with a certain value of
153      * the DO
154      *
155      * @param obj The object which will be read
156      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
157      * @param value The current value of the attribute which will be read
158      * @return Whether the User has the right to perform this task
159      */

160     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, short value) throws AccessEvalException;
161
162     /**
163      * Decide whether the User is allowed to
164      * read an attribute with a certain value of
165      * the DO
166      *
167      * @param obj The object which will be read
168      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
169      * @param value The current value of the attribute which will be read
170      * @return Whether the User has the right to perform this task
171      */

172     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, int value) throws AccessEvalException;
173
174     /**
175      * Decide whether the User is allowed to
176      * read an attribute with a certain value of
177      * the DO
178      *
179      * @param obj The object which will be read
180      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
181      * @param value The current value of the attribute which will be read
182      * @return Whether the User has the right to perform this task
183      */

184     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, long value) throws AccessEvalException;
185
186     /**
187      * Decide whether the User is allowed to
188      * read an attribute with a certain value of
189      * the DO
190      *
191      * @param obj The object which will be read
192      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
193      * @param value The current value of the attribute which will be read
194      * @return Whether the User has the right to perform this task
195      */

196     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, float value) throws AccessEvalException;
197
198     /**
199      * Decide whether the User is allowed to
200      * read an attribute with a certain value of
201      * the DO
202      *
203      * @param obj The object which will be read
204      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
205      * @param value The current value of the attribute which will be read
206      * @return Whether the User has the right to perform this task
207      */

208     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, double value) throws AccessEvalException;
209
210     /**
211      * Decide whether the User is allowed to
212      * read an attribute with a certain value of
213      * the DO
214      *
215      * @param obj The object which will be read
216      * @param attrName The name of the attribute which will be read ("packages.class:attrname")
217      * @param value The current value of the attribute which will be read
218      * @return Whether the User has the right to perform this task
219      */

220     public boolean hasDOGetAttrAccess(GenericDO obj, String JavaDoc attrName, byte[] value) throws AccessEvalException;
221
222     /**
223      * Decide whether the User is allowed to
224      * create
225      * the DO of a certain class
226      *
227      * @param className The name of the class which will be instanciated
228      * @return Whether the User has the right to perform this task
229      */

230     public boolean hasDOCreateAccess(String JavaDoc className) throws AccessEvalException;
231
232     /**
233      * Decide whether the User is allowed to
234      * set an attribute with a certain old value/type and a certain new value/type of
235      * the DO, used for enums
236      *
237      * @param obj The object which will be modified
238      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
239      * @param oldValue The current value of the attribute which will be overwritten
240      * @param oldType The current type of the attribute which will be overwritten
241      * @param newValue The new value of the attribute which will be set
242      * @param newType The new type of the attribute which will be set
243      * @return Whether the User has the right to perform this task
244      */

245     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, String JavaDoc oldType, String JavaDoc oldValue, String JavaDoc newType, String JavaDoc newValue) throws AccessEvalException;
246
247     /**
248      * Decide whether the User is allowed to
249      * set an attribute with a certain old value and a certain new value of
250      * the DO
251      *
252      * @param obj The object which will be modified
253      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
254      * @param oldValue The current value of the attribute which will be overwritten
255      * @param newValue The new value of the attribute which will be set
256      * @return Whether the User has the right to perform this task
257      */

258     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, Object JavaDoc oldValue, Object JavaDoc newValue) throws AccessEvalException;
259
260     /**
261      * Decide whether the User is allowed to
262      * set an attribute with a certain old value and a certain new value of
263      * the DO
264      *
265      * @param obj The object which will be modified
266      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
267      * @param oldValue The current value of the attribute which will be overwritten
268      * @param newValue The new value of the attribute which will be set
269      * @return Whether the User has the right to perform this task
270      */

271     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, boolean oldValue, boolean newValue) throws AccessEvalException;
272
273     /**
274      * Decide whether the User is allowed to
275      * set an attribute with a certain old value and a certain new value of
276      * the DO
277      *
278      * @param obj The object which will be modified
279      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
280      * @param oldValue The current value of the attribute which will be overwritten
281      * @param newValue The new value of the attribute which will be set
282      * @return Whether the User has the right to perform this task
283      */

284     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, byte oldValue, byte newValue) throws AccessEvalException;
285
286     /**
287      * Decide whether the User is allowed to
288      * set an attribute with a certain old value and a certain new value of
289      * the DO
290      *
291      * @param obj The object which will be modified
292      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
293      * @param oldValue The current value of the attribute which will be overwritten
294      * @param newValue The new value of the attribute which will be set
295      * @return Whether the User has the right to perform this task
296      */

297     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, short oldValue, short newValue) throws AccessEvalException;
298
299     /**
300      * Decide whether the User is allowed to
301      * set an attribute with a certain old value and a certain new value of
302      * the DO
303      *
304      * @param obj The object which will be modified
305      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
306      * @param oldValue The current value of the attribute which will be overwritten
307      * @param newValue The new value of the attribute which will be set
308      * @return Whether the User has the right to perform this task
309      */

310     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, int oldValue, int newValue) throws AccessEvalException;
311
312     /**
313      * Decide whether the User is allowed to
314      * set an attribute with a certain old value and a certain new value of
315      * the DO
316      *
317      * @param obj The object which will be modified
318      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
319      * @param oldValue The current value of the attribute which will be overwritten
320      * @param newValue The new value of the attribute which will be set
321      * @return Whether the User has the right to perform this task
322      */

323     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, long oldValue, long newValue) throws AccessEvalException;
324
325     /**
326      * Decide whether the User is allowed to
327      * set an attribute with a certain old value and a certain new value of
328      * the DO
329      *
330      * @param obj The object which will be modified
331      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
332      * @param oldValue The current value of the attribute which will be overwritten
333      * @param newValue The new value of the attribute which will be set
334      * @return Whether the User has the right to perform this task
335      */

336     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, float oldValue, float newValue) throws AccessEvalException;
337
338     /**
339      * Decide whether the User is allowed to
340      * set an attribute with a certain old value and a certain new value of
341      * the DO
342      *
343      * @param obj The object which will be modified
344      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
345      * @param oldValue The current value of the attribute which will be overwritten
346      * @param newValue The new value of the attribute which will be set
347      * @return Whether the User has the right to perform this task
348      */

349     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, double oldValue, double newValue) throws AccessEvalException;
350
351     /**
352      * Decide whether the User is allowed to
353      * set an attribute with a certain old value and a certain new value of
354      * the DO
355      *
356      * @param obj The object which will be modified
357      * @param attrName The name of the attribute which will be set ("packages.class:attrname")
358      * @param oldValue The current value of the attribute which will be overwritten
359      * @param newValue The new value of the attribute which will be set
360      * @return Whether the User has the right to perform this task
361      */

362     public boolean hasDOSetAttrAccess(GenericDO obj, String JavaDoc attrName, byte[] oldValue, byte[] newValue) throws AccessEvalException;
363
364     /**
365      * Decide whether the User is allowed to
366      * query
367      * the DO's of a certain class
368      *
369      * @param className The name of the class which will be queried for DO's
370      * @return Whether the User has the right to perform this task
371      */

372     public boolean hasQueryAccess(String JavaDoc className) throws AccessEvalException;
373
374     /**
375      * Decide whether the User is allowed to
376      * find
377      * the DO during a query
378      *
379      * @param obj The DO which would be found with a query
380      * @return Whether the User has the right to perform this task
381      */

382     public boolean hasQueryFindAccess(GenericDO obj) throws AccessEvalException;
383
384     /**
385      * Decide whether the User is allowed to
386      * query DO's for an attribute with a certain query-value and comparison operator
387      *
388      * @param className The name of the class which will be queried for DO's
389      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
390      * @param queryValue The query value for the attribute
391      * @param cmp_op Compare operator
392      * @return Whether the User has the right to perform this task
393      */

394     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, Object JavaDoc queryValue, String JavaDoc cmp_op) throws AccessEvalException;
395
396     /**
397      * Decide whether the User is allowed to
398      * query DO's for an attribute with a certain query-value and comparison operator
399      *
400      * @param className The name of the class which will be queried for DO's
401      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
402      * @param queryValue The query value for the attribute
403      * @param cmp_op Compare operator
404      * @return Whether the User has the right to perform this task
405      */

406     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, boolean queryValue, String JavaDoc cmp_op) throws AccessEvalException;
407
408     /**
409      * Decide whether the User is allowed to
410      * query DO's for an attribute with a certain query-value and comparison operator
411      *
412      * @param className The name of the class which will be queried for DO's
413      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
414      * @param queryValue The query value for the attribute
415      * @param cmp_op Compare operator
416      * @return Whether the User has the right to perform this task
417      */

418     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, byte queryValue, String JavaDoc cmp_op) throws AccessEvalException;
419
420     /**
421      * Decide whether the User is allowed to
422      * query DO's for an attribute with a certain query-value and comparison operator
423      *
424      * @param className The name of the class which will be queried for DO's
425      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
426      * @param queryValue The query value for the attribute
427      * @param cmp_op Compare operator
428      * @return Whether the User has the right to perform this task
429      */

430     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, short queryValue, String JavaDoc cmp_op) throws AccessEvalException;
431
432     /**
433      * Decide whether the User is allowed to
434      * query DO's for an attribute with a certain query-value and comparison operator
435      *
436      * @param className The name of the class which will be queried for DO's
437      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
438      * @param queryValue The query value for the attribute
439      * @param cmp_op Compare operator
440      * @return Whether the User has the right to perform this task
441      */

442     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, int queryValue, String JavaDoc cmp_op) throws AccessEvalException;
443
444     /**
445      * Decide whether the User is allowed to
446      * query DO's for an attribute with a certain query-value and comparison operator
447      *
448      * @param className The name of the class which will be queried for DO's
449      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
450      * @param queryValue The query value for the attribute
451      * @param cmp_op Compare operator
452      * @return Whether the User has the right to perform this task
453      */

454     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, long queryValue, String JavaDoc cmp_op) throws AccessEvalException;
455
456     /**
457      * Decide whether the User is allowed to
458      * query DO's for an attribute with a certain query-value and comparison operator
459      *
460      * @param className The name of the class which will be queried for DO's
461      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
462      * @param queryValue The query value for the attribute
463      * @param cmp_op Compare operator
464      * @return Whether the User has the right to perform this task
465      */

466     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, float queryValue, String JavaDoc cmp_op) throws AccessEvalException;
467
468     /**
469      * Decide whether the User is allowed to
470      * query DO's for an attribute with a certain query-value and comparison operator
471      *
472      * @param className The name of the class which will be queried for DO's
473      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
474      * @param queryValue The query value for the attribute
475      * @param cmp_op Compare operator
476      * @return Whether the User has the right to perform this task
477      */

478     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, double queryValue, String JavaDoc cmp_op) throws AccessEvalException;
479
480     /**
481      * Decide whether the User is allowed to
482      * query DO's for an attribute with a certain query-value and comparison operator
483      *
484      * @param className The name of the class which will be queried for DO's
485      * @param attrName The name of the attribute which will be queried ("packages.class:attrname")
486      * @param queryValue The query value for the attribute
487      * @param cmp_op Compare operator
488      * @return Whether the User has the right to perform this task
489      */

490     public boolean hasQueryAttrAccess(String JavaDoc className, String JavaDoc attrName, byte[] queryValue, String JavaDoc cmp_op) throws AccessEvalException;
491 }
492
Popular Tags