⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 turbinetemplateservice.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:09 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class  TurbineTemplateService</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/TurbineTemplateService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplate.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TurbineTemplateService.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.services.template</FONT><BR>Class  TurbineTemplateService</H2><PRE>java.lang.Object  |  +--<A HREF="../../../../../org/apache/turbine/services/BaseInitable.html">org.apache.turbine.services.BaseInitable</A>        |        +--<A HREF="../../../../../org/apache/turbine/services/BaseService.html">org.apache.turbine.services.BaseService</A>              |              +--<A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">org.apache.turbine.services.TurbineBaseService</A>                    |                    +--<B>org.apache.turbine.services.template.TurbineTemplateService</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/turbine/services/Initable.html">Initable</A>, <A HREF="../../../../../org/apache/turbine/services/Service.html">Service</A>, <A HREF="../../../../../org/apache/turbine/services/template/TemplateService.html">TemplateService</A></DD></DL><HR><DL><DT>public class <B>TurbineTemplateService</B><DT>extends <A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">TurbineBaseService</A><DT>implements <A HREF="../../../../../org/apache/turbine/services/template/TemplateService.html">TemplateService</A></DL><P>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. Since everything is keyed off the template variable, if data.getParameters().getString("template") returns /about_us/directions/driving.vm, the search for the Screen class is as follows (in order): 1. about_us.directions.Driving 2. about_us.directions.Default 3. about_us.Default 4. Default 5. VelocityScreen If the template variable does not exist, then VelocityScreen will be executed and templates/screens/index.vm will be executed. If index.vm is not found or if the template is invalid or Velocity execution throws an exception of any reason, then templates/screens/error.vm will be executed. For the Layouts and Navigations, the following paths will be searched in the layouts and navigations template subdirectories (in order): 1./about_us/directions/driving.vm 2./about_us/directions/default.vm 3./about_us/default.vm 4./default.vm<P><DL><DT><B>Version: </B><DD>$Id: TurbineTemplateService.java,v 1.4 2002/04/16 22:07:09 kschrader Exp $</DD><DT><B>Author: </B><DD><a href="mailto:john.mcnally@clearink.com">John D. McNally</a>, <a href="mailto:mbryson@mont.mindspring.com">Dave Bryson</a>, <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>, <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>, <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#LAYOUT_KEY">LAYOUT_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#LAYOUT_TEMPLATE_KEY">LAYOUT_TEMPLATE_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#NAVIGATION_KEY">NAVIGATION_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#NO_FILE_EXT">NO_FILE_EXT</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default file extension used as a registry key when a template's file extension cannot be determined.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#PAGE_KEY">PAGE_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The keys of template objects provided by the service.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#SCREEN_KEY">SCREEN_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#SCREEN_TEMPLATE_KEY">SCREEN_TEMPLATE_KEY</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_org.apache.turbine.services.BaseService"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.<A HREF="../../../../../org/apache/turbine/services/BaseService.html">BaseService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/BaseService.html#configuration">configuration</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#name">name</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#properties">properties</A>, <A HREF="../../../../../org/apache/turbine/services/BaseService.html#serviceBroker">serviceBroker</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_org.apache.turbine.services.BaseInitable"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class org.apache.turbine.services.<A HREF="../../../../../org/apache/turbine/services/BaseInitable.html">BaseInitable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/BaseInitable.html#initableBroker">initableBroker</A>, <A HREF="../../../../../org/apache/turbine/services/BaseInitable.html#isInitialized">isInitialized</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_org.apache.turbine.services.template.TemplateService"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface org.apache.turbine.services.template.<A HREF="../../../../../org/apache/turbine/services/template/TemplateService.html">TemplateService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/template/TemplateService.html#SERVICE_NAME">SERVICE_NAME</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#TurbineTemplateService()">TurbineTemplateService</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#getCachedName(java.lang.String, int)">getCachedName</A></B>(java.lang.String&nbsp;template,              int&nbsp;key)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the cached template object name.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#getDefaultExtension()">getDefaultExtension</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default template name extension specified in the template service properties.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#getDefaultLayout()">getDefaultLayout</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default layout module name of the template engine service corresponding to the default template name extension.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#getDefaultLayoutName(org.apache.turbine.util.RunData)">getDefaultLayoutName</A></B>(<A HREF="../../../../../org/apache/turbine/util/RunData.html">RunData</A>&nbsp;data)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the default layout module name for the given request.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/template/TurbineTemplateService.html#getDefaultLayoutName(java.lang.String)">getDefaultLayoutName</A></B>(java.lang.String&nbsp;template)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the default layout module name of the template engine service corresponding to the template name extension of the named template.</TD>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -