1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package org.apache.tiles.preparer;
22
23 import org.apache.tiles.context.TilesRequestContext;
24 import org.apache.tiles.TilesException;
25
26 /***
27 * <p>
28 * Factory interface used to create/retrieve instances of
29 * the {@link ViewPreparer} interface.
30 * <p/>
31 *
32 * <p>
33 * This factory provides an extension point into the default
34 * tiles implementation. Implementors wishing to provide
35 * per request initialization of the ViewPreparer (for instance)
36 * may provide a custom prerparer.
37 * </p>
38 *
39 * @since 2.0
40 *
41 * @version $Rev: 527536 $ $Date: 2007-04-11 17:44:51 +0200 (Wed, 11 Apr 2007) $
42 */
43 public interface PreparerFactory {
44
45 /***
46 * Create the named {link ViewPreparer} for the specified context.
47 *
48 * @param name ViewPreparer name, commonly the qualified classname.
49 * @param context the context within which the preparerInstance will be invoked.
50 * @return instance of the ViewPreparer
51 * @throws TilesException If something goes wrong during preparer creation.
52 */
53 ViewPreparer getPreparer(String name, TilesRequestContext context)
54 throws TilesException;
55
56
57 }