Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.turbine.services.pull
Class TurbinePull

    java.lang.Object
      org.apache.turbine.services.pull.TurbinePull

    public abstract class TurbinePull

extends Object

This is a Facade class for PullService. This class provides static methods that call related methods of the implementation of the PullService used by the System, according to the settings in TurbineResources.

Version:
  $Id: TurbinePull.java 1078552 2011-03-06 19:58:46Z tv $
Author:
  Jason van Zyl, Daniel Rall, Henning P. Schmiedehausen, Peter Courcoux

Constructor Summary
`TurbinePull()`

Method Summary
`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

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### TurbinePull

    public TurbinePull()

Method Detail

### getService

    public static PullService getService()

  Utility method for accessing the service implementation

  Returns:
    a PullService implementation instance

### getGlobalContext

    public static final org.apache.velocity.context.Context getGlobalContext()

  Get the context containing global tools that will be use as part of the Turbine Pull Model.

  Returns:
    A Context object which contains the Global Tool instances.

### isRegistered

    public static final boolean isRegistered()

  Checks whether this service has been registered. This is required by the TurbineVelocityService so it can determine whether to attempt to place the ToolBox in the context.

  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.

### getAbsolutePathToResourcesDirectory

    public static final String getAbsolutePathToResourcesDirectory()

  Return the absolute path of the resources directory used by application tools.

  Returns:
    A directory path in the file system or null.

### getResourcesDirectory

    public static final String getResourcesDirectory()

  Return the resources directory. This is relative to the webapp context.

  Returns:
    A directory path to the resources directory relative to the webapp root or null.

### populateContext

    public 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).

  Parameters:
    `context` - a Velocity Context to populate
    `data` - a RunData object for request specific data

### populateContext

    public 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).

  Parameters:
    `context` - a Velocity Context to populate
    `data` - a RunData object for request specific data

### releaseTools

    public static void releaseTools(org.apache.velocity.context.Context context)

  Release tool instances from the given context to the object pool

  Parameters:
    `context` - a Velocity Context to release tools from

### getTool

    public static ApplicationTool getTool(org.apache.velocity.context.Context context,
                                          String name)

  Helper method that allows you to easily get a tool from a Context. Essentially, it just does the cast to an Application tool for you.

  Parameters:
    `context` - a Velocity Context to get tools from
    `name` - the name of the tool to get
  Returns:
    ApplicationTool null if no tool could be found

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2011 The Apache Software Foundation. All Rights Reserved.