1 package org.apache.maven.continuum.web.action.admin;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.ArrayList;
23 import java.util.List;
24 import java.util.Map;
25 import java.util.Set;
26
27 import org.apache.commons.lang.ArrayUtils;
28 import org.apache.continuum.buildmanager.BuildManagerException;
29 import org.apache.continuum.taskqueue.BuildProjectTask;
30 import org.apache.continuum.taskqueue.CheckOutTask;
31 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
32 import org.apache.maven.continuum.model.project.Project;
33 import org.apache.maven.continuum.model.project.ProjectGroup;
34 import org.apache.maven.continuum.security.ContinuumRoleConstants;
35 import org.apache.maven.continuum.web.action.ContinuumActionSupport;
36 import org.apache.maven.continuum.web.bean.BuildProjectQueue;
37 import org.apache.maven.continuum.web.bean.CheckoutQueue;
38 import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
39 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
40 import org.apache.maven.continuum.web.model.DistributedBuildSummary;
41 import org.apache.maven.continuum.web.model.PrepareBuildSummary;
42 import org.codehaus.plexus.redback.rbac.Resource;
43 import org.codehaus.plexus.util.StringUtils;
44 import org.codehaus.redback.integration.interceptor.SecureAction;
45 import org.codehaus.redback.integration.interceptor.SecureActionBundle;
46 import org.codehaus.redback.integration.interceptor.SecureActionException;
47 import org.slf4j.Logger;
48 import org.slf4j.LoggerFactory;
49
50
51
52
53
54
55
56 public class QueuesAction
57 extends ContinuumActionSupport
58 implements SecureAction
59 {
60 private static final Logger logger = LoggerFactory.getLogger( QueuesAction.class );
61
62 private static final String DISTRIBUTED_BUILD_SUCCESS = "distributed-build-success";
63
64 private List<String> selectedPrepareBuildTaskHashCodes;
65
66 private List<String> selectedBuildTaskHashCodes;
67
68 private List<String> selectedCheckOutTaskHashCodes;
69
70 private int buildDefinitionId;
71
72 private int projectId;
73
74 private int trigger;
75
76 private String projectName;
77
78 private List<BuildProjectQueue> currentBuildProjectTasks = new ArrayList<BuildProjectQueue>();
79
80 private List<CheckoutQueue> currentCheckoutTasks = new ArrayList<CheckoutQueue>();
81
82 private List<BuildProjectQueue> buildsInQueue = new ArrayList<BuildProjectQueue>();
83
84 private List<CheckoutQueue> checkoutsInQueue = new ArrayList<CheckoutQueue>();
85
86 private List<PrepareBuildSummary> currentPrepareBuilds = new ArrayList<PrepareBuildSummary>();
87
88 private List<PrepareBuildSummary> prepareBuildQueues = new ArrayList<PrepareBuildSummary>();
89
90 private List<PrepareBuildSummary> currentDistributedPrepareBuilds = new ArrayList<PrepareBuildSummary>();
91
92 private List<PrepareBuildSummary> distributedPrepareBuildQueues = new ArrayList<PrepareBuildSummary>();
93
94 private List<DistributedBuildSummary> currentDistributedBuilds = new ArrayList<DistributedBuildSummary>();
95
96 private List<DistributedBuildSummary> distributedBuildQueues = new ArrayList<DistributedBuildSummary>();
97
98 private String buildAgentUrl;
99
100 private int projectGroupId;
101
102 private int scmRootId;
103
104
105
106
107
108 public String cancelCurrent()
109 throws Exception
110 {
111 try
112 {
113 checkManageQueuesAuthorization();
114 }
115 catch ( AuthorizationRequiredException authzE )
116 {
117 addActionError( authzE.getMessage() );
118 return REQUIRES_AUTHORIZATION;
119 }
120 catch ( AuthenticationRequiredException e )
121 {
122 addActionError( e.getMessage() );
123 return REQUIRES_AUTHENTICATION;
124 }
125
126 try
127 {
128 getContinuum().getBuildsManager().cancelBuild( projectId );
129 }
130 catch ( BuildManagerException e )
131 {
132 addActionError( e.getMessage() );
133 return ERROR;
134 }
135
136 return SUCCESS;
137 }
138
139 public String removeCheckout()
140 throws Exception
141 {
142 try
143 {
144 checkManageQueuesAuthorization();
145 }
146 catch ( AuthorizationRequiredException authzE )
147 {
148 addActionError( authzE.getMessage() );
149 return REQUIRES_AUTHORIZATION;
150 }
151 catch ( AuthenticationRequiredException e )
152 {
153 addActionError( e.getMessage() );
154 return REQUIRES_AUTHENTICATION;
155 }
156
157 try
158 {
159 getContinuum().getBuildsManager().removeProjectFromCheckoutQueue( projectId );
160 }
161 catch ( BuildManagerException e )
162 {
163 addActionError( e.getMessage() );
164 return ERROR;
165 }
166
167 return SUCCESS;
168 }
169
170 public String cancelCurrentCheckout()
171 throws Exception
172 {
173 try
174 {
175 checkManageQueuesAuthorization();
176 }
177 catch ( AuthorizationRequiredException authzE )
178 {
179 addActionError( authzE.getMessage() );
180 return REQUIRES_AUTHORIZATION;
181 }
182 catch ( AuthenticationRequiredException e )
183 {
184 addActionError( e.getMessage() );
185 return REQUIRES_AUTHENTICATION;
186 }
187 try
188 {
189 cancelCheckout( projectId );
190 }
191 catch ( BuildManagerException e )
192 {
193 addActionError( e.getMessage() );
194 return ERROR;
195 }
196
197 return SUCCESS;
198 }
199
200 public String display()
201 throws Exception
202 {
203 if ( getContinuum().getConfiguration().isDistributedBuildEnabled() )
204 {
205
206 Map<String, PrepareBuildProjectsTask> currentPrepareBuildMap = getContinuum().getDistributedBuildManager().getProjectsCurrentlyPreparingBuild();
207
208 for ( String url : currentPrepareBuildMap.keySet() )
209 {
210 PrepareBuildProjectsTask task = currentPrepareBuildMap.get( url );
211
212 ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId() );
213
214 PrepareBuildSummary summary = new PrepareBuildSummary();
215 summary.setBuildAgentUrl( url );
216 summary.setProjectGroupId( task.getProjectGroupId() );
217 summary.setProjectGroupName( projectGroup.getName() );
218 summary.setScmRootAddress( task.getScmRootAddress() );
219 summary.setScmRootId( task.getProjectScmRootId() );
220
221 currentDistributedPrepareBuilds.add( summary );
222 }
223
224
225 Map<String, BuildProjectTask> currentBuildMap = getContinuum().getDistributedBuildManager().getProjectsCurrentlyBuilding();
226
227 for ( String url : currentBuildMap.keySet() )
228 {
229 BuildProjectTask task = currentBuildMap.get( url );
230
231 Project project = getContinuum().getProject( task.getProjectId() );
232
233 DistributedBuildSummary summary = new DistributedBuildSummary();
234 summary.setProjectId( project.getId() );
235 summary.setProjectName( project.getName() );
236 summary.setProjectGroupName( project.getProjectGroup().getName() );
237 summary.setBuildDefinitionId( task.getBuildDefinitionId() );
238 summary.setBuildDefinitionLabel( task.getBuildDefinitionLabel() );
239 summary.setHashCode( task.getHashCode() );
240 summary.setBuildAgentUrl( url );
241
242 currentDistributedBuilds.add( summary );
243 }
244
245
246 Map<String, List<PrepareBuildProjectsTask>> prepareBuildMap = getContinuum().getDistributedBuildManager().getProjectsInPrepareBuildQueue();
247
248 for ( String url : prepareBuildMap.keySet() )
249 {
250 for ( PrepareBuildProjectsTask task : prepareBuildMap.get( url ) )
251 {
252 ProjectGroup projectGroup = getContinuum().getProjectGroup( task.getProjectGroupId() );
253
254 PrepareBuildSummary summary = new PrepareBuildSummary();
255 summary.setBuildAgentUrl( url );
256 summary.setProjectGroupId( task.getProjectGroupId() );
257 summary.setProjectGroupName( projectGroup.getName() );
258 summary.setScmRootAddress( task.getScmRootAddress() );
259 summary.setScmRootId( task.getProjectScmRootId() );
260 summary.setHashCode( task.getHashCode() );
261
262 distributedPrepareBuildQueues.add( summary );
263 }
264 }
265
266
267 Map<String, List<BuildProjectTask>> buildMap = getContinuum().getDistributedBuildManager().getProjectsInBuildQueue();
268
269 for ( String url : buildMap.keySet() )
270 {
271 for ( BuildProjectTask task : buildMap.get( url ) )
272 {
273 DistributedBuildSummary summary = new DistributedBuildSummary();
274
275 Project project = getContinuum().getProject( task.getProjectId() );
276
277 summary.setProjectId( project.getId() );
278 summary.setProjectName( project.getName() );
279 summary.setProjectGroupName( project.getProjectGroup().getName() );
280 summary.setBuildDefinitionId( task.getBuildDefinitionId() );
281 summary.setBuildDefinitionLabel( task.getBuildDefinitionLabel() );
282 summary.setHashCode( task.getHashCode() );
283 summary.setBuildAgentUrl( url );
284
285 distributedBuildQueues.add( summary );
286 }
287 }
288
289 return DISTRIBUTED_BUILD_SUCCESS;
290 }
291 else
292 {
293 try
294 {
295
296 PrepareBuildProjectsTask currentPrepareBuildTask = getContinuum().getBuildsManager().getCurrentProjectInPrepareBuild();
297
298 if ( currentPrepareBuildTask != null )
299 {
300 PrepareBuildSummary s = new PrepareBuildSummary();
301
302 s.setProjectGroupId( currentPrepareBuildTask.getProjectGroupId() );
303 s.setProjectGroupName( currentPrepareBuildTask.getProjectGroupName() );
304 s.setScmRootId( currentPrepareBuildTask.getProjectScmRootId() );
305 s.setScmRootAddress( currentPrepareBuildTask.getScmRootAddress() );
306 currentPrepareBuilds.add( s );
307 }
308 }
309 catch ( BuildManagerException e )
310 {
311 addActionError( e.getMessage() );
312 return ERROR;
313 }
314
315 try
316 {
317
318 Map<String, BuildProjectTask> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
319 Set<String> keySet = currentBuilds.keySet();
320 for ( String key : keySet )
321 {
322 BuildProjectTask buildTask = currentBuilds.get( key );
323 BuildProjectQueue queue = new BuildProjectQueue();
324 queue.setName( key );
325 queue.setTask( buildTask );
326 currentBuildProjectTasks.add( queue );
327 }
328 }
329 catch ( BuildManagerException e )
330 {
331 addActionError( e.getMessage() );
332 return ERROR;
333 }
334
335 try
336 {
337
338 List<PrepareBuildProjectsTask> prepareBuilds =
339 getContinuum().getBuildsManager().getProjectsInPrepareBuildQueue();
340 for ( PrepareBuildProjectsTask task : prepareBuilds )
341 {
342 PrepareBuildSummary summary = new PrepareBuildSummary();
343 summary.setProjectGroupId( task.getProjectGroupId() );
344 summary.setProjectGroupName( task.getProjectGroupName() );
345 summary.setScmRootId( task.getProjectScmRootId() );
346 summary.setScmRootAddress( task.getScmRootAddress() );
347 summary.setHashCode( task.getHashCode() );
348
349 prepareBuildQueues.add( summary );
350 }
351 }
352 catch ( BuildManagerException e )
353 {
354 addActionError( e.getMessage() );
355 return ERROR;
356 }
357
358 try
359 {
360
361 Map<String, List<BuildProjectTask>> builds =
362 getContinuum().getBuildsManager().getProjectsInBuildQueues();
363 Set<String> keySet = builds.keySet();
364 for ( String key : keySet )
365 {
366 for ( BuildProjectTask task : builds.get( key ) )
367 {
368 BuildProjectQueue queue = new BuildProjectQueue();
369 queue.setName( key );
370 queue.setTask( task );
371 buildsInQueue.add( queue );
372 }
373 }
374 }
375 catch ( BuildManagerException e )
376 {
377 addActionError( e.getMessage() );
378 return ERROR;
379 }
380
381 try
382 {
383
384 Map<String, CheckOutTask> currentCheckouts = getContinuum().getBuildsManager().getCurrentCheckouts();
385 Set<String> keySet = currentCheckouts.keySet();
386 for ( String key : keySet )
387 {
388 CheckOutTask checkoutTask = currentCheckouts.get( key );
389 CheckoutQueue queue = new CheckoutQueue();
390 queue.setName( key );
391 queue.setTask( checkoutTask );
392 currentCheckoutTasks.add( queue );
393 }
394 }
395 catch ( BuildManagerException e )
396 {
397 addActionError( e.getMessage() );
398 return ERROR;
399 }
400
401 try
402 {
403
404 Map<String, List<CheckOutTask>> checkouts =
405 getContinuum().getBuildsManager().getProjectsInCheckoutQueues();
406 Set<String> keySet = checkouts.keySet();
407 for ( String key : keySet )
408 {
409 for ( CheckOutTask task : checkouts.get( key ) )
410 {
411 CheckoutQueue queue = new CheckoutQueue();
412 queue.setName( key );
413 queue.setTask( task );
414 checkoutsInQueue.add( queue );
415 }
416 }
417 }
418 catch ( BuildManagerException e )
419 {
420 addActionError( e.getMessage() );
421 return ERROR;
422 }
423 }
424
425 return SUCCESS;
426 }
427
428 public String remove()
429 throws Exception
430 {
431 try
432 {
433 checkManageQueuesAuthorization();
434 }
435 catch ( AuthorizationRequiredException authzE )
436 {
437 addActionError( authzE.getMessage() );
438 return REQUIRES_AUTHORIZATION;
439 }
440 catch ( AuthenticationRequiredException e )
441 {
442 addActionError( e.getMessage() );
443 return REQUIRES_AUTHENTICATION;
444 }
445
446 getContinuum().getBuildsManager().removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger,
447 projectName, projectGroupId );
448 Project project = getContinuum().getProject( projectId );
449 project.setState( project.getOldState() );
450 getContinuum().updateProject( project );
451
452 return SUCCESS;
453 }
454
455 public String removeBuildEntries()
456 throws Exception
457 {
458 try
459 {
460 checkManageQueuesAuthorization();
461 }
462 catch ( AuthorizationRequiredException authzE )
463 {
464 addActionError( authzE.getMessage() );
465 return REQUIRES_AUTHORIZATION;
466 }
467 catch ( AuthenticationRequiredException e )
468 {
469 addActionError( e.getMessage() );
470 return REQUIRES_AUTHENTICATION;
471 }
472
473 getContinuum().getBuildsManager().removeProjectsFromBuildQueueWithHashcodes(
474 listToIntArray( this.getSelectedBuildTaskHashCodes() ) );
475 return SUCCESS;
476 }
477
478 public String removeCheckoutEntries()
479 throws Exception
480 {
481 try
482 {
483 checkManageQueuesAuthorization();
484 }
485 catch ( AuthorizationRequiredException authzE )
486 {
487 addActionError( authzE.getMessage() );
488 return REQUIRES_AUTHORIZATION;
489 }
490 catch ( AuthenticationRequiredException e )
491 {
492 addActionError( e.getMessage() );
493 return REQUIRES_AUTHENTICATION;
494 }
495
496 getContinuum().getBuildsManager().removeProjectsFromCheckoutQueueWithHashcodes(
497 listToIntArray( this.getSelectedCheckOutTaskHashCodes() ) );
498 return SUCCESS;
499 }
500
501 public String removePrepareBuildEntry()
502 throws Exception
503 {
504 try
505 {
506 checkManageQueuesAuthorization();
507 }
508 catch ( AuthorizationRequiredException authzE )
509 {
510 addActionError( authzE.getMessage() );
511 return REQUIRES_AUTHORIZATION;
512 }
513 catch ( AuthenticationRequiredException e )
514 {
515 addActionError( e.getMessage() );
516 return REQUIRES_AUTHENTICATION;
517 }
518
519 getContinuum().getBuildsManager().removeProjectFromPrepareBuildQueue( projectGroupId, scmRootId );
520 return SUCCESS;
521 }
522
523 public String removePrepareBuildEntries()
524 throws Exception
525 {
526 try
527 {
528 checkManageQueuesAuthorization();
529 }
530 catch ( AuthorizationRequiredException authzE )
531 {
532 addActionError( authzE.getMessage() );
533 return REQUIRES_AUTHORIZATION;
534 }
535 catch ( AuthenticationRequiredException e )
536 {
537 addActionError( e.getMessage() );
538 return REQUIRES_AUTHENTICATION;
539 }
540
541 getContinuum().getBuildsManager().removeProjectsFromPrepareBuildQueueWithHashCodes(
542 listToIntArray( this.selectedPrepareBuildTaskHashCodes ) );
543 return SUCCESS;
544 }
545
546 public String cancelDistributedBuild()
547 throws Exception
548 {
549 try
550 {
551 checkManageQueuesAuthorization();
552 }
553 catch ( AuthorizationRequiredException authzE )
554 {
555 addActionError( authzE.getMessage() );
556 return REQUIRES_AUTHORIZATION;
557 }
558 catch ( AuthenticationRequiredException e )
559 {
560 addActionError( e.getMessage() );
561 return REQUIRES_AUTHENTICATION;
562 }
563
564 getContinuum().getDistributedBuildManager().cancelDistributedBuild( buildAgentUrl );
565
566 return SUCCESS;
567 }
568
569 public String removeDistributedPrepareBuildEntry()
570 throws Exception
571 {
572 try
573 {
574 checkManageQueuesAuthorization();
575 }
576 catch ( AuthorizationRequiredException authzE )
577 {
578 addActionError( authzE.getMessage() );
579 return REQUIRES_AUTHORIZATION;
580 }
581 catch ( AuthenticationRequiredException e )
582 {
583 addActionError( e.getMessage() );
584 return REQUIRES_AUTHENTICATION;
585 }
586
587 getContinuum().getDistributedBuildManager().removeFromPrepareBuildQueue( buildAgentUrl, projectGroupId, scmRootId );
588
589 return SUCCESS;
590 }
591
592 public String removeDistributedPrepareBuildEntries()
593 throws Exception
594 {
595 try
596 {
597 checkManageQueuesAuthorization();
598 }
599 catch ( AuthorizationRequiredException authzE )
600 {
601 addActionError( authzE.getMessage() );
602 return REQUIRES_AUTHORIZATION;
603 }
604 catch ( AuthenticationRequiredException e )
605 {
606 addActionError( e.getMessage() );
607 return REQUIRES_AUTHENTICATION;
608 }
609
610 getContinuum().getDistributedBuildManager().removeFromPrepareBuildQueue( this.getSelectedPrepareBuildTaskHashCodes() );
611
612 return SUCCESS;
613 }
614
615 public String removeDistributedBuildEntry()
616 throws Exception
617 {
618 try
619 {
620 checkManageQueuesAuthorization();
621 }
622 catch ( AuthorizationRequiredException authzE )
623 {
624 addActionError( authzE.getMessage() );
625 return REQUIRES_AUTHORIZATION;
626 }
627 catch ( AuthenticationRequiredException e )
628 {
629 addActionError( e.getMessage() );
630 return REQUIRES_AUTHENTICATION;
631 }
632
633 getContinuum().getDistributedBuildManager().removeFromBuildQueue( buildAgentUrl, projectId, buildDefinitionId );
634
635 return SUCCESS;
636 }
637
638 public String removeDistributedBuildEntries()
639 throws Exception
640 {
641 try
642 {
643 checkManageQueuesAuthorization();
644 }
645 catch ( AuthorizationRequiredException authzE )
646 {
647 addActionError( authzE.getMessage() );
648 return REQUIRES_AUTHORIZATION;
649 }
650 catch ( AuthenticationRequiredException e )
651 {
652 addActionError( e.getMessage() );
653 return REQUIRES_AUTHENTICATION;
654 }
655
656 getContinuum().getDistributedBuildManager().removeFromBuildQueue( this.getSelectedBuildTaskHashCodes() );
657
658 return SUCCESS;
659 }
660
661 private int[] listToIntArray( List<String> strings )
662 {
663 if ( strings == null || strings.isEmpty() )
664 {
665 return new int[0];
666 }
667 int[] array = new int[0];
668 for ( String intString : strings )
669 {
670 array = ArrayUtils.add( array, Integer.parseInt( intString ) );
671 }
672 return array;
673 }
674
675
676
677
678
679 public SecureActionBundle getSecureActionBundle()
680 throws SecureActionException
681 {
682 SecureActionBundle bundle = new SecureActionBundle();
683 bundle.setRequiresAuthentication( true );
684 bundle.addRequiredAuthorization( ContinuumRoleConstants.CONTINUUM_VIEW_QUEUES, Resource.GLOBAL );
685
686 return bundle;
687 }
688
689 private boolean cancelCheckout( int projectId )
690 throws BuildManagerException
691 {
692 Map<String, CheckOutTask> tasks = getContinuum().getBuildsManager().getCurrentCheckouts();
693 if ( tasks != null )
694 {
695 Set<String> keySet = tasks.keySet();
696 for ( String key : keySet )
697 {
698 CheckOutTask task = tasks.get( key );
699 if ( task != null )
700 {
701 if ( task.getProjectId() == projectId )
702 {
703 logger.info( "Cancelling checkout for project " + projectId );
704 return getContinuum().getBuildsManager().cancelCheckout( projectId );
705 }
706 else
707 {
708 logger.warn(
709 "Current task is not for the given projectId (" + projectId + "): " + task.getProjectId() +
710 "; not cancelling checkout" );
711 }
712 }
713 }
714 }
715 else
716 {
717 logger.warn( "No task running - not cancelling checkout" );
718 }
719
720 return false;
721 }
722
723 public int getBuildDefinitionId()
724 {
725 return buildDefinitionId;
726 }
727
728 public void setBuildDefinitionId( int buildDefinitionId )
729 {
730 this.buildDefinitionId = buildDefinitionId;
731 }
732
733 public int getProjectId()
734 {
735 return projectId;
736 }
737
738 public void setProjectId( int projectId )
739 {
740 this.projectId = projectId;
741 }
742
743 public int getTrigger()
744 {
745 return trigger;
746 }
747
748 public void setTrigger( int trigger )
749 {
750 this.trigger = trigger;
751 }
752
753 public String getProjectName()
754 {
755 return projectName;
756 }
757
758 public void setProjectName( String projectName )
759 {
760 this.projectName = projectName;
761 }
762
763 public List<String> getSelectedBuildTaskHashCodes()
764 {
765 return selectedBuildTaskHashCodes;
766 }
767
768 public void setSelectedBuildTaskHashCodes( List<String> selectedBuildTaskHashCodes )
769 {
770 this.selectedBuildTaskHashCodes = selectedBuildTaskHashCodes;
771 }
772
773 public List<String> getSelectedCheckOutTaskHashCodes()
774 {
775 return selectedCheckOutTaskHashCodes;
776 }
777
778 public void setSelectedCheckOutTaskHashCodes( List<String> selectedCheckOutTaskHashCodes )
779 {
780 this.selectedCheckOutTaskHashCodes = selectedCheckOutTaskHashCodes;
781 }
782
783 public List<BuildProjectQueue> getCurrentBuildProjectTasks()
784 {
785 return currentBuildProjectTasks;
786 }
787
788 public void setCurrentBuildProjectTasks( List<BuildProjectQueue> currentBuildProjectTasks )
789 {
790 this.currentBuildProjectTasks = currentBuildProjectTasks;
791 }
792
793 public List<CheckoutQueue> getCurrentCheckoutTasks()
794 {
795 return currentCheckoutTasks;
796 }
797
798 public void setCurrentCheckoutTasks( List<CheckoutQueue> currentCheckoutTasks )
799 {
800 this.currentCheckoutTasks = currentCheckoutTasks;
801 }
802
803 public List<BuildProjectQueue> getBuildsInQueue()
804 {
805 return buildsInQueue;
806 }
807
808 public void setBuildsInQueue( List<BuildProjectQueue> buildsInQueue )
809 {
810 this.buildsInQueue = buildsInQueue;
811 }
812
813 public List<CheckoutQueue> getCheckoutsInQueue()
814 {
815 return checkoutsInQueue;
816 }
817
818 public void setCheckoutsInQueue( List<CheckoutQueue> checkoutsInQueue )
819 {
820 this.checkoutsInQueue = checkoutsInQueue;
821 }
822
823 public List<PrepareBuildSummary> getCurrentDistributedPrepareBuilds()
824 {
825 return currentDistributedPrepareBuilds;
826 }
827
828 public List<DistributedBuildSummary> getCurrentDistributedBuilds()
829 {
830 return currentDistributedBuilds;
831 }
832
833 public List<PrepareBuildSummary> getDistributedPrepareBuildQueues()
834 {
835 return distributedPrepareBuildQueues;
836 }
837
838 public List<DistributedBuildSummary> getDistributedBuildQueues()
839 {
840 return distributedBuildQueues;
841 }
842
843 public List<PrepareBuildSummary> getCurrentPrepareBuilds()
844 {
845 return currentPrepareBuilds;
846 }
847
848 public List<PrepareBuildSummary> getPrepareBuildQueues()
849 {
850 return prepareBuildQueues;
851 }
852
853 public String getBuildAgentUrl()
854 {
855 return buildAgentUrl;
856 }
857
858 public void setBuildAgentUrl( String buildAgentUrl )
859 {
860 this.buildAgentUrl = buildAgentUrl;
861 }
862
863 public void setProjectGroupId( int projectGroupId )
864 {
865 this.projectGroupId = projectGroupId;
866 }
867
868 public void setScmRootId( int scmRootId )
869 {
870 this.scmRootId = scmRootId;
871 }
872
873 public void setSelectedPrepareBuildTaskHashCodes( List<String> selectedPrepareBuildTaskHashCodes )
874 {
875 this.selectedPrepareBuildTaskHashCodes = selectedPrepareBuildTaskHashCodes;
876 }
877
878 public List<String> getSelectedPrepareBuildTaskHashCodes()
879 {
880 return selectedPrepareBuildTaskHashCodes;
881 }
882 }