continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r682300 [1/2] - in /continuum/branches/continuum-refactoring-evenisse: continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-core/src/main/java/org/apache/maven/continu...
Date Mon, 04 Aug 2008 09:06:45 GMT
Author: evenisse
Date: Mon Aug  4 02:06:43 2008
New Revision: 682300

URL: http://svn.apache.org/viewvc?rev=682300&view=rev
Log:
Split ContinuumStore into few dao classes : extract ProjectDao and BuildDefinitionDao

Added:
    continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java   (with props)
    continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java   (with props)
    continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java   (with props)
    continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java   (with props)
Modified:
    continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
    continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
    continuum/branches/continuum-refactoring-evenisse/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
    continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
    continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/maven/continuum/store/JdoContinuumStore.java
    continuum/branches/continuum-refactoring-evenisse/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
    continuum/branches/continuum-refactoring-evenisse/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
    continuum/branches/continuum-refactoring-evenisse/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java

Added: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java?rev=682300&view=auto
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java (added)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java Mon Aug  4 02:06:43 2008
@@ -0,0 +1,105 @@
+package org.apache.continuum.dao;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.continuum.model.project.BuildDefinition;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectGroup;
+import org.apache.maven.continuum.store.ContinuumStoreException;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface BuildDefinitionDao
+{
+    BuildDefinition getBuildDefinition( int buildDefinitionId )
+        throws ContinuumStoreException;
+
+    void removeBuildDefinition( BuildDefinition buildDefinition )
+        throws ContinuumStoreException;
+
+    BuildDefinition storeBuildDefinition( BuildDefinition buildDefinition )
+        throws ContinuumStoreException;
+
+    BuildDefinition addBuildDefinition( BuildDefinition buildDefinition )
+        throws ContinuumStoreException;
+
+    List<BuildDefinition> getAllBuildDefinitions()
+        throws ContinuumStoreException;
+
+    Map getDefaultBuildDefinitions();
+
+    /**
+     * returns the default build definitions for the project group and there
+     * should always be at least one declared.
+     *
+     * @param projectGroupId The project group id
+     * @return The list of default build definitions
+     * @throws ContinuumStoreException if the build definitions list can't be obtain
+     */
+    List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup( int projectGroupId )
+        throws ContinuumStoreException;
+
+    /**
+     * returns the default build definitions for the project group and there
+     * should always be at least one declared.
+     *
+     * @param projectGroup The project group
+     * @return The list of default build definitions
+     * @throws ContinuumStoreException if the build definitions list can't be obtain
+     */
+    List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup( ProjectGroup projectGroup )
+        throws ContinuumStoreException;
+
+    /**
+     * returns the default build definition of the project, if the project
+     * doesn't have on declared the default of the project group will be
+     * returned <p/> this should be the most common usage of the default build
+     * definition accessing methods
+     *
+     * @param projectId
+     * @return
+     * @throws ContinuumStoreException
+     * @throws org.apache.maven.continuum.store.ContinuumObjectNotFoundException
+     *
+     */
+    BuildDefinition getDefaultBuildDefinitionForProject( int projectId )
+        throws ContinuumStoreException;
+
+    /**
+     * returns the default build definition for the project without consulting
+     * the project group
+     *
+     * @param project
+     * @return
+     * @throws ContinuumStoreException
+     * @throws org.apache.maven.continuum.store.ContinuumObjectNotFoundException
+     *
+     */
+    BuildDefinition getDefaultBuildDefinitionForProject( Project project )
+        throws ContinuumStoreException;
+
+    List<BuildDefinition> getAllTemplates()
+        throws ContinuumStoreException;
+}

Propchange: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java?rev=682300&view=auto
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java (added)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java Mon Aug  4 02:06:43 2008
@@ -0,0 +1,79 @@
+package org.apache.continuum.dao;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.model.project.ProjectGroup;
+import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
+import org.apache.maven.continuum.store.ContinuumStoreException;
+
+import java.util.List;
+
+/**
+ * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
+ * @version $Id$
+ */
+public interface ProjectDao
+{
+    void removeProject( Project project );
+
+    void updateProject( Project project )
+        throws ContinuumStoreException;
+
+    Project getProject( int projectId )
+        throws ContinuumStoreException;
+
+    Project getProject( String groupId, String artifactId, String version )
+        throws ContinuumStoreException;
+
+    Project getProjectByName( String name )
+        throws ContinuumStoreException;
+
+    List<Project> getProjectsWithDependenciesByGroupId( int projectGroupId );
+
+    Project getProjectWithBuilds( int projectId )
+        throws ContinuumStoreException;
+
+    Project getProjectWithBuildDetails( int projectId )
+        throws ContinuumStoreException;
+
+    Project getProjectWithCheckoutResult( int projectId )
+        throws ContinuumStoreException;
+
+    List<Project> getProjectsInGroup( int projectGroupId )
+        throws ContinuumStoreException;
+
+    List<Project> getProjectsInGroupWithDependencies( int projectGroupId )
+        throws ContinuumStoreException;
+
+    List<Project> getAllProjectsWithAllDetails();
+
+    Project getProjectWithAllDetails( int projectId )
+        throws ContinuumStoreException;
+
+    List<Project> getAllProjectsByName();
+
+    List<Project> getAllProjectsByNameWithDependencies();
+
+    List<Project> getAllProjectsByNameWithBuildDetails();
+
+    ProjectGroup getProjectGroupByProjectId( int projectId )
+        throws ContinuumObjectNotFoundException;
+}

Propchange: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java Mon Aug  4 02:06:43 2008
@@ -66,51 +66,6 @@
     BuildDefinition getDefaultBuildDefinition( int projectId )
         throws ContinuumStoreException, ContinuumObjectNotFoundException;
 
-    /**
-     * returns the default build definition for the project without consulting
-     * the project group
-     *
-     * @param projectId
-     * @return
-     * @throws ContinuumStoreException
-     * @throws ContinuumObjectNotFoundException
-     *
-     */
-    BuildDefinition getDefaultBuildDefinitionForProject( int projectId )
-        throws ContinuumStoreException, ContinuumObjectNotFoundException;
-
-    /**
-     * returns the default build definitions for the project group and there
-     * should always be at least one declared
-     *
-     * @param projectGroupId
-     * @return
-     * @throws ContinuumStoreException
-     * @throws ContinuumObjectNotFoundException
-     *
-     */
-    List<BuildDefinition> getDefaultBuildDefinitionsForProjectGroup( int projectGroupId )
-        throws ContinuumStoreException, ContinuumObjectNotFoundException;
-
-    BuildDefinition getBuildDefinition( int buildDefinitionId )
-        throws ContinuumStoreException, ContinuumObjectNotFoundException;
-
-    void removeBuildDefinition( BuildDefinition buildDefinition )
-        throws ContinuumStoreException;
-
-    BuildDefinition storeBuildDefinition( BuildDefinition buildDefinition )
-        throws ContinuumStoreException;
-
-    BuildDefinition addBuildDefinition( BuildDefinition buildDefinition )
-        throws ContinuumStoreException;
-
-    List<BuildDefinition> getAllBuildDefinitions()
-        throws ContinuumStoreException;
-
-    List<BuildDefinition> getAllTemplates()
-        throws ContinuumStoreException;
-
-    // ------------------------------------------------------
     //  BuildDefinitionTemplate
     // ------------------------------------------------------
 
@@ -160,8 +115,6 @@
 
     List<Project> getAllProjectsByNameWithDependencies();
 
-    public List<Project> getProjectsWithDependenciesByGroupId( int projectGroupId );
-
     List<Project> getAllProjectsByNameWithBuildDetails();
 
     List<Schedule> getAllSchedulesByName();
@@ -210,15 +163,6 @@
 
     List<BuildResult> getAllBuildsForAProjectByDate( int projectId );
 
-    Project getProject( int projectId )
-        throws ContinuumStoreException, ContinuumObjectNotFoundException;
-
-    Project getProject( String groupId, String artifactId, String version )
-        throws ContinuumStoreException;
-
-    Project getProjectByName( String name )
-        throws ContinuumStoreException;
-
     Map getProjectIdsAndBuildDefinitionsIdsBySchedule( int scheduleId )
         throws ContinuumStoreException;
 
@@ -228,38 +172,16 @@
     public Map getAggregatedProjectIdsAndBuildDefinitionIdsBySchedule( int scheduleId )
         throws ContinuumStoreException;
 
-    void updateProject( Project project )
-        throws ContinuumStoreException;
-
     void updateSchedule( Schedule schedule )
         throws ContinuumStoreException;
 
-    Project getProjectWithBuilds( int projectId )
-        throws ContinuumStoreException, ContinuumObjectNotFoundException;
-
     void removeSchedule( Schedule schedule );
 
-    Project getProjectWithCheckoutResult( int projectId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
     BuildResult getBuildResult( int buildId )
         throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
     void removeBuildResult( BuildResult buildResult );
 
-    void removeProject( Project project );
-
-    List<Project> getProjectsInGroup( int projectGroupId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
-    List<Project> getProjectsInGroupWithDependencies( int projectGroupId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
-    List<Project> getAllProjectsWithAllDetails();
-
-    Project getProjectWithAllDetails( int projectId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
     Schedule getSchedule( int scheduleId )
         throws ContinuumObjectNotFoundException, ContinuumStoreException;
 
@@ -298,9 +220,6 @@
     void updateBuildResult( BuildResult build )
         throws ContinuumStoreException;
 
-    Project getProjectWithBuildDetails( int projectId )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException;
-
     SystemConfiguration addSystemConfiguration( SystemConfiguration systemConf );
 
     void updateSystemConfiguration( SystemConfiguration systemConf )

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Mon Aug  4 02:06:43 2008
@@ -21,6 +21,8 @@
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.configuration.ContinuumConfigurationException;
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.maven.continuum.build.settings.SchedulesActivationException;
 import org.apache.maven.continuum.build.settings.SchedulesActivator;
@@ -127,6 +129,16 @@
     /**
      * @plexus.requirement
      */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
+    /**
+     * @plexus.requirement
+     */
     private ProjectGroupDao projectGroupDao;
 
     /**
@@ -785,7 +797,7 @@
 
             FileUtils.deleteDirectory( buildOutputDirectory );
 
-            store.removeProject( store.getProject( projectId ) );
+            projectDao.removeProject( projectDao.getProject( projectId ) );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -815,7 +827,7 @@
     {
         try
         {
-            return store.getProject( projectId );
+            return projectDao.getProject( projectId );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -828,7 +840,7 @@
     {
         try
         {
-            return store.getProjectWithBuildDetails( projectId );
+            return projectDao.getProjectWithBuildDetails( projectId );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -976,7 +988,7 @@
 
         try
         {
-            projectsList = getProjectsInBuildOrder( store.getProjectsWithDependenciesByGroupId( projectGroupId ) );
+            projectsList = getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId( projectGroupId ) );
         }
         catch ( CycleDetectedException e )
         {
@@ -1006,7 +1018,7 @@
                 BuildDefinition projectDefaultBD = null;
                 try
                 {
-                    projectDefaultBD = store.getDefaultBuildDefinitionForProject( project.getId() );
+                    projectDefaultBD = buildDefinitionDao.getDefaultBuildDefinitionForProject( project.getId() );
                 }
                 catch ( ContinuumObjectNotFoundException e )
                 {
@@ -1142,7 +1154,7 @@
 
         try
         {
-            project = store.getProject( projectId );
+            project = projectDao.getProject( projectId );
         }
         catch ( ContinuumStoreException e )
         {
@@ -1189,18 +1201,18 @@
 
                     project.setState( ContinuumProjectState.ERROR );
 
-                    store.updateProject( project );
+                    projectDao.updateProject( project );
 
-                    project = store.getProject( project.getId() );
+                    project = projectDao.getProject( project.getId() );
                 }
             }
             else
             {
                 project.setOldState( project.getState() );
 
-                store.updateProject( project );
+                projectDao.updateProject( project );
 
-                project = store.getProject( project.getId() );
+                project = projectDao.getProject( project.getId() );
             }
 
             BuildDefinition buildDefinition = getBuildDefinition( buildDefinitionId );
@@ -1216,7 +1228,7 @@
             BuildProjectTask task = new BuildProjectTask( project.getId(), buildDefinitionId, trigger, project
                 .getName(), buildDefinitionLabel );
 
-            task.setMaxExecutionTime( store.getBuildDefinition( buildDefinitionId ).getSchedule()
+            task.setMaxExecutionTime( buildDefinitionDao.getBuildDefinition( buildDefinitionId ).getSchedule()
                 .getMaxJobExecutionTime() * 1000 );
 
             buildQueue.put( task );
@@ -1861,7 +1873,7 @@
                 // FIXME
                 // olamy  : read again the project to have values because store.updateProjectGroup( projectGroup ); 
                 // remove object data -> we don't display the project name in the build queue
-                context.put( AbstractContinuumAction.KEY_PROJECT, store.getProject( project.getId() ) );
+                context.put( AbstractContinuumAction.KEY_PROJECT, projectDao.getProject( project.getId() ) );
                 executeAction( "add-project-to-checkout-queue", context );
             }
         }
@@ -2234,7 +2246,7 @@
     {
         try
         {
-            return store.getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
+            return buildDefinitionDao.getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException cne )
         {
@@ -2253,7 +2265,7 @@
     {
         try
         {
-            return store.getBuildDefinition( buildDefinitionId );
+            return buildDefinitionDao.getBuildDefinition( buildDefinitionId );
         }
         catch ( ContinuumObjectNotFoundException cne )
         {
@@ -2376,7 +2388,7 @@
     {
         try
         {
-            store.removeBuildDefinition( buildDefinition );
+            buildDefinitionDao.removeBuildDefinition( buildDefinition );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -2552,7 +2564,7 @@
     {
         try
         {
-            return workingDirectoryService.getWorkingDirectory( store.getProject( projectId ) );
+            return workingDirectoryService.getWorkingDirectory( projectDao.getProject( projectId ) );
         }
         catch ( ContinuumStoreException e )
         {
@@ -2778,9 +2790,9 @@
                     getLogger().info( "Fix project state for project " + project.getId() + ":" + project.getName() +
                         ":" + project.getVersion() );
 
-                    store.updateProject( project );
+                    projectDao.updateProject( project );
 
-                    Project p = store.getProject( project.getId() );
+                    Project p = projectDao.getProject( project.getId() );
 
                     if ( state == p.getState() )
                     {
@@ -2971,7 +2983,7 @@
         {
             boolean removeWorkingDirectory = false;
 
-            Project p = store.getProject( project.getId() );
+            Project p = projectDao.getProject( project.getId() );
 
             if ( !p.getScmUrl().equals( project.getScmUrl() ) )
             {
@@ -3003,7 +3015,7 @@
                 project.setScmTag( null );
             }
 
-            store.updateProject( project );
+            projectDao.updateProject( project );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -3066,7 +3078,7 @@
     {
         try
         {
-            return store.getProjectWithCheckoutResult( projectId );
+            return projectDao.getProjectWithCheckoutResult( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3080,7 +3092,7 @@
 
     public List<Project> getAllProjectsWithAllDetails( int start, int end )
     {
-        return store.getAllProjectsWithAllDetails();
+        return projectDao.getAllProjectsWithAllDetails();
     }
 
     public Project getProjectWithAllDetails( int projectId )
@@ -3088,7 +3100,7 @@
     {
         try
         {
-            return store.getProjectWithAllDetails( projectId );
+            return projectDao.getProjectWithAllDetails( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3122,7 +3134,7 @@
     {
         try
         {
-            return store.getProjectWithBuilds( projectId );
+            return projectDao.getProjectWithBuilds( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3150,7 +3162,7 @@
     {
         try
         {
-            return store.getProjectsInGroup( projectGroupId );
+            return projectDao.getProjectsInGroup( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3167,7 +3179,7 @@
     {
         try
         {
-            return store.getProjectsInGroupWithDependencies( projectGroupId );
+            return projectDao.getProjectsInGroupWithDependencies( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.manager.BuildExecutorManager;
@@ -59,6 +61,16 @@
     implements BuildController
 {
     /**
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
+    /**
      * @plexus.requirement role-hint="jdo"
      */
     private ContinuumStore store;
@@ -216,7 +228,7 @@
                         project.setState( ContinuumProjectState.ERROR );
                     }
 
-                    store.updateProject( project );
+                    projectDao.updateProject( project );
                 }
                 catch ( ContinuumStoreException e )
                 {
@@ -263,7 +275,7 @@
 
         try
         {
-            store.updateProject( context.getProject() );
+            projectDao.updateProject( context.getProject() );
         }
         catch ( ContinuumStoreException e )
         {
@@ -296,7 +308,7 @@
 
         try
         {
-            store.updateProject( project );
+            projectDao.updateProject( project );
         }
         catch ( ContinuumStoreException e )
         {
@@ -327,9 +339,9 @@
 
         try
         {
-            context.setProject( store.getProject( projectId ) );
+            context.setProject( projectDao.getProject( projectId ) );
 
-            BuildDefinition buildDefinition = store.getBuildDefinition( buildDefinitionId );
+            BuildDefinition buildDefinition = buildDefinitionDao.getBuildDefinition( buildDefinitionId );
 
             context.setBuildDefinition( buildDefinition );
 
@@ -534,7 +546,7 @@
             }
             catch ( Exception e )
             {
-                throw new TaskExecutionException("Can't determine if the project should build or not", e);
+                throw new TaskExecutionException( "Can't determine if the project should build or not", e );
             }
         }
 
@@ -550,7 +562,7 @@
 
             try
             {
-                store.updateProject( project );
+                projectDao.updateProject( project );
             }
             catch ( ContinuumStoreException e )
             {
@@ -611,7 +623,7 @@
 
         try
         {
-            Project project = store.getProjectWithAllDetails( context.getProject().getId() );
+            Project project = projectDao.getProjectWithAllDetails( context.getProject().getId() );
             List<ProjectDependency> dependencies = project.getDependencies();
 
             if ( dependencies == null )
@@ -633,7 +645,8 @@
 
             for ( ProjectDependency dep : dependencies )
             {
-                Project dependencyProject = store.getProject( dep.getGroupId(), dep.getArtifactId(), dep.getVersion() );
+                Project dependencyProject =
+                    projectDao.getProject( dep.getGroupId(), dep.getArtifactId(), dep.getVersion() );
 
                 if ( dependencyProject != null )
                 {
@@ -854,7 +867,7 @@
 
                 project.setState( build.getState() );
 
-                store.updateProject( project );
+                projectDao.updateProject( project );
 
                 return false;
             }

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java Mon Aug  4 02:06:43 2008
@@ -19,7 +19,9 @@
 package org.apache.maven.continuum.builddefinition;
 
 import org.apache.continuum.configuration.ContinuumConfigurationException;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.dao.ProjectGroupDao;
+import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
@@ -81,7 +83,6 @@
      */
     private String defaultM2Arguments;
 
-
     /**
      * @plexus.requirement role-hint="jdo"
      */
@@ -90,6 +91,16 @@
     /**
      * @plexus.requirement
      */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
+    /**
+     * @plexus.requirement
+     */
     private ProjectGroupDao projectGroupDao;
 
     /**
@@ -128,7 +139,7 @@
     {
         try
         {
-            return store.getBuildDefinition( buildDefinitionId );
+            return buildDefinitionDao.getBuildDefinition( buildDefinitionId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -145,7 +156,7 @@
     {
         try
         {
-            return store.addBuildDefinition( buildDefinition );
+            return buildDefinitionDao.addBuildDefinition( buildDefinition );
         }
         catch ( ContinuumStoreException e )
         {
@@ -159,7 +170,7 @@
     {
         try
         {
-            store.removeBuildDefinition( buildDefinition );
+            buildDefinitionDao.removeBuildDefinition( buildDefinition );
         }
         catch ( ContinuumStoreException e )
         {
@@ -172,7 +183,7 @@
     {
         try
         {
-            BuildDefinition storedBuildDefinition = store.getBuildDefinition( buildDefinition.getId() );
+            BuildDefinition storedBuildDefinition = buildDefinitionDao.getBuildDefinition( buildDefinition.getId() );
             storedBuildDefinition.setBuildFresh( buildDefinition.isBuildFresh() );
             storedBuildDefinition.setAlwaysBuild( buildDefinition.isAlwaysBuild() );
             storedBuildDefinition.setArguments( buildDefinition.getArguments() );
@@ -183,7 +194,7 @@
             storedBuildDefinition.setProfile( buildDefinition.getProfile() );
             storedBuildDefinition.setSchedule( buildDefinition.getSchedule() );
             storedBuildDefinition.setType( buildDefinition.getType() );
-            store.storeBuildDefinition( storedBuildDefinition );
+            buildDefinitionDao.storeBuildDefinition( storedBuildDefinition );
         }
         catch ( ContinuumStoreException e )
         {
@@ -197,7 +208,7 @@
     {
         try
         {
-            return store.getAllBuildDefinitions();
+            return buildDefinitionDao.getAllBuildDefinitions();
         }
         catch ( ContinuumStoreException e )
         {
@@ -211,7 +222,7 @@
     {
         try
         {
-            return store.getAllTemplates();
+            return buildDefinitionDao.getAllTemplates();
         }
         catch ( ContinuumStoreException e )
         {
@@ -557,17 +568,17 @@
             {
                 return;
             }
-            project = store.getProjectWithBuildDetails( project.getId() );
+            project = projectDao.getProjectWithBuildDetails( project.getId() );
             List<BuildDefinition> buildDefs = new ArrayList<BuildDefinition>();
             for ( Iterator<BuildDefinition> iterator = template.getBuildDefinitions().iterator(); iterator.hasNext(); )
             {
                 BuildDefinition bd = iterator.next();
                 bd = cloneBuildDefinition( bd );
                 bd.setTemplate( false );
-                bd = store.addBuildDefinition( bd );
+                bd = buildDefinitionDao.addBuildDefinition( bd );
                 project.addBuildDefinition( bd );
             }
-            store.updateProject( project );
+            projectDao.updateProject( project );
 
         }
         catch ( ContinuumStoreException e )
@@ -591,7 +602,7 @@
             for ( Iterator<BuildDefinition> iterator = template.getBuildDefinitions().iterator(); iterator.hasNext(); )
             {
                 BuildDefinition bd = iterator.next();
-                bd = store.addBuildDefinition( cloneBuildDefinition( bd ) );
+                bd = buildDefinitionDao.addBuildDefinition( cloneBuildDefinition( bd ) );
                 projectGroup.addBuildDefinition( bd );
             }
             projectGroupDao.updateProjectGroup( projectGroup );

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java Mon Aug  4 02:06:43 2008
@@ -19,8 +19,7 @@
  * under the License.
  */
 
-import java.util.List;
-
+import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -31,6 +30,8 @@
 import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
+import java.util.List;
+
 /**
  * AbstractBuildDefinitionContinuumAction:
  *
@@ -45,6 +46,11 @@
      */
     protected ContinuumStore store;
 
+    /**
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
     protected void resolveDefaultBuildDefinitionsForProject( BuildDefinition buildDefinition, Project project )
         throws ContinuumException
     {
@@ -53,13 +59,14 @@
             // if buildDefinition passed in is not default then we are done
             if ( buildDefinition.isDefaultForProject() )
             {
-                BuildDefinition storedDefinition = store.getDefaultBuildDefinitionForProject( project.getId() );
+                BuildDefinition storedDefinition =
+                    buildDefinitionDao.getDefaultBuildDefinitionForProject( project.getId() );
 
                 if ( storedDefinition != null )
                 {
                     storedDefinition.setDefaultForProject( false );
 
-                    store.storeBuildDefinition( storedDefinition );
+                    buildDefinitionDao.storeBuildDefinition( storedDefinition );
                 }
             }
         }
@@ -93,7 +100,7 @@
         try
         {
             List<BuildDefinition> storedDefinitions =
-                store.getDefaultBuildDefinitionsForProjectGroup( projectGroup.getId() );
+                buildDefinitionDao.getDefaultBuildDefinitionsForProjectGroup( projectGroup.getId() );
 
             for ( BuildDefinition storedDefinition : storedDefinitions )
             {
@@ -106,10 +113,10 @@
                             buildDefinition.getType().equals( storedDefinition.getType() ) )
                         {
                             //Required to get build def from store because storedDefinition is readonly
-                            BuildDefinition def = store.getBuildDefinition( storedDefinition.getId() );
+                            BuildDefinition def = buildDefinitionDao.getBuildDefinition( storedDefinition.getId() );
                             def.setDefaultForProject( false );
 
-                            store.storeBuildDefinition( def );
+                            buildDefinitionDao.storeBuildDefinition( def );
                         }
                     }
                 }
@@ -141,7 +148,8 @@
      * @param buildDefinition
      * @throws ContinuumException
      */
-    protected BuildDefinition updateBuildDefinitionInList( List<BuildDefinition> buildDefinitions, BuildDefinition buildDefinition )
+    protected BuildDefinition updateBuildDefinitionInList( List<BuildDefinition> buildDefinitions,
+                                                           BuildDefinition buildDefinition )
         throws ContinuumException
     {
         try
@@ -193,7 +201,7 @@
 
                 storedDefinition.setAlwaysBuild( buildDefinition.isAlwaysBuild() );
 
-                store.storeBuildDefinition( storedDefinition );
+                buildDefinitionDao.storeBuildDefinition( storedDefinition );
 
                 return storedDefinition;
             }

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java Mon Aug  4 02:06:43 2008
@@ -15,6 +15,7 @@
  * the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.Project;
@@ -33,11 +34,16 @@
 public class AddBuildDefinitionToProjectAction
     extends AbstractBuildDefinitionContinuumAction
 {
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
     public void execute( Map map )
         throws Exception
     {
         int projectId = getProjectId( map );
-        Project project = store.getProjectWithAllDetails( projectId );
+        Project project = projectDao.getProjectWithAllDetails( projectId );
 
         BuildDefinitionTemplate buildDefinitionTemplate = getBuildDefinitionTemplate( map );
 
@@ -51,7 +57,7 @@
 
                 project.addBuildDefinition( buildDefinition );
 
-                store.updateProject( project );
+                projectDao.updateProject( project );
                 if ( buildDefinition.isDefaultForProject() )
                 {
                     map.put( AbstractContinuumAction.KEY_BUILD_DEFINITION, buildDefinition );
@@ -65,7 +71,7 @@
 
             project.addBuildDefinition( buildDefinition );
 
-            store.updateProject( project );
+            projectDao.updateProject( project );
             map.put( AbstractContinuumAction.KEY_BUILD_DEFINITION, buildDefinition );
         }
 

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java Mon Aug  4 02:06:43 2008
@@ -19,14 +19,14 @@
  * under the License.
  */
 
-import java.util.Map;
-
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -47,19 +47,19 @@
     private TaskQueue checkOutQueue;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
-    
+    private ProjectDao projectDao;
+
     @SuppressWarnings("unchecked")
     public void execute( Map context )
         throws Exception
     {
-        
+
         Project project = (Project) getObject( context, KEY_PROJECT, null );
-        if (project == null)
+        if ( project == null )
         {
-            project = store.getProject( getProjectId( context ) );
+            project = projectDao.getProject( getProjectId( context ) );
         }
 
         CheckOutTask checkOutTask = new CheckOutTask( project.getId(), workingDirectoryService

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Mon Aug  4 02:06:43 2008
@@ -19,8 +19,8 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 
 import java.io.File;
@@ -41,14 +41,14 @@
     private WorkingDirectoryService workingDirectoryService;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private ProjectDao projectDao;
 
     public void execute( Map context )
         throws Exception
     {
-        Project project = store.getProject( getProjectId( context ) );
+        Project project = projectDao.getProject( getProjectId( context ) );
 
         File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Mon Aug  4 02:06:43 2008
@@ -19,11 +19,8 @@
  * under the License.
  */
 
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
+import org.apache.continuum.dao.ProjectDao;
+import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.scm.ContinuumScm;
 import org.apache.continuum.scm.ContinuumScmConfiguration;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -41,6 +38,11 @@
 import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -60,25 +62,30 @@
     private ContinuumScm scm;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private ProjectDao projectDao;
 
     public void execute( Map context )
         throws ContinuumObjectNotFoundException, ContinuumStoreException
     {
-        Project project = store.getProject( getProject( context ).getId() );
+        Project project = projectDao.getProject( getProject( context ).getId() );
 
         BuildDefinition buildDefinition = getBuildDefinition( context );
 
         if ( buildDefinition != null )
         {
-            buildDefinition = store.getBuildDefinition( buildDefinition.getId() );
+            buildDefinition = buildDefinitionDao.getBuildDefinition( buildDefinition.getId() );
         }
 
         project.setState( ContinuumProjectState.CHECKING_OUT );
 
-        store.updateProject( project );
+        projectDao.updateProject( project );
 
         File workingDirectory = getWorkingDirectory( context );
 
@@ -92,13 +99,12 @@
         {
             String scmUserName = getString( context, KEY_SCM_USERNAME, "" );
             String scmPassword = getString( context, KEY_SCM_PASSWORD, "" );
-            ContinuumScmConfiguration config = createScmConfiguration( project, workingDirectory, scmUserName, scmPassword );
+            ContinuumScmConfiguration config =
+                createScmConfiguration( project, workingDirectory, scmUserName, scmPassword );
 
             String tag = config.getTag();
-            getLogger().info(
-                              "Checking out project: '" + project.getName() + "', id: '" + project.getId() + "' "
-                                  + "to '" + workingDirectory + "'"
-                                  + ( tag != null ? " with branch/tag " + tag + "." : "." ) );
+            getLogger().info( "Checking out project: '" + project.getName() + "', id: '" + project.getId() + "' " +
+                "to '" + workingDirectory + "'" + ( tag != null ? " with branch/tag " + tag + "." : "." ) );
 
             CheckOutScmResult checkoutResult = scm.checkout( config );
             if ( StringUtils.isNotEmpty( checkoutResult.getRelativePathProjectDirectory() ) )
@@ -111,10 +117,9 @@
             {
                 // TODO: is it more appropriate to return this in the converted result so that it can be presented to
                 // the user?
-                String msg =
-                    "Error while checking out the code for project: '" + project.getName() + "', id: '"
-                        + project.getId() + "' to '" + workingDirectory.getAbsolutePath() + "'"
-                        + ( tag != null ? " with branch/tag " + tag + "." : "." );
+                String msg = "Error while checking out the code for project: '" + project.getName() + "', id: '" +
+                    project.getId() + "' to '" + workingDirectory.getAbsolutePath() + "'" +
+                    ( tag != null ? " with branch/tag " + tag + "." : "." );
                 getLogger().warn( msg );
 
                 getLogger().warn( "Command output: " + checkoutResult.getCommandOutput() );
@@ -135,8 +140,8 @@
             result.setSuccess( false );
 
             result.setProviderMessage( e.getMessage() + ": " + getValidationMessages( e ) );
-            
-            getLogger().error( e.getMessage(), e);
+
+            getLogger().error( e.getMessage(), e );
         }
         catch ( NoSuchScmProviderException e )
         {
@@ -146,8 +151,8 @@
             result.setSuccess( false );
 
             result.setProviderMessage( e.getMessage() );
-            
-            getLogger().error( e.getMessage(), e);
+
+            getLogger().error( e.getMessage(), e );
         }
         catch ( ScmException e )
         {
@@ -156,8 +161,8 @@
             result.setSuccess( false );
 
             result.setException( ContinuumUtils.throwableMessagesToString( e ) );
-            
-            getLogger().error( e.getMessage(), e);
+
+            getLogger().error( e.getMessage(), e );
         }
         catch ( Throwable t )
         {
@@ -168,8 +173,8 @@
             result.setSuccess( false );
 
             result.setException( ContinuumUtils.throwableMessagesToString( t ) );
-            
-            getLogger().error( t.getMessage(), t);
+
+            getLogger().error( t.getMessage(), t );
         }
         finally
         {
@@ -179,11 +184,11 @@
                 project.setRelativePath( relativePath );
             }
 
-            project = store.getProject( project.getId() );
+            project = projectDao.getProject( project.getId() );
 
             project.setState( ContinuumProjectState.CHECKEDOUT );
 
-            store.updateProject( project );
+            projectDao.updateProject( project );
 
             notifier.checkoutComplete( project, buildDefinition );
         }

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java Mon Aug  4 02:06:43 2008
@@ -19,12 +19,11 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 import org.apache.maven.shared.model.fileset.FileSet;
 import org.apache.maven.shared.model.fileset.util.FileSetManager;
-import org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
 import java.util.Map;
@@ -44,14 +43,14 @@
     private WorkingDirectoryService workingDirectoryService;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private ProjectDao projectDao;
 
     public void execute( Map context )
         throws Exception
     {
-        Project project = store.getProject( getProjectId( context ) );
+        Project project = projectDao.getProject( getProjectId( context ) );
 
         File workingDirectory = workingDirectoryService.getWorkingDirectory( project );
 

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutionResult;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
@@ -64,6 +65,11 @@
     /**
      * @plexus.requirement
      */
+    private ProjectDao projectDao;
+
+    /**
+     * @plexus.requirement
+     */
     private ContinuumNotificationDispatcher notifier;
 
     public void execute( Map context )
@@ -73,7 +79,7 @@
         // Get parameters from the context
         // ----------------------------------------------------------------------
 
-        Project project = store.getProject( getProject( context ).getId() );
+        Project project = projectDao.getProject( getProject( context ).getId() );
 
         BuildDefinition buildDefinition = getBuildDefinition( context );
 
@@ -133,7 +139,7 @@
         {
             buildResult.setEndTime( new Date().getTime() );
 
-            project = store.getProject( project.getId() );
+            project = projectDao.getProject( project.getId() );
 
             if ( buildResult.getState() == ContinuumProjectState.OK )
             {
@@ -162,8 +168,8 @@
             buildResult = store.getBuildResult( buildResult.getId() );
 
             context.put( KEY_PROJECT, project );
-            
-            store.updateProject( project );
+
+            projectDao.updateProject( project );
 
             notifier.goalsCompleted( project, buildDefinition, buildResult );
 

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectAction.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 
@@ -35,6 +36,10 @@
 public class RemoveBuildDefinitionFromProjectAction
     extends AbstractBuildDefinitionContinuumAction
 {
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
 
     public void execute( Map map )
         throws Exception
@@ -42,13 +47,13 @@
         BuildDefinition buildDefinition = getBuildDefinition( map );
         int projectId = getProjectId( map );
 
-        Project project = store.getProjectWithAllDetails( projectId );
+        Project project = projectDao.getProjectWithAllDetails( projectId );
 
         // removing build definition from project doesn't effect anything if it is the default for the proejct, the
         // default will just change automatically to the default build definition of the project group.
 
         project.removeBuildDefinition( buildDefinition );
 
-        store.updateProject( project );
+        projectDao.updateProject( project );
     }
 }

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java Mon Aug  4 02:06:43 2008
@@ -19,9 +19,9 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ScmResult;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
 
@@ -37,9 +37,9 @@
     extends AbstractContinuumAction
 {
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private ProjectDao projectDao;
 
     public void execute( Map context )
         throws TaskExecutionException
@@ -52,11 +52,11 @@
 
             ScmResult scmResult = AbstractContinuumAction.getCheckoutResult( context, null );
 
-            Project project = store.getProject( getProjectId( context ) );
+            Project project = projectDao.getProject( getProjectId( context ) );
 
             project.setCheckoutResult( scmResult );
 
-            store.updateProject( project );
+            projectDao.updateProject( project );
         }
         catch ( ContinuumStoreException e )
         {

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectAction.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
 
@@ -35,6 +36,10 @@
 public class UpdateBuildDefinitionFromProjectAction
     extends AbstractBuildDefinitionContinuumAction
 {
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
 
     public void execute( Map map )
         throws Exception
@@ -42,7 +47,7 @@
         BuildDefinition buildDefinition = getBuildDefinition( map );
         int projectId = getProjectId( map );
 
-        Project project = store.getProjectWithAllDetails( projectId );
+        Project project = projectDao.getProjectWithAllDetails( projectId );
 
         resolveDefaultBuildDefinitionsForProject( buildDefinition, project );
 

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java Mon Aug  4 02:06:43 2008
@@ -41,7 +41,6 @@
      */
     private ProjectGroupDao projectGroupDao;
 
-
     public void execute( Map map )
         throws Exception
     {

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutor;
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorException;
@@ -55,16 +57,26 @@
      */
     private ContinuumStore store;
 
+    /**
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
     public void execute( Map context )
         throws ContinuumStoreException, ContinuumException, ContinuumBuildExecutorException
     {
         Project project = getProject( context );
 
-        project = store.getProjectWithAllDetails( project.getId() );
+        project = projectDao.getProjectWithAllDetails( project.getId() );
 
         getLogger().info( "Updating project '" + project.getName() + "' from checkout." );
 
-        BuildDefinition buildDefinition = store.getBuildDefinition( getBuildDefinitionId( context ) );
+        BuildDefinition buildDefinition = buildDefinitionDao.getBuildDefinition( getBuildDefinitionId( context ) );
 
         // ----------------------------------------------------------------------
         // Make a new descriptor
@@ -79,6 +91,6 @@
         // Store the new descriptor
         // ----------------------------------------------------------------------
 
-        store.updateProject( project );
+        projectDao.updateProject( project );
     }
 }

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.scm.ContinuumScm;
 import org.apache.continuum.scm.ContinuumScmConfiguration;
 import org.apache.maven.continuum.model.project.BuildDefinition;
@@ -41,7 +42,6 @@
 
 import java.io.File;
 import java.util.Date;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -73,11 +73,16 @@
      */
     private ContinuumStore store;
 
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
     public void execute( Map context )
         throws ScmRepositoryException, NoSuchScmProviderException, ScmException, ContinuumObjectNotFoundException,
         ContinuumStoreException
     {
-        Project project = store.getProject( getProject( context ).getId() );
+        Project project = projectDao.getProject( getProject( context ).getId() );
 
         BuildDefinition buildDefinition = getBuildDefinition( context );
 
@@ -85,7 +90,7 @@
 
         project.setState( ContinuumProjectState.UPDATING );
 
-        store.updateProject( project );
+        projectDao.updateProject( project );
 
         UpdateScmResult scmResult;
 
@@ -109,9 +114,8 @@
             ContinuumScmConfiguration config = createScmConfiguration( project, workingDirectory );
             config.setLatestUpdateDate( latestUpdateDate );
             String tag = config.getTag();
-            String msg =
-                project.getName() + "', id: '" + project.getId() + "' to '" + workingDirectory.getAbsolutePath() + "'"
-                    + ( tag != null ? " with branch/tag " + tag + "." : "." );
+            String msg = project.getName() + "', id: '" + project.getId() + "' to '" +
+                workingDirectory.getAbsolutePath() + "'" + ( tag != null ? " with branch/tag " + tag + "." : "." );
             getLogger().info( "Updating project: " + msg );
             scmResult = scm.update( config );
 
@@ -137,11 +141,11 @@
             // TODO: transient states!
             try
             {
-                project = store.getProject( project.getId() );
+                project = projectDao.getProject( project.getId() );
 
                 project.setState( state );
 
-                store.updateProject( project );
+                projectDao.updateProject( project );
             }
             catch ( Exception e )
             {

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java Mon Aug  4 02:06:43 2008
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -60,6 +61,11 @@
     /**
      * @plexus.requirement
      */
+    private ProjectDao projectDao;
+
+    /**
+     * @plexus.requirement
+     */
     private ProjectGroupDao projectGroupDao;
 
     // ----------------------------------------------------------------------
@@ -117,7 +123,7 @@
             // Here we need to get all the project details
             //  - builds are used to detect if the state has changed (TODO: maybe previousState field is better)
             //  - notifiers are used to send the notification
-            project = store.getProjectWithAllDetails( project.getId() );
+            project = projectDao.getProjectWithAllDetails( project.getId() );
 
             ProjectGroup projectGroup =
                 projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( project.getProjectGroup().getId() );

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java Mon Aug  4 02:06:43 2008
@@ -19,9 +19,9 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.core.action.AbstractContinuumAction;
 import org.apache.maven.continuum.model.project.Project;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.action.ActionManager;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
@@ -48,9 +48,9 @@
     private ActionManager actionManager;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private ProjectDao projectDao;
 
     // ----------------------------------------------------------------------
     // TaskExecutor Implementation
@@ -67,7 +67,7 @@
 
         try
         {
-            project = store.getProjectWithBuildDetails( projectId );
+            project = projectDao.getProjectWithBuildDetails( projectId );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -85,11 +85,10 @@
         context.put( AbstractContinuumAction.KEY_PROJECT, project );
 
         context.put( AbstractContinuumAction.KEY_WORKING_DIRECTORY, workingDirectory );
-        
+
         context.put( AbstractContinuumAction.KEY_SCM_USERNAME, task.getScmUserName() );
-        
+
         context.put( AbstractContinuumAction.KEY_SCM_PASSWORD, task.getScmPassword() );
-        
 
         try
         {

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java Mon Aug  4 02:06:43 2008
@@ -54,7 +54,7 @@
         project1.setState( ContinuumProjectState.OK );
         projectId1 = addProject( getStore(), project1 ).getId();
         buildDefinitionId1 = getStore().getDefaultBuildDefinition( projectId1 ).getId();
-        project1 = getStore().getProject( projectId1 );
+        project1 = getProjectDao().getProject( projectId1 );
         BuildResult buildResult1 = new BuildResult();
         buildResult1.setStartTime( Calendar.getInstance().getTimeInMillis() );
         buildResult1.setEndTime( Calendar.getInstance().getTimeInMillis() );
@@ -140,13 +140,13 @@
     public void testWithNewProjects()
         throws Exception
     {
-        Project p1 = getStore().getProject( projectId1 );
+        Project p1 = getProjectDao().getProject( projectId1 );
         p1.setState( ContinuumProjectState.NEW );
-        getStore().updateProject( p1 );
+        getProjectDao().updateProject( p1 );
 
-        Project p2 = getStore().getProject( projectId2 );
+        Project p2 = getProjectDao().getProject( projectId2 );
         p2.setState( ContinuumProjectState.NEW );
-        getStore().updateProject( p2 );
+        getProjectDao().updateProject( p2 );
 
         BuildContext context = getContext();
         controller.checkProjectDependencies( context );

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java Mon Aug  4 02:06:43 2008
@@ -35,7 +35,6 @@
 public class DefaultBuildDefinitionServiceTest
     extends AbstractContinuumTest
 {
-
     private Logger logger = Logger.getLogger( getClass() );
 
     private ProjectGroup projectGroup;
@@ -96,7 +95,7 @@
             assertEquals( 5, getBuildDefinitionService().getAllBuildDefinitions().size() );
 
             getBuildDefinitionService().addTemplateInProject( buildDefinitionTemplate.getId(), project );
-            project = getStore().getProjectWithAllDetails( project.getId() );
+            project = getProjectDao().getProjectWithAllDetails( project.getId() );
             templates = getBuildDefinitionService().getAllBuildDefinitionTemplate();
             assertEquals( 1, project.getBuildDefinitions().size() );
             assertEquals( 5, templates.size() );
@@ -105,7 +104,7 @@
 
             getBuildDefinitionService().addTemplateInProject( buildDefinitionTemplate.getId(), project );
 
-            project = getStore().getProjectWithAllDetails( project.getId() );
+            project = getProjectDao().getProjectWithAllDetails( project.getId() );
             templates = getBuildDefinitionService().getAllBuildDefinitionTemplate();
             assertEquals( 2, project.getBuildDefinitions().size() );
             assertEquals( 5, templates.size() );

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java Mon Aug  4 02:06:43 2008
@@ -23,7 +23,6 @@
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.apache.maven.continuum.store.ContinuumStore;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -38,11 +37,9 @@
         ContinuumNotificationDispatcher notificationDispatcher =
             (ContinuumNotificationDispatcher) lookup( ContinuumNotificationDispatcher.ROLE );
 
-        ContinuumStore store = getStore();
+        Project project = addProject( getStore(), "Notification Dispatcher Test Project" );
 
-        Project project = addProject( store, "Notification Dispatcher Test Project" );
-
-        project = store.getProjectWithBuildDetails( project.getId() );
+        project = getProjectDao().getProjectWithBuildDetails( project.getId() );
 
         BuildResult build = new BuildResult();
 
@@ -52,9 +49,9 @@
 
         build.setTrigger( ContinuumProjectState.TRIGGER_SCHEDULED );
 
-        store.addBuildResult( project, build );
+        getStore().addBuildResult( project, build );
 
-        build = store.getBuildResult( build.getId() );
+        build = getStore().getBuildResult( build.getId() );
 
         notificationDispatcher.buildComplete( project, null, build );
     }

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml Mon Aug  4 02:06:43 2008
@@ -37,6 +37,9 @@
           <role-hint>jdo</role-hint>
         </requirement>
         <requirement>
+          <role>org.apache.continuum.dao.ProjectDao</role>
+        </requirement>
+        <requirement>
           <role>org.codehaus.plexus.mailsender.MailSender</role>
         </requirement>
         <requirement>

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml Mon Aug  4 02:06:43 2008
@@ -38,6 +38,9 @@
           <role-hint>jdo</role-hint>
         </requirement>
         <requirement>
+          <role>org.apache.continuum.dao.ProjectDao</role>
+        </requirement>
+        <requirement>
           <role>org.codehaus.plexus.mailsender.MailSender</role>
         </requirement>
         <requirement>

Modified: continuum/branches/continuum-refactoring-evenisse/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-refactoring-evenisse/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java?rev=682300&r1=682299&r2=682300&view=diff
==============================================================================
--- continuum/branches/continuum-refactoring-evenisse/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java (original)
+++ continuum/branches/continuum-refactoring-evenisse/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java Mon Aug  4 02:06:43 2008
@@ -20,6 +20,7 @@
  */
 
 import org.apache.continuum.configuration.ContinuumConfigurationException;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.configuration.ConfigurationLoadingException;
@@ -51,6 +52,11 @@
     private ConfigurationService configurationService;
 
     /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
+    /**
      * @plexus.requirement role-hint="jdo"
      */
     private ContinuumStore store;
@@ -260,7 +266,7 @@
                 //Normally, it isn't possible, buildDef should be != null
                 if ( project.getId() > 0 )
                 {
-                    project = getContinuumStore().getProjectWithBuilds( project.getId() );
+                    project = projectDao.getProjectWithBuilds( project.getId() );
                 }
                 builds = project.getBuildResults();
 



Mime
View raw message