|
2 | 2 |
|
3 | 3 | import hudson.ExtensionPoint; |
4 | 4 | import hudson.model.Run; |
5 | | -import jenkins.model.Jenkins; |
6 | 5 | import jenkins.util.Listeners; |
7 | 6 |
|
8 | 7 | /** |
9 | 8 | * A listener to track usage of Groovy scripts running outside of a sandbox. |
10 | 9 | * |
11 | | - * @see org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript#evaluate(groovy.lang.GroovyClassLoader, groovy.lang.Binding, hudson.model.TaskListener) |
| 10 | + * @see org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript#evaluate(ClassLoader, groovy.lang.Binding, hudson.model.TaskListener) |
12 | 11 | */ |
13 | 12 | public interface ScriptListener extends ExtensionPoint { |
14 | 13 |
|
15 | 14 | /** |
16 | 15 | * Called when a groovy script is executed in a pipeline outside of a sandbox. |
17 | 16 | * |
18 | | - * @see org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript#evaluate(groovy.lang.GroovyClassLoader, groovy.lang.Binding, hudson.model.TaskListener) |
| 17 | + * @see org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript#evaluate(ClassLoader, groovy.lang.Binding, hudson.model.TaskListener) |
19 | 18 | * @param script The Groovy script that is excecuted. |
20 | 19 | * @param run The run calling the Groovy script. |
21 | 20 | */ |
22 | 21 | void onScriptFromPipeline(String script, Run run); |
23 | 22 |
|
24 | | - |
25 | 23 | /** |
26 | 24 | * Fires the {@link #onScriptFromPipeline(String, Run)} event to track the usage of the script console. |
27 | 25 | * |
28 | | - * @see org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript#evaluate(ClassLoader, Binding, TaskListener) |
| 26 | + * @see org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript#evaluate(ClassLoader, groovy.lang.Binding, hudson.model.TaskListener) |
29 | 27 | * @param script The Groovy script that is excecuted. |
30 | 28 | * @param run The run calling the Groovy script. |
31 | 29 | */ |
32 | | - static void fireScriptFromConsoleEvent(String script, Run run) { |
| 30 | + static void fireScriptFromPipelineEvent(String script, Run run) { |
33 | 31 | Listeners.notify(ScriptListener.class, true, listener -> listener.onScriptFromPipeline(script, run)); |
34 | 32 | } |
35 | 33 | } |
0 commit comments