org.apache.turbine.services.template
Class TurbineTemplate

java.lang.Object
  |
  +--org.apache.turbine.services.template.TurbineTemplate

public abstract class TurbineTemplate
extends java.lang.Object

This is a simple static accessor to common TemplateService tasks such as getting a Screen that is associated with a screen template.

Version:
$Id: TurbineTemplate.java,v 1.1.1.1 2001/08/16 05:09:22 jvanzyl Exp $
Author:
John D. McNally

Constructor Summary
TurbineTemplate()
           
 
Method Summary
static java.lang.String getDefaultExtension()
          Get the default extension given in the properties file.
static java.lang.String getDefaultLayoutName(RunData data)
           
static java.lang.String getDefaultLayoutTemplate()
          Get the default layout template given in the properties file.
static java.lang.String getDefaultNavigation()
          Get the default Navigation given in the properties file.
static java.lang.String getDefaultPageName(RunData data)
           
static java.lang.String getDefaultScreen()
          Get the Screen template given in the properties file.
static java.lang.String getLayoutTemplateName(java.lang.String name)
          Locate and return the name of a layout template.
static java.lang.String getNavigationName(java.lang.String name)
          Locate and return the name of a Navigation module.
static java.lang.String getScreenName(java.lang.String name)
          Locate and return the name of a Screen module.
static java.lang.String getScreenTemplateName(java.lang.String key)
          Locate and return the name of a screen template.
protected static TemplateService getService()
          Utility method for accessing the service implementation
static void registerTemplateEngineService(TemplateEngineService service)
           
static boolean templateExists(java.lang.String template, java.lang.String[] templatePaths)
           
static java.lang.String[] translateTemplatePaths(java.lang.String[] templatePaths)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Constructor Detail

TurbineTemplate

public TurbineTemplate()
Method Detail

getService

protected static TemplateService getService()
Utility method for accessing the service implementation
Returns:
a TemplateService implementation instance

getScreenTemplateName

public static final java.lang.String getScreenTemplateName(java.lang.String key)
                                                    throws java.lang.Exception
Locate and return the name of a screen template.
Parameters:
key - A String which is the key to the template.
Returns:
A String with the screen template path.
Throws:
Exception, - a generic exception.

getLayoutTemplateName

public static final java.lang.String getLayoutTemplateName(java.lang.String name)
                                                    throws java.lang.Exception
Locate and return the name of a layout template.
Parameters:
name - A String with the name of the template.
Returns:
A String with the layout template path.
Throws:
Exception, - a generic exception.

getNavigationName

public static final java.lang.String getNavigationName(java.lang.String name)
                                                throws java.lang.Exception
Locate and return the name of a Navigation module.
Parameters:
name - A String with the name of the template.
Returns:
A String with the name of the navigation.
Throws:
Exception, - a generic exception.

getScreenName

public static final java.lang.String getScreenName(java.lang.String name)
                                            throws java.lang.Exception
Locate and return the name of a Screen module.
Parameters:
name - A String with the name of the template.
Returns:
A String with the name of the screen.
Throws:
Exception, - a generic exception.

getDefaultExtension

public static final java.lang.String getDefaultExtension()
Get the default extension given in the properties file.
Returns:
A String with the extension.

getDefaultScreen

public static final java.lang.String getDefaultScreen()
Get the Screen template given in the properties file.
Returns:
A String which is the value of the TemplateService default.screen property.

getDefaultNavigation

public static final java.lang.String getDefaultNavigation()
Get the default Navigation given in the properties file.
Returns:
A String which is the value of the TemplateService default.navigation property.

getDefaultLayoutTemplate

public static final java.lang.String getDefaultLayoutTemplate()
Get the default layout template given in the properties file.
Returns:
A String which is the value of the TemplateService default.layout.template property.

registerTemplateEngineService

public static final void registerTemplateEngineService(TemplateEngineService service)

translateTemplatePaths

public static final java.lang.String[] translateTemplatePaths(java.lang.String[] templatePaths)

templateExists

public static final boolean templateExists(java.lang.String template,
                                           java.lang.String[] templatePaths)

getDefaultPageName

public static final java.lang.String getDefaultPageName(RunData data)

getDefaultLayoutName

public static final java.lang.String getDefaultLayoutName(RunData data)


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.