001: package org.apache.turbine.services.template.mapper;
002:
003: /*
004: * Copyright 2001-2005 The Apache Software Foundation.
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License")
007: * you may not use this file except in compliance with the License.
008: * You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: */
018:
019: /**
020: * To separate out the various map and search policies for class
021: * names and template names, we use classes that implement this
022: * interface.
023: *
024: * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
025: * @version $Id: Mapper.java 264148 2005-08-29 14:21:04Z henning $
026: */
027:
028: public interface Mapper {
029: /**
030: * Mapper initialization.
031: */
032: void init();
033:
034: /**
035: * Get the CacheSize value.
036: * @return the CacheSize value.
037: */
038: int getCacheSize();
039:
040: /**
041: * Set the CacheSize value.
042: * @param cacheSize The new CacheSize value.
043: */
044: void setCacheSize(int cacheSize);
045:
046: /**
047: * Get the UseCache value.
048: * @return the UseCache value.
049: */
050: boolean isUseCache();
051:
052: /**
053: * Set the UseCache value.
054: * @param newUseCache The new UseCache value.
055: */
056: void setUseCache(boolean useCache);
057:
058: /**
059: * Get the DefaultProperty value.
060: * @return the DefaultProperty value.
061: */
062: String getDefaultProperty();
063:
064: /**
065: * Set the DefaultProperty value.
066: * @param defaultProperty The new DefaultProperty value.
067: */
068: void setDefaultProperty(String defaultProperty);
069:
070: /**
071: * Get the Separator value.
072: * @return the Separator value.
073: */
074: char getSeparator();
075:
076: /**
077: * Set the Separator value.
078: * @param separator The new Separator value.
079: */
080: void setSeparator(char separator);
081:
082: /**
083: * Returns the default name for the supplied template
084: * name. Must never return null.
085: *
086: * @param template The template name.
087: *
088: * @return The default name for this template.
089: */
090: String getDefaultName(String template);
091:
092: /**
093: * Return the first match name for the given template name.
094: * This method might return null if no possible match can
095: * be found.
096: *
097: * @param template The template name.
098: *
099: * @return The first matching class or template name.
100: */
101: String getMappedName(String template);
102: }
|