|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TemplateService
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.
Field Summary | |
---|---|
static String |
DEFAULT_EXTENSION_KEY
Default Extension for the template names. |
static String |
DEFAULT_EXTENSION_VALUE
Default value of the Turbine Module Caching |
static String |
DEFAULT_NAME
"Default" name for Classes and Templates |
static String |
DEFAULT_TEMPLATE_KEY
Default Template Name. |
static String |
DEFAULT_TEMPLATE_VALUE
Default value for the Template Name |
static char |
EXTENSION_SEPARATOR
Character that separates a Template Name from the Extension |
static String |
SERVICE_NAME
The key under which this service is stored in TurbineServices. |
static char |
TEMPLATE_PARTS_SEPARATOR
Character that separates the various Template Parts |
Method Summary | |
---|---|
String |
getDefaultExtension()
Get the default template name extension specified in the template service properties. |
String |
getDefaultLayout()
Get the default layout module name of the template engine service corresponding to the default template name extension. |
String |
getDefaultLayoutName(RunData data)
Find the default layout module name for the given request. |
String |
getDefaultLayoutName(String template)
Get the default layout module name of the template engine service corresponding to the template name extension of the named template. |
String |
getDefaultLayoutTemplate()
Get the default layout template name of the template engine service corresponding to the default template name extension. |
String |
getDefaultLayoutTemplateName(String template)
Get the default layout template name of the template engine service corresponding to the template name extension of the named template. |
String |
getDefaultNavigation()
Get the default navigation module name of the template engine service corresponding to the default template name extension. |
String |
getDefaultNavigationName(String template)
Get the default navigation module name of the template engine service corresponding to the template name extension of the named template. |
String |
getDefaultPage()
Get the default page module name of the template engine service corresponding to the default template name extension. |
String |
getDefaultPageName(RunData data)
Find the default page module name for the given request. |
String |
getDefaultPageName(String template)
Get the default page module name of the template engine service corresponding to the template name extension of the named template. |
String |
getDefaultScreen()
Get the default screen module name of the template engine service corresponding to the default template name extension. |
String |
getDefaultScreenName(String template)
Get the default screen module name of the template engine service corresponding to the template name extension of the named template. |
String |
getDefaultTemplate()
Returns the Default Template Name with the Default Extension. |
String |
getExtension(String template)
Return Extension for a supplied template |
String |
getLayoutName(String template)
Locate and return the name of the layout module to be used with the named layout template. |
String |
getLayoutTemplateName(String template)
Locate and return the name of the layout template corresponding to the given screen template name parameter. |
String |
getNavigationName(String name)
Locate and return the name of the navigation module to be used with the named navigation template. |
String |
getNavigationTemplateName(String template)
Locate and return the name of the navigation template corresponding to the given template name parameter. |
String |
getScreenName(String template)
Locate and return the name of the screen module to be used with the named screen template. |
String |
getScreenTemplateName(String template)
Locate and return the name of the screen template corresponding to the given template name parameter. |
TemplateEngineService |
getTemplateEngineService(String template)
The TemplateEngineService
associated with the specified template's file extension. |
boolean |
isCaching()
Returns true if the Template Service has caching activated |
void |
registerTemplateEngineService(TemplateEngineService service)
Registers the provided template engine for use by the TemplateService . |
boolean |
templateExists(String template,
String[] templatePaths)
Deprecated. Use templateExists from the various Templating Engines |
String[] |
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.Service |
---|
getConfiguration, getName, getProperties, setName, setServiceBroker |
Methods inherited from interface org.apache.turbine.services.Initable |
---|
getInit, init, init, setInitableBroker, shutdown |
Field Detail |
---|
static final String SERVICE_NAME
static final String DEFAULT_TEMPLATE_KEY
static final String DEFAULT_TEMPLATE_VALUE
static final String DEFAULT_EXTENSION_KEY
static final String DEFAULT_EXTENSION_VALUE
static final char EXTENSION_SEPARATOR
static final char TEMPLATE_PARTS_SEPARATOR
static final String DEFAULT_NAME
Method Detail |
---|
boolean isCaching()
String getDefaultExtension()
String getExtension(String template)
template
- The template name
String getDefaultTemplate()
String getDefaultPage()
String getDefaultScreen()
String getDefaultLayout()
String getDefaultNavigation()
String getDefaultLayoutTemplate()
String getDefaultPageName(String template)
template
- The template name.
String getDefaultScreenName(String template)
template
- The template name.
String getDefaultLayoutName(String template)
template
- The template name.
String getDefaultNavigationName(String template)
template
- The template name.
String getDefaultLayoutTemplateName(String template)
template
- The template name.
String getDefaultPageName(RunData data)
data
- The encapsulation of the request to retrieve the
default page for.
String getDefaultLayoutName(RunData data)
data
- The encapsulation of the request to retrieve the
default layout for.
String getScreenName(String template) throws Exception
template
- The screen template name.
Exception,
- a generic exception.
Exception
String getLayoutName(String template) throws Exception
template
- The layout template name.
Exception,
- a generic exception.
Exception
String getNavigationName(String name) throws Exception
template
- The navigation template name.
Exception,
- a generic exception.
Exception
String getScreenTemplateName(String template) throws Exception
template
- The template name parameter.
Exception,
- a generic exception.
Exception
String getLayoutTemplateName(String template) throws Exception
template
- The template name parameter.
Exception,
- a generic exception.
Exception
String getNavigationTemplateName(String template) throws Exception
template
- The template name parameter.
Exception,
- a generic exception.
Exception
String[] translateTemplatePaths(String[] templatePaths)
templatePaths
- An array of template paths.
boolean templateExists(String template, String[] templatePaths)
TemplateEngineService
to
check the existance of the specified template.
template
- The template to check for the existance of.templatePaths
- The paths to check for the template.TemplateEngineService getTemplateEngineService(String template)
TemplateEngineService
associated with the specified template's file extension.
template
- The template name.
void registerTemplateEngineService(TemplateEngineService service)
TemplateService
.
service
- The TemplateEngineService
to register.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |