KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > de > webman > acl > resolver > Resolver


1 package de.webman.acl.resolver;
2
3 import java.util.Hashtable JavaDoc;
4 import com.teamkonzept.lib.ConfigurationListener;
5 import com.teamkonzept.lib.TKException;
6 import de.webman.acl.Login;
7
8 /**
9  * Interface for access right resolvers.
10  *
11  * @version 1.0
12  * @since 1.0
13  * @author © 2001 Webman AG
14  */

15 public interface Resolver
16     extends ConfigurationListener
17 {
18
19     // $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/resolver/Resolver.java,v 1.1 2001/08/20 08:25:09 mischa Exp $
20

21     // Constants
22

23     /**
24      * Configuration property group.
25      */

26     String JavaDoc PROPERTY_GROUP_NAME = "Access Control Resolution";
27
28     /**
29      * Configuration property name.
30      */

31     String JavaDoc PROPERTY_CACHE_RESOLUTION_RESULTS = "cacheResolutionResults";
32
33     /**
34      * Configuration property name.
35      */

36     String JavaDoc PROPERTY_CACHE_CHECKING_RESULTS = "cacheCheckingResults";
37
38     /**
39      * Configuration property default value.
40      */

41     String JavaDoc DEFAULT_CACHE_RESOLUTION_RESULTS = "true";
42
43     /**
44      * Configuration property default value.
45      */

46     String JavaDoc DEFAULT_CACHE_CHECKING_RESULTS = "false";
47
48
49     // Method signatures
50

51     /**
52      * Assigns the login object of the resolver.
53      *
54      * @param login the login object to be assigned.
55      */

56     void setLogin (Login login);
57
58     /**
59      * Returns the assigned login object.
60      *
61      * @return the assigned login object.
62      */

63     Login getLogin ();
64
65     /**
66      * This method is provided for the implementation of the actual
67      * access right resolution algorithm, i.e. the calculation of all
68      * allowed events for a login (user or group) in the current application
69      * state. The application state is determined by the context, an object
70      * type and an object reference.
71      * <P>
72      * If the optional arguments are omitted, only the context-wide
73      * access rights are resolved, otherwise the context-wide as well
74      * as the object-specific access rights are resolved.
75      * <P>
76      * The hashed collection is passed recursively to ensure the uniqueness
77      * of the calculated events conveniently.
78      *
79      * @param collection the distinct collection of permitted events.
80      * @param context the ID if the current context (<I>required</I>).
81      * @param type the current object type (<I>optional</I>).
82      * @param reference the current object reference (<I>optional</I>).
83      * @exception com.teamkonzept.lib.TKException if an error occured during
84      * access right resolution.
85      */

86     void resolve (Hashtable JavaDoc collection,
87                                   Integer JavaDoc context,
88                                   Integer JavaDoc type,
89                                   Integer JavaDoc reference)
90         throws TKException;
91
92 }
93
94
95
Popular Tags