01: package org.apache.turbine.services.assemblerbroker;
02:
03: /*
04: * Copyright 2001-2005 The Apache Software Foundation.
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License")
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
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 extends Service {
33: /** Name of the Service */
34: String SERVICE_NAME = "AssemblerBrokerService";
35:
36: /** Predefined types for Turbine built-in assemblers: Actions */
37: String ACTION_TYPE = "action";
38:
39: /** Predefined types for Turbine built-in assemblers: Screens */
40: String SCREEN_TYPE = "screen";
41:
42: /** Predefined types for Turbine built-in assemblers: Navigations */
43: String NAVIGATION_TYPE = "navigation";
44:
45: /** Predefined types for Turbine built-in assemblers: Layouts */
46: String LAYOUT_TYPE = "layout";
47:
48: /** Predefined types for Turbine built-in assemblers: Pages */
49: String PAGE_TYPE = "page";
50:
51: /** Predefined types for Turbine built-in assemblers: Scheduler Jobs */
52: String SCHEDULEDJOB_TYPE = "scheduledjob";
53:
54: /**
55: * Register an AssemblerFactory class for a given type
56: *
57: * @param type Type of the Factory
58: * @param factory The factory object
59: */
60: void registerFactory(String type, AssemblerFactory factory);
61:
62: /**
63: * Attempts to load an Assembler of a type with a given name
64: *
65: * @param type The Type of the Assembler
66: * @param name The Name of the Assembler
67: * @return An Assembler object for the requested name and type
68: *
69: * @throws TurbineException Something went wrong while looking for the Assembler
70: */
71: Assembler getAssembler(String type, String name)
72: throws TurbineException;
73: }
|