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