Package org.apache.archiva.rest.api.services

Examples of org.apache.archiva.rest.api.services.BrowseService


            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, false );

        BrowseResult browseResult = browseService.browseGroupId( "org.apache", testRepoId );
        assertThat( browseResult ).isNotNull();
        assertThat( browseResult.getBrowseResultEntries() ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
            new BrowseResultEntry( "org.apache.felix", false ),
            new BrowseResultEntry( "org.apache.karaf.features", false ) );
View Full Code Here


            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, false );
        BrowseResult browseResult = browseService.browseGroupId( "commons-logging.commons-logging", testRepoId );
        log.info( "browseResult: {}", browseResult );

        deleteTestRepo( testRepoId );

    }
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, false );

        VersionsList versions =
            browseService.getVersionsList( "org.apache.karaf.features", "org.apache.karaf.features.core", testRepoId );
        assertThat( versions ).isNotNull();
        assertThat( versions.getVersions() ).isNotNull().isNotEmpty().hasSize( 2 ).contains( "2.2.1", "2.2.2" );

        deleteTestRepo( testRepoId );
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, true );

        ProjectVersionMetadata metadata =
            browseService.getProjectVersionMetadata( "org.apache.karaf.features", "org.apache.karaf.features.core",
                                                     testRepoId );

        assertThat( metadata ).isNotNull();

        deleteTestRepo( testRepoId );
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<ArtifactContentEntry> artifactContentEntries =
            browseService.getArtifactContentEntries( "commons-logging", "commons-logging", "1.1", null, null, null,
                                                     testRepoId );

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

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<ArtifactContentEntry> artifactContentEntries =
            browseService.getArtifactContentEntries( "commons-logging", "commons-logging", "1.1", null, null, "org/",
                                                     testRepoId );

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

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 1 ).contains(
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, true );

        List<ArtifactContentEntry> artifactContentEntries =
            browseService.getArtifactContentEntries( "commons-logging", "commons-logging", "1.1", null, null,
                                                     "org/apache/commons/logging/", testRepoId );

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

        assertThat( artifactContentEntries ).isNotNull().isNotEmpty().hasSize( 10 ).contains(
View Full Code Here

            }

            createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(),
                                false );

            BrowseService browseService = getBrowseService( authorizationHeader, true );

            List<Artifact> artifactDownloadInfos =
                browseService.getArtifactDownloadInfos( "commons-logging", "commons-logging", "1.1", testRepoId );

            log.info( "artifactDownloadInfos {}", artifactDownloadInfos );
            assertThat( artifactDownloadInfos ).isNotNull().isNotEmpty().hasSize( 3 );
            deleteTestRepo( testRepoId );
        }
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, true );

        WebClient.client( browseService ).accept( MediaType.TEXT_PLAIN );

        try
        {
            String text =
                browseService.getArtifactContentText( "commons-logging", "commons-logging", "1.1", "sources", null,
                                                      "org/apache/commons/logging/LogSource.java",
                                                      testRepoId ).getContent();

            log.debug( "text: {}", text );
View Full Code Here

            assertNotNull( getUserService( authorizationHeader ).createGuestUser() );
        }

        createAndIndexRepo( testRepoId, new File( getBasedir(), "src/test/repo-with-osgi" ).getAbsolutePath(), false );

        BrowseService browseService = getBrowseService( authorizationHeader, true );

        WebClient.client( browseService ).accept( MediaType.TEXT_PLAIN );

        try
        {
            String text =
                browseService.getArtifactContentText( "commons-logging", "commons-logging", "1.1", null, "pom", null,
                                                      testRepoId ).getContent();

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

            assertThat( text ).contains(
View Full Code Here

TOP

Related Classes of org.apache.archiva.rest.api.services.BrowseService

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.