continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r684085 [1/6] - in /continuum/trunk: ./ continuum-api/src/main/java/org/apache/continuum/dao/ continuum-api/src/main/java/org/apache/maven/continuum/store/ continuum-base/continuum-configuration/ continuum-commons/ continuum-commons/src/mai...
Date Fri, 08 Aug 2008 20:48:17 GMT
Author: evenisse
Date: Fri Aug  8 13:48:14 2008
New Revision: 684085

URL: http://svn.apache.org/viewvc?rev=684085&view=rev
Log:
Merge with continuum-refactoring-evenisse

Added:
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/
      - copied from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/BuildResultDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/DaoUtils.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/DaoUtils.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/InstallationDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/InstallationDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/LocalRepositoryDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/LocalRepositoryDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/NotifierDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/NotifierDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProfileDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProfileDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ProjectGroupDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ProjectGroupDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/ScheduleDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/ScheduleDao.java
    continuum/trunk/continuum-api/src/main/java/org/apache/continuum/dao/SystemConfigurationDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-api/src/main/java/org/apache/continuum/dao/SystemConfigurationDao.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/
      - copied from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/
      - copied from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/AbstractDao.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionTemplateDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/BuildResultDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/InstallationDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/LocalRepositoryDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/NotifierDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/ProfileDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/ProjectDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/ScheduleDaoImpl.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/StoreUtilities.java
    continuum/trunk/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java
      - copied unchanged from r683690, continuum/branches/continuum-refactoring-evenisse/continuum-store/src/main/java/org/apache/continuum/dao/SystemConfigurationDaoImpl.java
Removed:
    continuum/trunk/continuum-api/src/main/java/org/apache/maven/continuum/store/ContinuumStore.java
    continuum/trunk/continuum-store/src/main/java/org/apache/maven/continuum/store/
Modified:
    continuum/trunk/continuum-base/continuum-configuration/pom.xml
    continuum/trunk/continuum-commons/pom.xml
    continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml
    continuum/trunk/continuum-core/pom.xml
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/purge/DefaultContinuumPurgeManager.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddAssignableRolesAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddProjectToCheckOutQueueAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ExecuteBuilderContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveAssignableRolesAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/RemoveBuildDefinitionFromProjectGroupAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreCheckOutScmResultAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/StoreProjectGroupAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateBuildDefinitionFromProjectGroupAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateProjectFromWorkingDirectoryContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/UpdateWorkingDirectoryFromScmContinuumAction.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/ValidateProject.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializer.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/installation/DefaultInstallationService.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/DefaultContinuumNotificationDispatcher.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/profile/DefaultProfileService.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/DefaultContinuumScm.java
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/scm/queue/CheckOutTaskExecutor.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/purge/DefaultContinuumPurgeManagerTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/continuum/repository/DefaultRepositoryServiceTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/DefaultContinuumTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/BuildProjectTaskExecutorTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildcontroller/DefaultBuildControllerTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionServiceTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/buildqueue/BuildQueueTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/initialization/DefaultContinuumInitializerTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/installation/DefaultInstallationServiceTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/profile/DefaultProfileServiceTest.java
    continuum/trunk/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/ContinuumNotificationDispatcherTest.xml
    continuum/trunk/continuum-core/src/test/resources/org/apache/maven/continuum/notification/mail/MailContinuumNotifierTest.xml
    continuum/trunk/continuum-data-management/data-management-cli/pom.xml
    continuum/trunk/continuum-data-management/data-management-jdo/pom.xml
    continuum/trunk/continuum-data-management/data-management-jdo/src/main/java/org/apache/maven/continuum/management/JdoDataManagementTool.java
    continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
    continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/ContinuumPurgeConstants.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/DefaultPurgeConfigurationService.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/controller/DirectoryPurgeController.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/controller/RepositoryPurgeController.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/AbstractContinuumPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/CleanAllPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/DaysOldDirectoryPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/DaysOldRepositoryPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/ReleasedSnapshotsRepositoryPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/RetentionCountDirectoryPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/executor/RetentionCountRepositoryPurgeExecutor.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/content/ManagedDefaultRepositoryContent.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/content/ManagedLegacyRepositoryContent.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/scanner/DefaultRepositoryScanner.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/scanner/RepositoryScannerInstance.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/utils/FileTypes.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/utils/FilenameParser.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/repository/utils/LegacyPathParser.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/task/PurgeTask.java
    continuum/trunk/continuum-purge/src/main/java/org/apache/continuum/purge/task/PurgeTaskExecutor.java
    continuum/trunk/continuum-purge/src/main/resources/META-INF/plexus/components.xml
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/AbstractPurgeTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/DefaultPurgeConfigurationServiceTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/AbstractPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/CleanAllPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldDirectoryPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/DaysOldRepositoryPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/ReleasedSnapshotsRepositoryPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountDirectoryPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/java/org/apache/continuum/purge/executor/RetentionCountRepositoryPurgeExecutorTest.java
    continuum/trunk/continuum-purge/src/test/resources/META-INF/continuum/continuum-configuration.xml
    continuum/trunk/continuum-store/pom.xml
    continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/AbstractContinuumStoreTestCase.java
    continuum/trunk/continuum-store/src/test/java/org/apache/maven/continuum/store/ContinuumStoreTest.java
    continuum/trunk/continuum-test/src/main/java/org/apache/maven/continuum/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp/src/main/resources/META-INF/plexus/application.xml
    continuum/trunk/continuum-xmlrpc/continuum-xmlrpc-server/src/main/java/org/apache/maven/continuum/xmlrpc/server/ContinuumServiceImpl.java
    continuum/trunk/pom.xml

Modified: continuum/trunk/continuum-base/continuum-configuration/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-base/continuum-configuration/pom.xml?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-base/continuum-configuration/pom.xml (original)
+++ continuum/trunk/continuum-base/continuum-configuration/pom.xml Fri Aug  8 13:48:14 2008
@@ -26,26 +26,6 @@
   <modelVersion>4.0.0</modelVersion>
   <artifactId>continuum-configuration</artifactId>
   <name>Continuum Configuration</name>
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <systemProperties>
-            <property>
-              <name>appserver.base</name>
-              <value>${basedir}/target/test-classes/</value>    
-            </property>
-            <property>
-              <name>user.home</name>
-              <value>${basedir}/target/test-classes/</value>    
-            </property>            
-          </systemProperties>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
   <dependencies>
     <dependency>
       <groupId>org.apache.continuum</groupId>

Modified: continuum/trunk/continuum-commons/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/pom.xml?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/pom.xml (original)
+++ continuum/trunk/continuum-commons/pom.xml Fri Aug  8 13:48:14 2008
@@ -64,22 +64,6 @@
   <build>
     <plugins>
       <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <systemProperties>
-            <property>
-              <name>appserver.base</name>
-              <value>${basedir}/target/test-classes/</value>
-            </property>
-            <property>
-              <name>user.home</name>
-              <value>${basedir}/target/test-classes/</value>
-            </property>
-          </systemProperties>
-        </configuration>
-      </plugin>
-      <plugin>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-maven-plugin</artifactId>
         <executions>
@@ -93,4 +77,4 @@
       </plugin>
     </plugins>
   </build>
-</project>
\ No newline at end of file
+</project>

Modified: continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java (original)
+++ continuum/trunk/continuum-commons/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java Fri Aug  8 13:48:14 2008
@@ -22,9 +22,10 @@
 import org.apache.continuum.configuration.ContinuumConfiguration;
 import org.apache.continuum.configuration.ContinuumConfigurationException;
 import org.apache.continuum.configuration.GeneralConfiguration;
+import org.apache.continuum.dao.ScheduleDao;
+import org.apache.continuum.dao.SystemConfigurationDao;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.model.system.SystemConfiguration;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
@@ -51,9 +52,14 @@
     private File applicationHome;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
+     */
+    private ScheduleDao scheduleDao;
+
+    /**
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private SystemConfigurationDao systemConfigurationDao;
 
     /**
      * @plexus.requirement
@@ -80,14 +86,24 @@
         loadData();
     }
 
-    public void setStore( ContinuumStore store )
+    public ScheduleDao getScheduleDao()
+    {
+        return scheduleDao;
+    }
+
+    public void setScheduleDao( ScheduleDao scheduleDao )
+    {
+        this.scheduleDao = scheduleDao;
+    }
+
+    public SystemConfigurationDao getSystemConfigurationDao()
     {
-        this.store = store;
+        return systemConfigurationDao;
     }
 
-    public ContinuumStore getStore()
+    public void setSystemConfigurationDao( SystemConfigurationDao systemConfigurationDao )
     {
-        return store;
+        this.systemConfigurationDao = systemConfigurationDao;
     }
 
     public ContinuumConfiguration getConfiguration()
@@ -319,13 +335,13 @@
 
         try
         {
-            systemConf = getStore().getSystemConfiguration();
+            systemConf = getSystemConfigurationDao().getSystemConfiguration();
 
             if ( systemConf == null )
             {
                 systemConf = new SystemConfiguration();
 
-                systemConf = getStore().addSystemConfiguration( systemConf );
+                systemConf = getSystemConfigurationDao().addSystemConfiguration( systemConf );
             }
 
             loaded = true;
@@ -350,7 +366,7 @@
         configuration.save();
         try
         {
-            getStore().updateSystemConfiguration( systemConf );
+            getSystemConfigurationDao().updateSystemConfiguration( systemConf );
         }
         catch ( ContinuumStoreException e )
         {
@@ -362,13 +378,13 @@
         throws ContinuumStoreException, ConfigurationLoadingException, ContinuumConfigurationException
     {
         // Schedule
-        Schedule defaultSchedule = getStore().getScheduleByName( DEFAULT_SCHEDULE_NAME );
+        Schedule defaultSchedule = scheduleDao.getScheduleByName( DEFAULT_SCHEDULE_NAME );
 
         if ( defaultSchedule == null )
         {
             defaultSchedule = createDefaultSchedule();
 
-            defaultSchedule = getStore().addSchedule( defaultSchedule );
+            defaultSchedule = scheduleDao.addSchedule( defaultSchedule );
         }
 
         return defaultSchedule;

Modified: continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml (original)
+++ continuum/trunk/continuum-commons/src/main/resources/META-INF/spring-context.xml Fri Aug  8 13:48:14 2008
@@ -26,7 +26,8 @@
   <bean id="configurationService" class="org.apache.maven.continuum.configuration.DefaultConfigurationService"
         init-method="initialize">
     <property name="applicationHome" value="target"/>
-    <property name="store" ref="continuumStore#jdo"/>
+    <property name="scheduleDao" ref="scheduleDao"/>
+    <property name="systemConfigurationDao" ref="systemConfigurationDao"/>
     <property name="configuration" ref="continuumConfiguration"/>
   </bean>
   <bean id="workingDirectoryService" class="org.apache.maven.continuum.utils.DefaultWorkingDirectoryService">

Modified: continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/pom.xml?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-core/pom.xml (original)
+++ continuum/trunk/continuum-core/pom.xml Fri Aug  8 13:48:14 2008
@@ -296,48 +296,6 @@
   </build>
   <profiles>
     <profile>
-      <id>default</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <build>
-        <plugins>
-          <plugin>
-            <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <argLine>-Xmx512m</argLine>
-              <childDelegation>true</childDelegation>
-              <excludes>
-                <exclude>**/BuildProjectTaskExecutorTest.java</exclude>
-              </excludes>
-              <systemProperties>
-                <property>
-                  <name>JAVA_HOME</name>
-                  <value>${java.home}</value>    
-                </property>
-                <property>
-                  <name>M2_HOME</name>
-                  <value>${maven.home}</value>    
-                </property>                      
-                <property>
-                  <name>plexus.home</name>
-                  <!-- ${project.build.directory} is not evaluated see surefire documentation -->
-                  <!--value>${project.build.directory}</value-->
-                  <value>./target</value>
-                </property>
-                <property>
-                  <!-- java.io.tmpdir is a shared directory on solaris and cause permission issues -->
-                  <name>java.io.tmpdir</name>
-                  <value>./target</value>
-                </property> 
-              </systemProperties>
-            </configuration>
-          </plugin>
-        </plugins>
-      </build>
-    </profile>
-    <profile>
       <id>it</id>
       <build>
         <plugins>

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/purge/DefaultContinuumPurgeManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/purge/DefaultContinuumPurgeManager.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/purge/DefaultContinuumPurgeManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/purge/DefaultContinuumPurgeManager.java Fri Aug  8 13:48:14 2008
@@ -19,22 +19,16 @@
  * under the License.
  */
 
-import java.util.ArrayList;
-import java.util.List;
-
 import org.apache.commons.lang.ArrayUtils;
+import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
-import org.apache.continuum.purge.ContinuumPurgeManager;
-import org.apache.continuum.purge.ContinuumPurgeManagerException;
-import org.apache.continuum.purge.PurgeConfigurationService;
 import org.apache.continuum.purge.task.PurgeTask;
 import org.apache.maven.continuum.buildqueue.BuildProjectTask;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.release.tasks.PerformReleaseProjectTask;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
@@ -47,40 +41,43 @@
 import org.codehaus.plexus.taskqueue.TaskQueueException;
 import org.codehaus.plexus.taskqueue.execution.TaskQueueExecutor;
 
+import java.util.ArrayList;
+import java.util.List;
+
 /**
  * DefaultContinuumPurgeManager
- * 
+ *
  * @author Maria Catherine Tan
  * @version $Id$
- * @since 25 jul 07
  * @plexus.component role="org.apache.continuum.purge.ContinuumPurgeManager" role-hint="default"
+ * @since 25 jul 07
  */
 public class DefaultContinuumPurgeManager
     implements ContinuumPurgeManager, Contextualizable
 {
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
-    
+    private ProjectDao projectDao;
+
     /**
      * @plexus.requirement role-hint="purge"
      */
     private TaskQueue purgeQueue;
-    
+
     /**
      * @plexus.requirement
      */
     private PurgeConfigurationService purgeConfigurationService;
-    
+
     private PlexusContainer container;
-    
+
     public void purge( Schedule schedule )
         throws ContinuumPurgeManagerException
     {
         List<RepositoryPurgeConfiguration> repoPurgeList = null;
         List<DirectoryPurgeConfiguration> dirPurgeList = null;
-        
+
         repoPurgeList = purgeConfigurationService.getRepositoryPurgeConfigurationsBySchedule( schedule.getId() );
         dirPurgeList = purgeConfigurationService.getDirectoryPurgeConfigurationsBySchedule( schedule.getId() );
 
@@ -91,7 +88,7 @@
                 purgeRepository( repoPurge );
             }
         }
-        
+
         if ( dirPurgeList != null && dirPurgeList.size() > 0 )
         {
             for ( DirectoryPurgeConfiguration dirPurge : dirPurgeList )
@@ -100,13 +97,13 @@
             }
         }
     }
-    
+
     public boolean isRepositoryInPurgeQueue( int repositoryId )
         throws ContinuumPurgeManagerException
     {
-        List<RepositoryPurgeConfiguration> repoPurgeConfigs = 
+        List<RepositoryPurgeConfiguration> repoPurgeConfigs =
             purgeConfigurationService.getRepositoryPurgeConfigurationsByRepository( repositoryId );
-            
+
         for ( RepositoryPurgeConfiguration repoPurge : repoPurgeConfigs )
         {
             if ( isInPurgeQueue( repoPurge.getId() ) )
@@ -116,21 +113,21 @@
         }
         return false;
     }
-    
+
     public boolean isRepositoryInUse( int repositoryId )
         throws ContinuumPurgeManagerException
     {
         try
         {
             Task task = getCurrentTask( "build-project" );
-        
+
             if ( task != null && task instanceof BuildProjectTask )
             {
-                int projectId = ((BuildProjectTask) task).getProjectId();
-        
-                Project project = store.getProject( projectId );
+                int projectId = ( (BuildProjectTask) task ).getProjectId();
+
+                Project project = projectDao.getProject( projectId );
                 LocalRepository repository = project.getProjectGroup().getLocalRepository();
-                
+
                 if ( repository != null && repository.getId() == repositoryId )
                 {
                     return true;
@@ -147,15 +144,15 @@
     public void removeRepositoryFromPurgeQueue( int repositoryId )
         throws ContinuumPurgeManagerException
     {
-        List<RepositoryPurgeConfiguration> repoPurgeConfigs = 
+        List<RepositoryPurgeConfiguration> repoPurgeConfigs =
             purgeConfigurationService.getRepositoryPurgeConfigurationsByRepository( repositoryId );
-            
+
         for ( RepositoryPurgeConfiguration repoPurge : repoPurgeConfigs )
         {
             removeFromPurgeQueue( repoPurge.getId() );
         }
     }
-    
+
     public boolean removeFromPurgeQueue( int[] purgeConfigIds )
         throws ContinuumPurgeManagerException
     {
@@ -163,16 +160,16 @@
         {
             return false;
         }
-        
+
         if ( purgeConfigIds.length < 1 )
         {
             return false;
         }
-        
+
         List<PurgeTask> queue = getAllPurgeConfigurationsInPurgeQueue();
-        
+
         List<PurgeTask> tasks = new ArrayList<PurgeTask>();
-        
+
         for ( PurgeTask task : queue )
         {
             if ( task != null )
@@ -183,20 +180,20 @@
                 }
             }
         }
-        
+
         if ( !tasks.isEmpty() )
         {
             return purgeQueue.removeAll( tasks );
         }
-    
+
         return false;
     }
-    
+
     public boolean removeFromPurgeQueue( int purgeConfigId )
         throws ContinuumPurgeManagerException
     {
         List<PurgeTask> queue = getAllPurgeConfigurationsInPurgeQueue();
-        
+
         for ( PurgeTask task : queue )
         {
             if ( task != null && task.getPurgeConfigurationId() == purgeConfigId )
@@ -213,10 +210,9 @@
         try
         {
             LocalRepository repository = repoPurge.getRepository();
-            
+
             // do not purge if repository is in use and if repository is already in purge queue
-            if ( !isRepositoryInUse( repository.getId() ) && 
-                 !isInPurgeQueue( repoPurge.getId() ) )
+            if ( !isRepositoryInUse( repository.getId() ) && !isInPurgeQueue( repoPurge.getId() ) )
             {
                 purgeQueue.put( new PurgeTask( repoPurge.getId() ) );
             }
@@ -226,7 +222,7 @@
             throw new ContinuumPurgeManagerException( "Error while enqueuing repository", e );
         }
     }
-    
+
     public void purgeDirectory( DirectoryPurgeConfiguration dirPurge )
         throws ContinuumPurgeManagerException
     {
@@ -245,17 +241,17 @@
                 // do not purge if build in progress
                 if ( !buildInProgress() && !isInPurgeQueue( dirPurge.getId() ) )
                 {
-                    purgeQueue.put(  new PurgeTask( dirPurge.getId() ) );
+                    purgeQueue.put( new PurgeTask( dirPurge.getId() ) );
                 }
             }
-            
+
         }
         catch ( TaskQueueException e )
         {
             throw new ContinuumPurgeManagerException( "Error while enqueuing repository", e );
         }
     }
-    
+
     public void contextualize( Context context )
         throws ContextException
     {
@@ -266,17 +262,17 @@
         throws ContinuumPurgeManagerException
     {
         List<PurgeTask> queue = getAllPurgeConfigurationsInPurgeQueue();
-        
+
         for ( PurgeTask task : queue )
         {
-            if ( task != null && task.getPurgeConfigurationId() == purgeConfigId)
+            if ( task != null && task.getPurgeConfigurationId() == purgeConfigId )
             {
                 return true;
             }
         }
         return false;
     }
-    
+
     private List<PurgeTask> getAllPurgeConfigurationsInPurgeQueue()
         throws ContinuumPurgeManagerException
     {
@@ -289,7 +285,7 @@
             throw new ContinuumPurgeManagerException( "Error while getting the purge configs in purge queue", e );
         }
     }
-    
+
     private Task getCurrentTask( String task )
         throws ContinuumPurgeManagerException
     {
@@ -303,30 +299,30 @@
             throw new ContinuumPurgeManagerException( "Unable to lookup current task", e );
         }
     }
-    
-    private boolean buildInProgress() 
+
+    private boolean buildInProgress()
         throws ContinuumPurgeManagerException
     {
         Task task = getCurrentTask( "build-project" );
-        
+
         if ( task != null && task instanceof BuildProjectTask )
         {
             return true;
         }
-        
+
         return false;
     }
-    
+
     private boolean releaseInProgress()
         throws ContinuumPurgeManagerException
     {
         Task task = getCurrentTask( "perform-release" );
-        
+
         if ( task != null && task instanceof PerformReleaseProjectTask )
         {
             return true;
         }
-        
+
         return false;
     }
 }
\ No newline at end of file

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java Fri Aug  8 13:48:14 2008
@@ -19,61 +19,71 @@
  * under the License.
  */
 
-import java.util.List;
-
+import org.apache.continuum.dao.LocalRepositoryDao;
+import org.apache.continuum.dao.ProjectGroupDao;
+import org.apache.continuum.dao.RepositoryPurgeConfigurationDao;
 import org.apache.continuum.model.repository.LocalRepository;
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.continuum.purge.ContinuumPurgeManager;
 import org.apache.continuum.purge.ContinuumPurgeManagerException;
-import org.apache.continuum.repository.RepositoryService;
-import org.apache.continuum.repository.RepositoryServiceException;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 
+import java.util.List;
+
 /**
  * DefaultRepositoryService
- * 
+ *
  * @author Maria Catherine Tan
  * @version $Id$
- * @since 25 jul 07
  * @plexus.component role="org.apache.continuum.repository.RepositoryService" role-hint="default"
+ * @since 25 jul 07
  */
 public class DefaultRepositoryService
     extends AbstractLogEnabled
     implements RepositoryService
 {
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
+     */
+    private LocalRepositoryDao localRepositoryDao;
+
+    /**
+     * @plexus.requirement
      */
-    private ContinuumStore store;
-    
+    private RepositoryPurgeConfigurationDao repositoryPurgeConfigurationDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectGroupDao projectGroupDao;
+
     /**
      * @plexus.requirement
      */
     private ContinuumPurgeManager purgeManager;
-    
+
     public LocalRepository addLocalRepository( LocalRepository localRepository )
         throws RepositoryServiceException
     {
         LocalRepository repository = null;
-        
+
         try
         {
             localRepository.setName( localRepository.getName().trim() );
             localRepository.setLocation( localRepository.getLocation().trim() );
-            
-            repository = store.addLocalRepository( localRepository );
-            
+
+            repository = localRepositoryDao.addLocalRepository( localRepository );
+
             getLogger().info( "Added new local repository: " + repository.getName() );
         }
         catch ( ContinuumStoreException e )
         {
             throw new RepositoryServiceException( "Unable to add the requested local repository", e );
         }
-        
+
         return repository;
     }
 
@@ -83,30 +93,30 @@
         try
         {
             LocalRepository repository = getLocalRepository( repositoryId );
-            
+
             if ( purgeManager.isRepositoryInUse( repositoryId ) )
             {
                 return;
             }
-            
+
             if ( purgeManager.isRepositoryInPurgeQueue( repositoryId ) )
             {
                 purgeManager.removeRepositoryFromPurgeQueue( repositoryId );
             }
-            
+
             getLogger().info( "Remove purge configurations of " + repository.getName() );
             removePurgeConfigurationsOfRepository( repositoryId );
-            
-            List<ProjectGroup> groups = store.getProjectGroupByRepository( repositoryId );
-            
-            for( ProjectGroup group : groups )
+
+            List<ProjectGroup> groups = projectGroupDao.getProjectGroupByRepository( repositoryId );
+
+            for ( ProjectGroup group : groups )
             {
                 group.setLocalRepository( null );
-                store.updateProjectGroup( group );
+                projectGroupDao.updateProjectGroup( group );
             }
-            
-            store.removeLocalRepository( repository );
-            
+
+            localRepositoryDao.removeLocalRepository( repository );
+
             getLogger().info( "Removed local repository: " + repository.getName() );
         }
         catch ( ContinuumPurgeManagerException e )
@@ -115,7 +125,7 @@
         }
         catch ( ContinuumStoreException e )
         {
-            throw new RepositoryServiceException( "Unable to delete the requested local repository", e ); 
+            throw new RepositoryServiceException( "Unable to delete the requested local repository", e );
         }
     }
 
@@ -124,16 +134,16 @@
     {
         localRepository.setName( localRepository.getName().trim() );
         localRepository.setLocation( localRepository.getLocation().trim() );
-        
+
         try
         {
             if ( purgeManager.isRepositoryInUse( localRepository.getId() ) )
             {
                 return;
             }
-            
-            store.updateLocalRepository( localRepository );
-            
+
+            localRepositoryDao.updateLocalRepository( localRepository );
+
             getLogger().info( "Updated local repository: " + localRepository.getName() );
         }
         catch ( ContinuumPurgeManagerException e )
@@ -145,15 +155,15 @@
             throw new RepositoryServiceException( "Unable to update the requested local repository", e );
         }
     }
-    
+
     public List<LocalRepository> getAllLocalRepositories()
     {
-        return store.getAllLocalRepositories();
+        return localRepositoryDao.getAllLocalRepositories();
     }
 
     public List<LocalRepository> getLocalRepositoriesByLayout( String layout )
     {
-        return store.getLocalRepositoriesByLayout( layout );
+        return localRepositoryDao.getLocalRepositoriesByLayout( layout );
     }
 
     public LocalRepository getLocalRepositoryByLocation( String location )
@@ -161,7 +171,7 @@
     {
         try
         {
-            return store.getLocalRepositoryByLocation( location );
+            return localRepositoryDao.getLocalRepositoryByLocation( location );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -172,13 +182,13 @@
             throw new RepositoryServiceException( "Unable to retrieve local repository by location: " + location, e );
         }
     }
-    
+
     public LocalRepository getLocalRepository( int repositoryId )
         throws RepositoryServiceException
     {
         try
         {
-            return store.getLocalRepository( repositoryId );
+            return localRepositoryDao.getLocalRepository( repositoryId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -189,18 +199,18 @@
             throw new RepositoryServiceException( "Unable to retrieve local repository: " + repositoryId, e );
         }
     }
-    
+
     private void removePurgeConfigurationsOfRepository( int repositoryId )
         throws RepositoryServiceException
     {
         try
         {
-            List<RepositoryPurgeConfiguration> purgeConfigs = 
-                store.getRepositoryPurgeConfigurationsByLocalRepository( repositoryId );
-            
-            for( RepositoryPurgeConfiguration purgeConfig : purgeConfigs )
+            List<RepositoryPurgeConfiguration> purgeConfigs =
+                repositoryPurgeConfigurationDao.getRepositoryPurgeConfigurationsByLocalRepository( repositoryId );
+
+            for ( RepositoryPurgeConfiguration purgeConfig : purgeConfigs )
             {
-                store.removeRepositoryPurgeConfiguration( purgeConfig );
+                repositoryPurgeConfigurationDao.removeRepositoryPurgeConfiguration( purgeConfig );
             }
         }
         catch ( ContinuumObjectNotFoundException e )
@@ -209,8 +219,8 @@
         }
         catch ( ContinuumStoreException e )
         {
-            throw new RepositoryServiceException( "Error while removing purge configurations of local repository: " 
-                                                  + repositoryId, e );
+            throw new RepositoryServiceException(
+                "Error while removing purge configurations of local repository: " + repositoryId, e );
         }
     }
 }
\ No newline at end of file

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java Fri Aug  8 13:48:14 2008
@@ -19,22 +19,15 @@
  * under the License.
  */
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.configuration.ContinuumConfigurationException;
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.BuildResultDao;
+import org.apache.continuum.dao.DaoUtils;
+import org.apache.continuum.dao.NotifierDao;
+import org.apache.continuum.dao.ProjectDao;
+import org.apache.continuum.dao.ProjectGroupDao;
+import org.apache.continuum.dao.ScheduleDao;
 import org.apache.continuum.purge.ContinuumPurgeManager;
 import org.apache.continuum.repository.RepositoryService;
 import org.apache.maven.continuum.build.settings.SchedulesActivationException;
@@ -70,7 +63,6 @@
 import org.apache.maven.continuum.release.ContinuumReleaseManager;
 import org.apache.maven.continuum.scm.queue.CheckOutTask;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ProjectSorter;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
@@ -99,6 +91,20 @@
 import org.codehaus.plexus.util.StringUtils;
 import org.codehaus.plexus.util.dag.CycleDetectedException;
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l </a>
@@ -120,9 +126,39 @@
     private ConfigurationService configurationService;
 
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
+     */
+    private DaoUtils daoUtils;
+
+    /**
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private BuildResultDao buildResultDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private NotifierDao notifierDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectDao projectDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ProjectGroupDao projectGroupDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ScheduleDao scheduleDao;
 
     /**
      * @plexus.requirement
@@ -197,12 +233,12 @@
      * @plexus.requirement
      */
     private ContinuumPurgeManager purgeManager;
-    
+
     /**
      * @plexus.requirement
      */
     private RepositoryService repositoryService;
-    
+
     public DefaultContinuum()
     {
         Runtime.getRuntime().addShutdownHook( new Thread()
@@ -235,12 +271,12 @@
     {
         return actionManager;
     }
-    
+
     public ContinuumPurgeManager getPurgeManager()
     {
         return purgeManager;
     }
-    
+
     public RepositoryService getRepositoryService()
     {
         return repositoryService;
@@ -254,7 +290,7 @@
     {
         try
         {
-            return store.getProjectGroup( projectGroupId );
+            return projectGroupDao.getProjectGroup( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -271,7 +307,7 @@
     {
         try
         {
-            return store.getProjectGroupWithProjects( projectGroupId );
+            return projectGroupDao.getProjectGroupWithProjects( projectGroupId );
         }
         catch ( ContinuumStoreException e )
         {
@@ -284,7 +320,7 @@
     {
         try
         {
-            return store.getProjectGroupByProjectId( projectId );
+            return projectGroupDao.getProjectGroupByProjectId( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -311,7 +347,7 @@
         context.put( AbstractContinuumAction.KEY_PROJECT_GROUP_ID, new Integer( projectGroup.getId() ) );
         executeAction( "remove-assignable-roles", context );
 
-        store.removeProjectGroup( projectGroup );
+        projectGroupDao.removeProjectGroup( projectGroup );
     }
 
     public void addProjectGroup( ProjectGroup projectGroup )
@@ -321,7 +357,7 @@
 
         try
         {
-            pg = store.getProjectGroupByGroupId( projectGroup.getGroupId() );
+            pg = projectGroupDao.getProjectGroupByGroupId( projectGroup.getGroupId() );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -339,7 +375,7 @@
             projectGroup.setName( projectGroup.getName().trim() );
             try
             {
-                ProjectGroup new_pg = store.addProjectGroup( projectGroup );
+                ProjectGroup new_pg = projectGroupDao.addProjectGroup( projectGroup );
 
                 buildDefinitionService.addBuildDefinitionTemplateToProjectGroup( new_pg.getId(), buildDefinitionService
                     .getDefaultMavenTwoBuildDefinitionTemplate() );
@@ -369,7 +405,7 @@
 
     public List<ProjectGroup> getAllProjectGroups()
     {
-        return new ArrayList<ProjectGroup>( store.getAllProjectGroups() );
+        return new ArrayList<ProjectGroup>( projectGroupDao.getAllProjectGroups() );
     }
 
     public ProjectGroup getProjectGroupByGroupId( String groupId )
@@ -377,7 +413,7 @@
     {
         try
         {
-            return store.getProjectGroupByGroupId( groupId );
+            return projectGroupDao.getProjectGroupByGroupId( groupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -394,7 +430,7 @@
     {
         try
         {
-            return store.getProjectGroupByGroupIdWithBuildDetails( groupId );
+            return projectGroupDao.getProjectGroupByGroupIdWithBuildDetails( groupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -405,10 +441,10 @@
             throw new ContinuumException( "Error retrieving", e );
         }
     }
-    
+
     public List<ProjectGroup> getAllProjectGroupsWithRepository( int repositoryId )
     {
-        return store.getProjectGroupByRepository( repositoryId );
+        return projectGroupDao.getProjectGroupByRepository( repositoryId );
     }
 
     // ----------------------------------------------------------------------
@@ -418,18 +454,18 @@
     public Collection<Project> getProjects()
         throws ContinuumException
     {
-        return store.getAllProjectsByName();
+        return projectDao.getAllProjectsByName();
     }
 
     public Collection<Project> getProjectsWithDependencies()
         throws ContinuumException
     {
-        return store.getAllProjectsByNameWithDependencies();
+        return projectDao.getAllProjectsByNameWithDependencies();
     }
 
     public Map<Integer, BuildResult> getLatestBuildResults( int projectGroupId )
     {
-        Map<Integer, BuildResult> result = store.getLatestBuildResultsByProjectGroupId( projectGroupId );
+        Map<Integer, BuildResult> result = buildResultDao.getLatestBuildResultsByProjectGroupId( projectGroupId );
 
         if ( result == null )
         {
@@ -441,7 +477,7 @@
 
     public Map<Integer, BuildResult> getLatestBuildResults()
     {
-        Map<Integer, BuildResult> result = store.getLatestBuildResults();
+        Map<Integer, BuildResult> result = buildResultDao.getLatestBuildResults();
 
         if ( result == null )
         {
@@ -453,7 +489,7 @@
 
     public Map<Integer, BuildResult> getBuildResultsInSuccess( int projectGroupId )
     {
-        Map<Integer, BuildResult> result = store.getBuildResultsInSuccessByProjectGroupId( projectGroupId );
+        Map<Integer, BuildResult> result = buildResultDao.getBuildResultsInSuccessByProjectGroupId( projectGroupId );
 
         if ( result == null )
         {
@@ -465,7 +501,7 @@
 
     public Map<Integer, BuildResult> getBuildResultsInSuccess()
     {
-        Map<Integer, BuildResult> result = store.getBuildResultsInSuccess();
+        Map<Integer, BuildResult> result = buildResultDao.getBuildResultsInSuccess();
 
         if ( result == null )
         {
@@ -477,13 +513,13 @@
 
     public BuildResult getLatestBuildResultForProject( int projectId )
     {
-        return store.getLatestBuildResultForProject( projectId );
+        return buildResultDao.getLatestBuildResultForProject( projectId );
     }
 
     public BuildResult getBuildResultByBuildNumber( int projectId, int buildNumber )
         throws ContinuumException
     {
-        List<BuildResult> builds = store.getBuildResultByBuildNumber( projectId, buildNumber );
+        List<BuildResult> builds = buildResultDao.getBuildResultByBuildNumber( projectId, buildNumber );
 
         if ( builds.isEmpty() )
         {
@@ -793,7 +829,7 @@
                 BuildResult br = (BuildResult) o;
                 //Remove all modified dependencies to prevent SQL errors
                 br.setModifiedDependencies( null );
-                store.updateBuildResult( br );
+                buildResultDao.updateBuildResult( br );
                 removeBuildResult( br );
             }
 
@@ -805,7 +841,7 @@
 
             FileUtils.deleteDirectory( buildOutputDirectory );
 
-            store.removeProject( store.getProject( projectId ) );
+            projectDao.removeProject( projectDao.getProject( projectId ) );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -835,7 +871,7 @@
     {
         try
         {
-            return store.getProject( projectId );
+            return projectDao.getProject( projectId );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -848,7 +884,7 @@
     {
         try
         {
-            return store.getProjectWithBuildDetails( projectId );
+            return projectDao.getProjectWithBuildDetails( projectId );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -859,7 +895,7 @@
     public Collection<Project> getAllProjects( int start, int end )
         throws ContinuumException
     {
-        return store.getAllProjectsByName();
+        return projectDao.getAllProjectsByName();
     }
 
     // ----------------------------------------------------------------------
@@ -906,7 +942,7 @@
 
             try
             {
-                buildDefId = new Integer( store.getDefaultBuildDefinition( project.getId() ).getId() );
+                buildDefId = new Integer( buildDefinitionDao.getDefaultBuildDefinition( project.getId() ).getId() );
             }
             catch ( ContinuumStoreException e )
             {
@@ -996,7 +1032,7 @@
 
         try
         {
-            projectsList = getProjectsInBuildOrder( store.getProjectsWithDependenciesByGroupId( projectGroupId ) );
+            projectsList = getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId( projectGroupId ) );
         }
         catch ( CycleDetectedException e )
         {
@@ -1026,7 +1062,7 @@
                 BuildDefinition projectDefaultBD = null;
                 try
                 {
-                    projectDefaultBD = store.getDefaultBuildDefinitionForProject( project.getId() );
+                    projectDefaultBD = buildDefinitionDao.getDefaultBuildDefinitionForProject( project.getId() );
                 }
                 catch ( ContinuumObjectNotFoundException e )
                 {
@@ -1073,7 +1109,7 @@
 
         try
         {
-            projectsMap = store.getAggregatedProjectIdsAndBuildDefinitionIdsBySchedule( schedule.getId() );
+            projectsMap = daoUtils.getAggregatedProjectIdsAndBuildDefinitionIdsBySchedule( schedule.getId() );
 
             if ( projectsMap == null || projectsMap.size() == 0 )
             {
@@ -1162,7 +1198,7 @@
 
         try
         {
-            project = store.getProject( projectId );
+            project = projectDao.getProject( projectId );
         }
         catch ( ContinuumStoreException e )
         {
@@ -1209,18 +1245,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 );
@@ -1236,7 +1272,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 );
@@ -1256,7 +1292,7 @@
     {
         try
         {
-            return store.getBuildResult( buildId );
+            return buildResultDao.getBuildResult( buildId );
         }
         catch ( ContinuumStoreException e )
         {
@@ -1275,7 +1311,7 @@
     private void removeBuildResult( BuildResult buildResult )
         throws ContinuumException
     {
-        store.removeBuildResult( buildResult );
+        buildResultDao.removeBuildResult( buildResult );
 
         // cleanup some files
         try
@@ -1322,7 +1358,7 @@
         throws ContinuumException
     {
         ArrayList<BuildResult> buildResults =
-            new ArrayList<BuildResult>( store.getBuildResultsForProject( projectId, 0 ) );
+            new ArrayList<BuildResult>( buildResultDao.getBuildResultsForProject( projectId, 0 ) );
 
         Collections.reverse( buildResults );
 
@@ -1788,7 +1824,7 @@
             {
                 try
                 {
-                    projectGroup = store.getProjectGroupByGroupId( projectGroup.getGroupId() );
+                    projectGroup = projectGroupDao.getProjectGroupByGroupId( projectGroup.getGroupId() );
 
                     projectGroupId = projectGroup.getId();
 
@@ -1814,7 +1850,7 @@
                 }
             }
 
-            projectGroup = store.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId );
+            projectGroup = projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId );
 
             /* add the project group loaded from database, which has more info, like id */
             result.getProjectGroups().remove( 0 );
@@ -1854,7 +1890,7 @@
 
         try
         {
-            store.updateProjectGroup( projectGroup );
+            projectGroupDao.updateProjectGroup( projectGroup );
 
             for ( Project project : projects )
             {
@@ -1881,7 +1917,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 );
             }
         }
@@ -1991,7 +2027,7 @@
 
         try
         {
-            store.updateProjectGroup( projectGroup );
+            projectGroupDao.updateProjectGroup( projectGroup );
         }
         catch ( ContinuumStoreException cse )
         {
@@ -2099,7 +2135,7 @@
         projectGroup.addNotifier( notif );
         try
         {
-            store.updateProjectGroup( projectGroup );
+            projectGroupDao.updateProjectGroup( projectGroup );
         }
         catch ( ContinuumStoreException cse )
         {
@@ -2190,7 +2226,7 @@
 
                 try
                 {
-                    store.updateProjectGroup( projectGroup );
+                    projectGroupDao.updateProjectGroup( projectGroup );
                 }
                 catch ( ContinuumStoreException cse )
                 {
@@ -2236,7 +2272,7 @@
     {
         try
         {
-            return store.getDefaultBuildDefinition( projectId );
+            return buildDefinitionDao.getDefaultBuildDefinition( projectId );
         }
         catch ( ContinuumObjectNotFoundException cne )
         {
@@ -2254,7 +2290,7 @@
     {
         try
         {
-            return store.getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
+            return buildDefinitionDao.getDefaultBuildDefinitionsForProjectGroup( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException cne )
         {
@@ -2273,7 +2309,7 @@
     {
         try
         {
-            return store.getBuildDefinition( buildDefinitionId );
+            return buildDefinitionDao.getBuildDefinition( buildDefinitionId );
         }
         catch ( ContinuumObjectNotFoundException cne )
         {
@@ -2396,7 +2432,7 @@
     {
         try
         {
-            store.removeBuildDefinition( buildDefinition );
+            buildDefinitionDao.removeBuildDefinition( buildDefinition );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -2413,7 +2449,7 @@
     {
         try
         {
-            return store.getSchedule( scheduleId );
+            return scheduleDao.getSchedule( scheduleId );
         }
         catch ( Exception ex )
         {
@@ -2426,7 +2462,7 @@
     {
         try
         {
-            return store.getScheduleByName( scheduleName );
+            return scheduleDao.getScheduleByName( scheduleName );
         }
         catch ( ContinuumStoreException e )
         {
@@ -2437,7 +2473,7 @@
     public Collection<Schedule> getSchedules()
         throws ContinuumException
     {
-        return store.getAllSchedulesByName();
+        return scheduleDao.getAllSchedulesByName();
     }
 
     public void addSchedule( Schedule schedule )
@@ -2452,7 +2488,7 @@
             throw logAndCreateException( "Can't create schedule. A schedule with the same name already exists.", null );
         }
 
-        s = store.addSchedule( schedule );
+        s = scheduleDao.addSchedule( schedule );
 
         try
         {
@@ -2532,7 +2568,7 @@
 
         try
         {
-            store.removeSchedule( schedule );
+            scheduleDao.removeSchedule( schedule );
         }
         catch ( Exception e )
         {
@@ -2555,7 +2591,7 @@
     {
         try
         {
-            return store.storeSchedule( schedule );
+            return scheduleDao.storeSchedule( schedule );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -2572,7 +2608,7 @@
     {
         try
         {
-            return workingDirectoryService.getWorkingDirectory( store.getProject( projectId ) );
+            return workingDirectoryService.getWorkingDirectory( projectDao.getProject( projectId ) );
         }
         catch ( ContinuumStoreException e )
         {
@@ -2765,7 +2801,7 @@
 
         getLogger().info( "Showing all projects: " );
 
-        for ( Project project : store.getAllProjectsByNameWithBuildDetails() )
+        for ( Project project : projectDao.getAllProjectsByNameWithBuildDetails() )
         {
             for ( ProjectNotifier notifier : (List<ProjectNotifier>) project.getNotifiers() )
             {
@@ -2798,9 +2834,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() )
                     {
@@ -2825,7 +2861,6 @@
         throws ContextException
     {
         container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
-        
     }
 
     public void start()
@@ -2874,9 +2909,9 @@
 
     private void closeStore()
     {
-        if ( store != null )
+        if ( daoUtils != null )
         {
-            store.closeStore();
+            daoUtils.closeStore();
         }
     }
 
@@ -2923,13 +2958,13 @@
 
     public long getNbBuildResultsForProject( int projectId )
     {
-        return store.getNbBuildResultsForProject( projectId );
+        return buildResultDao.getNbBuildResultsForProject( projectId );
     }
 
     public Collection<BuildResult> getBuildResultsForProject( int projectId )
         throws ContinuumException
     {
-        return store.getBuildResultsForProject( projectId );
+        return buildResultDao.getBuildResultsForProject( projectId );
     }
 
     // ----------------------------------------------------------------------
@@ -2990,7 +3025,7 @@
         {
             boolean removeWorkingDirectory = false;
 
-            Project p = store.getProject( project.getId() );
+            Project p = projectDao.getProject( project.getId() );
 
             if ( !p.getScmUrl().equals( project.getScmUrl() ) )
             {
@@ -3022,7 +3057,7 @@
                 project.setScmTag( null );
             }
 
-            store.updateProject( project );
+            projectDao.updateProject( project );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -3041,7 +3076,7 @@
         projectGroup.setName( projectGroup.getName().trim() );
         try
         {
-            store.updateProjectGroup( projectGroup );
+            projectGroupDao.updateProjectGroup( projectGroup );
         }
         catch ( ContinuumStoreException cse )
         {
@@ -3054,7 +3089,7 @@
     {
         try
         {
-            store.removeNotifier( notifier );
+            notifierDao.removeNotifier( notifier );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -3067,7 +3102,7 @@
     {
         try
         {
-            return store.storeNotifier( notifier );
+            return notifierDao.storeNotifier( notifier );
         }
         catch ( ContinuumStoreException ex )
         {
@@ -3085,7 +3120,7 @@
     {
         try
         {
-            return store.getProjectWithCheckoutResult( projectId );
+            return projectDao.getProjectWithCheckoutResult( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3099,7 +3134,7 @@
 
     public List<Project> getAllProjectsWithAllDetails( int start, int end )
     {
-        return store.getAllProjectsWithAllDetails();
+        return projectDao.getAllProjectsWithAllDetails();
     }
 
     public Project getProjectWithAllDetails( int projectId )
@@ -3107,7 +3142,7 @@
     {
         try
         {
-            return store.getProjectWithAllDetails( projectId );
+            return projectDao.getProjectWithAllDetails( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3124,7 +3159,7 @@
     {
         try
         {
-            return store.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId );
+            return projectGroupDao.getProjectGroupWithBuildDetailsByProjectGroupId( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3141,7 +3176,7 @@
     {
         try
         {
-            return store.getProjectWithBuilds( projectId );
+            return projectDao.getProjectWithBuilds( projectId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3156,12 +3191,12 @@
     public Collection<ProjectGroup> getAllProjectGroupsWithProjects()
     {
         //TODO: check why this interface isn't throwing exceptions on this guy
-        return store.getAllProjectGroupsWithProjects();
+        return projectGroupDao.getAllProjectGroupsWithProjects();
     }
 
     public List<ProjectGroup> getAllProjectGroupsWithBuildDetails()
     {
-        return store.getAllProjectGroupsWithBuildDetails();
+        return projectGroupDao.getAllProjectGroupsWithBuildDetails();
     }
 
     public Collection<Project> getProjectsInGroup( int projectGroupId )
@@ -3169,7 +3204,7 @@
     {
         try
         {
-            return store.getProjectsInGroup( projectGroupId );
+            return projectDao.getProjectsInGroup( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3186,7 +3221,7 @@
     {
         try
         {
-            return store.getProjectsInGroupWithDependencies( projectGroupId );
+            return projectDao.getProjectsInGroupWithDependencies( projectGroupId );
         }
         catch ( ContinuumObjectNotFoundException e )
         {
@@ -3266,7 +3301,7 @@
     {
         try
         {
-            return store.getProjectGroupByGroupIdWithProjects( Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID );
+            return projectGroupDao.getProjectGroupByGroupIdWithProjects( Continuum.DEFAULT_PROJECT_GROUP_GROUP_ID );
         }
         catch ( ContinuumObjectNotFoundException e )
         {

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java Fri Aug  8 13:48:14 2008
@@ -19,6 +19,10 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.DirectoryPurgeConfigurationDao;
+import org.apache.continuum.dao.RepositoryPurgeConfigurationDao;
+import org.apache.continuum.dao.ScheduleDao;
 import org.apache.continuum.model.repository.DirectoryPurgeConfiguration;
 import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
 import org.apache.maven.continuum.Continuum;
@@ -27,7 +31,6 @@
 import org.apache.maven.continuum.scheduler.ContinuumBuildJob;
 import org.apache.maven.continuum.scheduler.ContinuumPurgeJob;
 import org.apache.maven.continuum.scheduler.ContinuumSchedulerConstants;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.scheduler.AbstractJob;
@@ -53,9 +56,24 @@
     implements SchedulesActivator
 {
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private DirectoryPurgeConfigurationDao directoryPurgeConfigurationDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private RepositoryPurgeConfigurationDao repositoryPurgeConfigurationDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private ScheduleDao scheduleDao;
 
     /**
      * @plexus.requirement role-hint="default"
@@ -70,7 +88,7 @@
     {
         getLogger().info( "Activating schedules ..." );
 
-        Collection<Schedule> schedules = store.getAllSchedulesByName();
+        Collection<Schedule> schedules = scheduleDao.getAllSchedulesByName();
 
         for ( Schedule schedule : schedules )
         {
@@ -90,7 +108,7 @@
                 {
                     schedule( schedule, continuum, ContinuumBuildJob.class );
                 }
-                
+
                 if ( isScheduleFromPurgeJob( schedule ) )
                 {
                     schedule( schedule, continuum, ContinuumPurgeJob.class );
@@ -104,7 +122,7 @@
 
                 try
                 {
-                    store.storeSchedule( schedule );
+                    scheduleDao.storeSchedule( schedule );
                 }
                 catch ( ContinuumStoreException e1 )
                 {
@@ -124,7 +142,7 @@
         {
             schedule( schedule, continuum, ContinuumBuildJob.class );
         }
-        
+
         if ( isScheduleFromPurgeJob( schedule ) )
         {
             schedule( schedule, continuum, ContinuumPurgeJob.class );
@@ -159,8 +177,7 @@
 
         //the name + group makes the job unique
 
-        JobDetail jobDetail =
-            new JobDetail( schedule.getName(), org.quartz.Scheduler.DEFAULT_GROUP, jobClass );
+        JobDetail jobDetail = new JobDetail( schedule.getName(), org.quartz.Scheduler.DEFAULT_GROUP, jobClass );
 
         jobDetail.setJobDataMap( dataMap );
 
@@ -218,29 +235,31 @@
             throw new SchedulesActivationException( "Cannot unschedule build job \"" + schedule.getName() + "\".", e );
         }
     }
-    
+
     private boolean isScheduleFromBuildJob( Schedule schedule )
     {
-        List<BuildDefinition> buildDef = store.getBuildDefinitionsBySchedule( schedule.getId() );
-        
+        List<BuildDefinition> buildDef = buildDefinitionDao.getBuildDefinitionsBySchedule( schedule.getId() );
+
         if ( buildDef.size() > 0 )
         {
             return true;
         }
-        
+
         return false;
     }
-    
+
     private boolean isScheduleFromPurgeJob( Schedule schedule )
     {
-        List<RepositoryPurgeConfiguration> repoPurgeConfigs = store.getRepositoryPurgeConfigurationsBySchedule( schedule.getId() );
-        List<DirectoryPurgeConfiguration> dirPurgeConfigs = store.getDirectoryPurgeConfigurationsBySchedule( schedule.getId() );
-        
+        List<RepositoryPurgeConfiguration> repoPurgeConfigs =
+            repositoryPurgeConfigurationDao.getRepositoryPurgeConfigurationsBySchedule( schedule.getId() );
+        List<DirectoryPurgeConfiguration> dirPurgeConfigs =
+            directoryPurgeConfigurationDao.getDirectoryPurgeConfigurationsBySchedule( schedule.getId() );
+
         if ( repoPurgeConfigs.size() > 0 || dirPurgeConfigs.size() > 0 )
         {
             return true;
         }
-        
+
         return false;
     }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=684085&r1=684084&r2=684085&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Fri Aug  8 13:48:14 2008
@@ -19,6 +19,9 @@
  * under the License.
  */
 
+import org.apache.continuum.dao.BuildDefinitionDao;
+import org.apache.continuum.dao.BuildResultDao;
+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;
@@ -32,7 +35,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
-import org.apache.maven.continuum.store.ContinuumStore;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.continuum.utils.ContinuumUtils;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
@@ -59,9 +61,19 @@
     implements BuildController
 {
     /**
-     * @plexus.requirement role-hint="jdo"
+     * @plexus.requirement
+     */
+    private BuildDefinitionDao buildDefinitionDao;
+
+    /**
+     * @plexus.requirement
+     */
+    private BuildResultDao buildResultDao;
+
+    /**
+     * @plexus.requirement
      */
-    private ContinuumStore store;
+    private ProjectDao projectDao;
 
     /**
      * @plexus.requirement
@@ -162,7 +174,7 @@
             {
                 try
                 {
-                    context.setBuildResult( store.getBuildResult( Integer.valueOf( s ) ) );
+                    context.setBuildResult( buildResultDao.getBuildResult( Integer.valueOf( s ) ) );
                 }
                 catch ( NumberFormatException e )
                 {
@@ -208,7 +220,7 @@
 
                     if ( s != null )
                     {
-                        BuildResult buildResult = store.getBuildResult( Integer.valueOf( s ) );
+                        BuildResult buildResult = buildResultDao.getBuildResult( Integer.valueOf( s ) );
                         project.setState( buildResult.getState() );
                     }
                     else
@@ -216,7 +228,7 @@
                         project.setState( ContinuumProjectState.ERROR );
                     }
 
-                    store.updateProject( project );
+                    projectDao.updateProject( project );
                 }
                 catch ( ContinuumStoreException e )
                 {
@@ -247,9 +259,9 @@
 
             try
             {
-                store.updateBuildResult( build );
+                buildResultDao.updateBuildResult( build );
 
-                build = store.getBuildResult( build.getId() );
+                build = buildResultDao.getBuildResult( build.getId() );
 
                 context.setBuildResult( build );
             }
@@ -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,13 +339,14 @@
 
         try
         {
-            context.setProject( store.getProject( projectId ) );
+            context.setProject( projectDao.getProject( projectId ) );
 
-            BuildDefinition buildDefinition = store.getBuildDefinition( buildDefinitionId );
+            BuildDefinition buildDefinition = buildDefinitionDao.getBuildDefinition( buildDefinitionId );
 
             context.setBuildDefinition( buildDefinition );
 
-            BuildResult oldBuildResult = store.getLatestBuildResultForBuildDefinition( projectId, buildDefinitionId );
+            BuildResult oldBuildResult =
+                buildResultDao.getLatestBuildResultForBuildDefinition( projectId, buildDefinitionId );
 
             context.setOldBuildResult( oldBuildResult );
 
@@ -534,7 +547,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 +563,7 @@
 
             try
             {
-                store.updateProject( project );
+                projectDao.updateProject( project );
             }
             catch ( ContinuumStoreException e )
             {
@@ -611,7 +624,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,12 +646,13 @@
 
             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 )
                 {
-                    List buildResults = store.getBuildResultsInSuccessForProject( dependencyProject.getId(),
-                                                                                  context.getOldBuildResult().getEndTime() );
+                    List buildResults = buildResultDao.getBuildResultsInSuccessForProject( dependencyProject.getId(),
+                                                                                           context.getOldBuildResult().getEndTime() );
                     if ( buildResults != null && !buildResults.isEmpty() )
                     {
                         getLogger().debug( "Dependency changed: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
@@ -742,9 +756,9 @@
 
         try
         {
-            store.addBuildResult( context.getProject(), build );
+            buildResultDao.addBuildResult( context.getProject(), build );
 
-            build = store.getBuildResult( build.getId() );
+            build = buildResultDao.getBuildResult( build.getId() );
 
             context.setBuildResult( build );
 
@@ -758,7 +772,7 @@
 
     private ScmResult getOldScmResult( int projectId, long fromDate )
     {
-        List<BuildResult> results = store.getBuildResultsForProject( projectId, fromDate );
+        List<BuildResult> results = buildResultDao.getBuildResultsForProject( projectId, fromDate );
 
         ScmResult res = new ScmResult();
 
@@ -854,7 +868,7 @@
 
                 project.setState( build.getState() );
 
-                store.updateProject( project );
+                projectDao.updateProject( project );
 
                 return false;
             }



Mime
View raw message