1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package de.smartics.ci.comm.hudson;
17
18 import de.smartics.ci.comm.CiController;
19 import de.smartics.ci.comm.CiSystem;
20 import de.smartics.ci.comm.LogLevel;
21 import de.smartics.ci.comm.hudson.command.HudsonCreateJobCommand;
22 import de.smartics.ci.comm.hudson.command.HudsonDeleteJobCommand;
23 import de.smartics.ci.comm.hudson.command.HudsonDisableJobCommand;
24 import de.smartics.ci.comm.hudson.command.HudsonEnableJobCommand;
25 import de.smartics.ci.comm.hudson.command.HudsonGenericJobCommand;
26 import de.smartics.ci.comm.hudson.command.HudsonLoginCommand;
27 import de.smartics.ci.comm.hudson.command.HudsonCheckStatusJobCommand;
28 import de.smartics.ci.comm.hudson.command.HudsonUpdateJobCommand;
29
30
31
32
33 public final class HudsonCiSystemFactory
34 {
35
36
37
38
39
40
41
42
43
44
45
46
47
48 private HudsonCiSystemFactory()
49 {
50
51 }
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70 public static CiController createCiController(final CiSystem system,
71 final LogLevel loglevel)
72 {
73 final CiController controller = new CiController(system);
74 controller.setLogLevel(loglevel);
75 final HudsonLoginCommand loginCommand = new HudsonLoginCommand();
76 controller.setLoginCommand(loginCommand);
77
78 final HudsonDeleteJobCommand deleteCommand = new HudsonDeleteJobCommand();
79 controller.setDeleteJobCommand(deleteCommand);
80
81 final HudsonCreateJobCommand createCommand = new HudsonCreateJobCommand();
82 controller.setCreateJobCommand(createCommand);
83
84 final HudsonUpdateJobCommand updateCommand = new HudsonUpdateJobCommand();
85 controller.setUpdateJobCommand(updateCommand);
86
87 final HudsonEnableJobCommand enableCommand = new HudsonEnableJobCommand();
88 controller.setEnableJobCommand(enableCommand);
89
90 final HudsonDisableJobCommand disableCommand =
91 new HudsonDisableJobCommand();
92 controller.setDisableJobCommand(disableCommand);
93
94 final HudsonCheckStatusJobCommand statusCommand =
95 new HudsonCheckStatusJobCommand();
96 controller.setStatusJobCommand(statusCommand);
97
98 final HudsonGenericJobCommand genericJobCommand =
99 new HudsonGenericJobCommand();
100 controller.setGenericJobCommand(genericJobCommand);
101
102 return controller;
103 }
104
105
106
107 }