Class BaseMapper
- java.lang.Object
- 
- org.apache.turbine.services.template.mapper.BaseMapper
 
- 
- Direct Known Subclasses:
- BaseTemplateMapper,- ClassMapper,- DirectMapper
 
 public abstract class BaseMapper extends Object A base class for the various mappers which contains common code.- Version:
- $Id$
- Author:
- Henning P. Schmiedehausen
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected StringdefaultPropertyThe name of the default property to pull from the Template Engine Service if the default is requestedprotected charseparatorThe separator used to concatenate the result parts for this mapper.
 - 
Constructor SummaryConstructors Constructor Description BaseMapper()Default C'tor.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringdoMapping(String template)The actual mapping implementation class.intgetCacheSize()Get the CacheSize value.StringgetDefaultName(String template)Returns the default name for the passed Template.StringgetDefaultProperty()Get the DefaultProperty value.StringgetMappedName(String template)Return the first match name for the given template name.chargetSeparator()Get the Separator value.voidinit()Initializes the Mapper.booleanisUseCache()Get the UseCache value.voidsetCacheSize(int cacheSize)Set the CacheSize value.voidsetDefaultProperty(String defaultProperty)Set the DefaultProperty value.voidsetSeparator(char separator)Set the Separator value.voidsetUseCache(boolean useCache)Set the UseCache value.
 
- 
- 
- 
Field Detail- 
defaultPropertyprotected String defaultProperty The name of the default property to pull from the Template Engine Service if the default is requested
 - 
separatorprotected char separator The separator used to concatenate the result parts for this mapper.
 
- 
 - 
Constructor Detail- 
BaseMapperpublic BaseMapper() 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- 
getCacheSizepublic int getCacheSize() Get the CacheSize value.- Returns:
- the CacheSize value.
 
 - 
setCacheSizepublic void setCacheSize(int cacheSize) Set the CacheSize value.- Parameters:
- cacheSize- The new CacheSize value.
 
 - 
isUseCachepublic boolean isUseCache() Get the UseCache value.- Returns:
- the UseCache value.
 
 - 
setUseCachepublic void setUseCache(boolean useCache) Set the UseCache value.- Parameters:
- useCache- The new UseCache value.
 
 - 
getDefaultPropertypublic String getDefaultProperty() Get the DefaultProperty value.- Returns:
- the DefaultProperty value.
 
 - 
setDefaultPropertypublic void setDefaultProperty(String defaultProperty) Set the DefaultProperty value.- Parameters:
- defaultProperty- The new DefaultProperty value.
 
 - 
getSeparatorpublic char getSeparator() Get the Separator value.- Returns:
- the Separator value.
 
 - 
setSeparatorpublic void setSeparator(char separator) Set the Separator value.- Parameters:
- separator- The new Separator value.
 
 - 
initpublic void init() Initializes the Mapper. Must be called before the mapper might be used.
 - 
getDefaultNamepublic String getDefaultName(String template) Returns the default name for the passed Template. If the passed template has no extension, the default extension is assumed. If the template is empty, the default template is returned.- Parameters:
- template- The template name.
- Returns:
- the mapped default name for the template.
 
 - 
getMappedNamepublic String getMappedName(String template) Return the first match name for the given template name.- Parameters:
- template- The template name.
- Returns:
- The first matching class or template name.
 
 
- 
 
-