1 package org.apache.turbine.services.pull;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 /***
23 * Tools that go into the Toolbox should implement this interface.
24 *
25 * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
26 * @version $Id: ApplicationTool.java 534527 2007-05-02 16:10:59Z tv $
27 */
28 public interface ApplicationTool
29 {
30 /***
31 * Initialize the application tool. The data parameter holds a different
32 * type depending on how the tool is being instantiated:
33 * <ul>
34 * <li>For global tools data will be null</li>
35 * <li>For request tools data will be of type RunData</li>
36 * <li>For session and authorized tools data will be of type User</li>
37 * </ul>
38 * <p>
39 * It is possible that session scope tools will be initialized with a null
40 * <code>User</code> object. This happens when the first request on a
41 * session happens to the be login action.
42 * <p>
43 * If your session tool depends on having a <code>User</code> object, you
44 * should look at implementing the {@link RunDataApplicationTool} interface
45 * instead.
46 *
47 * @param data initialization data
48 */
49 void init(Object data);
50
51 /***
52 * Refresh the application tool. This is
53 * necessary for development work where you
54 * probably want the tool to refresh itself
55 * if it is using configuration information
56 * that is typically cached after initialization
57 */
58 void refresh();
59 }