1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.struts.scripting;
19
20
21 import java.util.Properties;
22
23
24 import org.apache.bsf.BSFManager;
25
26
27 /***
28 * Defines a class that wants to manipulate the contents of the scripting
29 * context before the script is executed. An example would be a class that puts
30 * business facade classes in the context.
31 */
32 public interface BSFManagerFilter {
33
34 /***
35 * Initializes the filter. Properties can be retrieved as: <code>
36 * struts-scripting.filters.FILTER_NAME.PROPERTY_NAME=PROPERTY_VALUE
37 * </code> where FILTER_NAME is the "name" parameter.
38 *
39 *@param name The name of the filter
40 *@param props The properties
41 */
42 void init(String name, Properties props);
43
44
45 /***
46 * Applies the filter.
47 *
48 *@param mgr The scripting manager
49 *@return The scripting manager
50 */
51 BSFManager apply(BSFManager mgr);
52 }
53