Enum Class GshTemplateMode
- All Implemented Interfaces:
Serializable,Comparable<GshTemplateMode>,Constable
Execution mode for a GSH template. The mode determines which engine
handles the template's source body at runtime.
interpreted— the legacy path. The source body (Groovy or Java-syntax-compatible-with-Groovy) is parsed and executed by the Groovy engine on each invocation. Available for templateType values gsh, abac, and provisioner. Default for backward compat — existing config rows without an explicit templateMode behave exactly as they always have.compiled— the new path. The source body is real Java, compiled to bytecode once (and re-compiled when the source hash changes), defined in a per-template ByteArrayClassLoader, and invoked as method calls on the loaded class. Available for every templateType. Required for the new types (daemon, daemonChangeLog, report, customUi, hook, library) since they have no legacy interpreted path.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptioncompiled-on-save Java source, loaded via the per-template classloader registrylegacy Groovy-engine-interpreted source -
Method Summary
Modifier and TypeMethodDescriptionstatic GshTemplateModeReturns the enum constant of this class with the specified name.static GshTemplateModevalueOfIgnoreCase(String string, boolean exceptionOnNotFound) Resolve an enum value by case-insensitive name, mirroring the convention used by GshTemplateType.static GshTemplateMode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
interpreted
legacy Groovy-engine-interpreted source -
compiled
compiled-on-save Java source, loaded via the per-template classloader registry
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
valueOfIgnoreCase
Resolve an enum value by case-insensitive name, mirroring the convention used by GshTemplateType.- Parameters:
string- name of the enum value (case insensitive)exceptionOnNotFound- true to throw if the name doesn't match- Returns:
- the matched enum value, or null if not found and exceptionOnNotFound is false
-