Make Computer a DescriptorByNameOwner
This will allow Computers to be used as AncestorInPath e.g. for
form validation.
@@ -147,7 +147,7 @@ import static javax.servlet.http.HttpServletResponse.*;
* @author Kohsuke Kawaguchi
*/
@ExportedBean
-public /*transient*/ abstract class Computer extends Actionable implements AccessControlled, ExecutorListener {
+public /*transient*/ abstract class Computer extends Actionable implements AccessControlled, ExecutorListener, DescriptorByNameOwner {
private final CopyOnWriteArrayList<Executor> executors = new CopyOnWriteArrayList<Executor>();
// TODO:
@@ -1624,6 +1624,11 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
}
}
+ @Override
+ public Descriptor getDescriptorByName(String className) {
+ return Jenkins.getInstance().getDescriptorByName(className);
+ }
+
/**
* A value class to provide a consistent snapshot view of the state of an executor to avoid race conditions
* during rendering of the executors list.
