All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.continuum.xmlrpc.ContinuumService Maven / Gradle / Ivy

The newest version!
package org.apache.maven.continuum.xmlrpc;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import org.apache.continuum.xmlrpc.release.ContinuumReleaseResult;
import org.apache.continuum.xmlrpc.repository.DirectoryPurgeConfiguration;
import org.apache.continuum.xmlrpc.repository.LocalRepository;
import org.apache.continuum.xmlrpc.repository.RepositoryPurgeConfiguration;
import org.apache.continuum.xmlrpc.utils.BuildTrigger;
import org.apache.maven.continuum.xmlrpc.project.AddingResult;
import org.apache.maven.continuum.xmlrpc.project.BuildAgentConfiguration;
import org.apache.maven.continuum.xmlrpc.project.BuildAgentGroupConfiguration;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinition;
import org.apache.maven.continuum.xmlrpc.project.BuildDefinitionTemplate;
import org.apache.maven.continuum.xmlrpc.project.BuildProjectTask;
import org.apache.maven.continuum.xmlrpc.project.BuildResult;
import org.apache.maven.continuum.xmlrpc.project.BuildResultSummary;
import org.apache.maven.continuum.xmlrpc.project.Project;
import org.apache.maven.continuum.xmlrpc.project.ProjectGroup;
import org.apache.maven.continuum.xmlrpc.project.ProjectGroupSummary;
import org.apache.maven.continuum.xmlrpc.project.ProjectNotifier;
import org.apache.maven.continuum.xmlrpc.project.ProjectScmRoot;
import org.apache.maven.continuum.xmlrpc.project.ProjectSummary;
import org.apache.maven.continuum.xmlrpc.project.ReleaseListenerSummary;
import org.apache.maven.continuum.xmlrpc.project.Schedule;
import org.apache.maven.continuum.xmlrpc.system.Installation;
import org.apache.maven.continuum.xmlrpc.system.Profile;
import org.apache.maven.continuum.xmlrpc.system.SystemConfiguration;

import java.util.List;
import java.util.Map;
import java.util.Properties;

/**
 * @author Emmanuel Venisse
 * @version $Id: ContinuumService.java 1372260 2012-08-13 04:29:09Z brett $
 */
public interface ContinuumService
{
    // ----------------------------------------------------------------------
    // Projects
    // ----------------------------------------------------------------------

    /**
     * Get All projects.
     *
     * @param projectGroupId The project group Id
     * @return List of {@link ProjectSummary}
     * @throws Exception
     */
    List getProjects( int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group Id
     * @return List of {@link ProjectSummary} as RPC value
     * @throws Exception
     */
    List getProjectsRPC( int projectGroupId )
        throws Exception;

    /**
     * Get a project.
     *
     * @param projectId the project id
     * @return The project summary
     * @throws Exception
     */
    ProjectSummary getProjectSummary( int projectId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId the project id
     * @return The project summary as RPC value
     * @throws Exception
     */
    Map getProjectSummaryRPC( int projectId )
        throws Exception;

    /**
     * Get a project with all details.
     *
     * @param projectId The project id
     * @return The project
     * @throws Exception
     */
    Project getProjectWithAllDetails( int projectId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId the project id
     * @return The project as RPC value
     * @throws Exception
     */
    Map getProjectWithAllDetailsRPC( int projectId )
        throws Exception;

    /**
     * Remove a project.
     *
     * @param projectId The project id
     * @throws Exception
     */
    int removeProject( int projectId )
        throws Exception;

    /**
     * Update a project. Useful to change the scm parameters.
     *
     * @param project The project to update
     * @throws Exception
     */
    ProjectSummary updateProject( ProjectSummary project )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param project The project to update
     * @return The project as RPC value
     * @throws Exception
     */
    Map updateProjectRPC( Map project )
        throws Exception;

    // ----------------------------------------------------------------------
    // Projects Groups
    // ----------------------------------------------------------------------

    /**
     * Get a project groups.
     *
     * @param projectGroupId the id
     * @return project group
     * @throws Exception
     */
    ProjectGroup getProjectGroup( int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId the id
     * @return project group as RPC value
     * @throws Exception
     */
    Map getProjectGroupRPC( int projectGroupId )
        throws Exception;

    /**
     * Get all project groups.
     *
     * @return All project groups
     * @throws Exception
     */
    List getAllProjectGroups()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return List of {@link ProjectGroupSummary} as RPC value
     * @throws Exception
     */
    List getAllProjectGroupsRPC()
        throws Exception;

    /**
     * Get all project groups with all details (project summaries, notifiers, build definitions).
     *
     * @return All project groups
     * @throws Exception
     */
    List getAllProjectGroupsWithAllDetails()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return List of {@link ProjectGroup} as RPC value
     * @throws Exception
     */
    List getAllProjectGroupsWithAllDetailsRPC()
        throws Exception;

    /**
     * Get all project groups with all details.
     *
     * @return All project groups
     * @throws Exception
     * @deprecated
     */
    List getAllProjectGroupsWithProjects()
        throws Exception;

    /**
     * Get a project group.
     *
     * @param projectGroupId The project group id
     * @return The project group summary
     * @throws Exception
     */
    ProjectGroupSummary getProjectGroupSummary( int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group id
     * @return The project group summary as RPC value
     * @throws Exception
     */
    Map getProjectGroupSummaryRPC( int projectGroupId )
        throws Exception;

    /**
     * Get a project group with all details.
     *
     * @param projectGroupId The project group id
     * @return The project group
     * @throws Exception
     */
    ProjectGroup getProjectGroupWithProjects( int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group id
     * @return The project group as RPC value
     * @throws Exception
     */
    Map getProjectGroupWithProjectsRPC( int projectGroupId )
        throws Exception;

    /**
     * Remove a project group.
     *
     * @param projectGroupId The project group id
     * @throws Exception
     */
    int removeProjectGroup( int projectGroupId )
        throws Exception;

    /**
     * Update a project Group.
     *
     * @param projectGroup The project group to update
     * @throws Exception
     */
    ProjectGroupSummary updateProjectGroup( ProjectGroupSummary projectGroup )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroup The project group to update
     * @return The project group as RPC value
     * @throws Exception
     */
    Map updateProjectGroupRPC( Map projectGroup )
        throws Exception;

    /**
     * Add a project Group.
     *
     * @param groupName   The project group name
     * @param groupId     The project group id
     * @param description The project group description
     * @return the project group summary of the created project group
     * @throws Exception
     */
    ProjectGroupSummary addProjectGroup( String groupName, String groupId, String description )
        throws Exception;

    int removeBuildDefinitionFromProjectGroup( int projectGroupId, int buildDefinitionId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param groupName   The project group name
     * @param groupId     The project group id
     * @param description The project group description
     * @return the project group summary of the created project group as RPC value
     * @throws Exception
     */
    Map addProjectGroupRPC( String groupName, String groupId, String description )
        throws Exception;

    ProjectNotifier getNotifier( int projectid, int notifierId )
        throws Exception;

    Map getNotifierRPC( int projectid, int notifierId )
        throws Exception;

    ProjectNotifier getGroupNotifier( int projectgroupid, int notifierId )
        throws Exception;

    Map getGroupNotifierRPC( int projectgroupid, int notifierId )
        throws Exception;

    ProjectNotifier updateGroupNotifier( int projectgroupid, ProjectNotifier newNotifier )
        throws Exception;

    Map updateGroupNotifierRPC( int projectgroupid, Map newNotifier )
        throws Exception;

    ProjectNotifier updateNotifier( int projectid, ProjectNotifier newNotifier )
        throws Exception;

    Map updateNotifierRPC( int projectid, Map newNotifier )
        throws Exception;

    int removeGroupNotifier( int projectgroupid, int notifierId )
        throws Exception;

    int removeNotifier( int projectid, int notifierId )
        throws Exception;

    ProjectNotifier addNotifier( int projectid, ProjectNotifier newNotifier )
        throws Exception;

    ProjectNotifier addGroupNotifier( int projectgroupid, ProjectNotifier newNotifier )
        throws Exception;

    Map addNotifierRPC( int projectid, Map newNotifier )
        throws Exception;

    Map addGroupNotifierRPC( int projectgroupid, Map newNotifier )
        throws Exception;

    // ----------------------------------------------------------------------
    // Build Definitions
    // ----------------------------------------------------------------------

    /**
     * Get the build definitions list of the project.
     *
     * @param projectId The project id
     * @return The build definitions list
     * @throws Exception
     */
    List getBuildDefinitionsForProject( int projectId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId The project id
     * @return The build definitions list as RPC value
     * @throws Exception
     */
    List getBuildDefinitionsForProjectRPC( int projectId )
        throws Exception;

    /**
     * Get the build definitions list of the project group.
     *
     * @param projectGroupId The project group id
     * @return The build definitions list
     * @throws Exception
     */
    List getBuildDefinitionsForProjectGroup( int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group id
     * @return The build definitions list as RPC value
     * @throws Exception
     */
    List getBuildDefinitionsForProjectGroupRPC( int projectGroupId )
        throws Exception;

    /**
     * Get the build definition
     *
     * @param buildDefinitionId The build definition id
     * @return The build definition
     * @throws Exception
     */
    BuildDefinition getBuildDefinition( int buildDefinitionId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param buildDefinitionId The build definition id
     * @return The build definition as RPC value
     * @throws Exception
     */
    Map getBuildDefinitionRPC( int buildDefinitionId )
        throws Exception;

    /**
     * Update a project build definition.
     *
     * @param projectId The project id
     * @param buildDef  The build definition to update
     * @return the updated build definition
     * @throws Exception
     */
    BuildDefinition updateBuildDefinitionForProject( int projectId, BuildDefinition buildDef )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId The project id
     * @param buildDef  The build definition to update
     * @return the updated build definition as RPC value
     * @throws Exception
     */
    Map updateBuildDefinitionForProjectRPC( int projectId, Map buildDef )
        throws Exception;

    /**
     * Update a project group build definition.
     *
     * @param projectGroupId The project group id
     * @param buildDef       The build definition to update
     * @return the updated build definition
     * @throws Exception
     */
    BuildDefinition updateBuildDefinitionForProjectGroup( int projectGroupId, BuildDefinition buildDef )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group id
     * @param buildDef       The build definition to update
     * @return the updated build definition as RPC value
     * @throws Exception
     */
    Map updateBuildDefinitionForProjectGroupRPC( int projectGroupId, Map buildDef )
        throws Exception;

    /**
     * Add a project build definition.
     *
     * @param projectId The project id
     * @param buildDef  The build definition to update
     * @return the added build definition
     * @throws Exception
     */
    BuildDefinition addBuildDefinitionToProject( int projectId, BuildDefinition buildDef )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId The project id
     * @param buildDef  The build definition to update
     * @return the added build definition as RPC value
     * @throws Exception
     */
    Map addBuildDefinitionToProjectRPC( int projectId, Map buildDef )
        throws Exception;

    /**
     * Add a project group buildDefinition.
     *
     * @param projectGroupId The project group id
     * @param buildDef       The build definition to update
     * @return the build definition added
     * @throws Exception
     */
    BuildDefinition addBuildDefinitionToProjectGroup( int projectGroupId, BuildDefinition buildDef )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group id
     * @param buildDef       The build definition to update
     * @return the added build definition as RPC value
     * @throws Exception
     */
    Map addBuildDefinitionToProjectGroupRPC( int projectGroupId, Map buildDef )
        throws Exception;

    /**
     * Get the build definition templates list.
     *
     * @return The build definitions templates list
     * @throws Exception
     */
    List getBuildDefinitionTemplates()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return The build definitions templates list as RPC value
     * @throws Exception
     */
    List getBuildDefinitionTemplatesRPC()
        throws Exception;

    // ----------------------------------------------------------------------
    // Building
    // ----------------------------------------------------------------------

    /**
     * Add the project to the build queue.
     *
     * @param projectId The project id
     * @throws Exception
     */
    int addProjectToBuildQueue( int projectId )
        throws Exception;

    /**
     * Add the project to the build queue.
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @throws Exception
     */
    int addProjectToBuildQueue( int projectId, int buildDefinitionId )
        throws Exception;

    /**
     * Build the project
     *
     * @param projectId The project id
     * @throws Exception
     */
    int buildProject( int projectId )
        throws Exception;

    /**
     * Build the project
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @throws Exception
     */
    int buildProject( int projectId, int buildDefinitionId )
        throws Exception;

    /**
     * Forced build the project
     *
     * @param projectId    The project id
     * @param buildTrigger The build trigger
     * @return
     * @throws Exception
     */
    int buildProject( int projectId, BuildTrigger buildTrigger )
        throws Exception;

    /**
     * Forced build the project
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @param buildTrigger      The build trigger
     * @return
     * @throws Exception
     */
    int buildProject( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
        throws Exception;

    /**
     * Build the project group with the default build definition.
     *
     * @param projectGroupId The project group id
     * @throws Exception
     */
    int buildGroup( int projectGroupId )
        throws Exception;

    /**
     * Build the project group with the specified build definition.
     *
     * @param projectGroupId    The project group id
     * @param buildDefinitionId The build definition id
     * @throws Exception
     */
    int buildGroup( int projectGroupId, int buildDefinitionId )
        throws Exception;

    // ----------------------------------------------------------------------
    // SCM roots
    // ----------------------------------------------------------------------

    /**
     * Get the SCM roots for all projects in a project group
     *
     * @param projectGroupId the project group id
     * @return
     * @throws Exception
     */
    List getProjectScmRootByProjectGroup( int projectGroupId )
        throws Exception;

    /**
     * Get the SCM root for a specific project
     *
     * @param projectId the project id
     * @return
     * @throws Exception
     */
    ProjectScmRoot getProjectScmRootByProject( int projectId )
        throws Exception;

    // ----------------------------------------------------------------------
    // Build Results
    // ----------------------------------------------------------------------

    /**
     * Returns the latest build result for the project.
     *
     * @param projectId The project id
     * @return The build result
     * @throws Exception
     */
    BuildResult getLatestBuildResult( int projectId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId The project id
     * @return The build result as RPC value
     * @throws Exception
     */
    Map getLatestBuildResultRPC( int projectId )
        throws Exception;

    /**
     * Returns the build result.
     *
     * @param projectId The project id
     * @param buildId   The build id
     * @return The build result
     * @throws Exception
     */
    BuildResult getBuildResult( int projectId, int buildId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId The project id
     * @param buildId   The build id
     * @return The build result as RPC value
     * @throws Exception
     */
    Map getBuildResultRPC( int projectId, int buildId )
        throws Exception;

    /**
     * Returns the project build result summary list.
     *
     * @param projectId The project id
     * @return The build result list
     * @throws Exception
     */
    List getBuildResultsForProject( int projectId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectId The project id
     * @return The build result list as RPC value
     * @throws Exception
     */
    List getBuildResultsForProjectRPC( int projectId )
        throws Exception;

    /**
     * Remove the project build result.
     *
     * @param br The project build result
     * @return 0
     * @throws Exception
     */
    int removeBuildResult( BuildResult br )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param br The project build result
     * @return 0
     * @throws Exception
     */
    int removeBuildResultRPC( Map br )
        throws Exception;

    /**
     * Returns the build output.
     *
     * @param projectId The project id
     * @param buildId   The build id
     * @return The build output
     * @throws Exception
     */
    String getBuildOutput( int projectId, int buildId )
        throws Exception;

    // ----------------------------------------------------------------------
    // Maven 2.x projects
    // ----------------------------------------------------------------------

    /**
     * Add a maven 2.x project from an url.
     *
     * @param url The POM url
     * @return The result of the action with the list of projects created
     * @throws Exception
     */
    AddingResult addMavenTwoProject( String url )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url The POM url
     * @return The result of the action with the list of projects created as RPC value
     * @throws Exception
     */
    Map addMavenTwoProjectRPC( String url )
        throws Exception;

    /**
     * Add a maven 2.x project from an url.
     *
     * @param url            The POM url
     * @param projectGroupId The id of the group where projects will be stored
     * @return The result of the action with the list of projects created
     * @throws Exception
     */
    AddingResult addMavenTwoProject( String url, int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url            The POM url
     * @param projectGroupId The id of the group where projects will be stored
     * @return The result of the action with the list of projects created as RPC value
     * @throws Exception
     */
    Map addMavenTwoProjectRPC( String url, int projectGroupId )
        throws Exception;

    /**
     * Add a maven 2.x project from an url.
     *
     * @param url            The POM url
     * @param projectGroupId The id of the group where projects will be stored
     * @return The result of the action with the list of projects created
     * @throws Exception
     * @Param checkoutInSingleDirectory Determines whether the project will be stored on a single directory
     */
    AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkoutInSingleDirectory )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url            The POM url
     * @param projectGroupId The id of the group where projects will be stored
     * @return The result of the action with the list of projects created as RPC value
     * @throws Exception
     * @Param checkoutInSingleDirectory Determines whether the project will be stored on a single directory
     */
    Map addMavenTwoProjectRPC( String url, int projectGroupId, boolean checkoutInSingleDirectory )
        throws Exception;

    /**
     * Add a maven 2.x multi-module project from a url and add it to Continuum as a single project instead of as
     * multiple projects (one project per module). To add a multi-module project with its modules as separate Continuum
     * projects, use ContinuumService#addMavenTwoProject( String url, int projectGroupId, boolean
     * checkoutInSingleDirectory) instead.
     *
     * @param url
     * @param projectGroupId
     * @return
     * @throws Exception
     */
    AddingResult addMavenTwoProjectAsSingleProject( String url, int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url
     * @param projectGroupId
     * @return
     * @throws Exception
     */
    Map addMavenTwoProjectAsSingleProjectRPC( String url, int projectGroupId )
        throws Exception;

    /**
     * Add a maven 2.x multi-module project from a url
     *
     * @param url                       The POM url
     * @param projectGroupId            The id of the group where projects will be stored
     * @param checkProtocol             Determines whether the protocol will be checked
     * @param useCredentialsCache       Determines whether user credentials will be cached
     * @param recursiveProjects         Determines whether to load recursive projects
     * @param checkoutInSingleDirectory Determines whether the project will be stored on a single directory
     * @return The result of the action with the list of projects created
     * @throws Exception
     */
    AddingResult addMavenTwoProject( String url, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache,
                                     boolean recursiveProjects, boolean checkoutInSingleDirectory )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url                       The POM url
     * @param projectGroupId            The id of the group where projects will be stored
     * @param checkProtocol             Determines whether the protocol will be checked
     * @param useCredentialsCache       Determines whether user credentials will be cached
     * @param recursiveProjects         Determines whether to load recursive projects
     * @param checkoutInSingleDirectory Determines whether the project will be stored on a single directory
     * @return The result of the action with the list of projects created as RPC value
     * @throws Exception
     */
    Map addMavenTwoProjectRPC( String url, int projectGroupId, boolean checkProtocol,
                                               boolean useCredentialsCache, boolean recursiveProjects,
                                               boolean checkoutInSingleDirectory )
        throws Exception;

    // ----------------------------------------------------------------------
    // Maven 1.x projects
    // ----------------------------------------------------------------------

    /**
     * Add a maven 1.x project from an url.
     *
     * @param url            The POM url
     * @param projectGroupId The id of the group where projects will be stored
     * @return The result of the action with the list of projects created
     * @throws Exception
     */
    AddingResult addMavenOneProject( String url, int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url            The POM url
     * @param projectGroupId The id of the group where projects will be stored
     * @return The result of the action with the list of projects created as RPC value
     * @throws Exception
     */
    Map addMavenOneProjectRPC( String url, int projectGroupId )
        throws Exception;

    // ----------------------------------------------------------------------
    // Maven ANT projects
    // ----------------------------------------------------------------------

    /**
     * Add an ANT project in the specified group.
     *
     * @param project        The project to add. name, version and scm informations are required
     * @param projectGroupId The id of the group where projects will be stored
     * @return The project populated with the id.
     * @throws Exception
     */
    ProjectSummary addAntProject( ProjectSummary project, int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param project        The project to add. name, version and scm informations are required
     * @param projectGroupId The id of the group where projects will be stored
     * @return The project populated with the id as RPC value
     * @throws Exception
     */
    Map addAntProjectRPC( Map project, int projectGroupId )
        throws Exception;

    // ----------------------------------------------------------------------
    // Maven Shell projects
    // ----------------------------------------------------------------------

    /**
     * Add an shell project in the specified group.
     *
     * @param project        The project to add. name, version and scm informations are required
     * @param projectGroupId The id of the group where projects will be stored
     * @return The project populated with the id.
     * @throws Exception
     */
    ProjectSummary addShellProject( ProjectSummary project, int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param project        The project to add. name, version and scm informations are required
     * @param projectGroupId The id of the group where projects will be stored
     * @return The project populated with the id as RPC value
     * @throws Exception
     */
    Map addShellProjectRPC( Map project, int projectGroupId )
        throws Exception;

    // ----------------------------------------------------------------------
    // ADMIN TASKS
    // ----------------------------------------------------------------------

    // ----------------------------------------------------------------------
    // Schedules
    // ----------------------------------------------------------------------

    /**
     * Return the schedules list.
     *
     * @return The schedule list.
     * @throws Exception
     */
    List getSchedules()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return The schedule list as RPC value.
     * @throws Exception
     */
    List getSchedulesRPC()
        throws Exception;

    /**
     * Return the schedule defined by this id.
     *
     * @param scheduleId The schedule id
     * @return The schedule.
     * @throws Exception
     */
    Schedule getSchedule( int scheduleId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param scheduleId The schedule id
     * @return The schedule as RPC value.
     * @throws Exception
     */
    Map getScheduleRPC( int scheduleId )
        throws Exception;

    /**
     * Add the schedule.
     *
     * @param schedule The schedule
     * @return The schedule.
     * @throws Exception
     */
    Schedule addSchedule( Schedule schedule )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param schedule The schedule
     * @return The schedule as RPC value.
     * @throws Exception
     */
    Map addScheduleRPC( Map schedule )
        throws Exception;

    /**
     * Update the schedule.
     *
     * @param schedule The schedule
     * @return The schedule.
     * @throws Exception
     */
    Schedule updateSchedule( Schedule schedule )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param schedule The schedule
     * @return The schedule as RPC value.
     * @throws Exception
     */
    Map updateScheduleRPC( Map schedule )
        throws Exception;

    // ----------------------------------------------------------------------
    // Profiles
    // ----------------------------------------------------------------------

    /**
     * Return the profiles list.
     *
     * @return The profiles list.
     * @throws Exception
     */
    List getProfiles()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return The profiles list as RPC value.
     * @throws Exception
     */
    List getProfilesRPC()
        throws Exception;

    /**
     * Return the profile defined by this id.
     *
     * @param profileId The profile id
     * @return The profile.
     * @throws Exception
     */
    Profile getProfile( int profileId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param profileId The profile id
     * @return The profile.
     * @throws Exception
     */
    Map getProfileRPC( int profileId )
        throws Exception;

    Profile getProfileWithName( String profileName )
        throws Exception;

    Map getProfileWithNameRPC( String profileName )
        throws Exception;

    Profile addProfile( Profile profile )
        throws Exception;

    int updateProfile( Profile profile )
        throws Exception;

    int deleteProfile( int profileId )
        throws Exception;

    Map addProfileRPC( Map profile )
        throws Exception;

    int updateProfileRPC( Map profile )
        throws Exception;

    // ----------------------------------------------------------------------
    // Installations
    // ----------------------------------------------------------------------

    /**
     * Return the installations list.
     *
     * @return The installations list.
     * @throws Exception
     */
    List getInstallations()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return The installations list.
     * @throws Exception
     */
    List getInstallationsRPC()
        throws Exception;

    /**
     * Return the installation defined by this id.
     *
     * @param installationId The installation id
     * @return The installation.
     * @throws Exception
     */
    Installation getInstallation( int installationId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param installationId The installation id
     * @return The installation.
     * @throws Exception
     */
    Map getInstallationRPC( int installationId )
        throws Exception;

    /**
     * Return the installation defined by this name
     *
     * @param installationName The installation name
     * @return The installation
     * @throws Exception
     */
    Installation getInstallation( String installationName )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param installationName The installation name
     * @return The installation
     * @throws Exception
     */
    Map getInstallationRPC( String installationName )
        throws Exception;

    /**
     * Return the installations list defined by this URL.
     *
     * @param url The build agent URL
     * @return The installations list.
     * @throws Exception
     */
    List getBuildAgentInstallations( String url )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url The build agent URL
     * @return The installations list.
     * @throws Exception
     */
    List getBuildAgentInstallationsRPC( String url )
        throws Exception;

    Installation addInstallation( Installation installation )
        throws Exception;

    int updateInstallation( Installation installation )
        throws Exception;

    int deleteInstallation( int installationId )
        throws Exception;

    Map addInstallationRPC( Map installation )
        throws Exception;

    int updateInstallationRPC( Map installation )
        throws Exception;

    // ----------------------------------------------------------------------
    // SystemConfiguration
    // ----------------------------------------------------------------------

    SystemConfiguration getSystemConfiguration()
        throws Exception;

    Map getSystemConfigurationRPC()
        throws Exception;

    // ----------------------------------------------------------------------
    // Queue
    // ----------------------------------------------------------------------

    /**
     * Return true if the project is in prepare build queue
     *
     * @param projectId The project id
     * @throws ContinuumException
     */
    boolean isProjectInPrepareBuildQueue( int projectId )
        throws Exception;

    /**
     * Return true if the project is in prepare build queue
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @throws ContinuumException
     */
    boolean isProjectInPrepareBuildQueue( int projectId, int buildDefinitionId )
        throws Exception;

    /**
     * Return true if the project is in building queue.
     *
     * @param projectId The project id
     * @throws ContinuumException
     */
    boolean isProjectInBuildingQueue( int projectId )
        throws Exception;

    /**
     * Return true if the project is in building queue.
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @throws ContinuumException
     */
    boolean isProjectInBuildingQueue( int projectId, int buildDefinitionId )
        throws Exception;

    /**
     * Return true if the project is currently preparing build
     *
     * @param projectId The project id
     * @return
     * @throws Exception
     */
    boolean isProjectCurrentlyPreparingBuild( int projectId )
        throws Exception;

    /**
     * Return true if the project is currently preparing build
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @return
     * @throws Exception
     */
    boolean isProjectCurrentlyPreparingBuild( int projectId, int buildDefinitionId )
        throws Exception;

    /**
     * Return true if the project is currently building
     *
     * @param projectId The project id
     * @return
     * @throws Exception
     */
    boolean isProjectCurrentlyBuilding( int projectId )
        throws Exception;

    /**
     * Return true if the project is currently building
     *
     * @param projectId         The project id
     * @param buildDefinitionId The build definition id
     * @return
     * @throws Exception
     */
    boolean isProjectCurrentlyBuilding( int projectId, int buildDefinitionId )
        throws Exception;

    /**
     * Return projects building queue.
     *
     * @throws ContinuumException
     */
    public List getProjectsInBuildQueue()
        throws Exception;

    /**
     * Remove projects from build queue
     *
     * @param projectsId project id to be removed from the building queue
     * @return
     * @throws Exception
     */
    int removeProjectsFromBuildingQueue( int[] projectsId )
        throws Exception;

    /**
     * Cancel the current project build
     *
     * @return
     * @throws Exception
     */
    boolean cancelCurrentBuild()
        throws Exception;

    /**
     * Cancel a project build
     *
     * @param projectId         the project id
     * @param buildDefinitionId the build definition id
     * @return
     * @throws Exception
     */
    boolean cancelBuild( int projectId, int buildDefinitionId )
        throws Exception;

    // ----------------------------------------------------------------------
    // TODO:Users
    // ----------------------------------------------------------------------

    // ----------------------------------------------------------------------
    // Utils
    // ----------------------------------------------------------------------

    boolean ping()
        throws Exception;

    // ----------------------------------------------------------------------
    // Local Repository
    // ----------------------------------------------------------------------

    /**
     * Add a local repository
     *
     * @param repository the local repository to add
     * @return
     * @throws Exception
     */
    LocalRepository addLocalRepository( LocalRepository repository )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param repository the local repository to add
     * @return
     * @throws Exception
     */
    Map addLocalRepositoryRPC( Map repository )
        throws Exception;

    /**
     * Update the local repository
     *
     * @param repository the local repository to update
     * @return
     * @throws Exception
     */
    int updateLocalRepository( LocalRepository repository )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param repository the local repository to update
     * @return
     * @throws Exception
     */
    int updateLocalRepositoryRPC( Map repository )
        throws Exception;

    /**
     * Remove the local repository
     *
     * @param repositoryId
     * @return
     * @throws Exception
     */
    int removeLocalRepository( int repositoryId )
        throws Exception;

    /**
     * Returns the local repository
     *
     * @param repositoryId the local repository id
     * @return
     * @throws Exception
     */
    LocalRepository getLocalRepository( int repositoryId )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param repositoryId
     * @return
     * @throws Exception
     */
    Map getLocalRepositoryRPC( int repositoryId )
        throws Exception;

    /**
     * Returns all local repositories
     *
     * @return
     * @throws Exception
     */
    List getAllLocalRepositories()
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @return
     * @throws Exception
     */
    List getAllLocalRepositoriesRPC()
        throws Exception;

    // ----------------------------------------------------------------------
    // Purging
    // ----------------------------------------------------------------------

    /**
     * Add a repository purge configuration
     *
     * @param repoPurge the repository purge configuration
     * @return
     * @throws Exception
     */
    RepositoryPurgeConfiguration addRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param repoPurge the repository purge configuration
     * @return
     * @throws Exception
     */
    Map addRepositoryPurgeConfigurationRPC( Map repoPurge )
        throws Exception;

    /**
     * Update the repository purge configuration
     *
     * @param repoPurge the repository purge configuration
     * @return
     * @throws Exception
     */
    int updateRepositoryPurgeConfiguration( RepositoryPurgeConfiguration repoPurge )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param repoPurge the repository purge configuration
     * @return
     * @throws Exception
     */
    int updateRepositoryPurgeConfigurationRPC( Map repoPurge )
        throws Exception;

    /**
     * Remove repository purge configuration
     *
     * @param repoPurgeId the repository purge configuration id
     * @return
     * @throws Exception
     */
    int removeRepositoryPurgeConfiguration( int repoPurgeId )
        throws Exception;

    /**
     * Returns the repository purge configuration
     *
     * @param purgeConfigId the repository purge configuration id
     * @return the repository purge configuration
     * @throws Exception
     */
    RepositoryPurgeConfiguration getRepositoryPurgeConfiguration( int repoPurgeId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param purgeConfigId the repository purge configuration id
     * @return the repository purge configuration
     * @throws Exception
     */
    Map getRepositoryPurgeConfigurationRPC( int purgeConfigId )
        throws Exception;

    /**
     * Returns repository purge configurations list
     *
     * @return list of repository purge configurations
     * @throws Exception
     */
    List getAllRepositoryPurgeConfigurations()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return list of repository purge configurations
     * @throws Exception
     */
    List getAllRepositoryPurgeConfigurationsRPC()
        throws Exception;

    /**
     * Add a directory purge configuration
     *
     * @param dirPurge the directory purge configuration
     * @return
     * @throws Exception
     */
    DirectoryPurgeConfiguration addDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param dirPurge the directory purge configuration
     * @return
     * @throws Exception
     */
    Map addDirectoryPurgeConfigurationRPC( Map dirPurge )
        throws Exception;

    /**
     * Update the directory purge configuration
     *
     * @param dirPurge the directory purge configuration
     * @return
     * @throws Exception
     */
    int updateDirectoryPurgeConfiguration( DirectoryPurgeConfiguration dirPurge )
        throws Exception;

    /**
     * Same method but compatible with the standard XMLRPC
     *
     * @param dirPurge the directory purge configuration
     * @return
     * @throws Exception
     */
    int updateDirectoryPurgeConfigurationRPC( Map dirPurge )
        throws Exception;

    /**
     * Removes the directory purge configuration
     *
     * @param dirPurgeId the directory purge configuration id
     * @return
     * @throws Exception
     */
    int removeDirectoryPurgeConfiguration( int dirPurgeId )
        throws Exception;

    /**
     * Returns the directory purge configuration
     *
     * @param purgeConfigId the directory purge configuration id
     * @return the directory purge configuration
     * @throws Exception
     */
    DirectoryPurgeConfiguration getDirectoryPurgeConfiguration( int purgeConfigId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param purgeConfigId the directory purge configuration id
     * @return the directory purge configuration
     * @throws Exception
     */
    Map getDirectoryPurgeConfigurationRPC( int purgeConfigId )
        throws Exception;

    /**
     * Returns directory purge configurations list
     *
     * @return list of directory purge configurations
     * @throws Exception
     */
    List getAllDirectoryPurgeConfigurations()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return list of directory purge configurations
     * @throws Exception
     */
    List getAllDirectoryPurgeConfigurationsRPC()
        throws Exception;

    int purgeLocalRepository( int repoPurgeId )
        throws Exception;

    int purgeDirectory( int dirPurgeId )
        throws Exception;

    // ----------------------------------------------------------------------
    // Release Results
    // ----------------------------------------------------------------------

    /**
     * Returns the release result.
     *
     * @param releaseId The release id
     * @return The release result
     * @throws Exception
     */
    ContinuumReleaseResult getReleaseResult( int releaseId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param releaseId The release id
     * @return The release result as RPC value
     * @throws Exception
     */
    Map getReleaseResultRPC( int releaseId )
        throws Exception;

    /**
     * Returns the project group release result list.
     *
     * @param projectGroupId The project group id
     * @return The release result list
     * @throws Exception
     */
    List getReleaseResultsForProjectGroup( int projectGroupId )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param projectGroupId The project group id
     * @return The release result list as RPC value
     * @throws Exception
     */
    List getReleaseResultsForProjectGroupRPC( int projectGroupId )
        throws Exception;

    /**
     * Remove the project release result.
     *
     * @param releaseResult The project release result
     * @return 0
     * @throws Exception
     */
    int removeReleaseResult( ContinuumReleaseResult releaseResult )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param rr The project release result
     * @return 0
     * @throws Exception
     */
    int removeReleaseResultRPC( Map rr )
        throws Exception;

    /**
     * Returns the release output.
     *
     * @param releaseId The release id
     * @return The release output
     * @throws Exception
     */
    String getReleaseOutput( int releaseId )
        throws Exception;

    /**
     * Release prepare a project
     *
     * @param projectId
     * @param releaseProperties
     * @param releaseVersions
     * @param developmentVersions
     * @param environments
     * @param username
     * @return The release id
     * @throws Exception
     */
    String releasePrepare( int projectId, Properties releaseProperties, Map releaseVersions,
                           Map developmentVersions, Map environments, String username )
        throws Exception;

    /**
     * Release perform a project
     *
     * @param projectId
     * @param releaseId
     * @param goals
     * @param arguments
     * @param useReleaseProfile
     * @param repositoryName
     * @param username
     * @return
     * @throws Exception
     */
    int releasePerform( int projectId, String releaseId, String goals, String arguments, boolean useReleaseProfile,
                        String repositoryName, String username )
        throws Exception;

    /**
     * Get release listener
     *
     * @param projectId
     * @param releaseId
     * @return
     * @throws Exception
     */
    ReleaseListenerSummary getListener( int projectId, String releaseId )
        throws Exception;

    /**
     * Cleanup the release
     *
     * @param projectId
     * @param releaseId
     * @return
     * @throws Exception
     */
    int releaseCleanup( int projectId, String releaseId )
        throws Exception;

    /**
     * Cleanup the release
     *
     * @param projectId
     * @param releaseId
     * @param releaseType
     * @return
     * @throws Exception
     */
    int releaseCleanup( int projectId, String releaseId, String releaseType )
        throws Exception;

    /**
     * Rollback a release
     *
     * @param projectId
     * @param releaseId
     * @return
     * @throws Exception
     */
    int releaseRollback( int projectId, String releaseId )
        throws Exception;

    /**
     * Get release plugin parameters
     *
     * @param projectId
     * @return
     */
    Map getReleasePluginParameters( int projectId )
        throws Exception;

    List> getProjectReleaseAndDevelopmentVersions( int projectId, String pomFilename,
                                                                       boolean autoVersionSubmodules )
        throws Exception;

    /**
     * Add/Register build agent to Continuum Master
     *
     * @return
     * @throws Exception
     */
    BuildAgentConfiguration addBuildAgent( BuildAgentConfiguration buildAgentConfiguration )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return
     * @throws Exception
     */
    Map addBuildAgentRPC( Map buildAgentConfiguration )
        throws Exception;

    /**
     * Get build agent in Continuum Master
     *
     * @param url - build agent URL
     * @return
     */
    BuildAgentConfiguration getBuildAgent( String url );

    /**
     * Get the url of the build agent that is processing the project
     *
     * @param projectId         project Id
     * @param buildDefinitionId build definition Id
     * @return build agent url
     */
    String getBuildAgentUrl( int projectId, int buildDefinition )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @param url - build agent URL
     * @return
     */
    Map getBuildAgentRPC( String url );

    /**
     * Update build agent in Continuum Master
     *
     * @return
     * @throws Exception
     */
    BuildAgentConfiguration updateBuildAgent( BuildAgentConfiguration buildAgentConfiguration )
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return
     * @throws Exception
     */
    Map updateBuildAgentRPC( Map buildAgentConfiguration )
        throws Exception;

    /**
     * remove build agent in Continuum Master
     *
     * @param url - build agent URL
     * @return Exception
     */
    boolean removeBuildAgent( String url )
        throws Exception;

    /**
     * List all build agent in Continuum Master
     *
     * @return
     */
    List getAllBuildAgents();

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return
     */
    List getAllBuildAgentsRPC();

    /**
     * Retrieve all enabled build agents with their available installations
     *
     * @return
     * @throws Exception
     */
    List getBuildAgentsWithInstallations()
        throws Exception;

    /**
     * Same method but compatible with standard XMLRPC
     *
     * @return
     * @throws Exception
     */
    List getBuildAgentsWithInstallationsRPC()
        throws Exception;

    boolean pingBuildAgent( String buildAgentUrl )
        throws Exception;

    BuildAgentGroupConfiguration addBuildAgentGroup( BuildAgentGroupConfiguration buildAgentGroup )
        throws Exception;

    Map addBuildAgentGroupRPC( Map buildAgentGroup )
        throws Exception;

    BuildAgentGroupConfiguration getBuildAgentGroup( String name );

    Map getBuildAgentGroupRPC( String name );

    BuildAgentGroupConfiguration updateBuildAgentGroup( BuildAgentGroupConfiguration buildAgentGroup )
        throws Exception;

    Map updateBuildAgentGroupRPC( Map buildAgentGroup )
        throws Exception;

    int removeBuildAgentGroup( String name )
        throws Exception;
}