Return-Path: Delivered-To: apmail-maven-continuum-commits-archive@www.apache.org Received: (qmail 14539 invoked from network); 26 Aug 2005 15:20:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Aug 2005 15:20:58 -0000 Received: (qmail 81072 invoked by uid 500); 26 Aug 2005 15:20:58 -0000 Delivered-To: apmail-maven-continuum-commits-archive@maven.apache.org Received: (qmail 81056 invoked by uid 500); 26 Aug 2005 15:20:58 -0000 Mailing-List: contact continuum-commits-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-dev@maven.apache.org Delivered-To: mailing list continuum-commits@maven.apache.org Received: (qmail 81043 invoked by uid 99); 26 Aug 2005 15:20:57 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 26 Aug 2005 08:20:57 -0700 Received: (qmail 14535 invoked by uid 65534); 26 Aug 2005 15:20:57 -0000 Message-ID: <20050826152057.14534.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r240262 - in /maven/continuum/trunk: continuum-api/src/main/java/org/apache/maven/continuum/ continuum-core-it/src/test/java/org/apache/maven/continuum/it/ continuum-core/src/main/java/org/apache/maven/continuum/ continuum-model/src/main/md... Date: Fri, 26 Aug 2005 15:20:55 -0000 To: continuum-commits@maven.apache.org From: evenisse@apache.org X-Mailer: svnmailer-1.0.3 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: evenisse Date: Fri Aug 26 08:20:41 2005 New Revision: 240262 URL: http://svn.apache.org/viewcvs?rev=240262&view=rev Log: o Add an id to ProjectNotifier because a project can have multiple provider with the same type Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm Modified: maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java?rev=240262&r1=240261&r2=240262&view=diff ============================================================================== --- maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java (original) +++ maven/continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/Continuum.java Fri Aug 26 08:20:41 2005 @@ -116,16 +116,16 @@ // Notification // ---------------------------------------------------------------------- - ProjectNotifier getNotifier( int projectId, String notifierType ) + ProjectNotifier getNotifier( int projectId, int notifierId ) throws ContinuumException; - void updateNotifier( int projectId, String notifierType, Map configuration ) + void updateNotifier( int projectId, int notifierId, Map configuration ) throws ContinuumException; void addNotifier( int projectId, String notifierType, Map configuration ) throws ContinuumException; - void removeNotifier( int projectId, String notifierType ) + void removeNotifier( int projectId, int notifierId ) throws ContinuumException; Project getProjectWithCheckoutResult( int projectId ) Modified: maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java?rev=240262&r1=240261&r2=240262&view=diff ============================================================================== --- maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java (original) +++ maven/continuum/trunk/continuum-core-it/src/test/java/org/apache/maven/continuum/it/MavenTwoIntegrationTest.java Fri Aug 26 08:20:41 2005 @@ -62,7 +62,7 @@ assertEquals( "project.notifiers.size", 2, project.getNotifiers().size() ); //TODO: Activate this test when CONTINUUM-252 will be fixed - //removeNotifier( projectId, ( (ProjectNotifier) project.getNotifiers().get( 1 ) ).getType() ); + //removeNotifier( projectId, ( (ProjectNotifier) project.getNotifiers().get( 1 ) ).getId() ); //assertEquals( "project.notifiers.size", 1, project.getNotifiers().size() ); @@ -133,11 +133,11 @@ cvsImport( basedir, artifactId, getCvsRoot() ); } - private void removeNotifier( int projectId, String notifierType ) + private void removeNotifier( int projectId, int notifierId ) { try { - getContinuum().removeNotifier( projectId, notifierType ); + getContinuum().removeNotifier( projectId, notifierId ); } catch ( Exception e ) { Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=240262&r1=240261&r2=240262&view=diff ============================================================================== --- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original) +++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Fri Aug 26 08:20:41 2005 @@ -520,10 +520,10 @@ // This whole section needs a scrub but will need to be dealt with generally // when we add schedules and profiles to the mix. - public ProjectNotifier getNotifier( int projectId, String notifierType ) + public ProjectNotifier getNotifier( int projectId, int notifierId ) throws ContinuumException { - Project project = getProject( projectId ); + Project project = getProjectWithAllDetails( projectId ); List notifiers = project.getNotifiers(); @@ -533,7 +533,7 @@ { notifier = (ProjectNotifier) i.next(); - if ( notifier.getType().equals( notifierType ) ) + if ( notifier.getId() == notifierId ) { break; } @@ -542,10 +542,10 @@ return notifier; } - public void updateNotifier( int projectId, String notifierType, Map configuration ) + public void updateNotifier( int projectId, int notifierId, Map configuration ) throws ContinuumException { - ProjectNotifier notifier = getNotifier( projectId, notifierType ); + ProjectNotifier notifier = getNotifier( projectId, notifierId ); Properties notifierProperties = createNotifierProperties( configuration ); @@ -595,10 +595,10 @@ updateProject( project ); } - public void removeNotifier( int projectId, String notifierType ) + public void removeNotifier( int projectId, int notifierId ) throws ContinuumException { - ProjectNotifier n = getNotifier( projectId, notifierType ); + ProjectNotifier n = getNotifier( projectId, notifierId ); if ( n != null ) { Modified: maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo?rev=240262&r1=240261&r2=240262&view=diff ============================================================================== --- maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo (original) +++ maven/continuum/trunk/continuum-model/src/main/mdo/continuum.mdo Fri Aug 26 08:20:41 2005 @@ -12,7 +12,6 @@ @@ -207,6 +206,13 @@ Configures one method for notifying users/developers when a build breaks. + + id + true + true + 1.0.0+ + int + type 1.0.0+ Modified: maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml?rev=240262&r1=240261&r2=240262&view=diff ============================================================================== --- maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml (original) +++ maven/continuum/trunk/continuum-web/src/main/resources/META-INF/plexus/components.xml Fri Aug 26 08:20:41 2005 @@ -234,7 +234,7 @@ notifier - getNotifier(#id,#notifierType) + getNotifier(#id,#notifierId) @@ -243,7 +243,7 @@ notifier - getNotifier(#id,#notifierType) + getNotifier(#id,#notifierId) @@ -252,7 +252,7 @@ notifier - getNotifier(#id,#notifierType) + getNotifier(#id,#notifierId) project @@ -265,7 +265,7 @@ notifier - getNotifier(#id,#notifierType) + getNotifier(#id,#notifierId) project @@ -388,11 +388,11 @@ --> deleteNotifier - removeNotifier(#id,#notifierType) + removeNotifier(#id,#notifierId) updateNotifier - updateNotifier(#id,#notifierType,#parameters) + updateNotifier(#id,#notifierId,#parameters) Modified: maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm?rev=240262&r1=240261&r2=240262&view=diff ============================================================================== --- maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm (original) +++ maven/continuum/trunk/continuum-web/src/main/resources/templates/screens/View.vm Fri Aug 26 08:20:41 2005 @@ -132,22 +132,22 @@ Project #if ( $notifier.type == "irc" ) - #set ( $editNotifierLink = $link.setPage('EditIrcNotifier.vm').addPathInfo('view','EditIrcNotifier').addPathInfo('notifierType', $notifier.type).addPathInfo('id', $item.id) ) + #set ( $editNotifierLink = $link.setPage('EditIrcNotifier.vm').addPathInfo('view','EditIrcNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) ) Edit #elseif ( $notifier.type == "mail" ) - #set ( $editNotifierLink = $link.setPage('EditMailNotifier.vm').addPathInfo('view','EditMailNotifier').addPathInfo('notifierType', $notifier.type).addPathInfo('id', $item.id) ) + #set ( $editNotifierLink = $link.setPage('EditMailNotifier.vm').addPathInfo('view','EditMailNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) ) Edit #elseif ( $notifier.type == "msn" ) - #set ( $editNotifierLink = $link.setPage('EditMsnNotifier.vm').addPathInfo('view','EditMsnNotifier').addPathInfo('notifierType', $notifier.type).addPathInfo('id', $item.id) ) + #set ( $editNotifierLink = $link.setPage('EditMsnNotifier.vm').addPathInfo('view','EditMsnNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) ) Edit #elseif ( $notifier.type == "jabber" ) - #set ( $editNotifierLink = $link.setPage('EditJabberNotifier.vm').addPathInfo('view','EditJabberNotifier').addPathInfo('notifierType', $notifier.type).addPathInfo('id', $item.id) ) + #set ( $editNotifierLink = $link.setPage('EditJabberNotifier.vm').addPathInfo('view','EditJabberNotifier').addPathInfo('notifierId', $notifier.id).addPathInfo('id', $item.id) ) Edit #end