<constructor-arg ref="repositoryContentFactory"/>
<constructor-arg ref="artifactDAO#jdo"/>
<constructor-arg ref="databaseCleanupConsumer#not-present-remove-db-artifact"/>
- <constructor-arg ref="databaseCleanupConsumer#not-present-remove-db-project"/>
+ <constructor-arg ref="databaseCleanupConsumer#not-present-remove-db-project"/>
+ <constructor-arg ref="archivaTaskScheduler"/>
</bean>
<bean name="xmlrpcServicesList" lazy-init="true" scope="singleton" class="java.util.ArrayList">
- <constructor-arg>
- <ref bean="administrationService"/>
- </constructor-arg>
+ <constructor-arg ref="administrationService"/>
</bean>
<bean name="xmlRpcAuthenticator" class="org.apache.archiva.web.xmlrpc.security.XmlRpcAuthenticator">
private RepositoryContentConsumers repoConsumersUtil;
private DatabaseConsumers dbConsumersUtil;
-
- //private ArchivaTaskScheduler taskScheduler;
-
+
private RepositoryContentFactory repoFactory;
private ArtifactDAO artifactDAO;
private DatabaseCleanupConsumer cleanupProjects;
+ private ArchivaTaskScheduler taskScheduler;
+
public AdministrationServiceImpl( ArchivaConfiguration archivaConfig, RepositoryContentConsumers repoConsumersUtil,
DatabaseConsumers dbConsumersUtil, RepositoryContentFactory repoFactory,
ArtifactDAO artifactDAO, DatabaseCleanupConsumer cleanupArtifacts,
- DatabaseCleanupConsumer cleanupProjects )
+ DatabaseCleanupConsumer cleanupProjects, ArchivaTaskScheduler taskScheduler )
{
this.archivaConfiguration = archivaConfig;
this.repoConsumersUtil = repoConsumersUtil;
this.artifactDAO = artifactDAO;
this.cleanupArtifacts = cleanupArtifacts;
this.cleanupProjects = cleanupProjects;
+ this.taskScheduler = taskScheduler;
}
/**
*/
public Boolean executeDatabaseScanner() throws Exception
{
- /*if ( taskScheduler.isProcessingDatabaseTask() )
+ if ( taskScheduler.isProcessingDatabaseTask() )
{
return false;
}
task.setName( DefaultArchivaTaskScheduler.DATABASE_JOB + ":user-requested-via-web-service" );
task.setQueuePolicy( ArchivaTask.QUEUE_POLICY_WAIT );
- taskScheduler.queueDatabaseTask( task ); */
+ taskScheduler.queueDatabaseTask( task );
return new Boolean( true );
}
*/
public Boolean executeRepositoryScanner( String repoId ) throws Exception
{
- /* Configuration config = archivaConfiguration.getConfiguration();
+ Configuration config = archivaConfiguration.getConfiguration();
if( config.findManagedRepositoryById( repoId ) == null )
{
throw new Exception( "Repository does not exist." );
task.setName( DefaultArchivaTaskScheduler.REPOSITORY_JOB + ":" + repoId );
task.setQueuePolicy( ArchivaTask.QUEUE_POLICY_WAIT );
- taskScheduler.queueRepositoryTask( task ); */
+ taskScheduler.queueRepositoryTask( task );
return new Boolean( true );
}
managedRepos.add( repo );
}
- System.out.println( "\n++++++MANAGED REPOS --> " + managedRepos );
-
return managedRepos;
}