Skip to content

Home

Development

IDEs

API Explorer

Releases

Release notes

Martini Runtime

Martini Desktop

Martini Online

Feature requests

Bug reports

VelocityMethods

VelocityMethods contains one-liners for evaluating Velocity templates. The methods in this class are available for use in both Gloop and Groovy.

Below are some examples:

Sample Gloop service showing how to use the `VelocityMethods` one-liners

1
2
3
4
5
// Create a context map; this contains variables that are to be used or substituted in the template
def context = ['firstName': 'Jon', 'lastName': 'Snow']

// Parse the template with the context
def parsedEmployeeTemplate = "${template}".parse(context)