Interface TemplateEngineService
-
- All Known Implementing Classes:
BaseTemplateEngineService
,TurbineJspService
,TurbineVelocityService
public interface TemplateEngineService
This is the interface that all template engine services must adhere to. This includes the Velocity, WebMacro, FreeMarker, and JSP services.- Version:
- $Id$
- Author:
- Jason van Zyl, Daniel Rall
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ERROR_SCREEN
Configuration keystatic String
DEFAULT_LAYOUT
Configuration keystatic String
DEFAULT_LAYOUT_TEMPLATE
Configuration keystatic String
DEFAULT_NAVIGATION
Configuration keystatic String
DEFAULT_NAVIGATION_TEMPLATE
Configuration keystatic String
DEFAULT_PAGE
Configuration keystatic String
DEFAULT_SCREEN
Configuration keystatic String
DEFAULT_SCREEN_TEMPLATE
Configuration keystatic String
DEFAULT_TEMPLATE_EXTENSION
Configuration keystatic String
TEMPLATE_EXTENSIONS
Configuration key
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String[]
getAssociatedFileExtensions()
Supplies the file extension to key this engine inTemplateService
's registry with.Hashtable<String,Object>
getTemplateEngineServiceConfiguration()
Return the configuration of the template engine in the form of a Hashtable.void
registerConfiguration(String defaultExt)
Initializes file extension associations and registers with the template service.boolean
templateExists(String template)
Use the specific template engine to determine whether a given template exists.
-
-
-
Field Detail
-
TEMPLATE_EXTENSIONS
static final String TEMPLATE_EXTENSIONS
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_TEMPLATE_EXTENSION
static final String DEFAULT_TEMPLATE_EXTENSION
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_PAGE
static final String DEFAULT_PAGE
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_SCREEN
static final String DEFAULT_SCREEN
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_LAYOUT
static final String DEFAULT_LAYOUT
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_NAVIGATION
static final String DEFAULT_NAVIGATION
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_ERROR_SCREEN
static final String DEFAULT_ERROR_SCREEN
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_LAYOUT_TEMPLATE
static final String DEFAULT_LAYOUT_TEMPLATE
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_SCREEN_TEMPLATE
static final String DEFAULT_SCREEN_TEMPLATE
Configuration key- See Also:
- Constant Field Values
-
DEFAULT_NAVIGATION_TEMPLATE
static final String DEFAULT_NAVIGATION_TEMPLATE
Configuration key- See Also:
- Constant Field Values
-
-
Method Detail
-
getTemplateEngineServiceConfiguration
Hashtable<String,Object> getTemplateEngineServiceConfiguration()
Return the configuration of the template engine in the form of a Hashtable.- Returns:
- the template engine service configuration map
-
registerConfiguration
void registerConfiguration(String defaultExt)
Initializes file extension associations and registers with the template service.- Parameters:
defaultExt
- The default file extension association to use in case of properties file misconfiguration.
-
getAssociatedFileExtensions
String[] getAssociatedFileExtensions()
Supplies the file extension to key this engine inTemplateService
's registry with.- Returns:
- the list of extensions this engine supports
-
templateExists
boolean templateExists(String template)
Use the specific template engine to determine whether a given template exists. This allows Turbine the TemplateService to delegate the search for a template to the template engine being used for the view. This gives us the advantage of fully utilizing the capabilities of template engine with respect to retrieving templates from arbitrary sources.- Parameters:
template
- The name of the template to check the existence of.- Returns:
- Whether the specified template exists.
-
-