Interface TemplateService

All Superinterfaces:
Initable, Service
All Known Implementing Classes:
TurbineTemplateService

public interface TemplateService extends Service
This service provides a method for mapping templates to their appropriate Screens or Navigations. It also allows templates to define a layout/navigations/screen modularization within the template structure. It also performs caching if turned on in the properties file.
Version:
$Id$
Author:
John D. McNally, Jason van Zyl, Daniel Rall, Ilkka Priha
  • Field Details

  • Method Details

    • isCaching

      boolean isCaching()
      Returns true if the Template Service has caching activated
      Returns:
      true if Caching is active.
    • getDefaultExtension

      Get the default template name extension specified in the template service properties.
      Returns:
      The default the extension.
    • getExtension

      Return Extension for a supplied template
      Parameters:
      template - The template name
      Returns:
      extension The extension for the supplied template
    • getDefaultTemplate

      Returns the Default Template Name with the Default Extension. If the extension is unset, return only the template name
      Returns:
      The default template Name
    • getDefaultPage

      Get the default page module name of the template engine service corresponding to the default template name extension.
      Returns:
      The default page module name.
    • getDefaultScreen

      Get the default screen module name of the template engine service corresponding to the default template name extension.
      Returns:
      The default screen module name.
    • getDefaultLayout

      Get the default layout module name of the template engine service corresponding to the default template name extension.
      Returns:
      The default layout module name.
    • getDefaultNavigation

      Get the default navigation module name of the template engine service corresponding to the default template name extension.
      Returns:
      The default navigation module name.
    • getDefaultLayoutTemplate

      Get the default layout template name of the template engine service corresponding to the default template name extension.
      Returns:
      The default layout template name.
    • getDefaultPageName

      Get the default page module name of the template engine service corresponding to the template name extension of the named template.
      Parameters:
      template - The template name.
      Returns:
      The default page module name.
    • getDefaultScreenName

      Get the default screen module name of the template engine service corresponding to the template name extension of the named template.
      Parameters:
      template - The template name.
      Returns:
      The default screen module name.
    • getDefaultLayoutName

      Get the default layout module name of the template engine service corresponding to the template name extension of the named template.
      Parameters:
      template - The template name.
      Returns:
      The default layout module name.
    • getDefaultNavigationName

      Get the default navigation module name of the template engine service corresponding to the template name extension of the named template.
      Parameters:
      template - The template name.
      Returns:
      The default navigation module name.
    • getDefaultLayoutTemplateName

      Get the default layout template name of the template engine service corresponding to the template name extension of the named template.
      Parameters:
      template - The template name.
      Returns:
      The default layout template name.
    • getDefaultPageName

      Find the default page module name for the given request.
      Parameters:
      pipelineData - The encapsulation of the request to retrieve the default page for.
      Returns:
      The default page module name.
    • getDefaultLayoutName

      Find the default layout module name for the given request.
      Parameters:
      pipelineData - The encapsulation of the request to retrieve the default layout for.
      Returns:
      The default layout module name.
    • getScreenName

      Locate and return the name of the screen module to be used with the named screen template.
      Parameters:
      template - The screen template name.
      Returns:
      The found screen module name.
      Throws:
      Exception - a generic exception.
    • getLayoutName

      Locate and return the name of the layout module to be used with the named layout template.
      Parameters:
      template - The layout template name.
      Returns:
      The found layout module name.
      Throws:
      Exception - a generic exception.
    • getNavigationName

      Locate and return the name of the navigation module to be used with the named navigation template.
      Parameters:
      template - The navigation template name.
      Returns:
      The found navigation module name.
      Throws:
      Exception - a generic exception.
    • getScreenTemplateName

      Locate and return the name of the screen template corresponding to the given template name parameter.
      Parameters:
      template - The template name parameter.
      Returns:
      The found screen template name.
      Throws:
      Exception - a generic exception.
    • getLayoutTemplateName

      Locate and return the name of the layout template corresponding to the given screen template name parameter.
      Parameters:
      template - The template name parameter.
      Returns:
      The found screen template name.
      Throws:
      Exception - a generic exception.
    • getNavigationTemplateName

      Locate and return the name of the navigation template corresponding to the given template name parameter.
      Parameters:
      template - The template name parameter.
      Returns:
      The found navigation template name.
      Throws:
      Exception - a generic exception.
    • translateTemplatePaths

      Deprecated.
      Each template engine service should know how to translate a request onto a file.
      Translates the supplied template paths into their Turbine-canonical equivalent (probably absolute paths).
      Parameters:
      templatePaths - An array of template paths.
      Returns:
      An array of translated template paths.
    • templateExists

      @Deprecated boolean templateExists(String template, String[] templatePaths)
      Deprecated.
      Use templateExists from the various Templating Engines
      Delegates to the appropriate TemplateEngineService to check the existence of the specified template.
      Parameters:
      template - The template to check for the existence of.
      templatePaths - The paths to check for the template.
      Returns:
      true if the given template exists
    • getTemplateEngineService

      The TemplateEngineService associated with the specified template's file extension.
      Parameters:
      template - The template name.
      Returns:
      The template engine service.
    • registerTemplateEngineService

      Registers the provided template engine for use by the TemplateService.
      Parameters:
      service - The TemplateEngineService to register.