public abstract class TurbinePull extends Object
Constructor and Description |
---|
TurbinePull() |
Modifier and Type | Method and Description |
---|---|
static String |
getAbsolutePathToResourcesDirectory()
Return the absolute path of the resources directory
used by application tools.
|
static org.apache.velocity.context.Context |
getGlobalContext()
Get the context containing global tools that will be
use as part of the Turbine Pull Model.
|
static String |
getResourcesDirectory()
Return the resources directory.
|
static PullService |
getService()
Utility method for accessing the service
implementation
|
static ApplicationTool |
getTool(org.apache.velocity.context.Context context,
String name)
Helper method that allows you to easily get a tool
from a Context.
|
static boolean |
isRegistered()
Checks whether this service has been registered.
|
static void |
populateContext(org.apache.velocity.context.Context context,
PipelineData pipelineData)
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).
|
static void |
populateContext(org.apache.velocity.context.Context 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).
|
static void |
releaseTools(org.apache.velocity.context.Context context)
Release tool instances from the given context to the
object pool
|
public TurbinePull()
public static PullService getService()
public static final org.apache.velocity.context.Context getGlobalContext()
public static final boolean isRegistered()
So users can use Turbine with templates in the traditional
manner. If the Pull Service is not listed in
TurbineResources.props
, or no tools are specified
the TurbineVelocityService will behave in its traditional
manner.
public static final String getAbsolutePathToResourcesDirectory()
public static final String getResourcesDirectory()
public static void populateContext(org.apache.velocity.context.Context context, PipelineData pipelineData)
context
- a Velocity Context to populatepipelineData
- a RunData object for request specific datapublic static void populateContext(org.apache.velocity.context.Context context, RunData data)
context
- a Velocity Context to populatedata
- a RunData object for request specific datapublic static void releaseTools(org.apache.velocity.context.Context context)
context
- a Velocity Context to release tools frompublic static ApplicationTool getTool(org.apache.velocity.context.Context context, String name)
context
- a Velocity Context to get tools fromname
- the name of the tool to getCopyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.