VPPConfig

Description

Data type used to configure the Velocity Engine and/or Context used when preprocessing.

Parameters

Name Description Required Legal Values
([] indicates the default, if applicable)
usetempfile

If yes, then preprocessed output will be written to a temporary file before passing on to the next filter in the chain, else preprocessed output will be buffered in memory.

This parameter is especially important when processing extremely large files.

No Yes, [No]
keep

If yes and if usetempfile is yes, then the temporary file will be kept after preprocessing. This is generally useful only for debugging problems in a filter chain in lieu of a 'tee' filter.

This parameter has no effect if usetempfile is no.

No Yes, [No]
tempdir Sets the directory used for preprocessor output if usetempfile is true. This directory will be created if it does not exist. No A directory path. [vpp.out]
id

Sets the id of this configuration so that it can be referenced.

No A legal Ant reference id.

Parameters Specified as Nested Elements

context

This nested element defines a VPPContext which allows you to configure the Velocity Context used when preprocessing.

engine

This nested element defines a VPPEngine which allows you to configure the Velocity Context used when preprocessing.

Examples

Note: the following examples assume that VPPConfig is being used as an antlib, hence the tasks use the vpp namespace. If not using as an antlib, then simply omit the ':' character and the xmlns attribute.

    <vpp:config id="vppconfig0" xmlns:vpp="antlib:foundrylogic.vpp" >
      <context>
        <property key="foo" value="bar" />
        <property file="context.properties" />
        <tool key="myTool" classname="xyz.MyTool" />
      </context>
      <engine usevelocitylogger="no" >
        <property file="engine.properties" />
      </engine>
    </vpp:config>

VPPContext

Description

Data type used to configure the Velocity Context used when preprocessing.

Parameters

No parameters are currently supported.

Parameters Specified as Nested Elements

property

Use this nested element of VPPContext to define properties in the Velocity Context. 0 or more of these elements may be declared as nested elements of a single VPPContext.

Name Description Required Legal Values
([] indicates the default, if applicable)
key

The key used to store the value of this property

One of these must be set Any string.
file

The path to a file that contains properties

Any legal path
value

The value to be stored for this property

Yes Any string
encoding

The encoding of a property file

No A legal encoding identifier

tool

Use this nested element of VPPContext to define an instance of a user defined class to be placed into the context. 0 or more of these elements may be declared as nested elements of a single VPPContext.

Tool class restrictions:

Name Description Required Legal Values
([] indicates the default, if applicable)
key

The key used to store the value of this property

Yes Any string.
className

The name of a class

One of these must be specified Fully qualified class name
refid Reference id of a configured data type

A valid reference

eventHandler

Use this nested element of VPPContext to install a user-defined event handler on the Velocity Context. 0 or 1 of these elements may be declared as nested elements of a single VPPContext.

Event handler class restrictions:

Name Description Required Legal Values
([] indicates the default, if applicable)
className

The name of a class

One of these must be specified Fully qualified class name
refid Reference id of a configured data type

A valid reference


VPPEngine

Description

Data type used to configure the Velocity Engine used when preprocessing.

Parameters

Name Description Required Legal Values
([] indicates the default, if applicable)
usevelocitylogger

If yes, then Velocity's logger will be used, else Ant's logger will be used

No Yes, [No]

Parameters Specified as Nested Elements

property

Use this nested element of VPPEngine to configure Velocity Engine properties. 0 or more of these elements may be declared as nested elements of a single VPPEngine.

Name Description Required Legal Values
([] indicates the default, if applicable)
key

The key used to store the value of this property

One of these must be set Any string.
file

The path to a file that contains properties

Any legal path
value

The value to be stored for this property

Yes Any string
encoding

The encoding of a property file

No A legal encoding identifier
add

If yes, then the property will be added, not set. This supports the setting of certain multi-value properties, e.g. velocimacro.library

No Yes, [No]