KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > turbine > services > template > mapper > Mapper


1 package org.apache.turbine.services.template.mapper;
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 /**
20  * To separate out the various map and search policies for class
21  * names and template names, we use classes that implement this
22  * interface.
23  *
24  * @author <a HREF="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
25  * @version $Id: Mapper.java,v 1.1.2.2 2004/05/20 03:06:48 seade Exp $
26  */

27
28 public interface Mapper
29 {
30     /**
31      * Mapper initialization.
32      */

33     void init();
34
35     /**
36      * Get the CacheSize value.
37      * @return the CacheSize value.
38      */

39     int getCacheSize();
40
41     /**
42      * Set the CacheSize value.
43      * @param cacheSize The new CacheSize value.
44      */

45     void setCacheSize(int cacheSize);
46
47     /**
48      * Get the UseCache value.
49      * @return the UseCache value.
50      */

51     boolean isUseCache();
52
53     /**
54      * Set the UseCache value.
55      * @param newUseCache The new UseCache value.
56      */

57     void setUseCache(boolean useCache);
58
59     /**
60      * Get the DefaultProperty value.
61      * @return the DefaultProperty value.
62      */

63     String JavaDoc getDefaultProperty();
64
65     /**
66      * Set the DefaultProperty value.
67      * @param defaultProperty The new DefaultProperty value.
68      */

69     void setDefaultProperty(String JavaDoc defaultProperty);
70
71     /**
72      * Get the Separator value.
73      * @return the Separator value.
74      */

75     char getSeparator();
76
77     /**
78      * Set the Separator value.
79      * @param separator The new Separator value.
80      */

81     void setSeparator(char separator);
82
83
84     /**
85      * Returns the default name for the supplied template
86      * name. Must never return null.
87      *
88      * @param template The template name.
89      *
90      * @return The default name for this template.
91      */

92     String JavaDoc getDefaultName(String JavaDoc template);
93
94     /**
95      * Return the first match name for the given template name.
96      * This method might return null if no possible match can
97      * be found.
98      *
99      * @param template The template name.
100      *
101      * @return The first matching class or template name.
102      */

103     String JavaDoc getMappedName(String JavaDoc template);
104 }
105
Popular Tags