public class OMTool extends Object implements ApplicationTool, org.apache.fulcrum.pool.Recyclable
Modifier and Type | Class and Description |
---|---|
protected class |
OMTool.PullHelper
Inner class to present a nice interface to the template designer
|
Modifier and Type | Field and Description |
---|---|
protected RetrieverFactory |
omFactory
The Factory responsible for retrieving the
objects from storage
|
protected ConcurrentHashMap<String,Object> |
omMap |
Constructor and Description |
---|
OMTool()
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Disposes the object after use.
|
OMTool.PullHelper |
get(String omName)
Get the
OMTool.PullHelper object with the given name |
Object |
get(String omName,
String key)
Get the object with the given name and key
|
void |
init(Object data)
Prepares tool for a single request
|
boolean |
isDisposed()
Checks whether the recyclable has been disposed.
|
void |
recycle()
Recycles the object for a new client.
|
void |
refresh()
Implementation of ApplicationTool interface is not needed for this
method as the tool is request scoped
|
protected ConcurrentHashMap<String,Object> omMap
protected RetrieverFactory omFactory
public void init(Object data)
init
in interface ApplicationTool
data
- the initialization datapublic void refresh()
refresh
in interface ApplicationTool
public OMTool.PullHelper get(String omName) throws Exception
OMTool.PullHelper
object with the given nameomName
- the object nameException
- if retrieving the object failspublic Object get(String omName, String key) throws Exception
omName
- the object namekey
- the object keyException
- if retrieving the object failspublic void recycle()
recycle
in interface org.apache.fulcrum.pool.Recyclable
public void dispose()
dispose
in interface org.apache.fulcrum.pool.Recyclable
public boolean isDisposed()
isDisposed
in interface org.apache.fulcrum.pool.Recyclable
Copyright © 2000-2015 The Apache Software Foundation. All Rights Reserved.