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 * Tools that go into the Toolbox should implement this interface.
21 *
22 * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
23 * @version $Id: ApplicationTool.java 264148 2005-08-29 14:21:04Z henning $
24 */
25 public interface ApplicationTool
26 {
27 /***
28 * Initialize the application tool. The data parameter holds a different
29 * type depending on how the tool is being instantiated:
30 * <ul>
31 * <li>For global tools data will be null</li>
32 * <li>For request tools data will be of type RunData</li>
33 * <li>For session and authorized tools data will be of type User</li>
34 * </ul>
35 * <p>
36 * It is possible that session scope tools will be initialized with a null
37 * <code>User</code> object. This happens when the first request on a
38 * session happens to the be login action.
39 * <p>
40 * If your session tool depends on having a <code>User</code> object, you
41 * should look at implementing the {@link RunDataApplicationTool} interface
42 * instead.
43 *
44 * @param data initialization data
45 */
46 void init(Object data);
47
48 /***
49 * Refresh the application tool. This is
50 * necessary for development work where you
51 * probably want the tool to refresh itself
52 * if it is using configuration information
53 * that is typically cached after initialization
54 */
55 void refresh();
56 }