continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r219611 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Tue, 19 Jul 2005 03:26:48 GMT
Author: jvanzyl
Date: Mon Jul 18 20:26:33 2005
New Revision: 219611

URL: http://svn.apache.org/viewcvs?rev=219611&view=rev
Log:
 o methods for adding and removing projects to schedules


Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

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=219611&r1=219610&r2=219611&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
Mon Jul 18 20:26:33 2005
@@ -732,14 +732,38 @@
         }
     }
 
-    public void addScheduleToProject( ContinuumProject project, ContinuumSchedule schedule
)
+    // ----------------------------------------------------------------------
+    // Project scheduling
+    // ----------------------------------------------------------------------
+
+    public void addProjectToSchedule( ContinuumProject project, ContinuumSchedule schedule
)
+        throws ContinuumException
     {
-        project.addSchedule( schedule );
+        schedule.addProject( project );
+
+        try
+        {
+            store.updateSchedule( schedule );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while adding project to schedule.", e );
+        }
     }
 
-    public void removeScheduleFromProject( ContinuumProject project, ContinuumSchedule schedule
)
+    public void removeProjectFromSchedule( ContinuumProject project, ContinuumSchedule schedule
)
+        throws ContinuumException
     {
-        project.removeSchedule( schedule );
+        schedule.removeProject( project );
+
+        try
+        {
+            store.updateSchedule( schedule );
+        }
+        catch ( ContinuumStoreException e )
+        {
+            throw logAndCreateException( "Error while removing project from schedule.", e
);
+        }
     }
 
     // ----------------------------------------------------------------------



Mime
View raw message