org.apache.maven.continuum
Class DefaultContinuum

java.lang.Object
  extended by org.apache.maven.continuum.DefaultContinuum
All Implemented Interfaces:
Continuum, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable

public class DefaultContinuum
extends Object
implements Continuum, org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable, org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable

Version:
$Id: DefaultContinuum.java 1391353 2012-09-28 07:50:49Z brett $
Author:
Jason van Zyl, Trygve Laugstøl

Field Summary
 
Fields inherited from interface org.apache.maven.continuum.Continuum
ROLE
 
Constructor Summary
DefaultContinuum()
           
 
Method Summary
 void activeBuildDefinitionSchedule(Schedule schedule)
           
 void activePurgeSchedule(Schedule schedule)
           
 BuildDefinition addBuildDefinitionToProject(int projectId, BuildDefinition buildDefinition)
           
 BuildDefinition addBuildDefinitionToProjectGroup(int projectGroupId, BuildDefinition buildDefinition)
           
 BuildQueue addBuildQueue(BuildQueue buildQueue)
           
 ContinuumReleaseResult addContinuumReleaseResult(ContinuumReleaseResult releaseResult)
           
 ContinuumReleaseResult addContinuumReleaseResult(int projectId, String releaseId, String releaseType)
           
 ProjectNotifier addGroupNotifier(int projectGroupId, ProjectNotifier notifier)
           
 ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl, int projectGroupId)
          Add a Maven 1 project to the list of projects.
 ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl, int projectGroupId, boolean checkProtocol)
          Add a Maven 1 project to the list of projects.
 ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache, int buildDefinitionTemplateId)
           
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl, boolean checkProtocol)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl, int projectGroupId)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl, int projectGroupId, boolean checkProtocol)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache, boolean recursiveProjects)
          Add a Maven 2 project to the list of projects.
 ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache, boolean recursiveProjects, int buildDefinitionTemplateId, boolean checkoutInSingleDirectory)
          Add a Maven 2 project to the list of projects.
 ProjectNotifier addNotifier(int projectId, ProjectNotifier notifier)
           
 int addProject(Project project, String executorId, int groupId)
          Add a project to the list of building projects (ant, shell,...)
 int addProject(Project project, String executorId, int groupId, int buildDefinitionTemplateId)
          Add a project to the list of building projects (ant, shell,...)
 void addProjectGroup(ProjectGroup projectGroup)
           
 void addSchedule(Schedule schedule)
           
 void buildProject(int projectId, BuildTrigger buildTrigger)
           
 void buildProject(int projectId, int buildDefinitionId, BuildTrigger buildTrigger)
           
 void buildProject(int projectId, String username)
           
 void buildProjectGroup(int projectGroupId, BuildTrigger buildTrigger)
          fire off a build for all of the projects in a project group using their default builds
 void buildProjectGroupWithBuildDefinition(int projectGroupId, int buildDefinitionId, BuildTrigger buildTrigger)
          fire off a build for all of the projects in a project group using their default builds.
 void buildProjects(BuildTrigger buildTrigger)
          fire of the builds of all projects across all project groups using their default build definitions TODO:Remove this method
 void buildProjects(Schedule schedule)
          takes a given schedule and determines which projects need to build

The build order is determined by the dependencies

 void buildProjects(String username)
           
 void buildProjectsWithBuildDefinition(List<Project> projects, int buildDefinitionId)
           
 void buildProjectsWithBuildDefinition(List<Project> projects, List<BuildDefinition> bds)
           
 void buildProjectWithBuildDefinition(int projectId, int buildDefinitionId, BuildTrigger buildTrigger)
           
 void checkoutProject(int projectId)
           
protected  void executeAction(String actionName, Map<String,Object> context)
           
protected  ContinuumProjectBuildingResult executeAddProjectsFromMetadataActivity(String metadataUrl, String projectBuilderId, int projectGroupId, boolean checkProtocol, boolean useCredentialsCache, boolean loadRecursiveProjects, int buildDefinitionTemplateId, boolean addAssignableRoles, boolean checkoutInSingleDirectory)
           
 List<BuildQueue> getAllBuildQueues()
           
 List<ContinuumReleaseResult> getAllContinuumReleaseResults()
           
 List<ProjectGroup> getAllProjectGroups()
           
 List<ProjectGroup> getAllProjectGroupsWithBuildDetails()
           
 List<ProjectGroup> getAllProjectGroupsWithRepository(int repositoryId)
           
 BuildDefinition getBuildDefinition(int buildDefinitionId)
          returns the build definition from either the project or the project group it is a part of
 BuildDefinition getBuildDefinition(int projectId, int buildDefinitionId)
           
 List<BuildDefinition> getBuildDefinitions(int projectId)
           
 BuildDefinitionService getBuildDefinitionService()
           
 List<BuildDefinition> getBuildDefinitionsForProject(int projectId)
           
 List<BuildDefinition> getBuildDefinitionsForProjectGroup(int projectGroupId)
           
 String getBuildOutput(int projectId, int buildId)
           
 BuildQueue getBuildQueue(int buildQueueId)
           
 BuildQueue getBuildQueueByName(String buildQueueName)
           
 BuildResult getBuildResult(int buildId)
           
 BuildResult getBuildResultByBuildNumber(int projectId, int buildNumber)
           
 Collection<BuildResult> getBuildResultsForProject(int projectId)
           
 List<BuildResult> getBuildResultsInRange(int projectGroupId, Date fromDate, Date toDate, int state, String triggeredBy)
           
 Map<Integer,BuildResult> getBuildResultsInSuccess(int projectGroupId)
           
 BuildsManager getBuildsManager()
           
 List<ChangeSet> getChangesSinceLastSuccess(int projectId, int buildResultId)
          TODO: Must be done by build definition
 ConfigurationService getConfiguration()
           
 ContinuumReleaseResult getContinuumReleaseResult(int releaseResultId)
           
 ContinuumReleaseResult getContinuumReleaseResult(int projectId, String releaseGoal, long startTime, long endTime)
           
 List<ContinuumReleaseResult> getContinuumReleaseResultsByProjectGroup(int projectGroupId)
           
 BuildDefinition getDefaultBuildDefinition(int projectId)
          returns the default build definition for the project

1) if project has default build definition, return that 2) otherwise return default build definition for parent project group

 List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup(int projectGroupId)
           
 DistributedBuildManager getDistributedBuildManager()
           
 DistributedReleaseManager getDistributedReleaseManager()
           
 String getFileContent(int projectId, String directory, String filename)
           
 List<File> getFiles(int projectId, String userDirectory)
           
 ProjectNotifier getGroupNotifier(int projectGroupId, int notifierId)
           
 InstallationService getInstallationService()
           
 BuildResult getLatestBuildResultForProject(int projectId)
           
 Map<Integer,BuildResult> getLatestBuildResults(int projectGroupId)
           
 long getNbBuildResultsForProject(int projectId)
           
 ProjectNotifier getNotifier(int projectId, int notifierId)
           
 ProfileService getProfileService()
           
 Project getProject(int projectId)
           
 ProjectGroup getProjectGroup(int projectGroupId)
           
 ProjectGroup getProjectGroupByGroupId(String groupId)
           
 ProjectGroup getProjectGroupByGroupIdWithBuildDetails(String groupId)
           
 ProjectGroup getProjectGroupByProjectId(int projectId)
           
 ProjectGroup getProjectGroupWithBuildDetails(int projectGroupId)
           
 ProjectGroup getProjectGroupWithProjects(int projectGroupId)
           
 Collection<Project> getProjects()
          TODO: Remove this method
 ProjectScmRoot getProjectScmRoot(int projectScmRootId)
           
 ProjectScmRoot getProjectScmRootByProject(int projectId)
           
 List<ProjectScmRoot> getProjectScmRootByProjectGroup(int projectGroupId)
           
 ProjectScmRoot getProjectScmRootByProjectGroupAndScmRootAddress(int projectGroupId, String scmRootAddress)
           
 List<Project> getProjectsInBuildOrder(Collection<Project> projects)
          take a collection of projects and sort for order
 Collection<Project> getProjectsInGroup(int projectGroupId)
           
 Collection<Project> getProjectsInGroupWithDependencies(int projectGroupId)
           
 Map<Integer,ProjectGroupSummary> getProjectsSummaryByGroups()
           
 Collection<Project> getProjectsWithDependencies()
          TODO: Remove this method
 Project getProjectWithAllDetails(int projectId)
           
 Project getProjectWithBuildDetails(int projectId)
           
 Project getProjectWithBuilds(int projectId)
           
 Project getProjectWithCheckoutResult(int projectId)
           
 PurgeConfigurationService getPurgeConfigurationService()
           
 ContinuumPurgeManager getPurgeManager()
           
 ContinuumReleaseManager getReleaseManager()
           
 String getReleaseOutput(int releaseResultId)
           
 RepositoryService getRepositoryService()
           
 Schedule getSchedule(int scheduleId)
           
 Schedule getScheduleByName(String scheduleName)
           
 Collection<Schedule> getSchedules()
           
 TaskQueueManager getTaskQueueManager()
           
 File getWorkingDirectory(int projectId)
           
 void initialize()
           
 void reloadConfiguration()
           
 void removeBuildDefinition(int projectId, int buildDefinitionId)
           
 void removeBuildDefinitionFromProject(int projectId, int buildDefinitionId)
           
 void removeBuildDefinitionFromProjectGroup(int projectGroupId, int buildDefinitionId)
           
 void removeBuildQueue(BuildQueue buildQueue)
           
 void removeBuildResult(int buildId)
           
 void removeContinuumReleaseResult(int releaseResultId)
           
 void removeGroupNotifier(int projectGroupId, int notifierId)
           
 void removeNotifier(int projectId, int notifierId)
           
 void removeProject(int projectId)
           
 void removeProjectGroup(int projectGroupId)
           
 void removeSchedule(int scheduleId)
           
 void start()
           
 void startup()
           
 void stop()
           
 BuildQueue storeBuildQueue(BuildQueue buildQueue)
           
 BuildDefinition updateBuildDefinitionForProject(int projectId, BuildDefinition buildDefinition)
           
 BuildDefinition updateBuildDefinitionForProjectGroup(int projectGroupId, BuildDefinition buildDefinition)
           
 ProjectNotifier updateGroupNotifier(int projectGroupId, ProjectNotifier notifier)
           
 ProjectNotifier updateNotifier(int projectId, ProjectNotifier notifier)
           
 void updateProject(Project project)
           
 void updateProjectGroup(ProjectGroup projectGroup)
           
 void updateSchedule(int scheduleId, Map<String,String> configuration)
           
 void updateSchedule(Schedule schedule)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContinuum

public DefaultContinuum()
Method Detail

getReleaseManager

public ContinuumReleaseManager getReleaseManager()
Specified by:
getReleaseManager in interface Continuum

getPurgeManager

public ContinuumPurgeManager getPurgeManager()
Specified by:
getPurgeManager in interface Continuum

getRepositoryService

public RepositoryService getRepositoryService()
Specified by:
getRepositoryService in interface Continuum

getTaskQueueManager

public TaskQueueManager getTaskQueueManager()
Specified by:
getTaskQueueManager in interface Continuum

getPurgeConfigurationService

public PurgeConfigurationService getPurgeConfigurationService()
Specified by:
getPurgeConfigurationService in interface Continuum

getBuildsManager

public BuildsManager getBuildsManager()
Specified by:
getBuildsManager in interface Continuum

getDistributedReleaseManager

public DistributedReleaseManager getDistributedReleaseManager()
Specified by:
getDistributedReleaseManager in interface Continuum

getProjectGroup

public ProjectGroup getProjectGroup(int projectGroupId)
                             throws ContinuumException
Specified by:
getProjectGroup in interface Continuum
Throws:
ContinuumException

getProjectGroupWithProjects

public ProjectGroup getProjectGroupWithProjects(int projectGroupId)
                                         throws ContinuumException
Specified by:
getProjectGroupWithProjects in interface Continuum
Throws:
ContinuumException

getProjectGroupByProjectId

public ProjectGroup getProjectGroupByProjectId(int projectId)
                                        throws ContinuumException
Specified by:
getProjectGroupByProjectId in interface Continuum
Throws:
ContinuumException

removeProjectGroup

public void removeProjectGroup(int projectGroupId)
                        throws ContinuumException
Specified by:
removeProjectGroup in interface Continuum
Throws:
ContinuumException

addProjectGroup

public void addProjectGroup(ProjectGroup projectGroup)
                     throws ContinuumException
Specified by:
addProjectGroup in interface Continuum
Throws:
ContinuumException

getAllProjectGroups

public List<ProjectGroup> getAllProjectGroups()
Specified by:
getAllProjectGroups in interface Continuum

getProjectGroupByGroupId

public ProjectGroup getProjectGroupByGroupId(String groupId)
                                      throws ContinuumException
Specified by:
getProjectGroupByGroupId in interface Continuum
Throws:
ContinuumException

getProjectGroupByGroupIdWithBuildDetails

public ProjectGroup getProjectGroupByGroupIdWithBuildDetails(String groupId)
                                                      throws ContinuumException
Specified by:
getProjectGroupByGroupIdWithBuildDetails in interface Continuum
Throws:
ContinuumException

getAllProjectGroupsWithRepository

public List<ProjectGroup> getAllProjectGroupsWithRepository(int repositoryId)
Specified by:
getAllProjectGroupsWithRepository in interface Continuum

getProjects

public Collection<Project> getProjects()
                                throws ContinuumException
TODO: Remove this method

Specified by:
getProjects in interface Continuum
Throws:
ContinuumException

getProjectsWithDependencies

public Collection<Project> getProjectsWithDependencies()
                                                throws ContinuumException
TODO: Remove this method

Specified by:
getProjectsWithDependencies in interface Continuum
Throws:
ContinuumException

getLatestBuildResults

public Map<Integer,BuildResult> getLatestBuildResults(int projectGroupId)
Specified by:
getLatestBuildResults in interface Continuum

getBuildResultsInSuccess

public Map<Integer,BuildResult> getBuildResultsInSuccess(int projectGroupId)
Specified by:
getBuildResultsInSuccess in interface Continuum

getLatestBuildResultForProject

public BuildResult getLatestBuildResultForProject(int projectId)
Specified by:
getLatestBuildResultForProject in interface Continuum

getBuildResultByBuildNumber

public BuildResult getBuildResultByBuildNumber(int projectId,
                                               int buildNumber)
                                        throws ContinuumException
Specified by:
getBuildResultByBuildNumber in interface Continuum
Throws:
ContinuumException

getBuildResultsInRange

public List<BuildResult> getBuildResultsInRange(int projectGroupId,
                                                Date fromDate,
                                                Date toDate,
                                                int state,
                                                String triggeredBy)
Specified by:
getBuildResultsInRange in interface Continuum

removeProject

public void removeProject(int projectId)
                   throws ContinuumException
Specified by:
removeProject in interface Continuum
Throws:
ContinuumException

checkoutProject

public void checkoutProject(int projectId)
                     throws ContinuumException
Specified by:
checkoutProject in interface Continuum
Throws:
ContinuumException
See Also:
Continuum.checkoutProject(int)

getProject

public Project getProject(int projectId)
                   throws ContinuumException
Specified by:
getProject in interface Continuum
Throws:
ContinuumException

getProjectWithBuildDetails

public Project getProjectWithBuildDetails(int projectId)
                                   throws ContinuumException
Specified by:
getProjectWithBuildDetails in interface Continuum
Throws:
ContinuumException

getProjectsSummaryByGroups

public Map<Integer,ProjectGroupSummary> getProjectsSummaryByGroups()
Specified by:
getProjectsSummaryByGroups in interface Continuum

buildProjects

public void buildProjects(String username)
                   throws ContinuumException,
                          NoBuildAgentException,
                          NoBuildAgentInGroupException
Specified by:
buildProjects in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjectsWithBuildDefinition

public void buildProjectsWithBuildDefinition(List<Project> projects,
                                             List<BuildDefinition> bds)
                                      throws ContinuumException,
                                             NoBuildAgentException,
                                             NoBuildAgentInGroupException
Specified by:
buildProjectsWithBuildDefinition in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjectsWithBuildDefinition

public void buildProjectsWithBuildDefinition(List<Project> projects,
                                             int buildDefinitionId)
                                      throws ContinuumException,
                                             NoBuildAgentException,
                                             NoBuildAgentInGroupException
Specified by:
buildProjectsWithBuildDefinition in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjects

public void buildProjects(BuildTrigger buildTrigger)
                   throws ContinuumException,
                          NoBuildAgentException,
                          NoBuildAgentInGroupException
fire of the builds of all projects across all project groups using their default build definitions TODO:Remove this method

Specified by:
buildProjects in interface Continuum
Parameters:
buildTrigger -
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjectGroup

public void buildProjectGroup(int projectGroupId,
                              BuildTrigger buildTrigger)
                       throws ContinuumException,
                              NoBuildAgentException,
                              NoBuildAgentInGroupException
fire off a build for all of the projects in a project group using their default builds

Specified by:
buildProjectGroup in interface Continuum
Parameters:
projectGroupId -
buildTrigger -
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjectGroupWithBuildDefinition

public void buildProjectGroupWithBuildDefinition(int projectGroupId,
                                                 int buildDefinitionId,
                                                 BuildTrigger buildTrigger)
                                          throws ContinuumException,
                                                 NoBuildAgentException,
                                                 NoBuildAgentInGroupException
fire off a build for all of the projects in a project group using their default builds.

Specified by:
buildProjectGroupWithBuildDefinition in interface Continuum
Parameters:
projectGroupId - the project group id
buildDefinitionId - the build definition id to use
buildTrigger - the trigger state and the username
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjects

public void buildProjects(Schedule schedule)
                   throws ContinuumException
takes a given schedule and determines which projects need to build

The build order is determined by the dependencies

Specified by:
buildProjects in interface Continuum
Parameters:
schedule - The schedule
Throws:
ContinuumException

buildProject

public void buildProject(int projectId,
                         String username)
                  throws ContinuumException,
                         NoBuildAgentException,
                         NoBuildAgentInGroupException
Specified by:
buildProject in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProjectWithBuildDefinition

public void buildProjectWithBuildDefinition(int projectId,
                                            int buildDefinitionId,
                                            BuildTrigger buildTrigger)
                                     throws ContinuumException,
                                            NoBuildAgentException,
                                            NoBuildAgentInGroupException
Specified by:
buildProjectWithBuildDefinition in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProject

public void buildProject(int projectId,
                         BuildTrigger buildTrigger)
                  throws ContinuumException,
                         NoBuildAgentException,
                         NoBuildAgentInGroupException
Specified by:
buildProject in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

buildProject

public void buildProject(int projectId,
                         int buildDefinitionId,
                         BuildTrigger buildTrigger)
                  throws ContinuumException,
                         NoBuildAgentException,
                         NoBuildAgentInGroupException
Specified by:
buildProject in interface Continuum
Throws:
ContinuumException
NoBuildAgentException
NoBuildAgentInGroupException

getBuildResult

public BuildResult getBuildResult(int buildId)
                           throws ContinuumException
Specified by:
getBuildResult in interface Continuum
Throws:
ContinuumException

removeBuildResult

public void removeBuildResult(int buildId)
                       throws ContinuumException
Specified by:
removeBuildResult in interface Continuum
Throws:
ContinuumException

getBuildOutput

public String getBuildOutput(int projectId,
                             int buildId)
                      throws ContinuumException
Specified by:
getBuildOutput in interface Continuum
Throws:
ContinuumException

getChangesSinceLastSuccess

public List<ChangeSet> getChangesSinceLastSuccess(int projectId,
                                                  int buildResultId)
                                           throws ContinuumException
TODO: Must be done by build definition

Specified by:
getChangesSinceLastSuccess in interface Continuum
Throws:
ContinuumException

getProjectsInBuildOrder

public List<Project> getProjectsInBuildOrder(Collection<Project> projects)
take a collection of projects and sort for order

Specified by:
getProjectsInBuildOrder in interface Continuum
Parameters:
projects -
Returns:

addMavenOneProject

public ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl,
                                                         int projectGroupId)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 1 project to the list of projects.

Specified by:
addMavenOneProject in interface Continuum
Parameters:
metadataUrl - url of the project.xml
projectGroupId - id of the project group to use
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenOneProject

public ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 1 project to the list of projects.

Specified by:
addMavenOneProject in interface Continuum
Parameters:
metadataUrl - url of the project.xml
projectGroupId - id of the project group to use
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenOneProject

public ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol,
                                                         boolean useCredentialsCache)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenOneProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
projectGroupId - id of the project group to use
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
useCredentialsCache - whether to use cached scm account credentials or not
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenOneProject

public ContinuumProjectBuildingResult addMavenOneProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol,
                                                         boolean useCredentialsCache,
                                                         int buildDefinitionTemplateId)
                                                  throws ContinuumException
Specified by:
addMavenOneProject in interface Continuum
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl,
                                                         boolean checkProtocol)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl,
                                                         int projectGroupId)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
projectGroupId - id of the project group to use
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
projectGroupId - id of the project group to use
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol,
                                                         boolean useCredentialsCache)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
projectGroupId - id of the project group to use
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
useCredentialsCache - whether to use cached scm account credentials or not
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol,
                                                         boolean useCredentialsCache,
                                                         boolean recursiveProjects)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
projectGroupId - id of the project group to use
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
useCredentialsCache - whether to use cached scm account credentials or not
recursiveProjects - if multi modules project record all projects (if false only root project added)
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addMavenTwoProject

public ContinuumProjectBuildingResult addMavenTwoProject(String metadataUrl,
                                                         int projectGroupId,
                                                         boolean checkProtocol,
                                                         boolean useCredentialsCache,
                                                         boolean recursiveProjects,
                                                         int buildDefinitionTemplateId,
                                                         boolean checkoutInSingleDirectory)
                                                  throws ContinuumException
Description copied from interface: Continuum
Add a Maven 2 project to the list of projects.

Specified by:
addMavenTwoProject in interface Continuum
Parameters:
metadataUrl - url of the pom.xml
projectGroupId - id of the project group to use
checkProtocol - check if the protocol is allowed, use false if the pom is uploaded
useCredentialsCache - whether to use cached scm account credentials or not
recursiveProjects - if multi modules project record all projects (if false only root project added)
buildDefinitionTemplateId - buildDefintionTemplateId
checkoutInSingleDirectory - TODO
Returns:
a holder with the projects, project groups and errors occurred during the project adding
Throws:
ContinuumException

addProject

public int addProject(Project project,
                      String executorId,
                      int groupId)
               throws ContinuumException
Description copied from interface: Continuum
Add a project to the list of building projects (ant, shell,...)

Specified by:
addProject in interface Continuum
Parameters:
project - the project to add
executorId - the id of an ContinuumBuildExecutor, eg. ant or shell
Returns:
id of the project
Throws:
ContinuumException

addProject

public int addProject(Project project,
                      String executorId,
                      int groupId,
                      int buildDefinitionTemplateId)
               throws ContinuumException
Description copied from interface: Continuum
Add a project to the list of building projects (ant, shell,...)

Specified by:
addProject in interface Continuum
Parameters:
project - the project to add
executorId - the id of an ContinuumBuildExecutor, eg. ant or shell
Returns:
id of the project
Throws:
ContinuumException
See Also:
Continuum.addProject(org.apache.maven.continuum.model.project.Project, java.lang.String, int, int)

executeAddProjectsFromMetadataActivity

protected ContinuumProjectBuildingResult executeAddProjectsFromMetadataActivity(String metadataUrl,
                                                                                String projectBuilderId,
                                                                                int projectGroupId,
                                                                                boolean checkProtocol,
                                                                                boolean useCredentialsCache,
                                                                                boolean loadRecursiveProjects,
                                                                                int buildDefinitionTemplateId,
                                                                                boolean addAssignableRoles,
                                                                                boolean checkoutInSingleDirectory)
                                                                         throws ContinuumException
Throws:
ContinuumException

getNotifier

public ProjectNotifier getNotifier(int projectId,
                                   int notifierId)
                            throws ContinuumException
Specified by:
getNotifier in interface Continuum
Throws:
ContinuumException

getGroupNotifier

public ProjectNotifier getGroupNotifier(int projectGroupId,
                                        int notifierId)
                                 throws ContinuumException
Specified by:
getGroupNotifier in interface Continuum
Throws:
ContinuumException

updateNotifier

public ProjectNotifier updateNotifier(int projectId,
                                      ProjectNotifier notifier)
                               throws ContinuumException
Specified by:
updateNotifier in interface Continuum
Throws:
ContinuumException

updateGroupNotifier

public ProjectNotifier updateGroupNotifier(int projectGroupId,
                                           ProjectNotifier notifier)
                                    throws ContinuumException
Specified by:
updateGroupNotifier in interface Continuum
Throws:
ContinuumException

addNotifier

public ProjectNotifier addNotifier(int projectId,
                                   ProjectNotifier notifier)
                            throws ContinuumException
Specified by:
addNotifier in interface Continuum
Throws:
ContinuumException

addGroupNotifier

public ProjectNotifier addGroupNotifier(int projectGroupId,
                                        ProjectNotifier notifier)
                                 throws ContinuumException
Specified by:
addGroupNotifier in interface Continuum
Throws:
ContinuumException

removeNotifier

public void removeNotifier(int projectId,
                           int notifierId)
                    throws ContinuumException
Specified by:
removeNotifier in interface Continuum
Throws:
ContinuumException

removeGroupNotifier

public void removeGroupNotifier(int projectGroupId,
                                int notifierId)
                         throws ContinuumException
Specified by:
removeGroupNotifier in interface Continuum
Throws:
ContinuumException

getBuildDefinitions

public List<BuildDefinition> getBuildDefinitions(int projectId)
                                          throws ContinuumException
Specified by:
getBuildDefinitions in interface Continuum
Throws:
ContinuumException

getBuildDefinition

public BuildDefinition getBuildDefinition(int projectId,
                                          int buildDefinitionId)
                                   throws ContinuumException
Specified by:
getBuildDefinition in interface Continuum
Throws:
ContinuumException

getDefaultBuildDefinition

public BuildDefinition getDefaultBuildDefinition(int projectId)
                                          throws ContinuumException
Description copied from interface: Continuum
returns the default build definition for the project

1) if project has default build definition, return that 2) otherwise return default build definition for parent project group

Specified by:
getDefaultBuildDefinition in interface Continuum
Returns:
Throws:
ContinuumException

getDefaultBuildDefinitionsForProjectGroup

public List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup(int projectGroupId)
                                                                throws ContinuumException
Specified by:
getDefaultBuildDefinitionsForProjectGroup in interface Continuum
Throws:
ContinuumException

getBuildDefinition

public BuildDefinition getBuildDefinition(int buildDefinitionId)
                                   throws ContinuumException
Description copied from interface: Continuum
returns the build definition from either the project or the project group it is a part of

Specified by:
getBuildDefinition in interface Continuum
Returns:
Throws:
ContinuumException

getBuildDefinitionsForProject

public List<BuildDefinition> getBuildDefinitionsForProject(int projectId)
                                                    throws ContinuumException
Specified by:
getBuildDefinitionsForProject in interface Continuum
Throws:
ContinuumException

getBuildDefinitionsForProjectGroup

public List<BuildDefinition> getBuildDefinitionsForProjectGroup(int projectGroupId)
                                                         throws ContinuumException
Specified by:
getBuildDefinitionsForProjectGroup in interface Continuum
Throws:
ContinuumException

addBuildDefinitionToProject

public BuildDefinition addBuildDefinitionToProject(int projectId,
                                                   BuildDefinition buildDefinition)
                                            throws ContinuumException
Specified by:
addBuildDefinitionToProject in interface Continuum
Throws:
ContinuumException

removeBuildDefinitionFromProject

public void removeBuildDefinitionFromProject(int projectId,
                                             int buildDefinitionId)
                                      throws ContinuumException
Specified by:
removeBuildDefinitionFromProject in interface Continuum
Throws:
ContinuumException

updateBuildDefinitionForProject

public BuildDefinition updateBuildDefinitionForProject(int projectId,
                                                       BuildDefinition buildDefinition)
                                                throws ContinuumException
Specified by:
updateBuildDefinitionForProject in interface Continuum
Throws:
ContinuumException

addBuildDefinitionToProjectGroup

public BuildDefinition addBuildDefinitionToProjectGroup(int projectGroupId,
                                                        BuildDefinition buildDefinition)
                                                 throws ContinuumException
Specified by:
addBuildDefinitionToProjectGroup in interface Continuum
Throws:
ContinuumException

removeBuildDefinitionFromProjectGroup

public void removeBuildDefinitionFromProjectGroup(int projectGroupId,
                                                  int buildDefinitionId)
                                           throws ContinuumException
Specified by:
removeBuildDefinitionFromProjectGroup in interface Continuum
Throws:
ContinuumException

updateBuildDefinitionForProjectGroup

public BuildDefinition updateBuildDefinitionForProjectGroup(int projectGroupId,
                                                            BuildDefinition buildDefinition)
                                                     throws ContinuumException
Specified by:
updateBuildDefinitionForProjectGroup in interface Continuum
Throws:
ContinuumException

removeBuildDefinition

public void removeBuildDefinition(int projectId,
                                  int buildDefinitionId)
                           throws ContinuumException
Specified by:
removeBuildDefinition in interface Continuum
Throws:
ContinuumException

getSchedule

public Schedule getSchedule(int scheduleId)
                     throws ContinuumException
Specified by:
getSchedule in interface Continuum
Throws:
ContinuumException

getScheduleByName

public Schedule getScheduleByName(String scheduleName)
                           throws ContinuumException
Specified by:
getScheduleByName in interface Continuum
Throws:
ContinuumException

getSchedules

public Collection<Schedule> getSchedules()
                                  throws ContinuumException
Specified by:
getSchedules in interface Continuum
Throws:
ContinuumException

addSchedule

public void addSchedule(Schedule schedule)
                 throws ContinuumException
Specified by:
addSchedule in interface Continuum
Throws:
ContinuumException

updateSchedule

public void updateSchedule(Schedule schedule)
                    throws ContinuumException
Specified by:
updateSchedule in interface Continuum
Throws:
ContinuumException

updateSchedule

public void updateSchedule(int scheduleId,
                           Map<String,String> configuration)
                    throws ContinuumException
Specified by:
updateSchedule in interface Continuum
Throws:
ContinuumException

removeSchedule

public void removeSchedule(int scheduleId)
                    throws ContinuumException
Specified by:
removeSchedule in interface Continuum
Throws:
ContinuumException

activePurgeSchedule

public void activePurgeSchedule(Schedule schedule)
Specified by:
activePurgeSchedule in interface Continuum

activeBuildDefinitionSchedule

public void activeBuildDefinitionSchedule(Schedule schedule)
Specified by:
activeBuildDefinitionSchedule in interface Continuum

getWorkingDirectory

public File getWorkingDirectory(int projectId)
                         throws ContinuumException
Specified by:
getWorkingDirectory in interface Continuum
Throws:
ContinuumException

getFileContent

public String getFileContent(int projectId,
                             String directory,
                             String filename)
                      throws ContinuumException
Specified by:
getFileContent in interface Continuum
Throws:
ContinuumException

getFiles

public List<File> getFiles(int projectId,
                           String userDirectory)
                    throws ContinuumException
Specified by:
getFiles in interface Continuum
Throws:
ContinuumException

getConfiguration

public ConfigurationService getConfiguration()
Specified by:
getConfiguration in interface Continuum

reloadConfiguration

public void reloadConfiguration()
                         throws ContinuumException
Specified by:
reloadConfiguration in interface Continuum
Throws:
ContinuumException

initialize

public void initialize()
                throws org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException
Specified by:
initialize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException

start

public void start()
           throws org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException
Specified by:
start in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.StartingException

stop

public void stop()
          throws org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException
Specified by:
stop in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Startable
Throws:
org.codehaus.plexus.personality.plexus.lifecycle.phase.StoppingException

startup

public void startup()
             throws ContinuumException
Specified by:
startup in interface Continuum
Throws:
ContinuumException

getNbBuildResultsForProject

public long getNbBuildResultsForProject(int projectId)
Specified by:
getNbBuildResultsForProject in interface Continuum

getBuildResultsForProject

public Collection<BuildResult> getBuildResultsForProject(int projectId)
                                                  throws ContinuumException
Specified by:
getBuildResultsForProject in interface Continuum
Throws:
ContinuumException

executeAction

protected void executeAction(String actionName,
                             Map<String,Object> context)
                      throws ContinuumException
Throws:
ContinuumException

updateProject

public void updateProject(Project project)
                   throws ContinuumException
Specified by:
updateProject in interface Continuum
Throws:
ContinuumException

updateProjectGroup

public void updateProjectGroup(ProjectGroup projectGroup)
                        throws ContinuumException
Specified by:
updateProjectGroup in interface Continuum
Throws:
ContinuumException

getProjectWithCheckoutResult

public Project getProjectWithCheckoutResult(int projectId)
                                     throws ContinuumException
Specified by:
getProjectWithCheckoutResult in interface Continuum
Throws:
ContinuumException

getProjectWithAllDetails

public Project getProjectWithAllDetails(int projectId)
                                 throws ContinuumException
Specified by:
getProjectWithAllDetails in interface Continuum
Throws:
ContinuumException

getProjectGroupWithBuildDetails

public ProjectGroup getProjectGroupWithBuildDetails(int projectGroupId)
                                             throws ContinuumException
Specified by:
getProjectGroupWithBuildDetails in interface Continuum
Throws:
ContinuumException

getProjectWithBuilds

public Project getProjectWithBuilds(int projectId)
                             throws ContinuumException
Specified by:
getProjectWithBuilds in interface Continuum
Throws:
ContinuumException

getAllProjectGroupsWithBuildDetails

public List<ProjectGroup> getAllProjectGroupsWithBuildDetails()
Specified by:
getAllProjectGroupsWithBuildDetails in interface Continuum

getProjectsInGroup

public Collection<Project> getProjectsInGroup(int projectGroupId)
                                       throws ContinuumException
Specified by:
getProjectsInGroup in interface Continuum
Throws:
ContinuumException

getProjectsInGroupWithDependencies

public Collection<Project> getProjectsInGroupWithDependencies(int projectGroupId)
                                                       throws ContinuumException
Specified by:
getProjectsInGroupWithDependencies in interface Continuum
Throws:
ContinuumException

getInstallationService

public InstallationService getInstallationService()
Specified by:
getInstallationService in interface Continuum

getProfileService

public ProfileService getProfileService()
Specified by:
getProfileService in interface Continuum

getBuildDefinitionService

public BuildDefinitionService getBuildDefinitionService()
Specified by:
getBuildDefinitionService in interface Continuum

addContinuumReleaseResult

public ContinuumReleaseResult addContinuumReleaseResult(int projectId,
                                                        String releaseId,
                                                        String releaseType)
                                                 throws ContinuumException
Specified by:
addContinuumReleaseResult in interface Continuum
Throws:
ContinuumException

addContinuumReleaseResult

public ContinuumReleaseResult addContinuumReleaseResult(ContinuumReleaseResult releaseResult)
                                                 throws ContinuumException
Specified by:
addContinuumReleaseResult in interface Continuum
Throws:
ContinuumException

removeContinuumReleaseResult

public void removeContinuumReleaseResult(int releaseResultId)
                                  throws ContinuumException
Specified by:
removeContinuumReleaseResult in interface Continuum
Throws:
ContinuumException

getContinuumReleaseResult

public ContinuumReleaseResult getContinuumReleaseResult(int releaseResultId)
                                                 throws ContinuumException
Specified by:
getContinuumReleaseResult in interface Continuum
Throws:
ContinuumException

getAllContinuumReleaseResults

public List<ContinuumReleaseResult> getAllContinuumReleaseResults()
Specified by:
getAllContinuumReleaseResults in interface Continuum

getContinuumReleaseResultsByProjectGroup

public List<ContinuumReleaseResult> getContinuumReleaseResultsByProjectGroup(int projectGroupId)
Specified by:
getContinuumReleaseResultsByProjectGroup in interface Continuum

getContinuumReleaseResult

public ContinuumReleaseResult getContinuumReleaseResult(int projectId,
                                                        String releaseGoal,
                                                        long startTime,
                                                        long endTime)
                                                 throws ContinuumException
Specified by:
getContinuumReleaseResult in interface Continuum
Throws:
ContinuumException

getReleaseOutput

public String getReleaseOutput(int releaseResultId)
                        throws ContinuumException
Specified by:
getReleaseOutput in interface Continuum
Throws:
ContinuumException

getProjectScmRootByProjectGroup

public List<ProjectScmRoot> getProjectScmRootByProjectGroup(int projectGroupId)
Specified by:
getProjectScmRootByProjectGroup in interface Continuum

getProjectScmRoot

public ProjectScmRoot getProjectScmRoot(int projectScmRootId)
                                 throws ContinuumException
Specified by:
getProjectScmRoot in interface Continuum
Throws:
ContinuumException

getProjectScmRootByProject

public ProjectScmRoot getProjectScmRootByProject(int projectId)
                                          throws ContinuumException
Specified by:
getProjectScmRootByProject in interface Continuum
Throws:
ContinuumException

getProjectScmRootByProjectGroupAndScmRootAddress

public ProjectScmRoot getProjectScmRootByProjectGroupAndScmRootAddress(int projectGroupId,
                                                                       String scmRootAddress)
                                                                throws ContinuumException
Specified by:
getProjectScmRootByProjectGroupAndScmRootAddress in interface Continuum
Throws:
ContinuumException

addBuildQueue

public BuildQueue addBuildQueue(BuildQueue buildQueue)
                         throws ContinuumException
Specified by:
addBuildQueue in interface Continuum
Throws:
ContinuumException

getBuildQueue

public BuildQueue getBuildQueue(int buildQueueId)
                         throws ContinuumException
Specified by:
getBuildQueue in interface Continuum
Throws:
ContinuumException

getBuildQueueByName

public BuildQueue getBuildQueueByName(String buildQueueName)
                               throws ContinuumException
Specified by:
getBuildQueueByName in interface Continuum
Throws:
ContinuumException

removeBuildQueue

public void removeBuildQueue(BuildQueue buildQueue)
                      throws ContinuumException
Specified by:
removeBuildQueue in interface Continuum
Throws:
ContinuumException

storeBuildQueue

public BuildQueue storeBuildQueue(BuildQueue buildQueue)
                           throws ContinuumException
Specified by:
storeBuildQueue in interface Continuum
Throws:
ContinuumException

getAllBuildQueues

public List<BuildQueue> getAllBuildQueues()
                                   throws ContinuumException
Specified by:
getAllBuildQueues in interface Continuum
Throws:
ContinuumException

getDistributedBuildManager

public DistributedBuildManager getDistributedBuildManager()
Specified by:
getDistributedBuildManager in interface Continuum


Copyright © 2003-2013 The Apache Software Foundation. All Rights Reserved.