Class BaseTemplateMapper
- java.lang.Object
-
- org.apache.turbine.services.template.mapper.BaseMapper
-
- org.apache.turbine.services.template.mapper.BaseTemplateMapper
-
- Direct Known Subclasses:
DirectTemplateMapper
,LayoutTemplateMapper
,ScreenDefaultTemplateMapper
,ScreenTemplateMapper
public abstract class BaseTemplateMapper extends BaseMapper
This is a mapper like the BaseMapper but it returns its results with the extension of the template names passed or (if no extension is passed), the default extension.- Version:
- $Id$
- Author:
- Henning P. Schmiedehausen
-
-
Field Summary
Fields Modifier and Type Field Description protected String
prefix
A prefix which is used to separate the various template types (screen, layouts, navigation)-
Fields inherited from class org.apache.turbine.services.template.mapper.BaseMapper
defaultProperty, separator
-
-
Constructor Summary
Constructors Constructor Description BaseTemplateMapper()
Default C'tor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefaultName(String template)
Returns the default name for the passed Template.String
getPrefix()
Get the Prefix value.void
setPrefix(String prefix)
Set the Prefix value.-
Methods inherited from class org.apache.turbine.services.template.mapper.BaseMapper
doMapping, getCacheSize, getDefaultProperty, getMappedName, getSeparator, init, isUseCache, setCacheSize, setDefaultProperty, setSeparator, setUseCache
-
-
-
-
Constructor Detail
-
BaseTemplateMapper
public BaseTemplateMapper()
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
-
setPrefix
public void setPrefix(String prefix)
Set the Prefix value.- Parameters:
prefix
- The new Prefix value.
-
getDefaultName
public String getDefaultName(String template)
Returns the default name for the passed Template. If the template has no extension, the default extension is added. If the template is empty, the default template is returned.- Overrides:
getDefaultName
in classBaseMapper
- Parameters:
template
- The template name.- Returns:
- the mapped default name for the template.
-
-