Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
Mapper |
|
| 1.0;1 |
1 | package org.apache.turbine.services.template.mapper; | |
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 | /** | |
25 | * To separate out the various map and search policies for class | |
26 | * names and template names, we use classes that implement this | |
27 | * interface. | |
28 | * | |
29 | * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a> | |
30 | * @version $Id: Mapper.java 1706239 2015-10-01 13:18:35Z tv $ | |
31 | */ | |
32 | ||
33 | public interface Mapper | |
34 | { | |
35 | /** | |
36 | * Mapper initialization. | |
37 | */ | |
38 | void init(); | |
39 | ||
40 | /** | |
41 | * Get the CacheSize value. | |
42 | * @return the CacheSize value. | |
43 | */ | |
44 | int getCacheSize(); | |
45 | ||
46 | /** | |
47 | * Set the CacheSize value. | |
48 | * @param cacheSize The new CacheSize value. | |
49 | */ | |
50 | void setCacheSize(int cacheSize); | |
51 | ||
52 | /** | |
53 | * Get the UseCache value. | |
54 | * @return the UseCache value. | |
55 | */ | |
56 | boolean isUseCache(); | |
57 | ||
58 | /** | |
59 | * Set the UseCache value. | |
60 | * @param useCache The new UseCache value. | |
61 | */ | |
62 | void setUseCache(boolean useCache); | |
63 | ||
64 | /** | |
65 | * Get the DefaultProperty value. | |
66 | * @return the DefaultProperty value. | |
67 | */ | |
68 | String getDefaultProperty(); | |
69 | ||
70 | /** | |
71 | * Set the DefaultProperty value. | |
72 | * @param defaultProperty The new DefaultProperty value. | |
73 | */ | |
74 | void setDefaultProperty(String defaultProperty); | |
75 | ||
76 | /** | |
77 | * Get the Separator value. | |
78 | * @return the Separator value. | |
79 | */ | |
80 | char getSeparator(); | |
81 | ||
82 | /** | |
83 | * Set the Separator value. | |
84 | * @param separator The new Separator value. | |
85 | */ | |
86 | void setSeparator(char separator); | |
87 | ||
88 | ||
89 | /** | |
90 | * Returns the default name for the supplied template | |
91 | * name. Must never return null. | |
92 | * | |
93 | * @param template The template name. | |
94 | * | |
95 | * @return The default name for this template. | |
96 | */ | |
97 | String getDefaultName(String template); | |
98 | ||
99 | /** | |
100 | * Return the first match name for the given template name. | |
101 | * This method might return null if no possible match can | |
102 | * be found. | |
103 | * | |
104 | * @param template The template name. | |
105 | * | |
106 | * @return The first matching class or template name. | |
107 | */ | |
108 | String getMappedName(String template); | |
109 | } |