App Scripts
Whitelisted Groovy Classes

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

ClassMethods 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

ClassMethods 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.

ClassClass
java.time.LocalDate (opens in a new tab)java.time.format.DateTimeFormatter (opens in a new tab)
java.time.Instant (opens in a new tab)java.time.format.DateTimeFormatterBuilder (opens in a new tab)
java.time.LocalDateTime (opens in a new tab)java.time.format.DecimalStyle (opens in a new tab)
java.time.LocalTime (opens in a new tab)java.time.format.ResolverStyle (opens in a new tab)
java.time.Year (opens in a new tab)java.time.format.FormatStyle (opens in a new tab)
java.time.YearMonth (opens in a new tab)java.time.format.SignStyle (opens in a new tab)
java.time.Month (opens in a new tab)java.time.format.TextStyle (opens in a new tab)
java.time.MonthDay (opens in a new tab)java.time.format.DateTimeParseException (opens in a new tab)
java.time.ZonedDateTime (opens in a new tab)java.time.temporal.ChronoField (opens in a new tab)
java.time.ZoneId (opens in a new tab)java.time.temporal.ChronoUnit (opens in a new tab)
java.time.ZoneOffset (opens in a new tab)java.time.temporal.ValueRange (opens in a new tab)
java.time.OffsetDateTime (opens in a new tab)java.time.temporal.IsoFields (opens in a new tab)
java.time.OffsetTime (opens in a new tab)java.time.temporal.TemporalAdjusters (opens in a new tab)
java.time.DayOfWeek (opens in a new tab)java.time.temporal.TemporalQueries (opens in a new tab)
java.time.DateTimeException (opens in a new tab)java.time.chrono.IsoChronology (opens in a new tab)
java.time.Period (opens in a new tab)
java.time.Duration (opens in a new tab)

Java Text & Math

ClassMethods 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

ClassMethods 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.DateUtilExtensionsAll methods
org.apache.groovy.dateutil.extensions.DateUtilStaticExtensionsAll 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

ClassMethods Allowed
org.apache.commons.codec.digest.DigestUtils (opens in a new tab)sha256Hex()
;