Package org.apache.archiva.consumers.functors

Examples of org.apache.archiva.consumers.functors.ConsumerWantsFilePredicate


    public void testConsumption()
    {
        File localFile =
            new File( repoLocation, "org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-metadata.xml" );

        ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate();
        BaseFile baseFile = new BaseFile( repoLocation, localFile );
        predicate.setBasefile( baseFile );

        assertFalse( predicate.evaluate( consumer ) );
    }
View Full Code Here


    public void testConsumptionOfOtherMetadata()
    {
        File localFile =
            new File( repoLocation, "org/apache/maven/plugins/maven-plugin-plugin/2.4.1/maven-metadata-central.xml" );

        ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate();
        BaseFile baseFile = new BaseFile( repoLocation, localFile );
        predicate.setBasefile( baseFile );

        assertFalse( predicate.evaluate( consumer ) );
    }
View Full Code Here

            CollectionUtils.forAllDo( selectedInvalidConsumers, triggerBeginScan );

            // yuck. In case you can't read this, it says
            // "process the file if the consumer has it in the includes list, and not in the excludes list"
            BaseFile baseFile = new BaseFile( repository.getLocation(), localFile );
            ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate();
            predicate.setBasefile( baseFile );
            predicate.setCaseSensitive( false );

            ConsumerProcessFileClosure closure = new ConsumerProcessFileClosure();
            closure.setBasefile( baseFile );
            closure.setExecuteOnEntireRepo( false );

            Closure processIfWanted = IfClosure.getInstance( predicate, closure );

            CollectionUtils.forAllDo( selectedKnownConsumers, processIfWanted );

            if ( predicate.getWantedFileCount() <= 0 )
            {
                // Nothing known processed this file.  It is invalid!
                CollectionUtils.forAllDo( selectedInvalidConsumers, closure );
            }
View Full Code Here

        this.consumerProcessFile = new ConsumerProcessFileClosure();
        consumerProcessFile.setExecuteOnEntireRepo( true );
        consumerProcessFile.setConsumerTimings( consumerTimings );
        consumerProcessFile.setConsumerCounts( consumerCounts );

        this.consumerWantsFile = new ConsumerWantsFilePredicate();

        stats = new RepositoryScanStatistics();
        stats.setRepositoryId( repository.getId() );

        Closure triggerBeginScan = new TriggerBeginScanClosure( repository, new Date( System.currentTimeMillis() ), true );
View Full Code Here

        File repoLocation = new File( "target/test-" + getName() + "/test-repo" );

        File localFile = new File( repoLocation, path );

        ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate();
        BaseFile baseFile = new BaseFile( repoLocation, localFile );
        predicate.setBasefile( baseFile );

        assertFalse( predicate.evaluate( repoPurgeConsumer ) );
    }
View Full Code Here

        this.consumerProcessFile = new ConsumerProcessFileClosure();
        consumerProcessFile.setExecuteOnEntireRepo( true );
        consumerProcessFile.setConsumerTimings( consumerTimings );
        consumerProcessFile.setConsumerCounts( consumerCounts );

        this.consumerWantsFile = new ConsumerWantsFilePredicate( repository );

        stats = new RepositoryScanStatistics();
        stats.setRepositoryId( repository.getId() );

        Closure triggerBeginScan =
View Full Code Here

            CollectionUtils.forAllDo( selectedInvalidConsumers, triggerBeginScan );

            // yuck. In case you can't read this, it says
            // "process the file if the consumer has it in the includes list, and not in the excludes list"
            BaseFile baseFile = new BaseFile( repository.getLocation(), localFile );
            ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate( repository );
            predicate.setBasefile( baseFile );
            predicate.setCaseSensitive( false );

            ConsumerProcessFileClosure closure = new ConsumerProcessFileClosure();
            closure.setBasefile( baseFile );
            closure.setExecuteOnEntireRepo( false );

            Closure processIfWanted = IfClosure.getInstance( predicate, closure );

            CollectionUtils.forAllDo( selectedKnownConsumers, processIfWanted );

            if ( predicate.getWantedFileCount() <= 0 )
            {
                // Nothing known processed this file.  It is invalid!
                CollectionUtils.forAllDo( selectedInvalidConsumers, closure );
            }
View Full Code Here

            CollectionUtils.forAllDo( selectedInvalidConsumers, triggerBeginScan );

            // yuck. In case you can't read this, it says
            // "process the file if the consumer has it in the includes list, and not in the excludes list"
            BaseFile baseFile = new BaseFile( repository.getLocation(), localFile );
            ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate( repository );
            predicate.setBasefile( baseFile );
            predicate.setCaseSensitive( false );

            ConsumerProcessFileClosure closure = new ConsumerProcessFileClosure();
            closure.setBasefile( baseFile );
            closure.setExecuteOnEntireRepo( false );

            Closure processIfWanted = IfClosure.getInstance( predicate, closure );

            CollectionUtils.forAllDo( selectedKnownConsumers, processIfWanted );

            if ( predicate.getWantedFileCount() <= 0 )
            {
                // Nothing known processed this file.  It is invalid!
                CollectionUtils.forAllDo( selectedInvalidConsumers, closure );
            }
View Full Code Here

        this.consumerProcessFile = new ConsumerProcessFileClosure();
        consumerProcessFile.setExecuteOnEntireRepo( true );
        consumerProcessFile.setConsumerTimings( consumerTimings );
        consumerProcessFile.setConsumerCounts( consumerCounts );

        this.consumerWantsFile = new ConsumerWantsFilePredicate( repository );

        stats = new RepositoryScanStatistics();
        stats.setRepositoryId( repository.getId() );

        Closure triggerBeginScan =
View Full Code Here

            CollectionUtils.forAllDo( selectedInvalidConsumers, triggerBeginScan );

            // yuck. In case you can't read this, it says
            // "process the file if the consumer has it in the includes list, and not in the excludes list"
            BaseFile baseFile = new BaseFile( repository.getLocation(), localFile );
            ConsumerWantsFilePredicate predicate = new ConsumerWantsFilePredicate( repository );
            predicate.setBasefile( baseFile );
            predicate.setCaseSensitive( false );

            ConsumerProcessFileClosure closure = new ConsumerProcessFileClosure();
            closure.setBasefile( baseFile );
            closure.setExecuteOnEntireRepo( false );

            Closure processIfWanted = IfClosure.getInstance( predicate, closure );

            CollectionUtils.forAllDo( selectedKnownConsumers, processIfWanted );

            if ( predicate.getWantedFileCount() <= 0 )
            {
                // Nothing known processed this file.  It is invalid!
                CollectionUtils.forAllDo( selectedInvalidConsumers, closure );
            }
View Full Code Here

TOP

Related Classes of org.apache.archiva.consumers.functors.ConsumerWantsFilePredicate

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.