KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > services > assemblerbroker > AssemblerBrokerService


1 package org.apache.turbine.services.assemblerbroker;
2
3 /*
4  * Copyright 2001-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License")
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
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,v 1.5.2.2 2004/05/20 03:05:19 seade Exp $
31  */

32 public interface AssemblerBrokerService
33         extends Service
34 {
35     /** Name of the Service */
36     String JavaDoc SERVICE_NAME = "AssemblerBrokerService";
37
38     /** Predefined types for Turbine built-in assemblers: Actions */
39     String JavaDoc ACTION_TYPE = "action";
40
41     /** Predefined types for Turbine built-in assemblers: Screens */
42     String JavaDoc SCREEN_TYPE = "screen";
43
44     /** Predefined types for Turbine built-in assemblers: Navigations */
45     String JavaDoc NAVIGATION_TYPE = "navigation";
46
47     /** Predefined types for Turbine built-in assemblers: Layouts */
48     String JavaDoc LAYOUT_TYPE = "layout";
49
50     /** Predefined types for Turbine built-in assemblers: Pages */
51     String JavaDoc PAGE_TYPE = "page";
52
53     /** Predefined types for Turbine built-in assemblers: Scheduler Jobs */
54     String JavaDoc 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 JavaDoc 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 JavaDoc type, String JavaDoc name) throws TurbineException;
74 }
75
Popular Tags