org.apache.turbine.om

## Class OMTool

- java.lang.Object
- - org.apache.turbine.om.OMTool

- All Implemented Interfaces:
    org.apache.fulcrum.pool.Recyclable, ApplicationTool

  Deprecated.
  This class is probably not used anymore, it may have been intended for cacheable Torque OM or might be used with Fulcrum Security Torque.

      @Deprecated
      public class OMTool
      extends Object
      implements ApplicationTool, org.apache.fulcrum.pool.Recyclable

  A Pull tool to make om objects available to a template
  Version:
    $Id: OMTool.java 1812628 2017-10-19 12:34:25Z gk $
  Author:
    John D. McNally, Henning P. Schmiedehausen

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `OMTool.PullHelper` Deprecated. Inner class to present a nice interface to the template designer

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected RetrieverFactory` | `omFactory` Deprecated. The Factory responsible for retrieving the objects from storage
    `protected ConcurrentMap<String,Object>` | `omMap` Deprecated.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OMTool()` Deprecated. Default constructor

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `dispose()` Deprecated. Disposes the object after use.
    `OMTool.PullHelper` | `get(String omName)` Deprecated. Get the `OMTool.PullHelper` object with the given name
    `Object` | `get(String omName, String key)` Deprecated. Get the object with the given name and key
    `void` | `init(Object data)` Deprecated. Prepares tool for a single request
    `boolean` | `isDisposed()` Deprecated. Checks whether the recyclable has been disposed.
    `void` | `recycle()` Deprecated. Recycles the object for a new client.
    `void` | `refresh()` Deprecated. Implementation of ApplicationTool interface is not needed for this method as the tool is request scoped

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### omMap

          protected ConcurrentMap<String,Object> omMap

      Deprecated.

    - #### omFactory

          protected RetrieverFactory omFactory

      Deprecated.
      The Factory responsible for retrieving the objects from storage

  - ### Constructor Detail

    - #### OMTool

          public OMTool()
                 throws Exception

      Deprecated.
      Default constructor
      Throws:
        `Exception` - if creating the factory fails

  - ### Method Detail

    - #### init

          public void init(Object data)

      Deprecated.
      Prepares tool for a single request
      Specified by:
        `init` in interface `ApplicationTool`
      Parameters:
        `data` - the initialization data

    - #### refresh

          public void refresh()

      Deprecated.
      Implementation of ApplicationTool interface is not needed for this method as the tool is request scoped
      Specified by:
        `refresh` in interface `ApplicationTool`

    - #### get

          public OMTool.PullHelper get(String omName)
                                throws Exception

      Deprecated.
      Get the `OMTool.PullHelper` object with the given name
      Parameters:
        `omName` - the object name
      Returns:
        the PullHelper
      Throws:
        `Exception` - if retrieving the object fails

    - #### get

          public Object get(String omName,
                   String key)
                     throws Exception

      Deprecated.
      Get the object with the given name and key
      Parameters:
        `omName` - the object name
        `key` - the object key
      Returns:
        the object
      Throws:
        `Exception` - if retrieving the object fails

    - #### recycle

          public void recycle()

      Deprecated.
      Recycles the object for a new client. Recycle methods with parameters must be added to implementing object and they will be automatically called by pool implementations when the object is taken from the pool for a new client. The parameters must correspond to the parameters of the constructors of the object. For new objects, constructors can call their corresponding recycle methods whenever applicable. The recycle methods must call their super.
      Specified by:
        `recycle` in interface `org.apache.fulcrum.pool.Recyclable`

    - #### dispose

          public void dispose()

      Deprecated.
      Disposes the object after use. The method is called when the object is returned to its pool. The dispose method must call its super.
      Specified by:
        `dispose` in interface `org.apache.fulcrum.pool.Recyclable`

    - #### isDisposed

          public boolean isDisposed()

      Deprecated.
      Checks whether the recyclable has been disposed.
      Specified by:
        `isDisposed` in interface `org.apache.fulcrum.pool.Recyclable`
      Returns:
        true, if the recyclable is disposed.

Copyright © 2000–2018 The Apache Software Foundation. All rights reserved.