01: package org.apache.turbine.services.assemblerbroker;
02:
03: /*
04: * Licensed to the Apache Software Foundation (ASF) under one
05: * or more contributor license agreements. See the NOTICE file
06: * distributed with this work for additional information
07: * regarding copyright ownership. The ASF licenses this file
08: * to you under the Apache License, Version 2.0 (the
09: * "License"); you may not use this file except in compliance
10: * with the License. You may obtain a copy of the License at
11: *
12: * http://www.apache.org/licenses/LICENSE-2.0
13: *
14: * Unless required by applicable law or agreed to in writing,
15: * software distributed under the License is distributed on an
16: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17: * KIND, either express or implied. See the License for the
18: * specific language governing permissions and limitations
19: * under the License.
20: */
21:
22: import org.apache.turbine.modules.Assembler;
23: import org.apache.turbine.services.Service;
24: import org.apache.turbine.services.assemblerbroker.util.AssemblerFactory;
25: import org.apache.turbine.util.TurbineException;
26:
27: /**
28: * An interface the Turbine Assembler service.
29: * See TurbineAssemblerBrokerService for more info.
30: *
31: * @author <a href="mailto:leon@opticode.co.za">Leon Messerschmidt</a>
32: * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
33: * @version $Id: AssemblerBrokerService.java 534527 2007-05-02 16:10:59Z tv $
34: */
35: public interface AssemblerBrokerService extends Service {
36: /** Name of the Service */
37: String SERVICE_NAME = "AssemblerBrokerService";
38:
39: /** Predefined types for Turbine built-in assemblers: Actions */
40: String ACTION_TYPE = "action";
41:
42: /** Predefined types for Turbine built-in assemblers: Screens */
43: String SCREEN_TYPE = "screen";
44:
45: /** Predefined types for Turbine built-in assemblers: Navigations */
46: String NAVIGATION_TYPE = "navigation";
47:
48: /** Predefined types for Turbine built-in assemblers: Layouts */
49: String LAYOUT_TYPE = "layout";
50:
51: /** Predefined types for Turbine built-in assemblers: Pages */
52: String PAGE_TYPE = "page";
53:
54: /** Predefined types for Turbine built-in assemblers: Scheduler Jobs */
55: String SCHEDULEDJOB_TYPE = "scheduledjob";
56:
57: /**
58: * Register an AssemblerFactory class for a given type
59: *
60: * @param type Type of the Factory
61: * @param factory The factory object
62: */
63: void registerFactory(String type, AssemblerFactory factory);
64:
65: /**
66: * Attempts to load an Assembler of a type with a given name
67: *
68: * @param type The Type of the Assembler
69: * @param name The Name of the Assembler
70: * @return An Assembler object for the requested name and type
71: *
72: * @throws TurbineException Something went wrong while looking for the Assembler
73: */
74: Assembler getAssembler(String type, String name)
75: throws TurbineException;
76: }
|