| org.apache.turbine.services.pull.PullService
All known Subclasses: org.apache.turbine.services.pull.TurbinePullService,
PullService | public interface PullService extends Service(Code) | | 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,
authorized or 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.
author: Jason van Zyl author: Henning P. Schmiedehausen version: $Id: PullService.java 534527 2007-05-02 16:10:59Z tv $ |
AUTHORIZED_TOOL | String AUTHORIZED_TOOL(Code) | | Property Key for the authorized tools
|
GLOBAL_TOOL | String GLOBAL_TOOL(Code) | | Property Key for the global tools
|
PERSISTENT_TOOL | String PERSISTENT_TOOL(Code) | | Property Key for the persistent tools
|
REQUEST_TOOL | String REQUEST_TOOL(Code) | | Property Key for the request tools
|
SERVICE_NAME | String SERVICE_NAME(Code) | | The key under which this service is stored in TurbineServices.
|
SESSION_TOOL | String SESSION_TOOL(Code) | | Property Key for the session tools
|
SESSION_TOOLS_ATTRIBUTE_PREFIX | String SESSION_TOOLS_ATTRIBUTE_PREFIX(Code) | | prefix for key used in the session to store session scope pull tools
|
TOOLS_PER_REQUEST_REFRESH_DEFAULT | boolean TOOLS_PER_REQUEST_REFRESH_DEFAULT(Code) | | Default value for per request tool refreshing
|
TOOLS_PER_REQUEST_REFRESH_KEY | String TOOLS_PER_REQUEST_REFRESH_KEY(Code) | | Property tag for per request tool refreshing (for obvious reasons
has no effect for per-request tools)
|
TOOL_RESOURCES_DIR_DEFAULT | String TOOL_RESOURCES_DIR_DEFAULT(Code) | | Default value for the application tool resources. This is relative
to the webapp root
|
TOOL_RESOURCES_DIR_KEY | String TOOL_RESOURCES_DIR_KEY(Code) | | Property tag for application tool resources directory
|
getAbsolutePathToResourcesDirectory | String getAbsolutePathToResourcesDirectory()(Code) | | Return the absolute path of the resources directory
used by application tools.
A directory path in the file system or null. |
getGlobalContext | Context getGlobalContext()(Code) | | Get the context containing global tools that will be
use as part of the Turbine Pull Model.
A Context object which contains theGlobal Tool instances. |
getResourcesDirectory | String getResourcesDirectory()(Code) | | Return the resources directory. This is relative
to the webapp context.
A directory path to the resources directory relative to the webapp root or null. |
populateContext | void populateContext(Context context, RunData data)(Code) | | Populate the given context with all request, session, authorized
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 Velocity Context to populate Parameters: data - a RunData object for request specific data |
refreshGlobalTools | void refreshGlobalTools()(Code) | | Refresh the global tools .
|
refreshToolsPerRequest | boolean refreshToolsPerRequest()(Code) | | Shoud we refresh the tools
on each request. For development purposes.
true if we should refresh the tools on every request. |
releaseTools | void releaseTools(Context context)(Code) | | Release tool instances from the given context to the
object pool
Parameters: context - a Velocity Context to release tools from |
|
|