Package org.apache.maven.archiva.model

Examples of org.apache.maven.archiva.model.RepositoryContentStatistics


{
    private RepositoryContentStatistics createStats( String repoId, String timestamp, long duration, long totalfiles,
                                                     long newfiles )
        throws Exception
    {
        RepositoryContentStatistics stats = new RepositoryContentStatistics();
        stats.setRepositoryId( repoId );
        stats.setDuration( duration );
        stats.setNewFileCount( newfiles );
        stats.setTotalFileCount( totalfiles );
        stats.setWhenGathered( toDate( timestamp ) );

        return stats;
    }
View Full Code Here


        throws ObjectNotFoundException, ArchivaDatabaseException
    {
        Assert.assertTrue( constraint instanceof RepositoryContentStatisticsByRepositoryConstraint );

        List<RepositoryContentStatistics> stats = new ArrayList<RepositoryContentStatistics>();
        RepositoryContentStatistics statistics = new RepositoryContentStatistics();
        statistics.setRepositoryId( "repo-ident" );
        stats.add( statistics );

        return stats;
    }
View Full Code Here

        return results;
    }

    public RepositoryContentStatistics saveRepositoryContentStatistics( RepositoryContentStatistics stats )
    {
        RepositoryContentStatistics savedStats = (RepositoryContentStatistics) jdo.saveObject( stats );
       
        return savedStats;
    }
View Full Code Here

       

        List<RepositoryContentStatistics> stats = new ArrayList<RepositoryContentStatistics>();
        for ( String repo : configuration.getConfiguration().getManagedRepositoriesAsMap().keySet() )
        {
            RepositoryContentStatistics statistics = new RepositoryContentStatistics();
            statistics.setRepositoryId( repo );
            stats.add( statistics );
        }
        return stats;
    }
View Full Code Here

    }

    private List<RepositoryContentStatistics> createDefaultStats()
    {
        List<RepositoryContentStatistics> stats = new ArrayList<RepositoryContentStatistics>();
        RepositoryContentStatistics statistics = new RepositoryContentStatistics();
        statistics.setRepositoryId( "repo-ident" );
        statistics.setWhenGathered( new Date() );
        stats.add( statistics );
        return stats;
    }
View Full Code Here

        return repoStatsList;
    }

    private RepositoryContentStatistics createRepositoryContentStatistics()
    {
        RepositoryContentStatistics repoStats = new RepositoryContentStatistics();
        repoStats.setRepositoryId( REPO_ID );
        repoStats.setDuration( 1000 );
        repoStats.setTotalArtifactCount( 100 );
        repoStats.setTotalSize( 10 );
        repoStats.setTotalFileCount( 10 );
        repoStats.setTotalProjectCount( 2 );
        repoStats.setTotalGroupCount( 1 );
        repoStats.setNewFileCount( 3 );
        repoStats.setWhenGathered( new Date( System.currentTimeMillis() ) );

        return repoStats;
    }
View Full Code Here

        List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
        InvalidScanConsumer badconsumer = new InvalidScanConsumer();
        invalidConsumers.add( badconsumer );

        RepositoryScanner scanner = lookupRepositoryScanner();
        RepositoryContentStatistics stats =
            scanner.scan( repository, knownConsumers, invalidConsumers, getIgnoreList(), RepositoryScanner.FRESH_SCAN );

        assertNotNull( "Stats should not be null.", stats );
        assertMinimumHits( "Stats.totalFileCount", actualProjectPaths.size(), stats.getTotalFileCount() );
        assertMinimumHits( "Processed Count", actualProjectPaths.size(), consumer.getProcessCount() );
    }
View Full Code Here

        List<InvalidRepositoryContentConsumer> invalidConsumers = new ArrayList<InvalidRepositoryContentConsumer>();
        InvalidScanConsumer badconsumer = new InvalidScanConsumer();
        invalidConsumers.add( badconsumer );

        RepositoryScanner scanner = lookupRepositoryScanner();
        RepositoryContentStatistics stats =
            scanner.scan( repository, knownConsumers, invalidConsumers, getIgnoreList(), RepositoryScanner.FRESH_SCAN );

        assertNotNull( "Stats should not be null.", stats );
        assertMinimumHits( "Stats.totalFileCount", actualArtifactPaths.size(), stats.getTotalFileCount() );
        assertMinimumHits( "Processed Count", actualArtifactPaths.size(), consumer.getProcessCount() );
    }
View Full Code Here

{
    private RepositoryContentStatistics createStats( String repoId, String timestamp, long duration, long totalfiles,
                                                     long newfiles )
        throws Exception
    {
        RepositoryContentStatistics stats = new RepositoryContentStatistics();
        stats.setRepositoryId( repoId );
        stats.setDuration( duration );
        stats.setNewFileCount( newfiles );
        stats.setTotalFileCount( totalfiles );
        stats.setWhenGathered( toDate( timestamp ) );

        return stats;
    }
View Full Code Here

{
    private RepositoryContentStatistics createStats( String repoId, String timestamp, long duration, long totalfiles,
                                                     long newfiles )
        throws Exception
    {
        RepositoryContentStatistics stats = new RepositoryContentStatistics();
        stats.setRepositoryId( repoId );
        stats.setDuration( duration );
        stats.setNewFileCount( newfiles );
        stats.setTotalFileCount( totalfiles );
        stats.setWhenGathered( toDate( timestamp ) );

        return stats;
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.model.RepositoryContentStatistics

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.