Whitelisted Groovy Classes for Application Scripts
This page enumerates the Groovy classes that are whitelisted for use in TrackVia Application Scripts. Using classes or methods not on this list will result in an error.
Java Core Classes
Class | Methods Allowed |
---|---|
java.lang.Class (opens in a new tab) | getName() |
java.lang.Enum (opens in a new tab) | All methods |
java.lang.Integer (opens in a new tab) | All methods |
java.lang.Double (opens in a new tab) | All methods |
java.lang.Number (opens in a new tab) | All methods |
java.lang.Object (opens in a new tab) | All methods |
java.lang.RuntimeException (opens in a new tab) | All methods |
java.lang.String (opens in a new tab) | All methods |
java.lang.System (opens in a new tab) | currentTimeMillis() , nanoTime() |
java.lang.ThreadLocal (opens in a new tab) | get() |
java.lang.Math (opens in a new tab) | All methods |
Java Collections
Class | Methods Allowed |
---|---|
java.util.Calendar (opens in a new tab) | All methods |
java.util.Date (opens in a new tab) | All methods |
java.util.Collection (opens in a new tab) | All methods |
java.util.Iterator (opens in a new tab) | All methods |
java.util.List (opens in a new tab) | All methods |
java.util.Map (opens in a new tab) | All methods |
java.util.Map.Entry (opens in a new tab) | getKey() |
java.util.Set (opens in a new tab) | All methods |
java.util.TimeZone (opens in a new tab) | All methods (except: setDefault(TimeZone) ) |
Java Time API (Complete)
All methods are permitted for the following classes in the java.time
package.
Java Text & Math
Class | Methods Allowed |
---|---|
java.text.DateFormat (opens in a new tab) | All methods |
java.text.SimpleDateFormat (opens in a new tab) | All methods |
java.math.BigDecimal (opens in a new tab) | All methods |
Groovy Classes
Class | Methods Allowed |
---|---|
groovy.lang.Closure (opens in a new tab) | All methods |
groovy.json.JsonSlurper (opens in a new tab) | All methods |
groovy.json.JsonBuilder (opens in a new tab) | All methods |
org.apache.groovy.dateutil.extensions.DateUtilExtensions | All methods |
org.apache.groovy.dateutil.extensions.DateUtilStaticExtensions | All methods |
org.codehaus.groovy.runtime.DefaultGroovyMethods (opens in a new tab) | All methods (exceptions below) |
org.codehaus.groovy.runtime.StringGroovyMethods (opens in a new tab) | All methods |
Exceptions for org.codehaus.groovy.runtime.DefaultGroovyMethods
:
The following methods and types are not permitted:
println
/printf
/print
addShutdownHook(Object, Closure)
getRootLoader(ClassLoader)
- Any method whose parameter or return type is in
java.io
,java.net
,java.lang.Class
,groovy.lang.MetaClass
Apache Commons
Class | Methods Allowed |
---|---|
org.apache.commons.codec.digest.DigestUtils (opens in a new tab) | sha256Hex() |