org.apache.turbine.services.template.mapper
Interface Mapper

All Known Implementing Classes:
ClassMapper, DirectMapper, DirectTemplateMapper, LayoutTemplateMapper, ScreenDefaultTemplateMapper, ScreenTemplateMapper

public interface Mapper

To separate out the various map and search policies for class names and template names, we use classes that implement this interface.

Version:
$Id: Mapper.java 534527 2007-05-02 16:10:59Z tv $
Author:
Henning P. Schmiedehausen

Method Summary
 int getCacheSize()
          Get the CacheSize value.
 java.lang.String getDefaultName(java.lang.String template)
          Returns the default name for the supplied template name.
 java.lang.String getDefaultProperty()
          Get the DefaultProperty value.
 java.lang.String getMappedName(java.lang.String template)
          Return the first match name for the given template name.
 char getSeparator()
          Get the Separator value.
 void init()
          Mapper initialization.
 boolean isUseCache()
          Get the UseCache value.
 void setCacheSize(int cacheSize)
          Set the CacheSize value.
 void setDefaultProperty(java.lang.String defaultProperty)
          Set the DefaultProperty value.
 void setSeparator(char separator)
          Set the Separator value.
 void setUseCache(boolean useCache)
          Set the UseCache value.
 

Method Detail

init

void init()
Mapper initialization.


getCacheSize

int getCacheSize()
Get the CacheSize value.

Returns:
the CacheSize value.

setCacheSize

void setCacheSize(int cacheSize)
Set the CacheSize value.

Parameters:
cacheSize - The new CacheSize value.

isUseCache

boolean isUseCache()
Get the UseCache value.

Returns:
the UseCache value.

setUseCache

void setUseCache(boolean useCache)
Set the UseCache value.

Parameters:
newUseCache - The new UseCache value.

getDefaultProperty

java.lang.String getDefaultProperty()
Get the DefaultProperty value.

Returns:
the DefaultProperty value.

setDefaultProperty

void setDefaultProperty(java.lang.String defaultProperty)
Set the DefaultProperty value.

Parameters:
defaultProperty - The new DefaultProperty value.

getSeparator

char getSeparator()
Get the Separator value.

Returns:
the Separator value.

setSeparator

void setSeparator(char separator)
Set the Separator value.

Parameters:
separator - The new Separator value.

getDefaultName

java.lang.String getDefaultName(java.lang.String template)
Returns the default name for the supplied template name. Must never return null.

Parameters:
template - The template name.
Returns:
The default name for this template.

getMappedName

java.lang.String getMappedName(java.lang.String template)
Return the first match name for the given template name. This method might return null if no possible match can be found.

Parameters:
template - The template name.
Returns:
The first matching class or template name.


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.