org.codehaus.plexus.summit.pull
Interface PullService

All Known Implementing Classes:
DefaultPullService

public interface PullService

The Pull Service manages the creation of application tools that are available to all templates in a Turbine application. By using the Pull Service you can avoid having to make Screens to populate a context for use in a particular template. The Pull Service creates a set of tools, as specified in the TR. props file.

These tools can have global scope, request scope, session scope (i.e. stored in user temp hashmap) or persistent scope (i.e. stored in user perm hashmap).

The standard way of referencing these global tools is through the toolbox handle. This handle is typically $toolbox, but can be specified in the TR. props file.

So, for example, if you had a UI Manager tool which created a set of UI attributes from a properties file, and one of the properties was 'bgcolor', then you could access this UI attribute with $ui.bgcolor. The identifier that is given to the tool, in this case 'ui', can be specified as well.

Version:
$Id: PullService.java 2092 2005-06-06 16:31:27Z jvanzyl $
Author:
Jason van Zyl

Field Summary
static java.lang.String ROLE
          The Avalon role
 
Method Summary
 void populateContext(ViewContext context, RunData data)
          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).
 void releaseTools(ViewContext context)
          Release tool instances from the given context to the object pool
 

Field Detail

ROLE

public static final java.lang.String ROLE
The Avalon role

Method Detail

populateContext

public void populateContext(ViewContext context,
                            RunData data)
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).

Parameters:
context - a ViewContext to populate
data - a RunData object for request specific data

releaseTools

public void releaseTools(ViewContext context)
Release tool instances from the given context to the object pool

Parameters:
context - a ViewContext to release tools from