Package org.apache.archiva.rest.api.model

Examples of org.apache.archiva.rest.api.model.ArtifactContentEntry


                                                     "org/apache/commons/logging/", testRepoId );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 10 ).contains(
            new ArtifactContentEntry( "org/apache/commons/logging/impl", false, 4, testRepoId ),
            new ArtifactContentEntry( "org/apache/commons/logging/LogSource.class", true, 4, testRepoId ) );
        deleteTestRepo( testRepoId );
    }
View Full Code Here


                if ( StringUtils.isEmpty( filterPath ) && !artifactContentEntryMap.containsKey( entryRootPath )
                    && depth == filterDepth )
                {

                    artifactContentEntryMap.put( entryRootPath,
                                                 new ArtifactContentEntry( entryRootPath, !currentEntry.isDirectory(),
                                                                           depth, repoId ) );
                }
                else
                {
                    if ( StringUtils.startsWith( cleanedEntryName, filterPath ) && ( depth == filterDepth || (
                        !currentEntry.isDirectory() && depth == filterDepth ) ) )
                    {
                        artifactContentEntryMap.put( cleanedEntryName, new ArtifactContentEntry( cleanedEntryName,
                                                                                                 !currentEntry.isDirectory(),
                                                                                                 depth, repoId ) );
                    }
                }
            }
View Full Code Here

        int smallestDepth = Integer.MAX_VALUE;
        Map<Integer, List<ArtifactContentEntry>> perDepthList = new HashMap<Integer, List<ArtifactContentEntry>>();
        for ( Map.Entry<String, ArtifactContentEntry> entry : entries.entrySet() )
        {

            ArtifactContentEntry current = entry.getValue();

            if ( current.getDepth() < smallestDepth )
            {
                smallestDepth = current.getDepth();
            }

            List<ArtifactContentEntry> currentList = perDepthList.get( current.getDepth() );

            if ( currentList == null )
            {
                currentList = new ArrayList<ArtifactContentEntry>();
                currentList.add( current );
                perDepthList.put( current.getDepth(), currentList );
            }
            else
            {
                currentList.add( current );
            }
View Full Code Here

        List<ArtifactContentEntry> artifactContentEntries = browseService.readFileEntries( file, null, "foo" );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
            new ArtifactContentEntry( "org", false, 0, "foo" ),
            new ArtifactContentEntry( "META-INF", false, 0, "foo" ) );

    }
View Full Code Here

        List<ArtifactContentEntry> artifactContentEntries = browseService.readFileEntries( file, "", "foo" );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
            new ArtifactContentEntry( "org", false, 0, "foo" ),
            new ArtifactContentEntry( "META-INF", false, 0, "foo" ) );

    }
View Full Code Here

        List<ArtifactContentEntry> artifactContentEntries = browseService.readFileEntries( file, "/", "foo" );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
            new ArtifactContentEntry( "org", false, 0, "foo" ),
            new ArtifactContentEntry( "META-INF", false, 0, "foo" ) );

    }
View Full Code Here

        List<ArtifactContentEntry> artifactContentEntries = browseService.readFileEntries( file, "org", "foo" );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 1 ).contains(
            new ArtifactContentEntry( "org/apache", false, 1, "foo" ) );

    }
View Full Code Here

            browseService.readFileEntries( file, "org/apache/commons/logging/impl/", "foo" );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 16 ).contains(
            new ArtifactContentEntry( "org/apache/commons/logging/impl/AvalonLogger.class", true, 5, "foo" ) );

    }
View Full Code Here

            browseService.readFileEntries( file, "org/apache/commons/logging/", "foo" );

        log.info( "artifactContentEntries: {}", artifactContentEntries );

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 10 ).contains(
            new ArtifactContentEntry( "org/apache/commons/logging/impl", false, 4, "foo" ),
            new ArtifactContentEntry( "org/apache/commons/logging/LogSource.class", true, 4, "foo" ) );

    }
View Full Code Here

                if ( StringUtils.isEmpty( filterPath ) && !artifactContentEntryMap.containsKey( entryRootPath )
                    && depth == filterDepth )
                {

                    artifactContentEntryMap.put( entryRootPath,
                                                 new ArtifactContentEntry( entryRootPath, !currentEntry.isDirectory(),
                                                                           depth, repoId ) );
                }
                else
                {
                    if ( StringUtils.startsWith( cleanedEntryName, filterPath ) && ( depth == filterDepth || (
                        !currentEntry.isDirectory() && depth == filterDepth ) ) )
                    {
                        artifactContentEntryMap.put( cleanedEntryName, new ArtifactContentEntry( cleanedEntryName,
                                                                                                 !currentEntry.isDirectory(),
                                                                                                 depth, repoId ) );
                    }
                }
            }
View Full Code Here

TOP

Related Classes of org.apache.archiva.rest.api.model.ArtifactContentEntry

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.