1 package org.apache.turbine.services.assemblerbroker;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import org.apache.turbine.modules.Assembler;
20 import org.apache.turbine.services.Service;
21 import org.apache.turbine.services.assemblerbroker.util.AssemblerFactory;
22 import org.apache.turbine.util.TurbineException;
23
24 /***
25 * An interface the Turbine Assembler service.
26 * See TurbineAssemblerBrokerService for more info.
27 *
28 * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
29 * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
30 * @version $Id: AssemblerBrokerService.java 264148 2005-08-29 14:21:04Z henning $
31 */
32 public interface AssemblerBrokerService
33 extends Service
34 {
35 /*** Name of the Service */
36 String SERVICE_NAME = "AssemblerBrokerService";
37
38 /*** Predefined types for Turbine built-in assemblers: Actions */
39 String ACTION_TYPE = "action";
40
41 /*** Predefined types for Turbine built-in assemblers: Screens */
42 String SCREEN_TYPE = "screen";
43
44 /*** Predefined types for Turbine built-in assemblers: Navigations */
45 String NAVIGATION_TYPE = "navigation";
46
47 /*** Predefined types for Turbine built-in assemblers: Layouts */
48 String LAYOUT_TYPE = "layout";
49
50 /*** Predefined types for Turbine built-in assemblers: Pages */
51 String PAGE_TYPE = "page";
52
53 /*** Predefined types for Turbine built-in assemblers: Scheduler Jobs */
54 String SCHEDULEDJOB_TYPE = "scheduledjob";
55
56 /***
57 * Register an AssemblerFactory class for a given type
58 *
59 * @param type Type of the Factory
60 * @param factory The factory object
61 */
62 void registerFactory(String type, AssemblerFactory factory);
63
64 /***
65 * Attempts to load an Assembler of a type with a given name
66 *
67 * @param type The Type of the Assembler
68 * @param name The Name of the Assembler
69 * @return An Assembler object for the requested name and type
70 *
71 * @throws TurbineException Something went wrong while looking for the Assembler
72 */
73 Assembler getAssembler(String type, String name) throws TurbineException;
74 }