Package org.apache.archiva.indexer.search

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


        results.addHit( SearchUtil.getHitId( "org.apache.archiva", "archiva-configuration" ), hit );
       
        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add( "internal" );
       
        SearchFields searchFields = new SearchFields( "org", null, null, null, null, selectedRepos );
       
        userReposControl.expectAndReturn( userRepos.getObservableRepositoryIds( "user" ), selectedRepos );
       
        searchControl.expectAndReturn( search.search( "user", searchFields, limits ), results );
       
View Full Code Here


       
        List<String> selectedRepos = new ArrayList<String>();
        selectedRepos.add( "internal" );
        selectedRepos.add( "snapshots" );
       
        SearchFields searchFields = new SearchFields( "org", null, null, null, null, selectedRepos );
       
        searchControl.expectAndReturn( search.search( "user", searchFields, limits ), results );
       
        searchControl.replay();
       
View Full Code Here

        if ( CollectionUtils.isEmpty( selectedRepos ) )
        {        
            return GlobalResults.ACCESS_TO_NO_REPOS;
        }

        SearchFields searchFields =
            new SearchFields( groupId, artifactId, version, null, className, selectedRepos );
               
        // TODO: add packaging in the list of fields for advanced search (UI)?
        try
        {
            results = getNexusSearch().search( getPrincipal(), searchFields, limits );
View Full Code Here

    {
        if ( StringUtils.isBlank( groupId ) || StringUtils.isBlank( artifactId ) )
        {
            return Collections.emptyList();
        }
        SearchFields searchField = new SearchFields();
        searchField.setGroupId( groupId );
        searchField.setArtifactId( artifactId );
        searchField.setPackaging( StringUtils.isBlank( packaging ) ? "jar" : packaging );
        searchField.setRepositories( getObservableRepos() );

        try
        {
            SearchResults searchResults = repositorySearch.search( getPrincipal(), searchField, null );
            return getArtifacts( searchResults );
View Full Code Here

    {
        if ( searchRequest == null )
        {
            return Collections.emptyList();
        }
        SearchFields searchField = getModelMapper().map( searchRequest, SearchFields.class );
        SearchResultLimits limits = new SearchResultLimits( 0 );

        // if no repos set we use ones available for the user
        if ( searchField.getRepositories() == null || searchField.getRepositories().isEmpty() )
        {
            searchField.setRepositories( getObservableRepos() );
        }

        try
        {
            SearchResults searchResults = repositorySearch.search( getPrincipal(), searchField, limits );
View Full Code Here

    {
        if ( StringUtils.isBlank( groupId ) || StringUtils.isBlank( artifactId ) )
        {
            return Collections.emptyList();
        }
        SearchFields searchField = new SearchFields();
        searchField.setGroupId( groupId );
        searchField.setArtifactId( artifactId );
        searchField.setPackaging( StringUtils.isBlank( packaging ) ? "jar" : packaging );
        searchField.setRepositories( getObservableRepos() );

        try
        {
            SearchResults searchResults = repositorySearch.search( getPrincipal(), searchField, null );
            return getArtifacts( searchResults );
View Full Code Here

    {
        if ( searchRequest == null )
        {
            return Collections.emptyList();
        }
        SearchFields searchField = new BeanReplicator().replicateBean( searchRequest, SearchFields.class );
        SearchResultLimits limits = new SearchResultLimits( 0 );

        try
        {
            SearchResults searchResults = repositorySearch.search( getPrincipal(), searchField, limits );
View Full Code Here

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

        SearchFields searchFields = new SearchFields("org", null, null, null, null, selectedRepos);

        searchControl.expectAndReturn(search.search("user", searchFields, limits), results);

        searchControl.replay();
View Full Code Here

        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);

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

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

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

        SearchFields searchFields = new SearchFields("org", null, null, null, null, selectedRepos);

        searchControl.expectAndReturn(search.search("user", searchFields, limits), results);

        searchControl.replay();
View Full Code Here

TOP

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

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.