org.apache.turbine.services.template.mapper
Class ScreenDefaultTemplateMapper

java.lang.Object
  extended byorg.apache.turbine.services.template.mapper.BaseMapper
      extended byorg.apache.turbine.services.template.mapper.BaseTemplateMapper
          extended byorg.apache.turbine.services.template.mapper.ScreenDefaultTemplateMapper
All Implemented Interfaces:
Mapper

public class ScreenDefaultTemplateMapper
extends BaseTemplateMapper
implements Mapper

This is a pretty simple mapper which returns template pathes for a supplied template name. If the path does not exist, it looks for a templated called "Default" in the same package. This path can be used by the TemplateEngine to access a certain resource to actually render the template.

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

Field Summary
 
Fields inherited from class org.apache.turbine.services.template.mapper.BaseTemplateMapper
prefix
 
Fields inherited from class org.apache.turbine.services.template.mapper.BaseMapper
defaultProperty, separator
 
Constructor Summary
ScreenDefaultTemplateMapper()
          Default C'tor.
 
Method Summary
 java.lang.String doMapping(java.lang.String template)
          Look for a given Template, then try the default.
 
Methods inherited from class org.apache.turbine.services.template.mapper.BaseTemplateMapper
getDefaultName, getPrefix, setPrefix
 
Methods inherited from class org.apache.turbine.services.template.mapper.BaseMapper
getCacheSize, getDefaultProperty, getMappedName, getSeparator, init, isUseCache, setCacheSize, setDefaultProperty, setSeparator, setUseCache
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.turbine.services.template.mapper.Mapper
getCacheSize, getDefaultName, getDefaultProperty, getMappedName, getSeparator, init, isUseCache, setCacheSize, setDefaultProperty, setSeparator, setUseCache
 

Constructor Detail

ScreenDefaultTemplateMapper

public ScreenDefaultTemplateMapper()
Default C'tor. If you use this C'tor, you must use the bean setter to set the various properties needed for this mapper before first usage.

Method Detail

doMapping

public java.lang.String doMapping(java.lang.String template)
Look for a given Template, then try the default.

Specified by:
doMapping in class BaseMapper
Parameters:
template - The template name.
Returns:
The parsed module name.


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