1 /*
2 * $Id: TemplateGenerator.java 1349964 2012-06-13 17:18:51Z nlebas $
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "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 package org.apache.tiles.autotag.generate;
22
23
24 import java.util.Map;
25
26 import org.apache.tiles.autotag.model.TemplateSuite;
27
28 /**
29 * Generates all the code for a template suite.
30 *
31 * @version $Rev: 1349964 $ $Date: 2012-06-13 19:18:51 +0200 (Wed, 13 Jun 2012) $
32 */
33 public interface TemplateGenerator {
34
35 /**
36 * Generates the code.
37 *
38 * @param packageName The package name.
39 * @param suite The template suite.
40 * @param parameters Configuration parameters.
41 * @param runtimeClass The RequestBuilder implementation.
42 * @param requestClass The request class to use.
43 */
44 void generate(String packageName, TemplateSuite suite, Map<String, String> parameters,
45 String runtimeClass, String requestClass);
46
47 /**
48 * Indicates that this generator generates resources.
49 *
50 * @return <code>true</code> if the generator generates resources.
51 */
52 boolean isGeneratingResources();
53
54 /**
55 * Indicates that this generator generates classes.
56 *
57 * @return <code>true</code> if the generator generates classes.
58 */
59 boolean isGeneratingClasses();
60 }