##### Coverage Report - org.apache.turbine.services.assemblerbroker.AssemblerBrokerService

Classes in this File | Line Coverage | Branch Coverage | Complexity
AssemblerBrokerService |
N/A | N/A
N/A | N/A
| 1.0;1

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