提交 53f640fa 编写于 作者: D Daniel Beck

Make Computer a DescriptorByNameOwner

This will allow Computers to be used as AncestorInPath e.g. for
form validation.
上级 68f55859
......@@ -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.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册