It would be useful if the PullService could replace the hardcoded
placement of tools into the Context in TurbineVelocityService. I suggest
that the service allows specification of the scope of the tools as
follows:
toolbox.tool.link.1 = org.apache.turbine.util.template.TemplateLink
toolbox.tool.link.scope = request
toolbox.tool.page.2 = org.apache.turbine.util.template.TemplatePageAttributes
toolbox.tool.page.scope = request
toolbox.tool.ui.3 = org.apache.services.pull.util.UIManager
toolbox.tool.ui.scope = global
(etc for ContentURI and so on)
I would also add a "session" scope where the tool is stored in the
user's temp hashmap, and maybe even a "persistent" scope where the tool
is stored in the user's permanent hashmap.
For this to work, request scope tools at least (and I suggest session
and persistent scope tools) would need access to the RunData object.
There are two ways of going about this, one is making init() in the
ApplicationTool interface take a RunData parameter which is null for
global scope. Alternatively we could have two interfaces
GlobalApplicationTool and ApplicationTool where the former takes no
parameters for its init and refresh methods, and the latter takes a
RunData parameter for each (and perhaps an indication of the scope in
the init method). I prefer the latter.
As well as allowing the existing request scope tools to be configured
via a properties file rather than being hardcoded into TVS, this would
open up the way to have UIManager select the skin on a per-user or
per-request basis with minimal changes. (Although for one class to work
in both the global and per-request/per-user manner it would have to
implement both the GlobalApplicationTool and ApplicationTool interfaces
- no great bones though).
I'll post my suggestions about UIManager in another post, as I have
another one there as well...
Comments/questions/criticisms?
--
Sean Legassick
[EMAIL PROTECTED]
Hombre soy, nada humano me puede ser ajeno
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]