| This is the concrete implementation of the Turbine
Pull Service.
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:
tool.<scope>.<id> = <classname>
<scope> is the tool scope: global, request, session,
authorized 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.services.pull.tools.TemplateLink
tool.request.page = org.apache.turbine.util.template.HtmlPageAttributes
Then:
tool.ui.skin = default
configures the value of "skin" for the "ui" tool.
Tools are accessible in all templates by the 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 HtmlPageAttributes 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 session. These tools do not need to be
threadsafe.
authorized: tool is instantiated once for each user session once the
user logs in. After this, it is a normal session tool.
persistent: tool is instantiated once for each user session once
the user logs in and is 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 Serializable. These
tools do not need to be threadsafe.
persistent scope tools are deprecated in 2.3
Defaults: none
author: Jason van Zyl author: Sean Legassick author: Henning P. Schmiedehausen author: Quinton McCombs version: $Id: TurbinePullService.java 535743 2007-05-07 05:13:47Z seade $ |