📄 turbinepullservice.html
字号:
<!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:08 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Class TurbinePullService</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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/TurbinePullService.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/turbine/services/pull/TurbinePull.html"><B>PREV CLASS</B></A> NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="TurbinePullService.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_org.apache.turbine.services.BaseService">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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.pull</FONT><BR>Class TurbinePullService</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.pull.TurbinePullService</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/pull/PullService.html">PullService</A>, <A HREF="../../../../../org/apache/turbine/services/Service.html">Service</A></DD></DL><HR><DL><DT>public class <B>TurbinePullService</B><DT>extends <A HREF="../../../../../org/apache/turbine/services/TurbineBaseService.html">TurbineBaseService</A><DT>implements <A HREF="../../../../../org/apache/turbine/services/pull/PullService.html">PullService</A></DL><P><p> This is the concrete implementation of the Turbine Pull Service. </p> <p> These are tools that are placed in the context by the service These tools will be made available to all your templates. You list the tools in the following way: </p> <pre> tool.<scope>.<id> = <classname> <scope> is the tool scope: global, request, session or persistent (see below for more details) <id> is the name of the tool in the context You can configure the tools in this way: tool.<id>.<parameter> = <value> So if you find "global", "request", "session" or "persistent" as second part, it is a configuration to put a tool into the toolbox, else it is a tool specific configuration. For example: tool.global.ui = org.apache.turbine.util.pull.UIManager tool.global.mm = org.apache.turbine.util.pull.MessageManager tool.request.link = org.apache.turbine.util.template.TemplateLink tool.request.page = org.apache.turbine.util.template.TemplatePageAttributes Then: tool.ui.skin = default configures the value of "skin" for the "ui" tool. Tools are accessible in all templates by the <id> given to the tool. So for the above listings the UIManager would be available as $ui, the MessageManager as $mm, the TemplateLink as $link and the TemplatePageAttributes as $page. You should avoid using tool names called "global", "request", "session" or "persistent" because of clashes with the possible Scopes. Scopes: global: tool is instantiated once and that instance is available to all templates for all requests. Tool must be threadsafe. request: tool is instantiated once for each request (although the PoolService is used to recycle instances). Tool need not be threadsafe. session: tool is instantiated once for each user session, and is stored in the user's temporary hashtable. Tool should be threadsafe. persistent: tool is instantitated once for each use session, and is stored in the user's permanent hashtable. This means for a logged in user the tool will be persisted in the user's objectdata. Tool should be threadsafe and Serializable. Defaults: none </pre><P><DL><DT><B>Version: </B><DD>$Id: TurbinePullService.java,v 1.7 2002/08/14 16:51:25 henning Exp $</DD><DT><B>Author: </B><DD><a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>, <a href="mailto:sean@informage.net">Sean Legassick</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><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> <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> <A NAME="fields_inherited_from_class_org.apache.turbine.services.pull.PullService"><!-- --></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.pull.<A HREF="../../../../../org/apache/turbine/services/pull/PullService.html">PullService</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../../org/apache/turbine/services/pull/PullService.html#SERVICE_NAME">SERVICE_NAME</A></CODE></TD></TR></TABLE> <!-- ======== 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/pull/TurbinePullService.html#TurbinePullService()">TurbinePullService</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== 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> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/pull/TurbinePullService.html#getAbsolutePathToResourcesDirectory()">getAbsolutePathToResourcesDirectory</A></B>()</CODE><BR> Return the absolute path to the resources directory used by the application tools.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.apache.velocity.context.Context</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/pull/TurbinePullService.html#getGlobalContext()">getGlobalContext</A></B>()</CODE><BR> Return the Context which contains all global tools that are to be used in conjunction with the Turbine Pull Model.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/pull/TurbinePullService.html#getResourcesDirectory()">getResourcesDirectory</A></B>()</CODE><BR> Return the resources directory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/pull/TurbinePullService.html#init()">init</A></B>()</CODE><BR> Called the first time the Service is used.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/pull/TurbinePullService.html#populateContext(org.apache.velocity.context.Context, org.apache.turbine.util.RunData)">populateContext</A></B>(org.apache.velocity.context.Context context, <A HREF="../../../../../org/apache/turbine/util/RunData.html">RunData</A> data)</CODE><BR> Populate the given context with all request, session and persistent scope tools (it is assumed that the context already wraps the global context, and thus already contains the global tools).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/pull/TurbinePullService.html#refreshGlobalTools()">refreshGlobalTools</A></B>()</CODE><BR> Refresh the global tools.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -