in spring-taskqueue/src/main/java/org/apache/archiva/components/taskqueue/DefaultTaskQueue.java [66:107]
    public boolean put( Task task )
        throws TaskQueueException
    {
        // ----------------------------------------------------------------------
        // Check that all the task entry evaluators accepts the task
        // ----------------------------------------------------------------------
        for ( TaskEntryEvaluator taskEntryEvaluator : taskEntryEvaluators )
        {
            boolean result = taskEntryEvaluator.evaluate( task );
            if ( !result )
            {
                return false;
            }
        }
        // ----------------------------------------------------------------------
        // The task was accepted, enqueue it
        // ----------------------------------------------------------------------
        enqueue( task );
        // ----------------------------------------------------------------------
        // Check that all the task viability evaluators accepts the task
        // ----------------------------------------------------------------------
        for ( TaskViabilityEvaluator taskViabilityEvaluator : taskViabilityEvaluators )
        {
            Collection<Task> toBeRemoved =
                taskViabilityEvaluator.evaluate( Collections.unmodifiableCollection( queue ) );
            for ( Iterator<Task> it = toBeRemoved.iterator( ); it.hasNext( ); )
            {
                Task t = it.next( );
                queue.remove( t );
            }
        }
        return true;
    }