public abstract class BaseTemplateEngineService extends TurbineBaseService implements TemplateEngineService
TemplateEngineService
.name, serviceBroker
initableBroker, isInitialized
DEFAULT_ERROR_SCREEN, DEFAULT_LAYOUT, DEFAULT_LAYOUT_TEMPLATE, DEFAULT_NAVIGATION, DEFAULT_NAVIGATION_TEMPLATE, DEFAULT_PAGE, DEFAULT_SCREEN, DEFAULT_SCREEN_TEMPLATE, DEFAULT_TEMPLATE_EXTENSION, TEMPLATE_EXTENSIONS
SERVICE_NAME
Constructor and Description |
---|
BaseTemplateEngineService() |
Modifier and Type | Method and Description |
---|---|
String[] |
getAssociatedFileExtensions()
Supplies the file extension to key this engine in
TemplateService 's
registry with. |
Hashtable<String,Object> |
getTemplateEngineServiceConfiguration()
Return the configuration of the template engine in
the form of a Hashtable.
|
protected void |
initConfiguration(String defaultExt)
Initialize the Template Engine Service.
|
void |
registerConfiguration(String defaultExt)
Initializes file extension associations and registers with the
template service.
|
abstract boolean |
templateExists(String template)
Use the specific template engine to determine whether
a given template exists.
|
init, init, init, shutdown
getConfiguration, getName, getProperties, getServiceBroker, setName, setServiceBroker
getInit, getInitableBroker, setInit, setInitableBroker
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInit, setInitableBroker
public BaseTemplateEngineService()
public void registerConfiguration(String defaultExt)
TemplateEngineService
registerConfiguration
in interface TemplateEngineService
defaultExt
- The default file extension association to use
in case of properties file misconfiguration.TemplateEngineService.registerConfiguration(java.lang.String)
public Hashtable<String,Object> getTemplateEngineServiceConfiguration()
TemplateEngineService
getTemplateEngineServiceConfiguration
in interface TemplateEngineService
TemplateEngineService.getTemplateEngineServiceConfiguration()
public String[] getAssociatedFileExtensions()
TemplateEngineService
TemplateService
's
registry with.getAssociatedFileExtensions
in interface TemplateEngineService
TemplateEngineService.getAssociatedFileExtensions()
protected void initConfiguration(String defaultExt)
template.extension
. If none are defined,
uses the value keyed by
template.default.extension
, defaulting to the
emergency value supplied by defaultExt
.defaultExt
- The default used when the default defined in the
properties file is missing or misconfigured.public abstract boolean templateExists(String template)
TemplateEngineService
templateExists
in interface TemplateEngineService
template
- The name of the template to check the existence of.TemplateEngineService.templateExists(java.lang.String)
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.