org.apache.turbine.services.template.mapper

## 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: BaseTemplateMapper.java 1709648 2015-10-20 17:08:10Z tv $
  Author:
    Henning P. Schmiedehausen

- - ### Field Summary

    Fields
    Modifier and Type | Field and 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 and Description
    `BaseTemplateMapper()` Default C'tor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### prefix

          protected String prefix

      A prefix which is used to separate the various template types (screen, layouts, navigation)

  - ### 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

    - #### getPrefix

          public String getPrefix()

      Get the Prefix value.
      Returns:
        the Prefix value.

    - #### 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 class `BaseMapper`
      Parameters:
        `template` - The template name.
      Returns:
        the mapped default name for the template.

Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.