1 package org.apache.maven.continuum;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.io.File;
23 import java.util.Collection;
24 import java.util.List;
25 import java.util.Map;
26
27 import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
28 import org.apache.continuum.buildmanager.BuildsManager;
29 import org.apache.continuum.model.project.ProjectGroupSummary;
30 import org.apache.continuum.model.project.ProjectScmRoot;
31 import org.apache.continuum.model.release.ContinuumReleaseResult;
32 import org.apache.continuum.purge.ContinuumPurgeManager;
33 import org.apache.continuum.purge.PurgeConfigurationService;
34 import org.apache.continuum.release.distributed.manager.DistributedReleaseManager;
35 import org.apache.continuum.repository.RepositoryService;
36 import org.apache.continuum.taskqueue.manager.TaskQueueManager;
37 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
38 import org.apache.maven.continuum.configuration.ConfigurationService;
39 import org.apache.maven.continuum.installation.InstallationService;
40 import org.apache.maven.continuum.model.project.BuildDefinition;
41 import org.apache.maven.continuum.model.project.BuildQueue;
42 import org.apache.maven.continuum.model.project.BuildResult;
43 import org.apache.maven.continuum.model.project.Project;
44 import org.apache.maven.continuum.model.project.ProjectGroup;
45 import org.apache.maven.continuum.model.project.ProjectNotifier;
46 import org.apache.maven.continuum.model.project.Schedule;
47 import org.apache.maven.continuum.model.scm.ChangeSet;
48 import org.apache.maven.continuum.profile.ProfileService;
49 import org.apache.maven.continuum.project.builder.ContinuumProjectBuildingResult;
50 import org.apache.maven.continuum.release.ContinuumReleaseManager;
51
52
53
54
55
56
57 public interface Continuum
58 {
59 String ROLE = Continuum.class.getName();
60
61
62
63
64
65 public ProjectGroup getProjectGroup( int projectGroupId )
66 throws ContinuumException;
67
68 public List<ProjectGroup> getAllProjectGroupsWithBuildDetails();
69
70 public List<ProjectGroup> getAllProjectGroups();
71
72 public ProjectGroup getProjectGroupByProjectId( int projectId )
73 throws ContinuumException;
74
75 public Collection<Project> getProjectsInGroup( int projectGroupId )
76 throws ContinuumException;
77
78 public Collection<Project> getProjectsInGroupWithDependencies( int projectGroupId )
79 throws ContinuumException;
80
81 public void removeProjectGroup( int projectGroupId )
82 throws ContinuumException;
83
84 public void addProjectGroup( ProjectGroup projectGroup )
85 throws ContinuumException;
86
87 public ProjectGroup getProjectGroupWithProjects( int projectGroupId )
88 throws ContinuumException;
89
90 public ProjectGroup getProjectGroupWithBuildDetails( int projectGroupId )
91 throws ContinuumException;
92
93 public ProjectGroup getProjectGroupByGroupId( String groupId )
94 throws ContinuumException;
95
96 public ProjectGroup getProjectGroupByGroupIdWithBuildDetails( String groupId )
97 throws ContinuumException;
98
99 public List<ProjectGroup> getAllProjectGroupsWithRepository( int repositoryId );
100
101
102
103
104
105 void removeProject( int projectId )
106 throws ContinuumException;
107
108
109
110
111
112
113
114 @Deprecated
115 void checkoutProject( int projectId )
116 throws ContinuumException;
117
118 Project getProject( int projectId )
119 throws ContinuumException;
120
121 Project getProjectWithBuildDetails( int projectId )
122 throws ContinuumException;
123
124 Collection<Project> getProjects()
125 throws ContinuumException;
126
127 Collection<Project> getProjectsWithDependencies()
128 throws ContinuumException;
129
130 BuildResult getLatestBuildResultForProject( int projectId );
131
132 Map<Integer, BuildResult> getLatestBuildResults( int projectGroupId );
133
134 Map<Integer, BuildResult> getBuildResultsInSuccess( int projectGroupId );
135
136 Map<Integer, ProjectGroupSummary> getProjectsSummaryByGroups();
137
138
139
140
141
142
143
144
145
146
147
148 List<Project> getProjectsInBuildOrder( Collection<Project> projects );
149
150 void buildProjects()
151 throws ContinuumException;
152
153 void buildProjectsWithBuildDefinition( List<Project> projects, List<BuildDefinition> bds )
154 throws ContinuumException;
155
156 void buildProjectsWithBuildDefinition( List<Project> projects, int buildDefinitionId )
157 throws ContinuumException;
158
159 void buildProjects( int trigger )
160 throws ContinuumException;
161
162 void buildProjects( Schedule schedule )
163 throws ContinuumException;
164
165 void buildProject( int projectId )
166 throws ContinuumException;
167
168 void buildProject( int projectId, int trigger )
169 throws ContinuumException;
170
171 void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId )
172 throws ContinuumException;
173
174 void buildProject( int projectId, int buildDefinitionId, int trigger )
175 throws ContinuumException;
176
177 public void buildProjectGroup( int projectGroupId )
178 throws ContinuumException;
179
180 public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId )
181 throws ContinuumException;
182
183
184
185
186
187 BuildResult getBuildResult( int buildId )
188 throws ContinuumException;
189
190 BuildResult getBuildResultByBuildNumber( int projectId, int buildNumber )
191 throws ContinuumException;
192
193 String getBuildOutput( int projectId, int buildId )
194 throws ContinuumException;
195
196 long getNbBuildResultsForProject( int projectId );
197
198 Collection<BuildResult> getBuildResultsForProject( int projectId )
199 throws ContinuumException;
200
201 List<ChangeSet> getChangesSinceLastSuccess( int projectId, int buildResultId )
202 throws ContinuumException;
203
204 void removeBuildResult( int buildId )
205 throws ContinuumException;
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220 int addProject( Project project, String executorId, int projectGroupId )
221 throws ContinuumException;
222
223
224
225
226
227
228
229
230
231
232 int addProject( Project project, String executorId, int projectGroupId, int buildDefintionTemplateId )
233 throws ContinuumException;
234
235
236
237
238
239
240
241
242 ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl )
243 throws ContinuumException;
244
245
246
247
248
249
250
251
252
253 ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl, boolean checkProtocol )
254 throws ContinuumException;
255
256
257
258
259
260
261
262
263
264 ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl, int projectGroupId )
265 throws ContinuumException;
266
267
268
269
270
271
272
273
274
275
276 ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl, int projectGroupId, boolean checkProtocol )
277 throws ContinuumException;
278
279
280
281
282
283
284
285
286
287
288
289 ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl, int projectGroupId, boolean checkProtocol,
290 boolean useCredentialsCache )
291 throws ContinuumException;
292
293
294
295
296
297
298
299
300
301
302
303
304
305 public ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl, int projectGroupId,
306 boolean checkProtocol, boolean useCredentialsCache,
307 boolean loadRecursiveProjects )
308 throws ContinuumException;
309
310
311
312
313
314
315
316
317
318
319
320
321
322 public ContinuumProjectBuildingResult addMavenTwoProject( String metadataUrl, int projectGroupId,
323 boolean checkProtocol, boolean useCredentialsCache,
324 boolean loadRecursiveProjects,
325 int buildDefintionTemplateId )
326 throws ContinuumException;
327
328
329
330
331
332
333
334
335
336 ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl, int projectGroupId )
337 throws ContinuumException;
338
339
340
341
342
343
344
345
346
347
348 ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl, int projectGroupId, boolean checkProtocol )
349 throws ContinuumException;
350
351
352
353
354
355
356
357
358
359
360
361 ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl, int projectGroupId, boolean checkProtocol,
362 boolean useCredentialsCache )
363 throws ContinuumException;
364
365 ContinuumProjectBuildingResult addMavenOneProject( String metadataUrl, int projectGroupId, boolean checkProtocol,
366 boolean useCredentialsCache, int buildDefintionTemplateId )
367 throws ContinuumException;
368
369 void updateProject( Project project )
370 throws ContinuumException;
371
372 void updateProjectGroup( ProjectGroup projectGroup )
373 throws ContinuumException;
374
375 Project getProjectWithCheckoutResult( int projectId )
376 throws ContinuumException;
377
378 Project getProjectWithAllDetails( int projectId )
379 throws ContinuumException;
380
381 Project getProjectWithBuilds( int projectId )
382 throws ContinuumException;
383
384
385
386
387
388 ProjectNotifier getNotifier( int projectId, int notifierId )
389 throws ContinuumException;
390
391 ProjectNotifier updateNotifier( int projectId, ProjectNotifier notifier )
392 throws ContinuumException;
393
394 ProjectNotifier addNotifier( int projectId, ProjectNotifier notifier )
395 throws ContinuumException;
396
397 void removeNotifier( int projectId, int notifierId )
398 throws ContinuumException;
399
400 ProjectNotifier getGroupNotifier( int projectGroupId, int notifierId )
401 throws ContinuumException;
402
403 ProjectNotifier updateGroupNotifier( int projectGroupId, ProjectNotifier notifier )
404 throws ContinuumException;
405
406 ProjectNotifier addGroupNotifier( int projectGroupId, ProjectNotifier notifier )
407 throws ContinuumException;
408
409 void removeGroupNotifier( int projectGroupId, int notifierId )
410 throws ContinuumException;
411
412
413
414
415
416
417
418
419 @Deprecated
420 List<BuildDefinition> getBuildDefinitions( int projectId )
421 throws ContinuumException;
422
423
424
425
426 @Deprecated
427 BuildDefinition getBuildDefinition( int projectId, int buildDefinitionId )
428 throws ContinuumException;
429
430
431
432
433 @Deprecated
434 void removeBuildDefinition( int projectId, int buildDefinitionId )
435 throws ContinuumException;
436
437
438
439
440
441
442
443 BuildDefinition getBuildDefinition( int buildDefinitionId )
444 throws ContinuumException;
445
446
447
448
449
450
451
452
453
454
455
456 BuildDefinition getDefaultBuildDefinition( int projectId )
457 throws ContinuumException;
458
459 public List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup( int projectGroupId )
460 throws ContinuumException;
461
462 BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDefinition )
463 throws ContinuumException;
464
465 BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition buildDefinition )
466 throws ContinuumException;
467
468 List<BuildDefinition> getBuildDefinitionsForProject( int projectId )
469 throws ContinuumException;
470
471 List<BuildDefinition> getBuildDefinitionsForProjectGroup( int projectGroupId )
472 throws ContinuumException;
473
474 void removeBuildDefinitionFromProject( int projectId, int buildDefinitionId )
475 throws ContinuumException;
476
477 void removeBuildDefinitionFromProjectGroup( int projectGroupId, int buildDefinitionId )
478 throws ContinuumException;
479
480 BuildDefinition updateBuildDefinitionForProject( int projectId, BuildDefinition buildDefinition )
481 throws ContinuumException;
482
483 BuildDefinition updateBuildDefinitionForProjectGroup( int projectGroupId, BuildDefinition buildDefinition )
484 throws ContinuumException;
485
486
487
488
489
490 Schedule getScheduleByName( String scheduleName )
491 throws ContinuumException;
492
493 Schedule getSchedule( int id )
494 throws ContinuumException;
495
496 Collection<Schedule> getSchedules()
497 throws ContinuumException;
498
499 void addSchedule( Schedule schedule )
500 throws ContinuumException;
501
502 void updateSchedule( Schedule schedule )
503 throws ContinuumException;
504
505 void updateSchedule( int scheduleId, Map<String, String> configuration )
506 throws ContinuumException;
507
508 void removeSchedule( int scheduleId )
509 throws ContinuumException;
510
511 void activePurgeSchedule( Schedule schedule );
512
513 void activeBuildDefinitionSchedule( Schedule schedule );
514
515
516
517
518
519 File getWorkingDirectory( int projectId )
520 throws ContinuumException;
521
522 String getFileContent( int projectId, String directory, String filename )
523 throws ContinuumException;
524
525 List<File> getFiles( int projectId, String currentDirectory )
526 throws ContinuumException;
527
528
529
530
531
532 ConfigurationService getConfiguration();
533
534 void reloadConfiguration()
535 throws ContinuumException;
536
537
538
539
540 ContinuumReleaseManager getReleaseManager();
541
542
543
544
545
546 InstallationService getInstallationService();
547
548 ProfileService getProfileService();
549
550 BuildDefinitionService getBuildDefinitionService();
551
552
553
554
555 ContinuumPurgeManager getPurgeManager();
556
557 PurgeConfigurationService getPurgeConfigurationService();
558
559
560
561
562 RepositoryService getRepositoryService();
563
564
565
566
567 List<ProjectScmRoot> getProjectScmRootByProjectGroup( int projectGroupId );
568
569 ProjectScmRoot getProjectScmRoot( int projectScmRootId )
570 throws ContinuumException;
571
572 ProjectScmRoot getProjectScmRootByProject( int projectId )
573 throws ContinuumException;
574
575 ProjectScmRoot getProjectScmRootByProjectGroupAndScmRootAddress( int projectGroupId, String scmRootAddress )
576 throws ContinuumException;
577
578
579
580
581 TaskQueueManager getTaskQueueManager();
582
583
584
585
586 BuildsManager getBuildsManager();
587
588
589
590
591
592 BuildQueue addBuildQueue( BuildQueue buildQueue )
593 throws ContinuumException;
594
595 BuildQueue getBuildQueue( int buildQueueId )
596 throws ContinuumException;
597
598 BuildQueue getBuildQueueByName( String buildQueueName )
599 throws ContinuumException;
600
601 void removeBuildQueue( BuildQueue buildQueue )
602 throws ContinuumException;
603
604 BuildQueue storeBuildQueue( BuildQueue buildQueue )
605 throws ContinuumException;
606
607 List<BuildQueue> getAllBuildQueues()
608 throws ContinuumException;
609
610 public void startup()
611 throws ContinuumException;
612
613 ContinuumReleaseResult addContinuumReleaseResult( ContinuumReleaseResult releaseResult )
614 throws ContinuumException;
615
616 void removeContinuumReleaseResult( int releaseResultId )
617 throws ContinuumException;
618
619 ContinuumReleaseResult getContinuumReleaseResult( int releaseResultId )
620 throws ContinuumException;
621
622 List<ContinuumReleaseResult> getContinuumReleaseResultsByProjectGroup( int projectGroupId );
623
624 List<ContinuumReleaseResult> getAllContinuumReleaseResults();
625
626 ContinuumReleaseResult getContinuumReleaseResult( int projectId, String releaseGoal, long startTime, long endTime )
627 throws ContinuumException;
628
629 String getReleaseOutput( int releaseResultId )
630 throws ContinuumException;
631
632 DistributedBuildManager getDistributedBuildManager();
633
634 DistributedReleaseManager getDistributedReleaseManager();
635 }