Skip to content

Home

Development

IDEs

JAR services

API Explorer

VelocityFunctions

Velocity class contains functions for evaluating Velocity templates. The functions in this class are available for use in both Gloop and Groovy.

Below are some examples:

Sample service showing how to use the `Velocity` functions

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)