Interface TemplateService
- All Known Implementing Classes:
- TurbineTemplateService
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 SummaryFieldsModifier and TypeFieldDescriptionstatic final StringDefault Extension for the template names.static final StringDefault value of the Turbine Module Cachingstatic final String"Default" name for Classes and Templatesstatic final StringDefault Template Name.static final StringDefault value for the Template Namestatic final charCharacter that separates a Template Name from the Extensionstatic final StringThe key under which this service is stored in TurbineServices.static final charCharacter that separates the various Template Parts
- 
Method SummaryModifier and TypeMethodDescriptionGet the default template name extension specified in the template service properties.Get the default layout module name of the template engine service corresponding to the default template name extension.getDefaultLayoutName(String template) Get the default layout module name of the template engine service corresponding to the template name extension of the named template.getDefaultLayoutName(PipelineData pipelineData) Find the default layout module name for the given request.Get the default layout template name of the template engine service corresponding to the default template name extension.getDefaultLayoutTemplateName(String template) Get the default layout template name of the template engine service corresponding to the template name extension of the named template.Get the default navigation module name of the template engine service corresponding to the default template name extension.getDefaultNavigationName(String template) Get the default navigation module name of the template engine service corresponding to the template name extension of the named template.Get the default page module name of the template engine service corresponding to the default template name extension.getDefaultPageName(String template) Get the default page module name of the template engine service corresponding to the template name extension of the named template.getDefaultPageName(PipelineData pipelineData) Find the default page module name for the given request.Get the default screen module name of the template engine service corresponding to the default template name extension.getDefaultScreenName(String template) Get the default screen module name of the template engine service corresponding to the template name extension of the named template.Returns the Default Template Name with the Default Extension.getExtension(String template) Return Extension for a supplied templategetLayoutName(String template) Locate and return the name of the layout module to be used with the named layout template.getLayoutTemplateName(String template) Locate and return the name of the layout template corresponding to the given screen template name parameter.getNavigationName(String template) Locate and return the name of the navigation module to be used with the named navigation template.getNavigationTemplateName(String template) Locate and return the name of the navigation template corresponding to the given template name parameter.getScreenName(String template) Locate and return the name of the screen module to be used with the named screen template.getScreenTemplateName(String template) Locate and return the name of the screen template corresponding to the given template name parameter.getTemplateEngineService(String template) TheTemplateEngineServiceassociated with the specified template's file extension.booleanReturns true if the Template Service has caching activatedvoidRegisters the provided template engine for use by theTemplateService.booleantemplateExists(String template, String[] templatePaths) Deprecated.Use templateExists from the various Templating EnginesString[]translateTemplatePaths(String[] templatePaths) Deprecated.Each template engine service should know how to translate a request onto a file.Methods inherited from interface org.apache.turbine.services.InitablegetInit, init, init, setInitableBroker, shutdownMethods inherited from interface org.apache.turbine.services.ServicegetConfiguration, getName, getProperties, setName, setServiceBroker
- 
Field Details- 
SERVICE_NAMEThe key under which this service is stored in TurbineServices.- See Also:
 
- 
DEFAULT_TEMPLATE_KEYDefault Template Name.- See Also:
 
- 
DEFAULT_TEMPLATE_VALUEDefault value for the Template Name- See Also:
 
- 
DEFAULT_EXTENSION_KEYDefault Extension for the template names.- See Also:
 
- 
DEFAULT_EXTENSION_VALUEDefault value of the Turbine Module Caching- See Also:
 
- 
EXTENSION_SEPARATORCharacter that separates a Template Name from the Extension- See Also:
 
- 
TEMPLATE_PARTS_SEPARATORCharacter that separates the various Template Parts- See Also:
 
- 
DEFAULT_NAME"Default" name for Classes and Templates- See Also:
 
 
- 
- 
Method Details- 
isCachingboolean isCaching()Returns true if the Template Service has caching activated- Returns:
- true if Caching is active.
 
- 
getDefaultExtensionGet the default template name extension specified in the template service properties.- Returns:
- The default the extension.
 
- 
getExtensionReturn Extension for a supplied template- Parameters:
- template- The template name
- Returns:
- extension The extension for the supplied template
 
- 
getDefaultTemplateReturns the Default Template Name with the Default Extension. If the extension is unset, return only the template name- Returns:
- The default template Name
 
- 
getDefaultPageGet the default page module name of the template engine service corresponding to the default template name extension.- Returns:
- The default page module name.
 
- 
getDefaultScreenGet the default screen module name of the template engine service corresponding to the default template name extension.- Returns:
- The default screen module name.
 
- 
getDefaultLayoutGet the default layout module name of the template engine service corresponding to the default template name extension.- Returns:
- The default layout module name.
 
- 
getDefaultLayoutTemplateGet the default layout template name of the template engine service corresponding to the default template name extension.- Returns:
- The default layout template name.
 
- 
getDefaultPageNameGet 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.
 
- 
getDefaultScreenNameGet 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.
 
- 
getDefaultLayoutNameGet 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.
 
- 
getDefaultLayoutTemplateNameGet 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.
 
- 
getDefaultPageNameFind 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.
 
- 
getDefaultLayoutNameFind 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.
 
- 
getScreenNameLocate 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.
 
- 
getLayoutNameLocate 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.
 
- 
getScreenTemplateNameLocate 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.
 
- 
getLayoutTemplateNameLocate 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.
 
- 
translateTemplatePathsDeprecated.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.
 
- 
templateExistsDeprecated.Use templateExists from the various Templating EnginesDelegates to the appropriateTemplateEngineServiceto 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
 
- 
getTemplateEngineServiceTheTemplateEngineServiceassociated with the specified template's file extension.- Parameters:
- template- The template name.
- Returns:
- The template engine service.
 
- 
registerTemplateEngineServiceRegisters the provided template engine for use by theTemplateService.- Parameters:
- service- The- TemplateEngineServiceto register.
 
 
-