Package org.apache.maven.archiva.consumers

Examples of org.apache.maven.archiva.consumers.RepositoryContentConsumer


    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

        for ( Iterator iter = availableConsumers.entrySet().iterator(); iter.hasNext(); )
        {
            Map.Entry entry = (Map.Entry) iter.next();
            String consumerHint = (String) entry.getKey();
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) entry.getValue();
            System.out.println( "  " + consumerHint + ": " + consumer.getDescription() + " ("
                + consumer.getClass().getName() + ")" );
        }
    }
View Full Code Here

    {
        boolean satisfies = false;

        if ( object instanceof RepositoryContentConsumer )
        {
            RepositoryContentConsumer consumer = (RepositoryContentConsumer) object;
            if ( wantsFile( consumer, StringUtils.replace( 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 occured.
View Full Code Here

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

            try
            {
                consumer.beginScan( repository );
            }
            catch ( ConsumerException e )
            {
                logger.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;

            try
            {
                logger.debug( "Sending to consumer: " + consumer.getId() );

                consumer.processFile( basefile.getRelativePath() );
            }
            catch ( Exception e )
            {
                /* Intentionally Catch all exceptions.
                 * So that the discoverer processing can continue.
                 */
                logger.error( "Consumer [" + consumer.getId() + "] had an error when processing file ["
                    + basefile.getAbsolutePath() + "]: " + e.getMessage(), e );
            }
        }
    }
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;

            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

    {
        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 occured.
View Full Code Here

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

TOP

Related Classes of org.apache.maven.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.