1 package org.apache.maven.continuum.xmlrpc; 2 3 /* 4 * Licensed to the Apache Software Foundation (ASF) under one 5 * or more contributor license agreements. See the NOTICE file 6 * distributed with this work for additional information 7 * regarding copyright ownership. The ASF licenses this file 8 * to you under the Apache License, Version 2.0 (the 9 * "License"); you may not use this file except in compliance 10 * with the License. You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, 15 * software distributed under the License is distributed on an 16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17 * KIND, either express or implied. See the License for the 18 * specific language governing permissions and limitations 19 * under the License. 20 */ 21 22 import java.util.List; 23 import java.util.Map; 24 25 import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult; 26 import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration; 27 import org.apache.continuum.xmlrpc.repository.LocalRepository; 28 import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration; 29 import org.apache.maven.continuum.xmlrpc.project.AddingResult; 30 import org.apache.maven.continuum.xmlrpc.project.BuildDefinition; 31 import org.apache.maven.continuum.xmlrpc.project.BuildDefinitionTemplate; 32 import org.apache.maven.continuum.xmlrpc.project.BuildProjectTask; 33 import org.apache.maven.continuum.xmlrpc.project.BuildResult; 34 import org.apache.maven.continuum.xmlrpc.project.BuildResultSummary; 35 import org.apache.maven.continuum.xmlrpc.project.Project; 36 import org.apache.maven.continuum.xmlrpc.project.ProjectGroup; 37 import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary; 38 import org.apache.maven.continuum.xmlrpc.project.ProjectNotifier; 39 import org.apache.maven.continuum.xmlrpc.project.ProjectSummary; 40 import org.apache.maven.continuum.xmlrpc.project.Schedule; 41 import org.apache.maven.continuum.xmlrpc.system.Installation; 42 import org.apache.maven.continuum.xmlrpc.system.Profile; 43 import org.apache.maven.continuum.xmlrpc.system.SystemConfiguration; 44 import org.apache.xmlrpc.XmlRpcException; 45 46 /** 47 * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a> 48 * @version $Id: ContinuumService.java 760328 2009-03-31 04:55:00Z evenisse $ 49 */ 50 public interface ContinuumService 51 { 52 // ---------------------------------------------------------------------- 53 // Projects 54 // ---------------------------------------------------------------------- 55 56 /** 57 * Get All projects. 58 * 59 * @param projectGroupId The project group Id 60 * @return List of {@link ProjectSummary} 61 * @throws Exception 62 * @throws XmlRpcException 63 */ 64 List<ProjectSummary> getProjects( int projectGroupId ) 65 throws Exception; 66 67 68 /** 69 * Same method but compatible with standard XMLRPC 70 * 71 * @param projectGroupId The project group Id 72 * @return List of {@link ProjectSummary} as RPC value 73 * @throws Exception 74 */ 75 List<Object> getProjectsRPC( int projectGroupId ) 76 throws Exception; 77 78 79 /** 80 * Get a project. 81 * 82 * @param projectId the project id 83 * @return The project summary 84 * @throws Exception 85 */ 86 ProjectSummary getProjectSummary( int projectId ) 87 throws Exception; 88 89 /** 90 * Same method but compatible with standard XMLRPC 91 * 92 * @param projectId the project id 93 * @return The project summary as RPC value 94 * @throws Exception 95 */ 96 Map<String, Object> getProjectSummaryRPC( int projectId ) 97 throws Exception; 98 99 /** 100 * Get a project with all details. 101 * 102 * @param projectId The project id 103 * @return The project 104 * @throws Exception 105 */ 106 Project getProjectWithAllDetails( int projectId ) 107 throws Exception; 108 109 /** 110 * Same method but compatible with standard XMLRPC 111 * 112 * @param projectId the project id 113 * @return The project as RPC value 114 * @throws Exception 115 */ 116 Map<String, Object> getProjectWithAllDetailsRPC( int projectId ) 117 throws Exception; 118 119 /** 120 * Remove a project. 121 * 122 * @param projectId The project id 123 * @throws Exception 124 */ 125 int removeProject( int projectId ) 126 throws Exception; 127 128 /** 129 * Update a project. Useful to change the scm parameters. 130 * 131 * @param project The project to update 132 * @throws Exception 133 */ 134 ProjectSummary updateProject( ProjectSummary project ) 135 throws Exception; 136 137 /** 138 * Same method but compatible with standard XMLRPC 139 * 140 * @param project The project to update 141 * @return The project as RPC value 142 * @throws Exception 143 */ 144 Map<String, Object> updateProjectRPC( Map<String, Object> project ) 145 throws Exception; 146 // ---------------------------------------------------------------------- 147 // Projects Groups 148 // ---------------------------------------------------------------------- 149 150 /** 151 * Get a project groups. 152 * 153 * @param projectGroupId the id 154 * @return project group 155 * @throws Exception 156 */ 157 ProjectGroup getProjectGroup( int projectGroupId ) 158 throws Exception; 159 160 /** 161 * Same method but compatible with standard XMLRPC 162 * 163 * @param projectGroupId the id 164 * @return project group as RPC value 165 * @throws Exception 166 */ 167 Map<String, Object> getProjectGroupRPC( int projectGroupId ) 168 throws Exception; 169 170 /** 171 * Get all project groups. 172 * 173 * @return All project groups 174 * @throws Exception 175 */ 176 List<ProjectGroupSummary> getAllProjectGroups() 177 throws Exception; 178 179 /** 180 * Same method but compatible with standard XMLRPC 181 * 182 * @return List of {@link ProjectGroupSummary} as RPC value 183 * @throws Exception 184 */ 185 List<Object> getAllProjectGroupsRPC() 186 throws Exception; 187 188 /** 189 * Get all project groups with all details (project summaries, notifiers, build definitions). 190 * 191 * @return All project groups 192 * @throws Exception 193 */ 194 List<ProjectGroup> getAllProjectGroupsWithAllDetails() 195 throws Exception; 196 197 /** 198 * Same method but compatible with standard XMLRPC 199 * 200 * @return List of {@link ProjectGroup} as RPC value 201 * @throws Exception 202 */ 203 List<Object> getAllProjectGroupsWithAllDetailsRPC() 204 throws Exception; 205 206 /** 207 * Get all project groups with all details. 208 * 209 * @return All project groups 210 * @throws Exception 211 * @deprecated 212 */ 213 List<ProjectGroup> getAllProjectGroupsWithProjects() 214 throws Exception; 215 216 /** 217 * Get a project group. 218 * 219 * @param projectGroupId The project group id 220 * @return The project group summary 221 * @throws Exception 222 */ 223 ProjectGroupSummary getProjectGroupSummary( int projectGroupId ) 224 throws Exception; 225 226 /** 227 * Same method but compatible with standard XMLRPC 228 * 229 * @param projectGroupId The project group id 230 * @return The project group summary as RPC value 231 * @throws Exception 232 */ 233 Map<String, Object> getProjectGroupSummaryRPC( int projectGroupId ) 234 throws Exception; 235 236 /** 237 * Get a project group with all details. 238 * 239 * @param projectGroupId The project group id 240 * @return The project group 241 * @throws Exception 242 */ 243 ProjectGroup getProjectGroupWithProjects( int projectGroupId ) 244 throws Exception; 245 246 /** 247 * Same method but compatible with standard XMLRPC 248 * 249 * @param projectGroupId The project group id 250 * @return The project group as RPC value 251 * @throws Exception 252 */ 253 Map<String, Object> getProjectGroupWithProjectsRPC( int projectGroupId ) 254 throws Exception; 255 256 /** 257 * Remove a project group. 258 * 259 * @param projectGroupId The project group id 260 * @throws Exception 261 */ 262 int removeProjectGroup( int projectGroupId ) 263 throws Exception; 264 265 /** 266 * Update a project Group. 267 * 268 * @param projectGroup The project group to update 269 * @throws Exception 270 */ 271 ProjectGroupSummary updateProjectGroup( ProjectGroupSummary projectGroup ) 272 throws Exception; 273 274 /** 275 * Same method but compatible with standard XMLRPC 276 * 277 * @param projectGroup The project group to update 278 * @return The project group as RPC value 279 * @throws Exception 280 */ 281 Map<String, Object> updateProjectGroupRPC( Map<String, Object> projectGroup ) 282 throws Exception; 283 284 /** 285 * Add a project Group. 286 * 287 * @param groupName The project group name 288 * @param groupId The project group id 289 * @param description The project group description 290 * @return the project group summary of the created project group 291 * @throws Exception 292 */ 293 ProjectGroupSummary addProjectGroup( String groupName, String groupId, String description ) 294 throws Exception; 295 296 int removeBuildDefinitionFromProjectGroup( int projectGroupId, int buildDefinitionId ) 297 throws Exception; 298 299 /** 300 * Same method but compatible with standard XMLRPC 301 * 302 * @param groupName The project group name 303 * @param groupId The project group id 304 * @param description The project group description 305 * @return the project group summary of the created project group as RPC value 306 * @throws Exception 307 */ 308 Map<String, Object> addProjectGroupRPC( String groupName, String groupId, String description ) 309 throws Exception; 310 311 ProjectNotifier getNotifier( int projectid, int notifierId ) 312 throws Exception; 313 314 Map<String, Object> getNotifierRPC( int projectid, int notifierId ) 315 throws Exception; 316 317 ProjectNotifier getGroupNotifier( int projectgroupid, int notifierId ) 318 throws Exception; 319 320 Map<String, Object> getGroupNotifierRPC( int projectgroupid, int notifierId ) 321 throws Exception; 322 323 ProjectNotifier updateGroupNotifier( int projectgroupid, ProjectNotifier newNotifier ) 324 throws Exception; 325 326 Map<String, Object> updateGroupNotifierRPC( int projectgroupid, Map<String, Object> newNotifier ) 327 throws Exception; 328 329 ProjectNotifier updateNotifier( int projectid, ProjectNotifier newNotifier ) 330 throws Exception; 331 332 Map<String, Object> updateNotifierRPC( int projectid, Map<String, Object> newNotifier ) 333 throws Exception; 334 335 int removeGroupNotifier( int projectgroupid, int notifierId ) 336 throws Exception; 337 338 int removeNotifier( int projectid, int notifierId ) 339 throws Exception; 340 341 ProjectNotifier addNotifier( int projectid, ProjectNotifier newNotifier ) 342 throws Exception; 343 344 ProjectNotifier addGroupNotifier( int projectgroupid, ProjectNotifier newNotifier ) 345 throws Exception; 346 347 Map<String, Object> addNotifierRPC( int projectid, Map<String, Object> newNotifier ) 348 throws Exception; 349 350 Map<String, Object> addGroupNotifierRPC( int projectgroupid, Map<String, Object> newNotifier ) 351 throws Exception; 352 353 // ---------------------------------------------------------------------- 354 // Build Definitions 355 // ---------------------------------------------------------------------- 356 357 /** 358 * Get the build definitions list of the project. 359 * 360 * @param projectId The project id 361 * @return The build definitions list 362 * @throws Exception 363 */ 364 List<BuildDefinition> getBuildDefinitionsForProject( int projectId ) 365 throws Exception; 366 367 /** 368 * Same method but compatible with standard XMLRPC 369 * 370 * @param projectId The project id 371 * @return The build definitions list as RPC value 372 * @throws Exception 373 */ 374 List<Object> getBuildDefinitionsForProjectRPC( int projectId ) 375 throws Exception; 376 377 /** 378 * Get the build definitions list of the project group. 379 * 380 * @param projectGroupId The project group id 381 * @return The build definitions list 382 * @throws Exception 383 */ 384 List<BuildDefinition> getBuildDefinitionsForProjectGroup( int projectGroupId ) 385 throws Exception; 386 387 /** 388 * Same method but compatible with standard XMLRPC 389 * 390 * @param projectGroupId The project group id 391 * @return The build definitions list as RPC value 392 * @throws Exception 393 */ 394 List<Object> getBuildDefinitionsForProjectGroupRPC( int projectGroupId ) 395 throws Exception; 396 397 /** 398 * Update a project build definition. 399 * 400 * @param projectId The project id 401 * @param buildDef The build defintion to update 402 * @return the updated build definition 403 * @throws Exception 404 */ 405 BuildDefinition updateBuildDefinitionForProject( int projectId, BuildDefinition buildDef ) 406 throws Exception; 407 408 /** 409 * Same method but compatible with standard XMLRPC 410 * 411 * @param projectId The project id 412 * @param buildDef The build defintion to update 413 * @return the updated build definition as RPC value 414 * @throws Exception 415 */ 416 Map<String, Object> updateBuildDefinitionForProjectRPC( int projectId, Map<String, Object> buildDef ) 417 throws Exception; 418 419 /** 420 * Update a project group build definition. 421 * 422 * @param projectGroupId The project group id 423 * @param buildDef The build defintion to update 424 * @return the updated build definition 425 * @throws Exception 426 */ 427 BuildDefinition updateBuildDefinitionForProjectGroup( int projectGroupId, BuildDefinition buildDef ) 428 throws Exception; 429 430 /** 431 * Same method but compatible with standard XMLRPC 432 * 433 * @param projectGroupId The project group id 434 * @param buildDef The build defintion to update 435 * @return the updated build definition as RPC value 436 * @throws Exception 437 */ 438 Map<String, Object> updateBuildDefinitionForProjectGroupRPC( int projectGroupId, Map<String, Object> buildDef ) 439 throws Exception; 440 441 /** 442 * Add a project build definition. 443 * 444 * @param projectId The project id 445 * @param buildDef The build defintion to update 446 * @return the added build definition 447 * @throws Exception 448 */ 449 BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDef ) 450 throws Exception; 451 452 /** 453 * Same method but compatible with standard XMLRPC 454 * 455 * @param projectId The project id 456 * @param buildDef The build defintion to update 457 * @return the added build definition as RPC value 458 * @throws Exception 459 */ 460 Map<String, Object> addBuildDefinitionToProjectRPC( int projectId, Map<String, Object> buildDef ) 461 throws Exception; 462 463 /** 464 * Add a project group buildDefinition. 465 * 466 * @param projectGroupId The project group id 467 * @param buildDef The build defintion to update 468 * @return the build definition added 469 * @throws Exception 470 */ 471 BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition buildDef ) 472 throws Exception; 473 474 /** 475 * Same method but compatible with standard XMLRPC 476 * 477 * @param projectGroupId The project group id 478 * @param buildDef The build defintion to update 479 * @return the added build definition as RPC value 480 * @throws Exception 481 */ 482 Map<String, Object> addBuildDefinitionToProjectGroupRPC( int projectGroupId, Map<String, Object> buildDef ) 483 throws Exception; 484 485 /** 486 * Get the build definition templates list. 487 * 488 * @return The build definitions templates list 489 * @throws Exception 490 */ 491 List<BuildDefinitionTemplate> getBuildDefinitionTemplates() 492 throws Exception; 493 494 /** 495 * Same method but compatible with standard XMLRPC 496 * 497 * @return The build definitions templates list as RPC value 498 * @throws Exception 499 */ 500 List<Object> getBuildDefinitionTemplatesRPC() 501 throws Exception; 502 // ---------------------------------------------------------------------- 503 // Building 504 // ---------------------------------------------------------------------- 505 506 /** 507 * Add the project to the build queue. 508 * 509 * @param projectId The project id 510 * @throws Exception 511 */ 512 int addProjectToBuildQueue( int projectId ) 513 throws Exception; 514 515 /** 516 * Add the project to the build queue. 517 * 518 * @param projectId The project id 519 * @param buildDefinitionId The build definition id 520 * @throws Exception 521 */ 522 int addProjectToBuildQueue( int projectId, int buildDefinitionId ) 523 throws Exception; 524 525 /** 526 * Build the project 527 * 528 * @param projectId The project id 529 * @throws Exception 530 */ 531 int buildProject( int projectId ) 532 throws Exception; 533 534 /** 535 * Build the project 536 * 537 * @param projectId The project id 538 * @param buildDefinitionId The build definition id 539 * @throws Exception 540 */ 541 int buildProject( int projectId, int buildDefinitionId ) 542 throws Exception; 543 544 /** 545 * Build the project group with the default build definition. 546 * 547 * @param projectGroupId The project group id 548 * @throws Exception 549 */ 550 int buildGroup( int projectGroupId ) 551 throws Exception; 552 553 /** 554 * Build the project group with the specified build definition. 555 * 556 * @param projectGroupId The project group id 557 * @param buildDefinitionId The build definition id 558 * @throws Exception 559 */ 560 int buildGroup( int projectGroupId, int buildDefinitionId ) 561 throws Exception; 562 563 // ---------------------------------------------------------------------- 564 // Build Results 565 // ---------------------------------------------------------------------- 566 567 /** 568 * Returns the latest build result for the project. 569 * 570 * @param projectId The project id 571 * @return The build result 572 * @throws Exception 573 */ 574 BuildResult getLatestBuildResult( int projectId ) 575 throws Exception; 576 577 /** 578 * Same method but compatible with standard XMLRPC 579 * 580 * @param projectId The project id 581 * @return The build result as RPC value 582 * @throws Exception 583 */ 584 Map<String, Object> getLatestBuildResultRPC( int projectId ) 585 throws Exception; 586 587 /** 588 * Returns the build result. 589 * 590 * @param projectId The project id 591 * @param buildId The build id 592 * @return The build result 593 * @throws Exception 594 */ 595 BuildResult getBuildResult( int projectId, int buildId ) 596 throws Exception; 597 598 /** 599 * Same method but compatible with standard XMLRPC 600 * 601 * @param projectId The project id 602 * @param buildId The build id 603 * @return The build result as RPC value 604 * @throws Exception 605 */ 606 Map<String, Object> getBuildResultRPC( int projectId, int buildId ) 607 throws Exception; 608 609 /** 610 * Returns the project build result summary list. 611 * 612 * @param projectId The project id 613 * @return The build result list 614 * @throws Exception 615 */ 616 List<BuildResultSummary> getBuildResultsForProject( int projectId ) 617 throws Exception; 618 619 /** 620 * Same method but compatible with standard XMLRPC 621 * 622 * @param projectId The project id 623 * @return The build result list as RPC value 624 * @throws Exception 625 */ 626 List<Object> getBuildResultsForProjectRPC( int projectId ) 627 throws Exception; 628 629 /** 630 * Remove the project build result. 631 * 632 * @param br The project build result 633 * @return 0 634 * @throws Exception 635 */ 636 int removeBuildResult( BuildResult br ) 637 throws Exception; 638 639 /** 640 * Same method but compatible with standard XMLRPC 641 * 642 * @param br The project build result 643 * @return 0 644 * @throws Exception 645 */ 646 int removeBuildResultRPC( Map<String, Object> br ) 647 throws Exception; 648 649 /** 650 * Returns the build output. 651 * 652 * @param projectId The project id 653 * @param buildId The build id 654 * @return The build output 655 * @throws Exception 656 */ 657 String getBuildOutput( int projectId, int buildId ) 658 throws Exception; 659 660 // ---------------------------------------------------------------------- 661 // Maven 2.x projects 662 // ---------------------------------------------------------------------- 663 664 /** 665 * Add a maven 2.x project from an url. 666 * 667 * @param url The POM url 668 * @return The result of the action with the list of projects created 669 * @throws Exception 670 */ 671 AddingResult addMavenTwoProject( String url ) 672 throws Exception; 673 674 /** 675 * Same method but compatible with standard XMLRPC 676 * 677 * @param url The POM url 678 * @return The result of the action with the list of projects created as RPC value 679 * @throws Exception 680 */ 681 Map<String, Object> addMavenTwoProjectRPC( String url ) 682 throws Exception; 683 684 /** 685 * Add a maven 2.x project from an url. 686 * 687 * @param url The POM url 688 * @param projectGroupId The id of the group where projects will be stored 689 * @return The result of the action with the list of projects created 690 * @throws Exception 691 */ 692 AddingResult addMavenTwoProject( String url, int projectGroupId ) 693 throws Exception; 694 695 /** 696 * Same method but compatible with standard XMLRPC 697 * 698 * @param url The POM url 699 * @param projectGroupId The id of the group where projects will be stored 700 * @return The result of the action with the list of projects created as RPC value 701 * @throws Exception 702 */ 703 Map<String, Object> addMavenTwoProjectRPC( String url, int projectGroupId ) 704 throws Exception; 705 706 // ---------------------------------------------------------------------- 707 // Maven 1.x projects 708 // ---------------------------------------------------------------------- 709 710 /** 711 * Add a maven 1.x project from an url. 712 * 713 * @param url The POM url 714 * @param projectGroupId The id of the group where projects will be stored 715 * @return The result of the action with the list of projects created 716 * @throws Exception 717 */ 718 AddingResult addMavenOneProject( String url, int projectGroupId ) 719 throws Exception; 720 721 /** 722 * Same method but compatible with standard XMLRPC 723 * 724 * @param url The POM url 725 * @param projectGroupId The id of the group where projects will be stored 726 * @return The result of the action with the list of projects created as RPC value 727 * @throws Exception 728 */ 729 Map<String, Object> addMavenOneProjectRPC( String url, int projectGroupId ) 730 throws Exception; 731 732 // ---------------------------------------------------------------------- 733 // Maven ANT projects 734 // ---------------------------------------------------------------------- 735 736 /** 737 * Add an ANT project in the specified group. 738 * 739 * @param project The project to add. name, version and scm informations are required 740 * @param projectGroupId The id of the group where projects will be stored 741 * @return The project populated with the id. 742 * @throws Exception 743 */ 744 ProjectSummary addAntProject( ProjectSummary project, int projectGroupId ) 745 throws Exception; 746 747 /** 748 * Same method but compatible with standard XMLRPC 749 * 750 * @param project The project to add. name, version and scm informations are required 751 * @param projectGroupId The id of the group where projects will be stored 752 * @return The project populated with the id as RPC value 753 * @throws Exception 754 */ 755 Map<String, Object> addAntProjectRPC( Map<String, Object> project, int projectGroupId ) 756 throws Exception; 757 758 // ---------------------------------------------------------------------- 759 // Maven Shell projects 760 // ---------------------------------------------------------------------- 761 762 /** 763 * Add an shell project in the specified group. 764 * 765 * @param project The project to add. name, version and scm informations are required 766 * @param projectGroupId The id of the group where projects will be stored 767 * @return The project populated with the id. 768 * @throws Exception 769 */ 770 ProjectSummary addShellProject( ProjectSummary project, int projectGroupId ) 771 throws Exception; 772 773 /** 774 * Same method but compatible with standard XMLRPC 775 * 776 * @param project The project to add. name, version and scm informations are required 777 * @param projectGroupId The id of the group where projects will be stored 778 * @return The project populated with the id as RPC value 779 * @throws Exception 780 */ 781 Map<String, Object> addShellProjectRPC( Map<String, Object> project, int projectGroupId ) 782 throws Exception; 783 784 // ---------------------------------------------------------------------- 785 // ADMIN TASKS 786 // ---------------------------------------------------------------------- 787 788 // ---------------------------------------------------------------------- 789 // Schedules 790 // ---------------------------------------------------------------------- 791 792 /** 793 * Return the schedules list. 794 * 795 * @return The schedule list. 796 * @throws Exception 797 */ 798 List<Schedule> getSchedules() 799 throws Exception; 800 801 /** 802 * Same method but compatible with standard XMLRPC 803 * 804 * @return The schedule list as RPC value. 805 * @throws Exception 806 */ 807 List<Object> getSchedulesRPC() 808 throws Exception; 809 810 /** 811 * Return the schedule defined by this id. 812 * 813 * @param scheduleId The schedule id 814 * @return The schedule. 815 * @throws Exception 816 */ 817 Schedule getSchedule( int scheduleId ) 818 throws Exception; 819 820 /** 821 * Same method but compatible with standard XMLRPC 822 * 823 * @param scheduleId The schedule id 824 * @return The schedule as RPC value. 825 * @throws Exception 826 */ 827 Map<String, Object> getScheduleRPC( int scheduleId ) 828 throws Exception; 829 830 /** 831 * Add the schedule. 832 * 833 * @param schedule The schedule 834 * @return The schedule. 835 * @throws Exception 836 */ 837 Schedule addSchedule( Schedule schedule ) 838 throws Exception; 839 840 /** 841 * Same method but compatible with standard XMLRPC 842 * 843 * @param schedule The schedule 844 * @return The schedule as RPC value. 845 * @throws Exception 846 */ 847 Map<String, Object> addScheduleRPC( Map<String, Object> schedule ) 848 throws Exception; 849 850 /** 851 * Update the schedule. 852 * 853 * @param schedule The schedule 854 * @return The schedule. 855 * @throws Exception 856 */ 857 Schedule updateSchedule( Schedule schedule ) 858 throws Exception; 859 860 /** 861 * Same method but compatible with standard XMLRPC 862 * 863 * @param schedule The schedule 864 * @return The schedule as RPC value. 865 * @throws Exception 866 */ 867 Map<String, Object> updateScheduleRPC( Map<String, Object> schedule ) 868 throws Exception; 869 870 // ---------------------------------------------------------------------- 871 // Profiles 872 // ---------------------------------------------------------------------- 873 874 /** 875 * Return the profiles list. 876 * 877 * @return The profiles list. 878 * @throws Exception 879 */ 880 List<Profile> getProfiles() 881 throws Exception; 882 883 /** 884 * Same method but compatible with standard XMLRPC 885 * 886 * @return The profiles list as RPC value. 887 * @throws Exception 888 */ 889 List<Object> getProfilesRPC() 890 throws Exception; 891 892 /** 893 * Return the profile defined by this id. 894 * 895 * @param profileId The profile id 896 * @return The profile. 897 * @throws Exception 898 */ 899 Profile getProfile( int profileId ) 900 throws Exception; 901 902 /** 903 * Same method but compatible with standard XMLRPC 904 * 905 * @param profileId The profile id 906 * @return The profile. 907 * @throws Exception 908 */ 909 Map<String, Object> getProfileRPC( int profileId ) 910 throws Exception; 911 912 Profile addProfile( Profile profile ) 913 throws Exception; 914 915 int updateProfile( Profile profile ) 916 throws Exception; 917 918 int deleteProfile( int profileId ) 919 throws Exception; 920 921 Map<String, Object> addProfileRPC( Map<String, Object> profile ) 922 throws Exception; 923 924 int updateProfileRPC( Map<String, Object> profile ) 925 throws Exception; 926 927 // ---------------------------------------------------------------------- 928 // Installations 929 // ---------------------------------------------------------------------- 930 931 /** 932 * Return the installations list. 933 * 934 * @return The installations list. 935 * @throws Exception 936 */ 937 List<Installation> getInstallations() 938 throws Exception; 939 940 /** 941 * Same method but compatible with standard XMLRPC 942 * 943 * @return The installations list. 944 * @throws Exception 945 */ 946 List<Object> getInstallationsRPC() 947 throws Exception; 948 949 /** 950 * Return the installation defined by this id. 951 * 952 * @param installationId The installation id 953 * @return The installation. 954 * @throws Exception 955 */ 956 Installation getInstallation( int installationId ) 957 throws Exception; 958 959 /** 960 * Same method but compatible with standard XMLRPC 961 * 962 * @param installationId The installation id 963 * @return The installation. 964 * @throws Exception 965 */ 966 Map<String, Object> getInstallationRPC( int installationId ) 967 throws Exception; 968 969 Installation addInstallation( Installation installation ) 970 throws Exception; 971 972 int updateInstallation( Installation installation ) 973 throws Exception; 974 975 int deleteInstallation( int installationId ) 976 throws Exception; 977 978 Map<String, Object> addInstallationRPC( Map<String, Object> installation ) 979 throws Exception; 980 981 int updateInstallationRPC( Map<String, Object> installation ) 982 throws Exception; 983 984 // ---------------------------------------------------------------------- 985 // SystemConfiguration 986 // ---------------------------------------------------------------------- 987 988 SystemConfiguration getSystemConfiguration() 989 throws Exception; 990 991 Map<String, Object> getSystemConfigurationRPC() 992 throws Exception; 993 994 // ---------------------------------------------------------------------- 995 // Queue 996 // ---------------------------------------------------------------------- 997 998 999 /** 1000 * Return true is the project is in building queue. 1001 * 1002 * @param projectGroupId The project group id 1003 * @throws ContinuumException 1004 */ 1005 boolean isProjectInBuildingQueue( int projectId ) 1006 throws Exception; 1007 1008 /** 1009 * Return projects building queue. 1010 * 1011 * @throws ContinuumException 1012 */ 1013 public List<BuildProjectTask> getProjectsInBuildQueue() 1014 throws Exception; 1015 1016 /** 1017 * Remove projects from build queue 1018 * 1019 * @param projectsId project id to be removed from the building queue 1020 * @return 1021 * @throws Exception 1022 */ 1023 int removeProjectsFromBuildingQueue( int[] projectsId ) 1024 throws Exception; 1025 1026 /** 1027 * Cancel the current project build 1028 * 1029 * @return 1030 * @throws Exception 1031 */ 1032 boolean cancelCurrentBuild() 1033 throws Exception; 1034 1035 // ---------------------------------------------------------------------- 1036 // TODO:Users 1037 // ---------------------------------------------------------------------- 1038 1039 // ---------------------------------------------------------------------- 1040 // Utils 1041 // ---------------------------------------------------------------------- 1042 1043 boolean ping() 1044 throws Exception; 1045 1046 // ---------------------------------------------------------------------- 1047 // Local Repository 1048 // ---------------------------------------------------------------------- 1049 1050 /** 1051 * Add a local repository 1052 * 1053 * @param repository the local repository to add 1054 * @return 1055 * @throws Exception 1056 */ 1057 LocalRepository addLocalRepository( LocalRepository repository ) 1058 throws Exception; 1059 1060 /** 1061 * Same method but compatible with the standard XMLRPC 1062 * 1063 * @param repository the local repository to add 1064 * @return 1065 * @throws Exception 1066 */ 1067 Map<String, Object> addLocalRepositoryRPC( Map<String, Object> repository ) 1068 throws Exception; 1069 1070 /** 1071 * Update the local repository 1072 * 1073 * @param repository the local repository to update 1074 * @return 1075 * @throws Exception 1076 */ 1077 int updateLocalRepository( LocalRepository repository ) 1078 throws Exception; 1079 1080 /** 1081 * Same method but compatible with the standard XMLRPC 1082 * 1083 * @param repository the local repository to update 1084 * @return 1085 * @throws Exception 1086 */ 1087 int updateLocalRepositoryRPC( Map<String, Object> repository ) 1088 throws Exception; 1089 1090 /** 1091 * Remove the local repository 1092 * 1093 * @param repositoryId 1094 * @return 1095 * @throws Exception 1096 */ 1097 int removeLocalRepository( int repositoryId ) 1098 throws Exception; 1099 1100 /** 1101 * Returns the local repository 1102 * 1103 * @param repositoryId the local repository id 1104 * @return 1105 * @throws Exception 1106 */ 1107 LocalRepository getLocalRepository( int repositoryId ) 1108 throws Exception; 1109 1110 /** 1111 * Same method but compatible with the standard XMLRPC 1112 * 1113 * @param repositoryId 1114 * @return 1115 * @throws Exception 1116 */ 1117 Map<String, Object> getLocalRepositoryRPC( int repositoryId ) 1118 throws Exception; 1119 1120 /** 1121 * Returns all local repositories 1122 * 1123 * @return 1124 * @throws Exception 1125 */ 1126 List<LocalRepository> getAllLocalRepositories() 1127 throws Exception; 1128 1129 /** 1130 * Same method but compatible with the standard XMLRPC 1131 * 1132 * @return 1133 * @throws Exception 1134 */ 1135 List<Object> getAllLocalRepositoriesRPC() 1136 throws Exception; 1137 1138 // ---------------------------------------------------------------------- 1139 // Purging 1140 // ---------------------------------------------------------------------- 1141 1142 /** 1143 * Add a repository purge configuration 1144 * 1145 * @param repoPurge the repository purge configuration 1146 * @return 1147 * @throws Exception 1148 */ 1149 RepositoryPurgeConfiguration addRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge ) 1150 throws Exception; 1151 1152 /** 1153 * Same method but compatible with the standard XMLRPC 1154 * 1155 * @param repoPurge the repository purge configuration 1156 * @return 1157 * @throws Exception 1158 */ 1159 Map<String, Object> addRepositoryPurgeConfigurationRPC( Map<String, Object> repoPurge ) 1160 throws Exception; 1161 1162 /** 1163 * Update the repository purge configuration 1164 * 1165 * @param repoPurge the repository purge configuration 1166 * @return 1167 * @throws Exception 1168 */ 1169 int updateRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge ) 1170 throws Exception; 1171 1172 /** 1173 * Same method but compatible with the standard XMLRPC 1174 * 1175 * @param repoPurge the repository purge configuration 1176 * @return 1177 * @throws Exception 1178 */ 1179 int updateRepositoryPurgeConfigurationRPC( Map<String, Object> repoPurge ) 1180 throws Exception; 1181 1182 /** 1183 * Remove repository purge configuration 1184 * 1185 * @param repoPurgeId the repository purge configuration id 1186 * @return 1187 * @throws Exception 1188 */ 1189 int removeRepositoryPurgeConfiguration( int repoPurgeId ) 1190 throws Exception; 1191 1192 /** 1193 * Returns the repository purge configuration 1194 * 1195 * @param purgeConfigId the repository purge configuration id 1196 * @return the repository purge configuration 1197 * @throws Exception 1198 */ 1199 RepositoryPurgeConfiguration getRepositoryPurgeConfiguration( int repoPurgeId ) 1200 throws Exception; 1201 1202 /** 1203 * Same method but compatible with standard XMLRPC 1204 * 1205 * @param purgeConfigId the repository purge configuration id 1206 * @return the repository purge configuration 1207 * @throws Exception 1208 */ 1209 Map<String, Object> getRepositoryPurgeConfigurationRPC( int purgeConfigId ) 1210 throws Exception; 1211 1212 /** 1213 * Returns repository purge configurations list 1214 * 1215 * @return list of repository purge configurations 1216 * @throws Exception 1217 */ 1218 List<RepositoryPurgeConfiguration> getAllRepositoryPurgeConfigurations() 1219 throws Exception; 1220 1221 /** 1222 * Same method but compatible with standard XMLRPC 1223 * 1224 * @return list of repository purge configurations 1225 * @throws Exception 1226 */ 1227 List<Object> getAllRepositoryPurgeConfigurationsRPC() 1228 throws Exception; 1229 1230 /** 1231 * Add a directory purge configuration 1232 * 1233 * @param dirPurge the directory purge configuration 1234 * @return 1235 * @throws Exception 1236 */ 1237 DirectoryPurgeConfiguration addDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge ) 1238 throws Exception; 1239 1240 /** 1241 * Same method but compatible with the standard XMLRPC 1242 * 1243 * @param dirPurge the directory purge configuration 1244 * @return 1245 * @throws Exception 1246 */ 1247 Map<String, Object> addDirectoryPurgeConfigurationRPC( Map<String, Object> dirPurge ) 1248 throws Exception; 1249 1250 /** 1251 * Update the directory purge configuration 1252 * 1253 * @param dirPurge the directory purge configuration 1254 * @return 1255 * @throws Exception 1256 */ 1257 int updateDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge ) 1258 throws Exception; 1259 1260 /** 1261 * Same method but compatible with the standard XMLRPC 1262 * 1263 * @param dirPurge the directory purge configuration 1264 * @return 1265 * @throws Exception 1266 */ 1267 int updateDirectoryPurgeConfigurationRPC( Map<String, Object> dirPurge ) 1268 throws Exception; 1269 1270 /** 1271 * Removes the directory purge configuration 1272 * 1273 * @param dirPurgeId the directory purge configuration id 1274 * @return 1275 * @throws Exception 1276 */ 1277 int removeDirectoryPurgeConfiguration( int dirPurgeId ) 1278 throws Exception; 1279 1280 /** 1281 * Returns the directory purge configuration 1282 * 1283 * @param purgeConfigId the directory purge configuration id 1284 * @return the directory purge configuration 1285 * @throws Exception 1286 */ 1287 DirectoryPurgeConfiguration getDirectoryPurgeConfiguration( int purgeConfigId ) 1288 throws Exception; 1289 1290 /** 1291 * Same method but compatible with standard XMLRPC 1292 * 1293 * @param purgeConfigId the directory purge configuration id 1294 * @return the directory purge configuration 1295 * @throws Exception 1296 */ 1297 Map<String, Object> getDirectoryPurgeConfigurationRPC( int purgeConfigId ) 1298 throws Exception; 1299 1300 /** 1301 * Returns directory purge configurations list 1302 * 1303 * @return list of directory purge configurations 1304 * @throws Exception 1305 */ 1306 List<DirectoryPurgeConfiguration> getAllDirectoryPurgeConfigurations() 1307 throws Exception; 1308 1309 /** 1310 * Same method but compatible with standard XMLRPC 1311 * 1312 * @return list of directory purge configurations 1313 * @throws Exception 1314 */ 1315 List<Object> getAllDirectoryPurgeConfigurationsRPC() 1316 throws Exception; 1317 1318 void purgeLocalRepository( int repoPurgeId ) 1319 throws Exception; 1320 1321 void purgeDirectory( int dirPurgeId ) 1322 throws Exception; 1323 1324 // ---------------------------------------------------------------------- 1325 // Release Results 1326 // ---------------------------------------------------------------------- 1327 1328 /** 1329 * Returns the release result. 1330 * 1331 * @param releaseId The release id 1332 * @return The release result 1333 * @throws Exception 1334 */ 1335 ContinuumReleaseResult getReleaseResult( int releaseId ) 1336 throws Exception; 1337 1338 /** 1339 * Same method but compatible with standard XMLRPC 1340 * 1341 * @param releaseId The release id 1342 * @return The release result as RPC value 1343 * @throws Exception 1344 */ 1345 Map<String, Object> getReleaseResultRPC( int releaseId ) 1346 throws Exception; 1347 1348 /** 1349 * Returns the project group release result list. 1350 * 1351 * @param projectGroupId The project group id 1352 * @return The release result list 1353 * @throws Exception 1354 */ 1355 List<ContinuumReleaseResult> getReleaseResultsForProjectGroup( int projectGroupId ) 1356 throws Exception; 1357 1358 /** 1359 * Same method but compatible with standard XMLRPC 1360 * 1361 * @param projectGroupId The project group id 1362 * @return The release result list as RPC value 1363 * @throws Exception 1364 */ 1365 List<Object> getReleaseResultsForProjectGroupRPC( int projectGroupId ) 1366 throws Exception; 1367 1368 /** 1369 * Remove the project release result. 1370 * 1371 * @param releaseResult The project release result 1372 * @return 0 1373 * @throws Exception 1374 */ 1375 int removeReleaseResult( ContinuumReleaseResult releaseResult ) 1376 throws Exception; 1377 1378 /** 1379 * Same method but compatible with standard XMLRPC 1380 * 1381 * @param rr The project release result 1382 * @return 0 1383 * @throws Exception 1384 */ 1385 int removeReleaseResultRPC( Map<String, Object> rr ) 1386 throws Exception; 1387 1388 /** 1389 * Returns the release output. 1390 * 1391 * @param releaseId The release id 1392 * @return The release output 1393 * @throws Exception 1394 */ 1395 String getReleaseOutput( int releaseId ) 1396 throws Exception; 1397 }