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