This is a simple static accessor to common TemplateService tasks such as
getting a Screen that is associated with a screen template.
author: John D. McNally version: $Id: TurbineTemplate.java 534527 2007-05-02 16:10:59Z tv $
getDefaultLayoutName(String template) 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.
getDefaultLayoutName(RunData data) Find the default layout module name for the given request.
Parameters: data - The encapsulation of the request to retrieve thedefault layout for.
getDefaultLayoutTemplateName(String template) 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.
getDefaultNavigationName(String template) 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.
getDefaultPageName(String template) 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.
getDefaultPageName(RunData data) Find the default page module name for the given request.
Parameters: data - The encapsulation of the request to retrieve thedefault page for.
getDefaultScreenName(String template) 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.
getLayoutName(String template) Locate and return the name of the layout module to be used
with the named layout template.
Parameters: template - The layout template name.
getNavigationName(String template) Locate and return the name of the navigation module to be used
with the named navigation template.
Parameters: template - The navigation template name.
getNavigationTemplateName(String key) Locate and return the name of a navigation template.
Parameters: key - A String which is the key to the template.
translateTemplatePaths(String[] templatePaths) Translates the supplied template paths into their Turbine-canonical
equivalent (probably absolute paths).
Parameters: templatePaths - An array of template paths.
Method Detail
getDefaultExtension
final public static String getDefaultExtension()(Code)
Get the default extension given in the properties file.
A String with the extension.
getDefaultLayout
final public static String getDefaultLayout()(Code)
Get the default layout module name of the template engine
service corresponding to the default template name extension.
The default layout module name.
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. The default layout module name.
Find the default layout module name for the given request.
Parameters: data - The encapsulation of the request to retrieve thedefault layout for. The default layout module name.
getDefaultLayoutTemplate
final public static String getDefaultLayoutTemplate()(Code)
Get the default layout template given in the properties file.
A String which is the value of the TemplateServicedefault.layout.template property.
getDefaultLayoutTemplateName
final public static String getDefaultLayoutTemplateName(String template)(Code)
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. The default layout template name.
getDefaultNavigation
final public static String getDefaultNavigation()(Code)
Get the default Navigation given in the properties file.
A String which is the value of the TemplateServicedefault.navigation property.
getDefaultNavigationName
final public static String getDefaultNavigationName(String template)(Code)
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. The default navigation module name.
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. The default page module name.
Find the default page module name for the given request.
Parameters: data - The encapsulation of the request to retrieve thedefault page for. The default page module name.
getDefaultScreen
final public static String getDefaultScreen()(Code)
Get the Screen template given in the properties file.
A String which is the value of the TemplateServicedefault.screen property.
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. The default screen module name.
getDefaultTemplate
final public static String getDefaultTemplate()(Code)
Returns the Default Template Name with the Default Extension.
If the extension is unset, return only the template name
The default template Name
Locate and return the name of the layout module to be used
with the named layout template.
Parameters: template - The layout template name. The found layout module name. exception: Exception - , a generic exception.
Locate and return the name of a layout template.
Parameters: name - A String with the name of the template. A String with the layout template path. exception: Exception - , a generic exception.
Locate and return the name of the navigation module to be used
with the named navigation template.
Parameters: template - The navigation template name. The found navigation module name. exception: Exception - , a generic exception.
Locate and return the name of a navigation template.
Parameters: key - A String which is the key to the template. A String with the navigation template path. exception: Exception - , a generic exception.
Locate and return the name of a Screen module.
Parameters: name - A String with the name of the template. A String with the name of the screen. exception: Exception - , a generic exception.
Locate and return the name of a screen template.
Parameters: key - A String which is the key to the template. A String with the screen template path. exception: Exception - , a generic exception.
Registers the provided template engine for use by the
TemplateService.
Parameters: service - The TemplateEngineService to register.
templateExists
final public static boolean templateExists(String template, String[] templatePaths)(Code)
Delegates to the appropriate
org.apache.turbine.services.template.TemplateEngineService to
check the existance of the specified template.
Parameters: template - The template to check for the existance of. Parameters: templatePaths - The paths to check for the template.
translateTemplatePaths
final public static String[] translateTemplatePaths(String[] templatePaths)(Code)
Translates the supplied template paths into their Turbine-canonical
equivalent (probably absolute paths).
Parameters: templatePaths - An array of template paths. An array of translated template paths.