class GroovyConsole : InstanceService
Allows to execute Groovy code / scripts on AEM instance having Groovy Console CRX package installed.
<init> |
Allows to execute Groovy code / scripts on AEM instance having Groovy Console CRX package installed. GroovyConsole(sync: InstanceSync) |
available |
Check if console is installed on instance. val available: Boolean |
scriptDir |
Directory to search for scripts to be evaluated. val scriptDir: DirectoryProperty! |
verbose |
Controls throwing exception on script execution error. val verbose: Property<Boolean!>! |
evalCode |
Evaluate Groovy code snippet on AEM instance. fun evalCode(code: String, data: Map<String, Any?> = mapOf()): GroovyEvalResult |
evalScript |
Evaluate any Groovy script on AEM instance. fun evalScript(file: File, data: Map<String, Any?> = mapOf()): GroovyEvalResult
Evaluate Groovy script found by its file name on AEM instance. fun evalScript(fileName: String, data: Map<String, Any?> = mapOf()): GroovyEvalResult |
evalScripts |
Evaluate all Groovy scripts found by file name pattern on AEM instance in path-based alphabetical order. fun evalScripts(pathPattern: String = "**/*.groovy", data: Map<String, Any> = mapOf(), resultConsumer: GroovyEvalResult.() -> Unit = {}): Unit
Evaluate any Groovy scripts on AEM instance in specified order. fun evalScripts(scripts: Iterable<File>, data: Map<String, Any?> = mapOf(), resultConsumer: GroovyEvalResult.() -> Unit = {}): Unit |
findScripts |
Find scripts matching file pattern in pre-configured directory. fun findScripts(pathPattern: String): List<File> |
requireAvailable |
Ensure by throwing exception that console is available on instance. fun requireAvailable(): Unit |
EVAL_PATH |
const val EVAL_PATH: String |
SYMBOLIC_NAME |
const val SYMBOLIC_NAME: String |