01: package de.webman.acl.resolver;
02:
03: import java.util.Hashtable;
04: import com.teamkonzept.lib.ConfigurationListener;
05: import com.teamkonzept.lib.TKException;
06: import de.webman.acl.Login;
07:
08: /**
09: * Interface for access right resolvers.
10: *
11: * @version 1.0
12: * @since 1.0
13: * @author © 2001 Webman AG
14: */
15: public interface Resolver extends ConfigurationListener {
16:
17: // $Header: /cvsroot/webman-cms/source/webman/de/webman/acl/resolver/Resolver.java,v 1.1 2001/08/20 08:25:09 mischa Exp $
18:
19: // Constants
20:
21: /**
22: * Configuration property group.
23: */
24: String PROPERTY_GROUP_NAME = "Access Control Resolution";
25:
26: /**
27: * Configuration property name.
28: */
29: String PROPERTY_CACHE_RESOLUTION_RESULTS = "cacheResolutionResults";
30:
31: /**
32: * Configuration property name.
33: */
34: String PROPERTY_CACHE_CHECKING_RESULTS = "cacheCheckingResults";
35:
36: /**
37: * Configuration property default value.
38: */
39: String DEFAULT_CACHE_RESOLUTION_RESULTS = "true";
40:
41: /**
42: * Configuration property default value.
43: */
44: String DEFAULT_CACHE_CHECKING_RESULTS = "false";
45:
46: // Method signatures
47:
48: /**
49: * Assigns the login object of the resolver.
50: *
51: * @param login the login object to be assigned.
52: */
53: void setLogin(Login login);
54:
55: /**
56: * Returns the assigned login object.
57: *
58: * @return the assigned login object.
59: */
60: Login getLogin();
61:
62: /**
63: * This method is provided for the implementation of the actual
64: * access right resolution algorithm, i.e. the calculation of all
65: * allowed events for a login (user or group) in the current application
66: * state. The application state is determined by the context, an object
67: * type and an object reference.
68: * <P>
69: * If the optional arguments are omitted, only the context-wide
70: * access rights are resolved, otherwise the context-wide as well
71: * as the object-specific access rights are resolved.
72: * <P>
73: * The hashed collection is passed recursively to ensure the uniqueness
74: * of the calculated events conveniently.
75: *
76: * @param collection the distinct collection of permitted events.
77: * @param context the ID if the current context (<I>required</I>).
78: * @param type the current object type (<I>optional</I>).
79: * @param reference the current object reference (<I>optional</I>).
80: * @exception com.teamkonzept.lib.TKException if an error occured during
81: * access right resolution.
82: */
83: void resolve(Hashtable collection, Integer context, Integer type,
84: Integer reference) throws TKException;
85:
86: }
|