|
|||||||||
| Home >> All >> org >> apache >> turbine >> services >> template >> [ mapper overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
org.apache.turbine.services.template.mapper
Class BaseMapper

java.lang.Objectorg.apache.turbine.services.template.mapper.BaseMapper
- Direct Known Subclasses:
- BaseTemplateMapper, ClassMapper, DirectMapper
- public abstract class BaseMapper
- extends java.lang.Object
A base class for the various mappers which contains common code.
- Version:
- $Id: BaseMapper.java 264148 2005-08-29 14:21:04Z henning $
| Field Summary | |
private int |
cacheSize
Default cache size. |
protected java.lang.String |
defaultProperty
The name of the default property to pull from the Template Engine Service if the default is requested |
protected char |
separator
The separator used to concatenate the result parts for this mapper. |
private java.util.Map |
templateCache
The internal template -> name mapping cache |
private boolean |
useCache
True if this mapper should cache template -> name mappings |
| Constructor Summary | |
BaseMapper()
Default C'tor. |
|
| Method Summary | |
abstract java.lang.String |
doMapping(java.lang.String template)
The actual mapping implementation class. |
int |
getCacheSize()
Get the CacheSize value. |
java.lang.String |
getDefaultName(java.lang.String template)
Returns the default name for the passed Template. |
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()
Initializes the Mapper. |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
useCache
private boolean useCache
- True if this mapper should cache template -> name mappings
cacheSize
private int cacheSize
- Default cache size. Just a number out of thin air. Will be set at init time
templateCache
private java.util.Map templateCache
- The internal template -> name mapping cache
defaultProperty
protected java.lang.String defaultProperty
- The name of the default property to pull from the Template Engine Service if the default is requested
separator
protected char separator
- The separator used to concatenate the result parts for this mapper.
| Constructor Detail |
BaseMapper
public 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 |
getCacheSize
public int getCacheSize()
- Get the CacheSize value.
setCacheSize
public void setCacheSize(int cacheSize)
- Set the CacheSize value.
isUseCache
public boolean isUseCache()
- Get the UseCache value.
setUseCache
public void setUseCache(boolean useCache)
- Set the UseCache value.
getDefaultProperty
public java.lang.String getDefaultProperty()
- Get the DefaultProperty value.
setDefaultProperty
public void setDefaultProperty(java.lang.String defaultProperty)
- Set the DefaultProperty value.
getSeparator
public char getSeparator()
- Get the Separator value.
setSeparator
public void setSeparator(char separator)
- Set the Separator value.
init
public void init()
- Initializes the Mapper. Must be called before the mapper might be used.
getDefaultName
public java.lang.String getDefaultName(java.lang.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.
getMappedName
public java.lang.String getMappedName(java.lang.String template)
- Return the first match name for the given template name.
doMapping
public abstract java.lang.String doMapping(java.lang.String template)
- The actual mapping implementation class. It
is guaranteed that never an empty or null
template name is passed to it. This might
return null.
|
|||||||||
| Home >> All >> org >> apache >> turbine >> services >> template >> [ mapper overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
org.apache.turbine.services.template.mapper.BaseMapper