Package org.apache.archiva.consumers

Examples of org.apache.archiva.consumers.RepositoryContentConsumer


    {
        boolean satisfies = false;

        if ( object instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) object;
            if ( wantsFile( consumer, FilenameUtils.separatorsToUnix( basefile.getRelativePath() ) ) )
            {
                satisfies = true;
               
                // regardless of the timestamp, we record that it was wanted so it doesn't get counted as invalid
                wantedFileCount++;

                if ( !consumer.isProcessUnmodified() )
                {
                    // Timestamp finished points to the last successful scan, not this current one.
                    if ( basefile.lastModified() < changesSince )
                    {
                        // Skip file as no change has occurred.
View Full Code Here


    public void execute( Object input )
    {
        if ( input instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;

            boolean enabled = this.selectedIds.contains( consumer.getId() );
            AdminRepositoryConsumer adminconsumer = new AdminRepositoryConsumer();
            adminconsumer.setEnabled( enabled );
            adminconsumer.setId( consumer.getId() );
            adminconsumer.setDescription( consumer.getDescription() );

            list.add( adminconsumer );
        }
    }
View Full Code Here

        System.out.println( ".\\ Available Consumer List \\.______________________________" );

        for ( Map.Entry<String, KnownRepositoryContentConsumer> entry : availableConsumers.entrySet() )
        {
            String consumerHint = (String) entry.getKey();
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) entry.getValue();
            System.out.println(
                "  " + consumerHint + ": " + consumer.getDescription() + " (" + consumer.getClass().getName() + ")" );
        }
    }
View Full Code Here

    public void execute( Object input )
    {
        if ( input instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
               
            try
            {
                consumer.beginScan( repository, whenGathered, executeOnEntireRepo );
            }
            catch ( ConsumerException e )
            {
                log.warn( "Consumer [" + consumer.getId() + "] cannot begin: " + e.getMessage(), e );
            }
        }
    }
View Full Code Here

    public void execute( Object input )
    {
        if ( input instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;

            String id = consumer.getId();
            try
            {
                log.debug( "Sending to consumer: {}", id );

                long startTime = System.currentTimeMillis();
                consumer.processFile( basefile.getRelativePath(), executeOnEntireRepo );
                long endTime = System.currentTimeMillis();

                if ( consumerTimings != null )
                {
                    Long value = consumerTimings.get( id );
View Full Code Here

        System.out.println( ".\\ Available Consumer List \\.______________________________" );

        for ( Map.Entry<String, KnownRepositoryContentConsumer> entry : availableConsumers.entrySet() )
        {
            String consumerHint = entry.getKey();
            RepositoryContentConsumer consumer = entry.getValue();
            System.out.println(
                "  " + consumerHint + ": " + consumer.getDescription() + " (" + consumer.getClass().getName() + ")" );
        }
    }
View Full Code Here

    @Override
    public void execute( Object input )
    {
        if ( input instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;

            boolean enabled = this.selectedIds.contains( consumer.getId() );
            AdminRepositoryConsumer adminconsumer = new AdminRepositoryConsumer();
            adminconsumer.setEnabled( enabled );
            adminconsumer.setId( consumer.getId() );
            adminconsumer.setDescription( consumer.getDescription() );

            list.add( adminconsumer );
        }
    }
View Full Code Here

        System.out.println( ".\\ Available Consumer List \\.______________________________" );

        for ( Map.Entry<String, KnownRepositoryContentConsumer> entry : availableConsumers.entrySet() )
        {
            String consumerHint = entry.getKey();
            RepositoryContentConsumer consumer = entry.getValue();
            System.out.println(
                "  " + consumerHint + ": " + consumer.getDescription() + " (" + consumer.getClass().getName() + ")" );
        }
    }
View Full Code Here

    @Override
    public void execute( Object input )
    {
        if ( input instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) input;
            consumer.completeScan( executeOnEntireRepo );
            log.debug( "Consumer [{}] completed for repository [{}]", consumer.getId(), repository.getId() );
        }
    }
View Full Code Here

    {
        boolean satisfies = false;

        if ( object instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) object;
            if ( wantsFile( consumer, FilenameUtils.separatorsToUnix( basefile.getRelativePath() ) ) )
            {
                satisfies = true;

                // regardless of the timestamp, we record that it was wanted so it doesn't get counted as invalid
                wantedFileCount++;

                if ( !consumer.isProcessUnmodified() )
                {
                    // Timestamp finished points to the last successful scan, not this current one.
                    if ( basefile.lastModified() < changesSince )
                    {
                        // Skip file as no change has occurred.
View Full Code Here

TOP

Related Classes of org.apache.archiva.consumers.RepositoryContentConsumer

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.