@OpenApiAll public interface ITool extends IVariable
Tool gather objects of various types, and place them in the template. Tool is Java Bean object. The Java Bean consists of field, getter and setter of field, and empty Constructor.
Modifier and Type | Interface and Description |
---|---|
static class |
ITool.HTMLString
Direct command
IFormatter to render in HTML format. |
static class |
ITool.RetainedString
Direct command
IFormatter to keep the referenced String format. |
static class |
ITool.Void
A void class uses to return in Velocity Tools when you want exactly not return anything to context.
|
Modifier and Type | Field and Description |
---|---|
static ITool.Void |
VOID
Instead of void (null) in Velocity, return this object, if empty string is require for output.
|
Modifier and Type | Method and Description |
---|---|
IContext |
getContext()
Return template context.
|
java.util.Properties |
getProperties()
Return template engine properties.
|
void |
setContext(IContext context)
This method is invoked by the template engine runtime, after class has been initializing, to set the
template context.
|
void |
setProperties(java.util.Properties properties)
This method is invoked by the template engine runtime, after class has been initializing, to set the
template properties.
|
static final ITool.Void VOID
ITool.Void
uses to make sure that returning data from setter method is absolutely nothing. In general
case, Velocity consider return void
from setter method as null
value, this cause
the word 'null' printed out in report. To avoid this problem setter method may use VOID
as
returning object.void setProperties(java.util.Properties properties)
properties
- template engine propertiesjava.util.Properties getProperties()
void setContext(IContext context)
context
- template contextIContext getContext()
Copyright © 2010 - No Magic Asia