Package org.apache.archiva.indexer.search

Examples of org.apache.archiva.indexer.search.SearchResults


        selectedRepos.add("snapshots");

        SearchResultLimits limits = new SearchResultLimits(action.getCurrentPage());
        limits.setPageSize(30);

        SearchResults results = new SearchResults();

        userReposControl.expectAndReturn(userRepos.getObservableRepositoryIds("user"), selectedRepos);

        searchControl.expectAndReturn(search.search("user", selectedRepos, "archiva", limits, null), results);
View Full Code Here


        hit.setArtifactId("archiva-configuration");
        hit.setUrl("url");
        hit.addVersion("1.0");
        hit.addVersion("1.1");

        SearchResults results = new SearchResults();
        results.setLimits(limits);
        results.setTotalHits(1);
        results.addHit(SearchUtil.getHitId("org.apache.archiva", "archiva-configuration", null, "jar"), hit);

        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add("internal");
        selectedRepos.add("snapshots");
View Full Code Here

        hit.setArtifactId("archiva-configuration");
        hit.setUrl("url");
        hit.addVersion("1.0");
        hit.addVersion("1.1");

        SearchResults results = new SearchResults();
        results.setLimits(limits);
        results.setTotalHits(1);
        results.addHit(SearchUtil.getHitId("org.apache.archiva", "archiva-configuration", null, "jar"), hit);

        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add("internal");

        SearchFields searchFields = new SearchFields("org", null, null, null, null, selectedRepos);
View Full Code Here

        action.setGroupId("org");

        SearchResultLimits limits = new SearchResultLimits(action.getCurrentPage());
        limits.setPageSize(30);

        SearchResults results = new SearchResults();

        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add("internal");
        selectedRepos.add("snapshots");
View Full Code Here

        observableRepoIds.add( "repo1.mirror" );
        observableRepoIds.add( "public.releases" );
       
        userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
       
        SearchResults results = new SearchResults();        
        List<String> versions = new ArrayList<String>();
        versions.add( "1.0" );
       
        SearchResultHit resultHit = new SearchResultHit();
        resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
        resultHit.setArtifactId( "archiva-webapp" );       
        resultHit.setVersions( versions );
        resultHit.setRepositoryId( null );
       
        results.addHit( SearchUtil.getHitId( ARCHIVA_TEST_GROUP_ID, "archiva-webapp" ), resultHit );
       
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
       
        searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ), results );
       
View Full Code Here

        observableRepoIds.add( "repo1.mirror" );
        observableRepoIds.add( "public.releases" );
       
        userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
       
        SearchResults results = new SearchResults();       
        List<String> versions = new ArrayList<String>();
        versions.add( "1.0" );
       
        SearchResultHit resultHit = new SearchResultHit();
        resultHit.setRepositoryId( null );
        resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
        resultHit.setArtifactId( ARCHIVA_TEST_ARTIFACT_ID );
        resultHit.setVersions( versions );
       
        results.addHit( SearchUtil.getHitId( ARCHIVA_TEST_GROUP_ID, ARCHIVA_TEST_ARTIFACT_ID ), resultHit );
       
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
       
        searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ), results );
       
View Full Code Here

      List<String> observableRepoIds = new ArrayList<String>();
        observableRepoIds.add( "repo1.mirror" );

        userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
       
        SearchResults results = new SearchResults();       
        List<String> versions = new ArrayList<String>();
        versions.add( "1.0" );
       
        SearchResultHit resultHit = new SearchResultHit();
        resultHit.setRepositoryId( "repo1.mirror" );
        resultHit.setGroupId( "org.apache.archiva" );
        resultHit.setArtifactId( "archiva-test" );
        resultHit.setVersions( versions );

        results.addHit( SearchUtil.getHitId( "org.apache.archiva", "archiva-test" ), resultHit );
       
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
       
        searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ), results );
View Full Code Here

      List<String> observableRepoIds = new ArrayList<String>();
        observableRepoIds.add( "repo1.mirror" );

        userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
       
        SearchResults results = new SearchResults();       
        List<String> versions = new ArrayList<String>();
        versions.add( "1.0" );
       
        SearchResultHit resultHit = new SearchResultHit();
        resultHit.setRepositoryId( "repo1.mirror" );
        resultHit.setGroupId( "org.apache.archiva" );
        resultHit.setArtifactId( "archiva-test" );
        resultHit.setVersions( versions );

        results.addHit( SearchUtil.getHitId( "org.apache.archiva", "archiva-test" ), resultHit );
       
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
       
        searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "archiva", limits, null ), results );
View Full Code Here

        observableRepoIds.add( "repo1.mirror" );
        observableRepoIds.add( "public.releases" );
   
        userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
      
        SearchResults results = new SearchResults();      
        List<String> versions = new ArrayList<String>();
        versions.add( "1.0" );
       
        SearchResultHit resultHit = new SearchResultHit();
        resultHit.setGroupId( ARCHIVA_TEST_GROUP_ID );
        resultHit.setArtifactId( ARCHIVA_TEST_ARTIFACT_ID );
        resultHit.setVersions( versions );
        resultHit.setRepositoryId( null );
       
        results.addHit( SearchUtil.getHitId( resultHit.getGroupId(), resultHit.getArtifactId() ), resultHit );
   
        archivaDAOControl.expectAndReturn( archivaDAO.query( new UniqueVersionConstraint( observableRepoIds, resultHit.getGroupId(),
                                                                                          resultHit.getArtifactId() ) ), null );
       
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
View Full Code Here

        observableRepoIds.add( "repo1.mirror" );
        observableRepoIds.add( "public.releases" );
   
        userReposControl.expectAndReturn( userRepos.getObservableRepositories(), observableRepoIds );
   
        SearchResults results = new SearchResults();
        SearchResultLimits limits = new SearchResultLimits( SearchResultLimits.ALL_PAGES );
   
        searchControl.expectAndDefaultReturn( search.search( "", observableRepoIds, "non-existent", limits, null ), results );
        userReposControl.replay();
        searchControl.replay();
View Full Code Here

TOP

Related Classes of org.apache.archiva.indexer.search.SearchResults

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.