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

public void init()
Mapper initialization.


getCacheSize

public int getCacheSize()
Get the CacheSize value.

Returns:
the CacheSize value.

setCacheSize

public void setCacheSize(int cacheSize)
Set the CacheSize value.

Parameters:
cacheSize - The new CacheSize value.

isUseCache

public boolean isUseCache()
Get the UseCache value.

Returns:
the UseCache value.

setUseCache

public void setUseCache(boolean useCache)
Set the UseCache value.


getDefaultProperty

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

Returns:
the DefaultProperty value.

setDefaultProperty

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

Parameters:
defaultProperty - The new DefaultProperty value.

getSeparator

public char getSeparator()
Get the Separator value.

Returns:
the Separator value.

setSeparator

public void setSeparator(char separator)
Set the Separator value.

Parameters:
separator - The new Separator value.

getDefaultName

public 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

public 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-2008 Apache Software Foundation. All Rights Reserved.