continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1159492 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/ continuum-core/src/main/java/org/apache/continuum/builder/distributed/
Date Fri, 19 Aug 2011 03:16:40 GMT
Author: ctan
Date: Fri Aug 19 03:16:40 2011
New Revision: 1159492

URL: http://svn.apache.org/viewvc?rev=1159492&view=rev
Log:
[CONTINUUM-2626] merge changes r1159490 of 1.3.x branch

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java?rev=1159492&r1=1159491&r2=1159492&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
Fri Aug 19 03:16:40 2011
@@ -516,7 +516,6 @@ public abstract class AbstractBuildExecu
         return pDependencies;
     }
 
-    //TODO: Check the content of this method, it always return an empty list
     protected List<Map<String, Object>> getProjectNotifiers( List<ProjectNotifier>
notifiers )
     {
         List<Map<String, Object>> pNotifiers = new ArrayList<Map<String,
Object>>();
@@ -551,6 +550,7 @@ public abstract class AbstractBuildExecu
                 map.put( ContinuumBuildAgentUtil.KEY_NOTIFIER_SEND_ON_FAILURE, notifier.isSendOnFailure()
);
                 map.put( ContinuumBuildAgentUtil.KEY_NOTIFIER_SEND_ON_SCMFAILURE, notifier.isSendOnScmFailure()
);
                 map.put( ContinuumBuildAgentUtil.KEY_NOTIFIER_SEND_ON_WARNING, notifier.isSendOnWarning()
);
+                pNotifiers.add(map);
             }
         }
         return pNotifiers;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java?rev=1159492&r1=1159491&r2=1159492&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java
Fri Aug 19 03:16:40 2011
@@ -293,7 +293,7 @@ public class DefaultDistributedBuildServ
     {
         try
         {
-            Project project = projectDao.getProject( ContinuumBuildConstant.getProjectId(
context ) );
+            Project project = projectDao.getProjectWithAllDetails( ContinuumBuildConstant.getProjectId(
context ) );
     
             if ( StringUtils.isNotBlank( ContinuumBuildConstant.getGroupId( context ) ) )
             {
@@ -330,7 +330,48 @@ public class DefaultDistributedBuildServ
             project.setParent( getProjectParent( context ) );
             project.setDependencies( getProjectDependencies( context ) );
             project.setDevelopers( getProjectDevelopers( context ) );
+
+            List<ProjectNotifier> userNotifiers = new ArrayList<ProjectNotifier>();
+
+            if ( project.getNotifiers() != null )
+            {
+                for ( ProjectNotifier notifier : project.getNotifiers() )
+                {
+                    if ( notifier.isFromUser() )
+                    {
+                        ProjectNotifier userNotifier = new ProjectNotifier();
+
+                        userNotifier.setType( notifier.getType() );
+
+                        userNotifier.setEnabled( notifier.isEnabled() );
+
+                        userNotifier.setConfiguration( notifier.getConfiguration() );
+
+                        userNotifier.setFrom( notifier.getFrom() );
+
+                        userNotifier.setRecipientType( notifier.getRecipientType() );
+
+                        userNotifier.setSendOnError( notifier.isSendOnError() );
+
+                        userNotifier.setSendOnFailure( notifier.isSendOnFailure() );
+
+                        userNotifier.setSendOnSuccess( notifier.isSendOnSuccess() );
+
+                        userNotifier.setSendOnWarning( notifier.isSendOnWarning() );
+
+                        userNotifier.setSendOnScmFailure( notifier.isSendOnScmFailure() );
+
+                        userNotifiers.add( userNotifier );
+                    }
+                }
+            }
+
             project.setNotifiers( getProjectNotifiers( context ) );
+
+            for ( ProjectNotifier userNotifier : userNotifiers )
+            {
+                project.addNotifier( userNotifier );
+            }
     
             projectDao.updateProject( project );
         }



Mime
View raw message