}
public void executeTask( Task task )
throws TaskExecutionException
{
RepositoryTask repoTask = (RepositoryTask) task;
if ( StringUtils.isBlank( repoTask.getRepositoryId() ) )
{
throw new TaskExecutionException("Unable to execute RepositoryTask with blank repository Id.");
}
log.info( "Executing task from queue with job name: " + repoTask.getName() );
try
{
ManagedRepositoryConfiguration arepo = archivaConfiguration.getConfiguration().findManagedRepositoryById( repoTask.getRepositoryId() );
if ( arepo == null )
{
throw new TaskExecutionException( "Unable to execute RepositoryTask with invalid repository id: " + repoTask.getRepositoryId() );
}
long sinceWhen = RepositoryScanner.FRESH_SCAN;
List<RepositoryContentStatistics> results = dao.query( new MostRecentRepositoryScanStatistics( arepo.getId() ) );