aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-scheduled
diff options
context:
space:
mode:
authorMaria Odea B. Ching <oching@apache.org>2007-10-21 17:30:07 +0000
committerMaria Odea B. Ching <oching@apache.org>2007-10-21 17:30:07 +0000
commit21a61ab5f9c0a139bb25a64c7d8136af6a00dc96 (patch)
treea461952e7cada7b45eca459e7089262f1121adc0 /archiva-scheduled
parent1d6c1b9d0aab92bf85ec37dc24900bf890410838 (diff)
downloadarchiva-21a61ab5f9c0a139bb25a64c7d8136af6a00dc96.tar.gz
archiva-21a61ab5f9c0a139bb25a64c7d8136af6a00dc96.zip
[MRM-265]
- added method for deleting the artifacts in the db when a repo is deleted - also deleted repo scan statistics when the repo is deleted - created DAO that does retrieving, deleting and adding of RepositoryContentStatistics to the db - added and updated tests git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@586919 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-scheduled')
-rw-r--r--archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java
index 6ce703f9c..62e024488 100644
--- a/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java
+++ b/archiva-scheduled/src/main/java/org/apache/maven/archiva/scheduled/executors/ArchivaRepositoryScanningTaskExecutor.java
@@ -24,6 +24,7 @@ import org.apache.commons.lang.StringUtils;
import org.apache.maven.archiva.configuration.ArchivaConfiguration;
import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
import org.apache.maven.archiva.database.ArchivaDAO;
+import org.apache.maven.archiva.database.ArchivaDatabaseException;
import org.apache.maven.archiva.database.constraints.MostRecentRepositoryScanStatistics;
import org.apache.maven.archiva.model.RepositoryContentStatistics;
import org.apache.maven.archiva.repository.RepositoryException;
@@ -114,11 +115,11 @@ public class ArchivaRepositoryScanningTaskExecutor
dbstats.setTotalFileCount( stats.getTotalFileCount() );
dbstats.setWhenGathered( stats.getWhenGathered() );
- dao.save( dbstats );
+ dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( dbstats );
}
catch ( RepositoryException e )
{
throw new TaskExecutionException( "Repository error when executing repository job.", e );
- }
+ }
}
}