archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/main/java/org/apache/archiva/scheduler/repository/RepositoryTaskJob.java
/**
     * Execute the discoverer and the indexer.
     * 
     * @param context
     * @throws org.quartz.JobExecutionException
     */
Execute the discoverer and the indexer.


Execute the discoverer and the indexer .
@SuppressWarnings( "unchecked" )
    @Override
    public void execute( JobExecutionContext context )
        throws JobExecutionException
    {
        JobDataMap dataMap = context.getJobDetail().getJobDataMap();
        setJobDataMap( dataMap );
        TaskQueue taskQueue = (TaskQueue) dataMap.get( DefaultRepositoryArchivaTaskScheduler.TASK_QUEUE );
        String repositoryId = (String) dataMap.get( DefaultRepositoryArchivaTaskScheduler.TASK_REPOSITORY );
        RepositoryTask task = new RepositoryTask();
        task.setRepositoryId( repositoryId );
        try
        {
            taskQueue.put( task );
        }
        catch ( TaskQueueException e )
        {
            throw new JobExecutionException( e );
        }
    }
@ SuppressWarnings ( "unchecked" ) @ Override public void execute ( JobExecutionContext context ) throws JobExecutionException { JobDataMap dataMap = context . getJobDetail ( ) . getJobDataMap ( ) ; setJobDataMap ( dataMap ) ; TaskQueue taskQueue = ( TaskQueue ) dataMap . get ( DefaultRepositoryArchivaTaskScheduler . TASK_QUEUE ) ; String repositoryId = ( String ) dataMap . get ( DefaultRepositoryArchivaTaskScheduler . TASK_REPOSITORY ) ; RepositoryTask task = new RepositoryTask ( ) ; task . setRepositoryId ( repositoryId ) ; try { taskQueue . put ( task ) ; } catch ( TaskQueueException e ) { throw new JobExecutionException ( e ) ; } }
Execute the discoverer and the indexer.
Execute the discoverer and the indexer .