continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jzurb...@apache.org
Subject svn commit: r786891 [1/2] - in /continuum/branches/continuum-1.3.x: continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/ continuum-api/src/main/java/org/apache/continuum/buildmanager/ continuum-api/src/main/java/org/apache/cont...
Date Sat, 20 Jun 2009 19:31:58 GMT
Author: jzurbano
Date: Sat Jun 20 19:31:57 2009
New Revision: 786891

URL: http://svn.apache.org/viewvc?rev=786891&view=rev
Log:
revert r786863 commit

Removed:
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/utils/build/
Modified:
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
    continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
    continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
    continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
    continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CreateBuildProjectTaskAction.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutor.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/buildmanager/ParallelBuildsManagerTest.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueueTest.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    continuum/branches/continuum-1.3.x/continuum-data-management/continuum-legacy/src/main/mdo/continuum.xml
    continuum/branches/continuum-1.3.x/continuum-model/src/main/mdo/continuum.xml
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/error/HttpError.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AboutAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/QueuesAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/resources/localization/Continuum.properties
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildResult.jsp
    continuum/branches/continuum-1.3.x/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/builder/distributed/manager/DistributedBuildManager.java Sat Jun 20 19:31:57 2009
@@ -24,7 +24,6 @@
 
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.system.Installation;
 
@@ -61,7 +60,7 @@
     String getFileContent( int projectId, String directory, String filename )
         throws ContinuumException;
 
-    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId,  
+    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
                                String projectGroupName, String scmRootAddress, int scmRootId )
         throws ContinuumException;
 

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/buildmanager/BuildsManager.java Sat Jun 20 19:31:57 2009
@@ -26,7 +26,6 @@
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
 import org.apache.maven.continuum.model.project.Project;
@@ -45,13 +44,13 @@
      *
      * @param projects
      * @param projectsBuildDefinitionsMap
-     * @param buildTrigger
+     * @param trigger
      * @param scmResultMap                TODO
      * @param projectGroupId
      * @throws BuildManagerException
      */
-	void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap,
-			            BuildTrigger buildTrigger, Map<Integer, ScmResult> scmResultMap, int projectGroupId )
+    void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap, int trigger,
+                        Map<Integer, ScmResult> scmResultMap, int projectGroupId )
         throws BuildManagerException;
 
     /**
@@ -62,12 +61,12 @@
      * @param projectId
      * @param buildDefinition
      * @param projectName
-     * @param buildTrigger
+     * @param trigger
      * @param scmResult       TODO
      * @param projectGroupId
      * @throws BuildManagerException
      */
-	void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, BuildTrigger buildTrigger,
+    void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, int trigger,
                        ScmResult scmResult, int projectGroupId )
         throws BuildManagerException;
 
@@ -75,14 +74,13 @@
      * Adds the projects in the prepare-build-queue.
      *
      * @param projectsBuildDefinitionsMap
-     * @param buildTrigger
+     * @param trigger
      * @param projectGroupId              TODO
      * @param scmRootAddress              TODO
-     * @param scmRootId
      * @throws BuildManagerException
      */
-	void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
-			                   int projectGroupId, String projectGroupName, String scmRootAddress, int scmRootId )
+    void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId,
+                               String projectGroupName, String scmRootAddress, int scmRootId )
         throws BuildManagerException;
 
     /**
@@ -164,13 +162,13 @@
      *
      * @param projectId
      * @param buildDefinitionId
-     * @param buildTrigger
+     * @param trigger
      * @param projectName
      * @param projectGroupId
      * @throws BuildManagerException
      */
-    void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
-    		                          String projectName, int projectGroupId )
+    void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                      int projectGroupId )
         throws BuildManagerException;
 
     // TODO: should we throw an exception when one of the projects cannot be removed?

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/BuildProjectTask.java Sat Jun 20 19:31:57 2009
@@ -21,7 +21,6 @@
 
 import java.io.Serializable;
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.taskqueue.Task;
 
@@ -40,7 +39,7 @@
 
     private final long timestamp;
 
-    private BuildTrigger buildTrigger;
+    private final int trigger;
 
     private long maxExecutionTime;
 
@@ -52,7 +51,7 @@
 
     int projectGroupId;
 
-    public BuildProjectTask( int projectId, int buildDefinitionId, BuildTrigger buildTrigger, String projectName,
+    public BuildProjectTask( int projectId, int buildDefinitionId, int trigger, String projectName,
                              String buildDefinitionLabel, ScmResult scmResult, int projectGroupId )
     {
         this.projectId = projectId;
@@ -61,7 +60,7 @@
 
         this.timestamp = System.currentTimeMillis();
 
-        this.buildTrigger = buildTrigger;
+        this.trigger = trigger;
 
         this.projectName = projectName;
 
@@ -87,14 +86,9 @@
         return timestamp;
     }
 
-    public BuildTrigger getBuildTrigger()
+    public int getTrigger()
     {
-    	return buildTrigger;
-    }
-    
-    public void setBuildTrigger( BuildTrigger buildTrigger )
-    {
-        this.buildTrigger = buildTrigger;
+        return trigger;
     }
 
     public void setMaxExecutionTime( long maxExecutionTime )
@@ -144,12 +138,12 @@
         BuildProjectTask buildProjectTask = (BuildProjectTask) obj;
         return buildProjectTask.getBuildDefinitionId() == this.getBuildDefinitionId() &&
             buildProjectTask.getProjectId() == this.getProjectId() &&
-            buildProjectTask.getBuildTrigger().getTrigger() == this.buildTrigger.getTrigger();
+            buildProjectTask.getTrigger() == this.getTrigger();
     }
 
     public int hashCode()
     {
-    	return this.getBuildDefinitionId() + this.getProjectId() + this.buildTrigger.getTrigger();
+        return this.getBuildDefinitionId() + this.getProjectId() + this.getTrigger();
     }
 
     public int getHashCode()

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/OverallBuildQueue.java Sat Jun 20 19:31:57 2009
@@ -21,7 +21,6 @@
 
 import java.util.List;
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
@@ -214,14 +213,14 @@
      *
      * @param projectId
      * @param buildDefinitionId
-     * @param buildTrigger
+     * @param trigger
      * @param projectName
      * @param projectGroupId
      * @return
      * @throws TaskQueueException TODO
      */
-    boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
-    		                             String projectName, int projectGroupId )
+    boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                         int projectGroupId )
         throws TaskQueueException;
 
     /**

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/continuum/taskqueue/PrepareBuildProjectsTask.java Sat Jun 20 19:31:57 2009
@@ -21,7 +21,6 @@
 
 import java.util.Map;
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.Task;
 
 public class PrepareBuildProjectsTask
@@ -29,7 +28,7 @@
 {
     private final Map<Integer, Integer> projectsBuildDefinitionsMap;
 
-    private BuildTrigger buildTrigger;
+    private final int trigger;
 
     private final int projectGroupId;
 
@@ -39,11 +38,11 @@
 
     private final int projectScmRootId;
 
-    public PrepareBuildProjectsTask( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId,
+    public PrepareBuildProjectsTask( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger, int projectGroupId,
                                      String projectGroupName, String scmRootAddress, int projectScmRootId )
     {
         this.projectsBuildDefinitionsMap = projectsBuildDefinitionsMap;
-        this.buildTrigger = buildTrigger;
+        this.trigger = trigger;
         this.projectGroupId = projectGroupId;
         this.projectGroupName = projectGroupName;
         this.scmRootAddress = scmRootAddress;
@@ -61,9 +60,9 @@
         return projectsBuildDefinitionsMap;
     }
 
-    public BuildTrigger getBuildTrigger()
+    public int getTrigger()
     {
-    	return buildTrigger;
+        return trigger;
     }
 
     public int getHashCode()
@@ -93,6 +92,6 @@
 
     public int hashCode()
     {
-    	return this.projectGroupId + this.projectScmRootId + this.buildTrigger.getTrigger();
+        return this.projectGroupId + this.projectScmRootId + this.trigger;
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Sat Jun 20 19:31:57 2009
@@ -34,7 +34,6 @@
 import org.apache.continuum.release.distributed.manager.DistributedReleaseManager;
 import org.apache.continuum.repository.RepositoryService;
 import org.apache.continuum.taskqueue.manager.TaskQueueManager;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.installation.InstallationService;
@@ -167,7 +166,7 @@
      */
     List<Project> getProjectsInBuildOrder( Collection<Project> projects );
 
-    void buildProjects( String username )
+    void buildProjects()
         throws ContinuumException;
 
     void buildProjectsWithBuildDefinition( int buildDefinitionId )
@@ -179,31 +178,31 @@
     void buildProjectsWithBuildDefinition( List<Project> projects, int buildDefinitionId )
         throws ContinuumException;
 
-    void buildProjects( BuildTrigger buildTrigger )
+    void buildProjects( int trigger )
         throws ContinuumException;
 
-    void buildProjects( BuildTrigger buildTrigger, int buildDefinitionId )
+    void buildProjects( int trigger, int buildDefinitionId )
         throws ContinuumException;
 
     void buildProjects( Schedule schedule )
         throws ContinuumException;
 
-    void buildProject( int projectId, String username )
+    void buildProject( int projectId )
         throws ContinuumException;
 
-    void buildProject( int projectId, BuildTrigger buildTrigger )
+    void buildProject( int projectId, int trigger )
         throws ContinuumException;
 
-    void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
+    void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId )
         throws ContinuumException;
 
-    void buildProject( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
+    void buildProject( int projectId, int buildDefinitionId, int trigger )
         throws ContinuumException;
 
-    public void buildProjectGroup( int projectGroupId, BuildTrigger buildTrigger )
+    public void buildProjectGroup( int projectGroupId )
         throws ContinuumException;
 
-    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId, BuildTrigger buildTrigger )
+    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId )
         throws ContinuumException;
 
     // ----------------------------------------------------------------------

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/ContinuumBuildAgentServiceImpl.java Sat Jun 20 19:31:57 2009
@@ -43,7 +43,6 @@
 import org.apache.continuum.buildagent.utils.WorkingCopyContentGenerator;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.scm.ChangeFile;
@@ -196,7 +195,6 @@
             result.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, buildContext.getProjectId() );
             result.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
             result.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
-            result.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
 
             BuildResult buildResult = buildContext.getBuildResult();
 
@@ -613,8 +611,7 @@
                 map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
-                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
-                map.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
+                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
 
                 projects.add( map );
             }
@@ -640,8 +637,7 @@
                 Map<String, Object> map = new HashMap<String, Object>();
                 map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer( task.getBuildDefinitionId() ) );
-                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
-                map.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
+                map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
 
@@ -671,8 +667,7 @@
                 project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ID, new Integer( task.getScmRootId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, task.getScmRootAddress() );
-                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
-                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
+                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getTrigger() );
             }
 
             return project;
@@ -697,8 +692,7 @@
             {
                 project.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, new Integer( task.getProjectId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, new Integer( task.getBuildDefinitionId() ) );
-                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, task.getBuildTrigger().getTrigger() );
-                project.put( ContinuumBuildAgentUtil.KEY_USERNAME, task.getBuildTrigger().getUsername() );
+                project.put( ContinuumBuildAgentUtil.KEY_TRIGGER, new Integer( task.getTrigger() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_PROJECT_GROUP_ID, new Integer( task.getProjectGroupId() ) );
                 project.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_LABEL, task.getBuildDefinitionLabel() );
             }
@@ -929,7 +923,6 @@
             context.setProjectName( ContinuumBuildAgentUtil.getProjectName( map ) );
             context.setProjectState( ContinuumBuildAgentUtil.getProjectState( map ) );
             context.setTrigger( ContinuumBuildAgentUtil.getTrigger( map ) );
-            context.setUsername( ContinuumBuildAgentUtil.getUsername( map ) );
             context.setLocalRepository( ContinuumBuildAgentUtil.getLocalRepository( map ) );
             context.setBuildNumber( ContinuumBuildAgentUtil.getBuildNumber( map ) );
             context.setOldScmResult( getScmResult( ContinuumBuildAgentUtil.getOldScmChanges( map ) ) );
@@ -1012,8 +1005,8 @@
         if ( buildContexts != null && buildContexts.size() > 0 )
         {
             BuildContext context = buildContexts.get( 0 );
-            return new PrepareBuildProjectsTask( buildContexts, new BuildTrigger( context.getTrigger(), context.getUsername() ),
-            		                             context.getProjectGroupId(), context.getScmRootAddress(), context.getScmRootId() );
+            return new PrepareBuildProjectsTask( buildContexts, context.getTrigger(), context.getProjectGroupId(),
+                                                 context.getScmRootAddress(), context.getScmRootId() );
         }
         else
         {

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CreateBuildProjectTaskAction.java Sat Jun 20 19:31:57 2009
@@ -27,7 +27,6 @@
 import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.codehaus.plexus.action.AbstractAction;
 import org.codehaus.plexus.taskqueue.TaskQueueException;
@@ -54,11 +53,9 @@
 
         for ( BuildContext buildContext : buildContexts )
         {
-        	BuildTrigger buildTrigger = new BuildTrigger( buildContext.getTrigger(), buildContext.getUsername() );
-        	
-        	BuildProjectTask buildProjectTask =
+            BuildProjectTask buildProjectTask =
                 new BuildProjectTask( buildContext.getProjectId(), buildContext.getBuildDefinitionId(),
-                		              buildTrigger, buildContext.getProjectName(), buildContext.getBuildDefinitionLabel(),
+                                      buildContext.getTrigger(), buildContext.getProjectName(), buildContext.getBuildDefinitionLabel(),
                                       buildContext.getScmResult(), buildContext.getProjectGroupId() );
             buildProjectTask.setMaxExecutionTime( buildContext.getMaxExecutionTime() * 1000 );
 

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/ExecuteBuilderAction.java Sat Jun 20 19:31:57 2009
@@ -67,8 +67,6 @@
         String localRepository = ContinuumBuildAgentUtil.getLocalRepository( context );
 
         int trigger = ContinuumBuildAgentUtil.getTrigger( context );
-        
-        String username = ContinuumBuildAgentUtil.getUsername( context );
 
         ContinuumAgentBuildExecutor buildExecutor = buildAgentBuildExecutorManager.getBuildExecutor( project.getExecutorId() );
         
@@ -83,8 +81,6 @@
         buildResult.setState( ContinuumProjectState.BUILDING );
 
         buildResult.setTrigger( trigger );
-        
-        buildResult.setUsername( username );
 
         buildResult.setBuildDefinition( buildDefinition );
 

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/buildcontext/BuildContext.java Sat Jun 20 19:31:57 2009
@@ -22,7 +22,6 @@
 import java.util.Date;
 import java.util.Map;
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.scm.ScmResult;
 
@@ -57,8 +56,6 @@
     private String scmPassword;
 
     private int trigger;
-    
-    private String username;
 
     private boolean buildFresh;
 
@@ -377,14 +374,4 @@
     {
         return buildDefinitionLabel;
     }
-    
-    public void setUsername( String username )
-    {
-         this.username = username;
-    }
-    
-    public String getUsername()
-    {
-         return username;
-    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java Sat Jun 20 19:31:57 2009
@@ -22,7 +22,6 @@
 import java.util.List;
 
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.Task;
 
 public class PrepareBuildProjectsTask
@@ -30,7 +29,7 @@
 {
     private final List<BuildContext> buildContexts;
 
-    private BuildTrigger buildTrigger;
+    private final int trigger;
 
     private final int projectGroupId;
 
@@ -38,11 +37,11 @@
 
     private final int scmRootId;
 
-    public PrepareBuildProjectsTask( List<BuildContext> buildContexts, BuildTrigger buildTrigger, int projectGroupId,
+    public PrepareBuildProjectsTask( List<BuildContext> buildContexts, int trigger, int projectGroupId,
                                      String scmRootAddress, int scmRootId )
     {
         this.buildContexts = buildContexts;
-        this.buildTrigger = buildTrigger;
+        this.trigger = trigger;
         this.projectGroupId = projectGroupId;
         this.scmRootAddress = scmRootAddress;
         this.scmRootId = scmRootId;
@@ -59,9 +58,9 @@
         return buildContexts;
     }
 
-    public BuildTrigger getBuildTrigger()
+    public int getTrigger()
     {
-    	return buildTrigger;
+        return trigger;
     }
 
     public int getProjectGroupId()
@@ -81,6 +80,6 @@
 
     public int getHashCode()
     {
-    	return projectGroupId + scmRootId + buildTrigger.getTrigger();
+        return projectGroupId + scmRootId + trigger;
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java Sat Jun 20 19:31:57 2009
@@ -164,7 +164,6 @@
                            BuildContextToBuildDefinition.getBuildDefinition( buildContext ) );
         actionContext.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
-        actionContext.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_ENVIRONMENTS,
                            getEnvironments( buildContext.getBuildDefinitionId(),
                                             getInstallationType( buildContext ) ) );
@@ -206,7 +205,6 @@
         result.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, buildContext.getProjectId() );
         result.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, buildContext.getBuildDefinitionId() );
         result.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
-        result.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
         result.put( ContinuumBuildAgentUtil.KEY_BUILD_STATE, buildResult.getState() );
         result.put( ContinuumBuildAgentUtil.KEY_START_TIME, Long.toString( buildResult.getStartTime() ) );
         result.put( ContinuumBuildAgentUtil.KEY_END_TIME, Long.toString( buildResult.getEndTime() ) );
@@ -302,8 +300,6 @@
             build.setState( ContinuumProjectState.ERROR );
 
             build.setTrigger( context.getTrigger() );
-            
-            build.setUsername( context.getUsername() );
 
             build.setStartTime( context.getBuildStartTime() );
 
@@ -405,7 +401,6 @@
         map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, context.getProjectId() );
         map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, context.getBuildDefinitionId() );
         map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, context.getTrigger() );
-        map.put( ContinuumBuildAgentUtil.KEY_USERNAME, context.getUsername() );
         map.put( ContinuumBuildAgentUtil.KEY_SCM_CHANGES, getScmChanges( context.getScmResult() ) );
         map.put( ContinuumBuildAgentUtil.KEY_MAVEN_PROJECT, getMavenProject( context ) );
         if ( context.getLatestUpdateDate() != null )

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java Sat Jun 20 19:31:57 2009
@@ -31,7 +31,6 @@
 import org.apache.continuum.buildagent.utils.BuildContextToBuildDefinition;
 import org.apache.continuum.buildagent.utils.BuildContextToProject;
 import org.apache.continuum.buildagent.utils.ContinuumBuildAgentUtil;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
@@ -175,8 +174,6 @@
         actionContext.put( ContinuumBuildAgentUtil.KEY_SCM_ROOT_ADDRESS, buildContext.getScmRootAddress() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_OLD_SCM_RESULT, buildContext.getOldScmResult() );
         actionContext.put( ContinuumBuildAgentUtil.KEY_LATEST_UPDATE_DATE, buildContext.getLatestUpdateDate() );
-        actionContext.put( ContinuumBuildAgentUtil.KEY_TRIGGER, buildContext.getTrigger() );
-        actionContext.put( ContinuumBuildAgentUtil.KEY_USERNAME, buildContext.getUsername() );
 
         buildContext.setActionContext( actionContext );
     }

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/BuildAgentTaskQueueManager.java Sat Jun 20 19:31:57 2009
@@ -24,7 +24,6 @@
 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
 public interface BuildAgentTaskQueueManager
@@ -53,7 +52,7 @@
     boolean isProjectInBuildQueue( int projectId )
         throws TaskQueueManagerException;
 
-    boolean isInPrepareBuildQueue( int projectGroupId, BuildTrigger buildTrigger, String scmRootAddress )
+    boolean isInPrepareBuildQueue( int projectGroupId, int trigger, String scmRootAddress )
         throws TaskQueueManagerException;
 
     List<PrepareBuildProjectsTask> getProjectsInPrepareBuildQueue()

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java Sat Jun 20 19:31:57 2009
@@ -25,7 +25,6 @@
 import org.apache.continuum.buildagent.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
@@ -206,7 +205,7 @@
         return false;
     }
 
-    public boolean isInPrepareBuildQueue( int projectGroupId, BuildTrigger buildTrigger, String scmRootAddress )
+    public boolean isInPrepareBuildQueue( int projectGroupId, int trigger, String scmRootAddress )
         throws TaskQueueManagerException
     {
         try
@@ -217,7 +216,7 @@
             {
                 for ( PrepareBuildProjectsTask task : queues )
                 {
-                	if ( task.getProjectGroupId() == projectGroupId && task.getBuildTrigger().getTrigger() == buildTrigger.getTrigger() &&
+                    if ( task.getProjectGroupId() == projectGroupId && task.getTrigger() == trigger &&
                         task.getScmRootAddress().equals( scmRootAddress ) )
                     {
                         log.info( "projects already in build queue" );

Modified: continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java Sat Jun 20 19:31:57 2009
@@ -30,7 +30,6 @@
 import java.util.Map;
 
 import org.apache.continuum.buildagent.buildcontext.BuildContext;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -55,8 +54,6 @@
     public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
 
     public static final String KEY_TRIGGER = "trigger";
-    
-    public static final String KEY_USERNAME = "username";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
 
@@ -358,16 +355,6 @@
     {
         return getInteger( context, KEY_TRIGGER );
     }
-    
-    public static String getUsername( Map<String, Object> context )
-    {
-         return getString( context, KEY_USERNAME, "" );
-    }
-    
-    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
-    {
-         return new BuildTrigger( getTrigger( context ), getUsername( context ) );
-    }
 
     public static BuildResult getBuildResult( Map<String, Object> context, Object defaultValue )
     {

Modified: continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java Sat Jun 20 19:31:57 2009
@@ -38,7 +38,6 @@
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.continuum.utils.ProjectSorter;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -107,7 +106,7 @@
             log.info( "initializing buildContext" );
             List<Map<String, Object>> buildContext =
                 initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
-                		                prepareBuildTask.getBuildTrigger(), prepareBuildTask.getScmRootAddress(),
+                                        prepareBuildTask.getTrigger(), prepareBuildTask.getScmRootAddress(),
                                         prepareBuildTask.getProjectScmRootId() );
 
             startTime = System.currentTimeMillis();
@@ -128,7 +127,7 @@
     }
 
     private List<Map<String, Object>> initializeBuildContext( Map<Integer, Integer> projectsAndBuildDefinitions,
-    		                                     BuildTrigger buildTrigger, String scmRootAddress, int scmRootId )
+                                                              int trigger, String scmRootAddress, int scmRootId )
         throws ContinuumException
     {
         List<Map<String, Object>> buildContext = new ArrayList<Map<String, Object>>();
@@ -217,8 +216,7 @@
                 {
                     context.put( ContinuumBuildConstant.KEY_ARGUMENTS, buildDef.getArguments() );
                 }
-                context.put( ContinuumBuildConstant.KEY_TRIGGER, buildTrigger.getTrigger() );
-                context.put( ContinuumBuildConstant.KEY_USERNAME, buildTrigger.getUsername() );
+                context.put( ContinuumBuildConstant.KEY_TRIGGER, trigger );
                 context.put( ContinuumBuildConstant.KEY_BUILD_FRESH, buildDef.isBuildFresh() );
                 context.put( ContinuumBuildConstant.KEY_ALWAYS_BUILD, buildDef.isAlwaysBuild() );
                 context.put( ContinuumBuildConstant.KEY_OLD_SCM_CHANGES,
@@ -271,8 +269,7 @@
                         buildResult.setBuildDefinition( buildDef );
                         buildResult.setError( error );
                         buildResult.setState( ContinuumProjectState.ERROR );
-                        buildResult.setTrigger( task.getBuildTrigger().getTrigger() );
-                        buildResult.setUsername( task.getBuildTrigger().getUsername() );
+                        buildResult.setTrigger( task.getTrigger() );
                         buildResult.setStartTime( startTime );
                         buildResult.setEndTime( endTime );
 

Modified: continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java Sat Jun 20 19:31:57 2009
@@ -25,7 +25,6 @@
 import java.util.List;
 import java.util.Map;
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildResult;
 
 public class ContinuumBuildConstant
@@ -41,10 +40,6 @@
     public static final String KEY_BUILD_DEFINITION_LABEL = "builddefinition-label";
 
     public static final String KEY_TRIGGER = "trigger";
-    
-    public static final String KEY_USERNAME = "username";
-        
-    public static final String KEY_BUILD_TRIGGER = "buildTrigger";
 
     public static final String KEY_EXECUTOR_ID = "executor-id";
 
@@ -207,17 +202,6 @@
     {
         return getInteger( context, KEY_TRIGGER );
     }
-    
-    public static String getUsername( Map<String, Object> context )
-    {
-        return getString( context, KEY_USERNAME, "" );
-    }
-    
-    public static BuildTrigger getBuildTrigger( Map<String, Object> context )
-    {
-        BuildTrigger defaultValue = new BuildTrigger( 0, "" );
-        return (BuildTrigger) getObject( context, KEY_BUILD_TRIGGER, defaultValue );
-    }
 
     public static long getStartTime( Map<String, Object> context )
     {

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java Sat Jun 20 19:31:57 2009
@@ -41,7 +41,6 @@
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.utils.ContinuumUtils;
 import org.apache.continuum.utils.ProjectSorter;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -212,11 +211,11 @@
         }
     }
 
-    public void prepareBuildProjects( Map<Integer, Integer>projectsBuildDefinitionsMap, BuildTrigger buildTrigger, int projectGroupId, 
+    public void prepareBuildProjects( Map<Integer, Integer>projectsBuildDefinitionsMap, int trigger, int projectGroupId, 
                                       String projectGroupName, String scmRootAddress, int scmRootId )
         throws ContinuumException
     {
-    	PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, buildTrigger,
+        PrepareBuildProjectsTask task = new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger,
                                                                       projectGroupId, projectGroupName, 
                                                                       scmRootAddress, scmRootId );
 
@@ -1066,19 +1065,19 @@
         int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
         int scmRootId = ContinuumBuildConstant.getScmRootId( context );
         String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );
-        BuildTrigger buildTrigger = new BuildTrigger( ContinuumBuildConstant.getTrigger( context ), ContinuumBuildConstant.getUsername( context ) );
+        int trigger = ContinuumBuildConstant.getTrigger( context );
 
-        return new PrepareBuildProjectsTask( null, buildTrigger, projectGroupId, null, scmRootAddress, scmRootId );
+        return new PrepareBuildProjectsTask( null, trigger, projectGroupId, null, scmRootAddress, scmRootId );
     }
 
     private BuildProjectTask getBuildProjectTask( Map context )
     {
         int projectId = ContinuumBuildConstant.getProjectId( context );
         int buildDefinitionId = ContinuumBuildConstant.getBuildDefinitionId( context );
-        BuildTrigger buildTrigger = new BuildTrigger( ContinuumBuildConstant.getTrigger( context ), ContinuumBuildConstant.getUsername( context ) );
+        int trigger = ContinuumBuildConstant.getTrigger( context );
         int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
         String buildDefinitionLabel = ContinuumBuildConstant.getBuildDefinitionLabel( context );
 
-        return new BuildProjectTask( projectId, buildDefinitionId, buildTrigger, null, buildDefinitionLabel, null, projectGroupId );
+        return new BuildProjectTask( projectId, buildDefinitionId, trigger, null, buildDefinitionLabel, null, projectGroupId );
     }
 }
\ No newline at end of file

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/builder/distributed/util/DistributedBuildUtil.java Sat Jun 20 19:31:57 2009
@@ -45,7 +45,6 @@
         buildResult.setExitCode( ContinuumBuildConstant.getBuildExitCode( context ) );
         buildResult.setState( ContinuumBuildConstant.getBuildState( context ) );
         buildResult.setTrigger( ContinuumBuildConstant.getTrigger( context ) );
-        buildResult.setUsername( ContinuumBuildConstant.getUsername( context ) );
         buildResult.setBuildUrl( ContinuumBuildConstant.getBuildAgentUrl( context ) );
     
         return buildResult;

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java Sat Jun 20 19:31:57 2009
@@ -38,7 +38,6 @@
 import org.apache.continuum.taskqueue.OverallBuildQueue;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildQueue;
@@ -97,9 +96,9 @@
     private PlexusContainer container;
 
     /**
-     * @see BuildsManager#buildProject(int, BuildDefinition, String, BuildTrigger, ScmResult, int)
+     * @see BuildsManager#buildProject(int, BuildDefinition, String, int, ScmResult, int)
      */
-    public void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, BuildTrigger buildTrigger,
+    public void buildProject( int projectId, BuildDefinition buildDefinition, String projectName, int trigger,
                               ScmResult scmResult, int projectGroupId )
         throws BuildManagerException
     {
@@ -134,7 +133,7 @@
             }
     
             BuildProjectTask buildTask =
-            	new BuildProjectTask( projectId, buildDefinition.getId(), buildTrigger, projectName, buildDefinitionLabel,
+                new BuildProjectTask( projectId, buildDefinition.getId(), trigger, projectName, buildDefinitionLabel,
                                       scmResult, projectGroupId );
             try
             {
@@ -154,10 +153,10 @@
     }
 
     /**
-     * @see BuildsManager#buildProjects(List, Map, BuildTrigger, Map, int)
+     * @see BuildsManager#buildProjects(List, Map, int, Map, int)
      */
     public void buildProjects( List<Project> projects, Map<Integer, BuildDefinition> projectsBuildDefinitionsMap,
-    		                   BuildTrigger buildTrigger, Map<Integer, ScmResult> scmResultMap, int projectGroupId )
+                               int trigger, Map<Integer, ScmResult> scmResultMap, int projectGroupId )
         throws BuildManagerException
     {
         int firstProjectId = 0;
@@ -217,7 +216,7 @@
 
                     ScmResult scmResult = scmResultMap.get( project.getId() );
                     BuildProjectTask buildTask =
-                    	new BuildProjectTask( project.getId(), buildDefinition.getId(), buildTrigger, project.getName(),
+                        new BuildProjectTask( project.getId(), buildDefinition.getId(), trigger, project.getName(),
                                               buildDefinitionLabel, scmResult, projectGroupId );
                     buildTask.setMaxExecutionTime( buildDefinition.getSchedule().getMaxJobExecutionTime() * 1000 );
 
@@ -570,9 +569,9 @@
     }
 
     /**
-     * @see BuildsManager#prepareBuildProjects(Map, BuildTrigger, int, String, String, int)
+     * @see BuildsManager#prepareBuildProjects(Map, int, int, String, String, int)
      */
-    public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
+    public void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger,
                                       int projectGroupId, String projectGroupName, String scmRootAddress,
                                       int scmRootId )
         throws BuildManagerException
@@ -580,7 +579,7 @@
         try
         {
             PrepareBuildProjectsTask task =
-            	new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, buildTrigger, projectGroupId, projectGroupName,
+                new PrepareBuildProjectsTask( projectsBuildDefinitionsMap, trigger, projectGroupId, projectGroupName,
                                               scmRootAddress, scmRootId );
 
             log.info( "Queueing prepare-build-project task '" + task + "' to prepare-build queue." );
@@ -619,10 +618,10 @@
     }
 
     /**
-     * @see BuildsManager#removeProjectFromBuildQueue(int, int, BuildTrigger, String, int)
+     * @see BuildsManager#removeProjectFromBuildQueue(int, int, int, String)
      */
-    public void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
-    		                                 String projectName, int projectGroupId )
+    public void removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                             int projectGroupId )
         throws BuildManagerException
     {
         try
@@ -630,7 +629,7 @@
             OverallBuildQueue overallBuildQueue = getOverallBuildQueueWhereProjectIsQueued( projectId, BUILD_QUEUE );
             if ( overallBuildQueue != null )
             {
-            	overallBuildQueue.removeProjectFromBuildQueue( projectId, buildDefinitionId, buildTrigger, projectName,
+                overallBuildQueue.removeProjectFromBuildQueue( projectId, buildDefinitionId, trigger, projectName,
                                                                projectGroupId );
             }
             else
@@ -890,7 +889,7 @@
                     buildDefinitionDao.getBuildDefinition( buildTask.getBuildDefinitionId() );
 
                 buildProject( buildTask.getProjectId(), buildDefinition, buildTask.getProjectName(),
-                		      buildTask.getBuildTrigger(), buildTask.getScmResult(), buildTask.getProjectGroupId() );
+                              buildTask.getTrigger(), buildTask.getScmResult(), buildTask.getProjectGroupId() );
             }
             catch ( ContinuumStoreException e )
             {

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java Sat Jun 20 19:31:57 2009
@@ -27,7 +27,6 @@
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.taskqueue.Task;
@@ -324,10 +323,10 @@
     }
 
     /**
-     * @see OverallBuildQueue#removeProjectFromBuildQueue(int, int, BuildTrigger, String, int)
+     * @see OverallBuildQueue#removeProjectFromBuildQueue(int, int, int, String, int)
      */
-    public boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
-    		                                    String projectName, int projectGroupId )
+    public boolean removeProjectFromBuildQueue( int projectId, int buildDefinitionId, int trigger, String projectName,
+                                                int projectGroupId )
         throws TaskQueueException
     {
         BuildDefinition buildDefinition;
@@ -349,7 +348,7 @@
         }
 
         BuildProjectTask buildProjectTask =
-        	                      new BuildProjectTask( projectId, buildDefinitionId, buildTrigger, projectName, 
+            new BuildProjectTask( projectId, buildDefinitionId, trigger, projectName, 
                                   buildDefinitionLabel, null, projectGroupId );
 
         return getBuildQueue().remove( buildProjectTask );

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Sat Jun 20 19:31:57 2009
@@ -58,7 +58,6 @@
 import org.apache.continuum.taskqueue.manager.TaskQueueManager;
 import org.apache.continuum.taskqueue.manager.TaskQueueManagerException;
 import org.apache.continuum.utils.ProjectSorter;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.build.settings.SchedulesActivationException;
 import org.apache.maven.continuum.build.settings.SchedulesActivator;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
@@ -792,16 +791,16 @@
     // Building
     // ----------------------------------------------------------------------
 
-    public void buildProjects( String username )
+    public void buildProjects()
         throws ContinuumException
     {
-    	buildProjects( new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
+        buildProjects( ContinuumProjectState.TRIGGER_FORCED );
     }
 
     public void buildProjectsWithBuildDefinition( int buildDefinitionId )
         throws ContinuumException
     {
-    	buildProjects( new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, "" ), buildDefinitionId );
+        buildProjects( ContinuumProjectState.TRIGGER_FORCED, buildDefinitionId );
     }
 
     public void buildProjectsWithBuildDefinition( List<Project> projects, List<BuildDefinition> bds )
@@ -809,7 +808,7 @@
     {
         Collection<Project> filteredProjectsList = getProjectsNotInReleaseStage( projects );
 
-        prepareBuildProjects( filteredProjectsList, bds, true, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, "" ) );
+        prepareBuildProjects( filteredProjectsList, bds, true, ContinuumProjectState.TRIGGER_FORCED );
     }
 
     public void buildProjectsWithBuildDefinition( List<Project> projects, int buildDefinitionId )
@@ -817,50 +816,49 @@
     {
         Collection<Project> filteredProjectsList = getProjectsNotInReleaseStage( projects );
 
-        prepareBuildProjects( filteredProjectsList, buildDefinitionId, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, "" ) );
+        prepareBuildProjects( filteredProjectsList, buildDefinitionId, ContinuumProjectState.TRIGGER_FORCED );
     }
 
     /**
      * fire of the builds of all projects across all project groups using their default build definitions
      *
-     * @param buildTrigger
+     * @param trigger
      * @throws ContinuumException
      */
-    public void buildProjects( BuildTrigger buildTrigger )
+    public void buildProjects( int trigger )
         throws ContinuumException
     {
         Collection<Project> projectsList = getProjectsInBuildOrder();
 
         Collection<Project> filteredProjectsList = getProjectsNotInReleaseStage( projectsList );
 
-        prepareBuildProjects( filteredProjectsList, null, true, buildTrigger );
+        prepareBuildProjects( filteredProjectsList, null, true, trigger );
     }
 
     /**
      * fire of the builds of all projects across all project groups using the group build definition
      *
-     * @param buildTrigger
+     * @param trigger
      * @param buildDefinitionId
      * @throws ContinuumException
      */
-    public void buildProjects( BuildTrigger buildTrigger, int buildDefinitionId )
+    public void buildProjects( int trigger, int buildDefinitionId )
         throws ContinuumException
     {
         Collection<Project> projectsList = getProjectsInBuildOrder();
 
         Collection<Project> filteredProjectsList = getProjectsNotInReleaseStage( projectsList );
 
-        prepareBuildProjects( filteredProjectsList, buildDefinitionId, buildTrigger );
+        prepareBuildProjects( filteredProjectsList, buildDefinitionId, trigger );
     }
 
     /**
      * fire off a build for all of the projects in a project group using their default builds
      *
      * @param projectGroupId
-     * @param buildTrigger
      * @throws ContinuumException
      */
-    public void buildProjectGroup( int projectGroupId, BuildTrigger buildTrigger )
+    public void buildProjectGroup( int projectGroupId )
         throws ContinuumException
     {
         List<BuildDefinition> groupDefaultBDs;
@@ -869,7 +867,7 @@
         {
             groupDefaultBDs = getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
 
-            buildProjectGroupWithBuildDefinition( projectGroupId, groupDefaultBDs, true, buildTrigger );
+            buildProjectGroupWithBuildDefinition( projectGroupId, groupDefaultBDs, true );
         }
     }
 
@@ -878,10 +876,9 @@
      *
      * @param projectGroupId    the project group id
      * @param buildDefinitionId the build definition id to use
-     * @param buildTrigger      the trigger state and the username
      * @throws ContinuumException
      */
-    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId, BuildTrigger buildTrigger )
+    public void buildProjectGroupWithBuildDefinition( int projectGroupId, int buildDefinitionId )
         throws ContinuumException
     {
         if ( !isAnyProjectInGroupInReleaseStage( projectGroupId ) )
@@ -892,7 +889,7 @@
             {
                 bds.add( bd );
             }
-            buildProjectGroupWithBuildDefinition( projectGroupId, bds, false, buildTrigger );
+            buildProjectGroupWithBuildDefinition( projectGroupId, bds, false );
         }
     }
 
@@ -900,13 +897,10 @@
      * fire off a build for all of the projects in a project group using their default builds
      *
      * @param projectGroupId
-     * @param bds
-     * @param checkDefaultBuildDefinitionForProject
-     * @param buildTrigger
      * @throws ContinuumException
      */
     private void buildProjectGroupWithBuildDefinition( int projectGroupId, List<BuildDefinition> bds,
-    		                                   boolean checkDefaultBuildDefinitionForProject, BuildTrigger buildTrigger )
+                                                       boolean checkDefaultBuildDefinitionForProject )
         throws ContinuumException
     {
         if ( !isAnyProjectInGroupInReleaseStage( projectGroupId ) )
@@ -914,10 +908,9 @@
             Collection<Project> projectsList;
 
             projectsList = getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId( projectGroupId ) );
-            
-            buildTrigger.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
 
-            prepareBuildProjects( projectsList, bds, checkDefaultBuildDefinitionForProject, buildTrigger );
+            prepareBuildProjects( projectsList, bds, checkDefaultBuildDefinitionForProject,
+                                  ContinuumProjectState.TRIGGER_FORCED );
         }
     }
 
@@ -1009,23 +1002,22 @@
             }
         }
 
-        prepareBuildProjects( map, new BuildTrigger( ContinuumProjectState.TRIGGER_SCHEDULED, "" ), sortedScmRoot );
+        prepareBuildProjects( map, ContinuumProjectState.TRIGGER_SCHEDULED, sortedScmRoot );
     }
 
-    public void buildProject( int projectId, String username )
+    public void buildProject( int projectId )
         throws ContinuumException
     {
-    	buildProject( projectId, new BuildTrigger( ContinuumProjectState.TRIGGER_FORCED, username ) );
+        buildProject( projectId, ContinuumProjectState.TRIGGER_FORCED );
     }
 
-    public void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
+    public void buildProjectWithBuildDefinition( int projectId, int buildDefinitionId )
         throws ContinuumException
     {
-    	buildTrigger.setTrigger( ContinuumProjectState.TRIGGER_FORCED );
-    	buildProject( projectId, buildDefinitionId, buildTrigger );
+        buildProject( projectId, buildDefinitionId, ContinuumProjectState.TRIGGER_FORCED );
     }
 
-    public void buildProject( int projectId, BuildTrigger buildTrigger )
+    public void buildProject( int projectId, int trigger )
         throws ContinuumException
     {
         Project project = getProject( projectId );
@@ -1059,11 +1051,11 @@
         projectsBuildDefinitionsMap.put( projectId, buildDef.getId() );
 
         ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
-        prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, scmRoot.getScmRootAddress(),
+        prepareBuildProjects( projectsBuildDefinitionsMap, trigger, scmRoot.getScmRootAddress(),
                               scmRoot.getProjectGroup().getId(), scmRoot.getId() );
     }
 
-    public void buildProject( int projectId, int buildDefinitionId, BuildTrigger buildTrigger )
+    public void buildProject( int projectId, int buildDefinitionId, int trigger )
         throws ContinuumException
     {
         Project project = getProject( projectId );
@@ -1090,7 +1082,7 @@
         projectsBuildDefinitionsMap.put( projectId, buildDefinitionId );
 
         ProjectScmRoot scmRoot = getProjectScmRootByProject( projectId );
-        prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, scmRoot.getScmRootAddress(),
+        prepareBuildProjects( projectsBuildDefinitionsMap, trigger, scmRoot.getScmRootAddress(),
                               scmRoot.getProjectGroup().getId(), scmRoot.getId() );
     }
 
@@ -3413,7 +3405,7 @@
     }
 
     private void prepareBuildProjects( Collection<Project> projects, List<BuildDefinition> bds,
-    		                           boolean checkDefaultBuildDefinitionForProject, BuildTrigger buildTrigger )
+                                       boolean checkDefaultBuildDefinitionForProject, int trigger )
         throws ContinuumException
     {
         Map<ProjectScmRoot, Map<Integer, Integer>> map = new HashMap<ProjectScmRoot, Map<Integer, Integer>>();
@@ -3509,10 +3501,10 @@
             }
         }
 
-        prepareBuildProjects( map, buildTrigger, sortedScmRoot );
+        prepareBuildProjects( map, trigger, sortedScmRoot );
     }
 
-    private void prepareBuildProjects( Collection<Project> projects, int buildDefinitionId, BuildTrigger buildTrigger )
+    private void prepareBuildProjects( Collection<Project> projects, int buildDefinitionId, int trigger )
         throws ContinuumException
     {
         Map<ProjectScmRoot, Map<Integer, Integer>> map = new HashMap<ProjectScmRoot, Map<Integer, Integer>>();
@@ -3563,21 +3555,21 @@
             }
         }
 
-        prepareBuildProjects( map, buildTrigger, sortedScmRoot );
+        prepareBuildProjects( map, trigger, sortedScmRoot );
     }
 
-    private void prepareBuildProjects( Map<ProjectScmRoot, Map<Integer, Integer>> map, BuildTrigger buildTrigger,
+    private void prepareBuildProjects( Map<ProjectScmRoot, Map<Integer, Integer>> map, int trigger,
                                        List<ProjectScmRoot> scmRoots )
         throws ContinuumException
     {
         for ( ProjectScmRoot scmRoot : scmRoots )
         {
-        	prepareBuildProjects( map.get( scmRoot ), buildTrigger, scmRoot.getScmRootAddress(),
+            prepareBuildProjects( map.get( scmRoot ), trigger, scmRoot.getScmRootAddress(),
                                   scmRoot.getProjectGroup().getId(), scmRoot.getId() );
         }
     }
 
-    private void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, BuildTrigger buildTrigger,
+    private void prepareBuildProjects( Map<Integer, Integer> projectsBuildDefinitionsMap, int trigger,
                                        String scmRootAddress, int projectGroupId, int scmRootId )
         throws ContinuumException
     {
@@ -3587,12 +3579,12 @@
         {
             if ( configurationService.isDistributedBuildEnabled() )
             {
-            	distributedBuildManager.prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, projectGroupId, 
+                distributedBuildManager.prepareBuildProjects( projectsBuildDefinitionsMap, trigger, projectGroupId,
                                                               group.getName(), scmRootAddress, scmRootId );
             }
             else
             {
-            	parallelBuildsManager.prepareBuildProjects( projectsBuildDefinitionsMap, buildTrigger, projectGroupId,
+                parallelBuildsManager.prepareBuildProjects( projectsBuildDefinitionsMap, trigger, projectGroupId,
                                                             group.getName(), scmRootAddress, scmRootId );
             }
         }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildContext.java Sat Jun 20 19:31:57 2009
@@ -19,7 +19,6 @@
  * under the License.
  */
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
@@ -52,7 +51,7 @@
 
     private ScmResult scmResult;
 
-    private BuildTrigger buildTrigger;
+    private int trigger;
 
     private BuildResult buildResult;
 
@@ -139,14 +138,14 @@
         return actionContext;
     }
 
-    public BuildTrigger getBuildTrigger()
+    public int getTrigger()
     {
-    	return buildTrigger;
+        return trigger;
     }
 
-    public void setBuildTrigger( BuildTrigger buildTrigger )
+    public void setTrigger( int trigger )
     {
-    	this.buildTrigger = buildTrigger;
+        this.trigger = trigger;
     }
 
     public List<ProjectDependency> getModifiedDependencies()

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildController.java Sat Jun 20 19:31:57 2009
@@ -19,7 +19,6 @@
  * under the License.
  */
 
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 
@@ -31,6 +30,6 @@
 {
     String ROLE = BuildController.class.getName();
 
-    void build( int projectId, int buildDefinitionId, BuildTrigger buildTrigger, ScmResult scmResult )
+    void build( int projectId, int buildDefinitionId, int trigger, ScmResult scmResult )
         throws TaskExecutionException;
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutor.java Sat Jun 20 19:31:57 2009
@@ -46,6 +46,6 @@
         BuildProjectTask buildProjectTask = (BuildProjectTask) task;
 
         controller.build( buildProjectTask.getProjectId(), buildProjectTask.getBuildDefinitionId(), buildProjectTask
-        		.getBuildTrigger(), buildProjectTask.getScmResult() );
+            .getTrigger(), buildProjectTask.getScmResult() );
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Sat Jun 20 19:31:57 2009
@@ -31,7 +31,6 @@
 import org.apache.continuum.dao.ProjectScmRootDao;
 import org.apache.continuum.model.project.ProjectScmRoot;
 import org.apache.continuum.utils.ContinuumUtils;
-import org.apache.continuum.utils.build.BuildTrigger;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.core.action.ExecuteBuilderContinuumAction;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
@@ -119,15 +118,14 @@
     /**
      * @param projectId
      * @param buildDefinitionId
-     * @param buildTrigger
-     * @param scmResult
+     * @param trigger
      * @throws TaskExecutionException
      */
-    public void build( int projectId, int buildDefinitionId, BuildTrigger buildTrigger, ScmResult scmResult )
+    public void build( int projectId, int buildDefinitionId, int trigger, ScmResult scmResult )
         throws TaskExecutionException
     {
         log.info( "Initializing build" );
-        BuildContext context = initializeBuildContext( projectId, buildDefinitionId, buildTrigger, scmResult );
+        BuildContext context = initializeBuildContext( projectId, buildDefinitionId, trigger, scmResult );
 
         // ignore this if AlwaysBuild ?
         if ( !checkScmResult( context ) )
@@ -322,12 +320,11 @@
      *
      * @param projectId
      * @param buildDefinitionId
-     * @param buildTrigger
-     * @param scmResult
+     * @param trigger
      * @return
      * @throws TaskExecutionException
      */
-    protected BuildContext initializeBuildContext( int projectId, int buildDefinitionId, BuildTrigger buildTrigger,
+    protected BuildContext initializeBuildContext( int projectId, int buildDefinitionId, int trigger,
                                                    ScmResult scmResult )
         throws TaskExecutionException
     {
@@ -335,7 +332,7 @@
 
         context.setStartTime( System.currentTimeMillis() );
 
-        context.setBuildTrigger( buildTrigger );
+        context.setTrigger( trigger );
 
         try
         {
@@ -378,7 +375,7 @@
 
         AbstractContinuumAction.setBuildDefinition( actionContext, context.getBuildDefinition() );
 
-        AbstractContinuumAction.setBuildTrigger( actionContext, buildTrigger );
+        AbstractContinuumAction.setTrigger( actionContext, trigger );
 
         AbstractContinuumAction.setScmResult( actionContext, context.getScmResult() );
 
@@ -474,7 +471,7 @@
             return true;
         }
 
-        if ( context.getBuildTrigger().getTrigger() == ContinuumProjectState.TRIGGER_FORCED )
+        if ( context.getTrigger() == ContinuumProjectState.TRIGGER_FORCED )
         {
             log.info( "The project build is forced, building" );
             return true;
@@ -486,7 +483,7 @@
 
         if ( project.getOldState() != ContinuumProjectState.NEW &&
             project.getOldState() != ContinuumProjectState.CHECKEDOUT &&
-            context.getBuildTrigger().getTrigger() != ContinuumProjectState.TRIGGER_FORCED &&
+            context.getTrigger() != ContinuumProjectState.TRIGGER_FORCED &&
             project.getState() != ContinuumProjectState.NEW && project.getState() != ContinuumProjectState.CHECKEDOUT )
         {
             // Check SCM changes
@@ -677,9 +674,7 @@
 
         build.setState( ContinuumProjectState.ERROR );
 
-        build.setTrigger( context.getBuildTrigger().getTrigger() );
-        
-        build.setUsername( context.getBuildTrigger().getUsername() );
+        build.setTrigger( context.getTrigger() );
 
         build.setStartTime( context.getStartTime() );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=786891&r1=786890&r2=786891&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java Sat Jun 20 19:31:57 2009
@@ -117,7 +117,7 @@
                 // If this build is forces, don't remove it
                 // ----------------------------------------------------------------------
 
-                if ( task.getBuildTrigger().getTrigger() == ContinuumProjectState.TRIGGER_FORCED )
+                if ( task.getTrigger() == ContinuumProjectState.TRIGGER_FORCED )
                 {
                     continue;
                 }



Mime
View raw message