1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.osoco.cowarp;
17
18
19 /***
20 * This class describes the current application. Inside Cocoon, you can have
21 * different applications running at the same time (a portal, a shop, a
22 * registration wizard etc.) Each of these applications might require their
23 * own login or have different settings. The application object helps in
24 * managing these things.
25 *
26 * @author <a href="mailto:cziegeler.at.osoco.org">Carsten Ziegeler</a>
27 * @version CVS $Id: Application.java,v 1.9 2005/02/22 18:39:00 cziegeler Exp $
28 */
29 public interface Application {
30
31 /***
32 * Return the security handler of this application.
33 * @return The security handler
34 */
35 SecurityHandler getSecurityHandler();
36
37 /***
38 * Return the application store for loading/saving user specific data.
39 * @return Return the application store or null.
40 */
41 ApplicationStore getApplicationStore();
42
43 /***
44 * Notify the application about a successful login of a user.
45 * @param user The current user.
46 */
47 void userDidLogin(User user);
48
49 /***
50 * Notify the application about a logout of a user.
51 * @param user The current user.
52 */
53 void userWillLogout(User user);
54
55 /***
56 * Set an application attribute.
57 * @param key The key of the attribute.
58 * @param value The value of the attribute.
59 */
60 void setAttribute(String key, Object value);
61
62 /***
63 * Remove an application attribute.
64 * @param key The key of the attribute.
65 */
66 void removeAttribute(String key);
67
68 /***
69 * Get the value of an application attribute.
70 * @param key The key of the attribute.
71 * @return The value of the attribute or null.
72 */
73 Object getAttribute(String key);
74 }