1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package de.smartics.maven.bugzilla.command;
17
18 import de.smartics.maven.issue.command.AddComponentCommand;
19 import de.smartics.maven.issue.command.AddMilestoneCommand;
20 import de.smartics.maven.issue.command.AddProductCommand;
21 import de.smartics.maven.issue.command.AddVersionCommand;
22 import de.smartics.maven.issue.command.ClassificationNavigationCommand;
23 import de.smartics.maven.issue.command.CommandArgument;
24 import de.smartics.maven.issue.command.CommandFactory;
25 import de.smartics.maven.issue.command.LoginCommand;
26 import de.smartics.maven.issue.command.LogoutCommand;
27 import de.smartics.maven.issue.command.ProductNavigationCommand;
28 import de.smartics.maven.issue.command.UpdateProductCommand;
29
30
31
32
33 public final class BugzillaCommandFactory implements CommandFactory
34 {
35
36
37
38
39
40
41
42
43
44
45
46
47
48 public BugzillaCommandFactory()
49 {
50 }
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68 @Override
69 public ClassificationNavigationCommand createClassificationNavigationCommand(
70 final String service,
71 final CommandArgument<ClassificationNavigationCommand> classification)
72 {
73 return new BugzillaClassificationNavigationCommand(service, classification);
74 }
75
76
77
78
79
80
81 @Override
82 public ProductNavigationCommand createProductNavigationCommand(
83 final String service,
84 final CommandArgument<ProductNavigationCommand> product)
85 {
86 return new BugzillaProductNavigationCommand(service, product);
87 }
88
89
90
91
92
93
94 @Override
95 public ProductNavigationCommand createProductNavigationCommand(
96 final String service,
97 final CommandArgument<ProductNavigationCommand> action,
98 final CommandArgument<ProductNavigationCommand> product)
99 {
100 return new BugzillaProductNavigationCommand(service, action, product);
101 }
102
103
104
105
106
107
108
109
110 @Override
111 public AddVersionCommand createAddVersionCommand(
112 final CommandArgument<AddVersionCommand> product,
113 final CommandArgument<AddVersionCommand> version,
114 final CommandArgument<AddVersionCommand> token)
115 {
116 return new BugzillaAddVersionCommand(product, version, token);
117 }
118
119
120
121
122
123
124
125
126
127 @Override
128 public AddMilestoneCommand createAddMilestoneCommand(
129 final CommandArgument<AddMilestoneCommand> product,
130 final CommandArgument<AddMilestoneCommand> milestone,
131 final CommandArgument<AddMilestoneCommand> sortkey,
132 final CommandArgument<AddMilestoneCommand> token)
133 {
134 return new BugzillaAddMilestoneCommand(product, milestone, sortkey, token);
135 }
136
137
138
139
140
141
142
143 public LoginCommand createLoginCommand(
144 final CommandArgument<LoginCommand> login,
145 final CommandArgument<LoginCommand> password)
146 {
147 return new BugzillaLoginCommand(login, password);
148 }
149
150
151
152
153
154
155
156 @Override
157 public LogoutCommand createLogoutCommand()
158 {
159 return new BugzillaLogoutCommand();
160 }
161
162
163
164
165
166
167
168
169
170
171
172
173 @Override
174 public AddProductCommand createAddProductCommand(
175 final CommandArgument<AddProductCommand> classification,
176 final CommandArgument<AddProductCommand> product,
177 final CommandArgument<AddProductCommand> description,
178 final CommandArgument<AddProductCommand> defaultMilestone,
179 final CommandArgument<AddProductCommand> version,
180 final CommandArgument<AddProductCommand> token)
181 {
182 return new BugzillaAddProductCommand(classification, product, description,
183 defaultMilestone, version, token);
184 }
185
186
187
188
189
190
191
192
193
194
195
196
197
198 @Override
199 public UpdateProductCommand createUpdateProductCommand(
200 final CommandArgument<UpdateProductCommand> oldProduct,
201 final CommandArgument<UpdateProductCommand> product,
202 final CommandArgument<UpdateProductCommand> description,
203 final CommandArgument<UpdateProductCommand> defaultMilestone,
204 final CommandArgument<UpdateProductCommand> token)
205 {
206 return new BugzillaUpdateProductCommand(oldProduct, product, description,
207 defaultMilestone, token);
208 }
209
210
211
212
213
214
215
216
217
218
219
220
221 @Override
222 public AddComponentCommand createAddComponentCommand(
223 final CommandArgument<AddComponentCommand> product,
224 final CommandArgument<AddComponentCommand> component,
225 final CommandArgument<AddComponentCommand> description,
226 final CommandArgument<AddComponentCommand> initialOwner,
227 final CommandArgument<AddComponentCommand> token)
228 {
229 return new BugzillaAddComponentCommand(product, component, description,
230 initialOwner, token);
231 }
232
233
234
235 }