File D:\maven-qcr-plugin-testsunitaires\qcr4java\jenkins-master\target\site\qc\core\src\main\java\hudson\model\ComputerPanelBox.java.html

1 package hudson.model;
2
3 import hudson.ExtensionPoint;
4 import java.util.ArrayList;
5 import java.util.List;
6
7 /**
8 * Adds box rendered in the computer side panel.
9 *
10 * Add box.jelly to display box
11 *
12 * @author Lucie Votypkova
13 * @since 1.434
14 * @see jenkins.model.Computer#getComputerPanelBoxs()
15 */
16
17 public abstract class ComputerPanelBox implements ExtensionPoint{
18
19 private Computer computer;
20
21
22 public void setComputer(Computer computer){
23 this.computer = computer;
24 }
25
26 public Computer getComputer(){
27 return computer;
28 }
29
30 /**
31 * Create boxes for the given computer in its page.
32 *
33 * @param computer
34 * The computer for which displays the boxes. Never null.
35 * @return
36 * List of all the registered {@link ComputerPanelBox}s.
37 */
38 public static List<ComputerPanelBox> all(Computer computer) {
39 List<ComputerPanelBox> boxs = new ArrayList<ComputerPanelBox>();
40 for(ComputerPanelBox box: Hudson.getInstance().getExtensionList(ComputerPanelBox.class)){
41 box.setComputer(computer);
42 boxs.add(box);
43 }
44 return boxs;
45 }
46
47
48 }
49